kitchensync.h
00001
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 KitchenSync : public Core
00056 {
00057 Q_OBJECT
00058 public:
00065 KitchenSync( ActionManager *, QWidget * );
00066 ~KitchenSync();
00067
00068 void readProfileConfig();
00069 void writeProfileConfig();
00070
00074 QWidget *widgetStack();
00075
00079 KSyncSystemTray *tray();
00080
00084 Profile currentProfile() const;
00085
00090 ProfileManager *profileManager() const;
00091
00092 Engine *engine() const;
00093
00097 SyncUi *syncUi();
00098
00102 SyncAlgorithm *syncAlgorithm();
00103
00107 const QPtrList<ActionPart> parts() const;
00108
00109 public slots:
00110 void initProfiles();
00114 void activateProfile();
00115
00116 private:
00117 void addPart( const ActionPartService & );
00118 void initSystray ( void );
00119
00120 private slots:
00124 void initProfileList();
00125 void activateProfile( const Profile &prof );
00129 void configureProfiles();
00130 void configureCurrentProfile();
00131 void slotSync();
00132 void slotActivated( ActionPart * );
00133 void slotKonnectorBar( bool );
00134
00135 void slotPreferences();
00136 void updateConfig();
00137
00138
00139 private slots:
00140
00141 void slotKonnectorProg( Konnector *, const Progress & );
00142 void slotKonnectorErr( Konnector *, const Error & );
00143
00144
00145 void slotPartProg( ActionPart *, int );
00146 void slotPartProg( ActionPart *, const Progress & );
00147 void slotPartErr( ActionPart *, const Error & );
00148 void slotPartSyncStatus( ActionPart *, int );
00149
00150 private:
00151 ActionManager *mActionManager;
00152
00153 PartBar *m_bar;
00154 QWidgetStack *m_stack;
00155
00156 QPtrList<ActionPart> m_parts;
00157 QPtrListIterator<ActionPart> *m_partsIt;
00158 bool m_isSyncing;
00159
00160 KSyncSystemTray *m_tray;
00161
00162 ProfileManager *m_profileManager;
00163 SyncUi *m_syncUi;
00164 SyncAlgorithm *m_syncAlg;
00165
00166 Engine *mEngine;
00167 QMap<ActionPart *, QWidget *> mActionWidgetMap;
00168 };
00169
00170 }
00171
00172 #endif
This file is part of the documentation for kitchensync Library Version 3.3.2.