kitchensync Library API Documentation

kitchensync.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
00005     Copyright (c) 2002 Maximilian Reiß <harlekin@handhelds.org>
00006     Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
00007 
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Library General Public
00010     License as published by the Free Software Foundation; either
00011     version 2 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Library General Public License for more details.
00017 
00018     You should have received a copy of the GNU Library General Public License
00019     along with this library; see the file COPYING.LIB.  If not, write to
00020     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00021     Boston, MA 02111-1307, USA.
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     /* slots for the KonnectorManager */
00139   private slots:
00140 // obsolete:    void slotSync( Konnector *, SynceeList );
00141     void slotKonnectorProg( Konnector *, const Progress & );
00142     void slotKonnectorErr( Konnector *, const Error & );
00143 
00144     /* slots for the ActionParts */
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     // loaded parts
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
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Dec 21 14:23:40 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003