kitchensync

pluckerpart.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2004 Holger Hans Peter Freyther <freyther@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 */
00020 
00021 
00022 #ifndef KS_PLUCKER_PART_H
00023 #define KS_PLUCKER_PART_H
00024 
00025 #include "pluckerinterface.h"
00026 #include <actionpart.h>
00027 #include <profile.h>
00028 
00029 #include <synceelist.h>
00030 
00031 #include <kaboutdata.h>
00032 
00033 #include <qpixmap.h>
00034 
00035 
00036 class KSPluckerConfigWidget;
00037 class QTextEdit;
00038 class KTempDir;
00039 
00040 using KSync::Profile; // ugly ugly #FIXME
00041 
00042 namespace KSync {
00043 class KonnectorView;
00044 }
00045 
00046 namespace KSPlucker {
00047 class PluckerProcessHandler;
00048 class PluckerPart : public KSync::ActionPart, virtual public PluckerInterface 
00049 {
00050     Q_OBJECT
00051 public:
00052     PluckerPart( QWidget* parent, const char* name, QObject* obj,
00053                  const char* name2, const QStringList& = QStringList() );
00054     virtual ~PluckerPart();
00055 
00056     static KAboutData *createAboutData();
00057 
00058     QString type()const;
00059     QString title()const;
00060     QString description()const;
00061     bool hasGui()const;
00062     QPixmap *pixmap();
00063     QString iconName()const;
00064     QWidget *widget();
00065 
00066     bool needsKonnectorWrite()const;
00067 
00068     void executeAction();
00069 
00070     bool configIsVisible()const;
00071     QWidget* configWidget();
00072 
00075     ASYNC addPluckerUrl( KURL );
00076     ASYNC addPluckerFeed( KURL );
00077 
00078 public slots:
00079     void slotConfigOk();
00080 
00081 private slots:
00082     void slotCleanUp();
00083     void slotFinished(PluckerProcessHandler*);
00084     void slotProfileChanged(const Profile&);
00085 
00086 private:
00087     QPixmap m_pixmap;
00088     QWidget *m_widget;
00089     KSPluckerConfigWidget *m_config;
00090     QTextEdit *m_edit;
00091     KSync::KonnectorView *m_view;
00092     KTempDir *m_temp;
00093     bool m_done : 1;
00094 };
00095 }
00096 
00097 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys