kitchensync
kitchensync.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KSYNC_KITCHENSYNC_H
00024 #define KSYNC_KITCHENSYNC_H
00025
00026 #include "actionpart.h"
00027 #include "profilemanager.h"
00028 #include "actionpartservice.h"
00029 #include "core.h"
00030 #include "systemtray.h"
00031
00032 #include <kdebug.h>
00033 #include <kparts/mainwindow.h>
00034
00035 #include <qptrlist.h>
00036 #include <qmap.h>
00037
00038 class QHBox;
00039 class QWidgetStack;
00040 class KSelectAction;
00041
00042 namespace KSync {
00043
00044 class PartBar;
00045 class KonnectorBar;
00046 class MainWindow;
00047 class ActionManager;
00048 class Engine;
00049
00055 class KDE_EXPORT KitchenSync : public Core
00056 {
00057 Q_OBJECT
00058 public:
00064 KitchenSync( ActionManager *actionManager, QWidget *parent );
00065 ~KitchenSync();
00066
00067 void readProfileConfig();
00068 void writeProfileConfig();
00069
00073 QWidget *widgetStack();
00074
00078 KSyncSystemTray *tray();
00079
00083 Profile currentProfile() const;
00084
00088
00089 ProfileManager *profileManager() const;
00090
00091 Engine *engine() const;
00092
00096 SyncUi *syncUi();
00097
00101 const QPtrList<ActionPart> parts() const;
00102
00103 public slots:
00104 void initProfiles();
00108 void activateProfile();
00109
00110 private:
00111 void addPart( const ActionPartService & );
00112 void initSystray ( void );
00113
00114 private slots:
00118 void initProfileList();
00119 void activateProfile( const Profile &prof );
00123 void configureProfiles();
00124 void configureCurrentProfile();
00125 void slotSync();
00126 void slotActivated( ActionPart * );
00127 void slotKonnectorBar( bool );
00128
00129 void slotPreferences();
00130 void updateConfig();
00131
00132
00133 private slots:
00134
00135 void slotPartProg( ActionPart *, int );
00136 void slotPartSyncStatus( ActionPart *, int );
00137
00138 private:
00139 ActionManager *mActionManager;
00140
00141 PartBar *m_bar;
00142 QWidgetStack *m_stack;
00143
00144 QPtrList<ActionPart> m_parts;
00145 QPtrListIterator<ActionPart> *m_partsIt;
00146 bool m_isSyncing;
00147
00148 KSyncSystemTray *m_tray;
00149
00150 ProfileManager *m_profileManager;
00151 SyncUi *m_syncUi;
00152
00153 Engine *mEngine;
00154 QMap<ActionPart *, QWidget *> mActionWidgetMap;
00155 };
00156
00157 }
00158
00159 #endif
|