kitchensync

core.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library 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 GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 #ifndef KSYNC_CORE_H
00022 #define KSYNC_CORE_H
00023 
00024 #include "actionpart.h"
00025 #include "profile.h"
00026 
00027 #include <kdebug.h>
00028 
00029 #include <qwidget.h>
00030 
00031 namespace KSync
00032 {
00033 
00034 class ProfileManager;
00035 class KonnectorManager;
00036 class SyncUi;
00037 class SyncAlgorithm;
00038 class Engine;
00039 
00040 enum KonnectorMode { KONNECTOR_ONLINE = 0, KONNECTOR_OFFLINE };
00041 
00047 class Core : public QWidget
00048 {
00049    Q_OBJECT
00050   public:
00051     Core( QWidget *parent );
00052     ~Core();
00053 
00057     virtual Profile currentProfile() const = 0;
00058 
00062     // FIXME make const pointer to const object
00063     virtual ProfileManager *profileManager() const = 0;
00064 
00065     virtual Engine *engine() const = 0;
00066 
00070     virtual SyncUi *syncUi() = 0;
00071 
00075     virtual const QPtrList<ActionPart> parts() const = 0;
00076 
00077   signals:
00083     void profileChanged( const Profile &oldProfile );
00084 
00089     void partChanged( ActionPart *newPart );
00090 
00094     void startSync();
00095 
00099     void startSync( ActionPart * );
00100 
00101     void syncProgress( ActionPart *, int, int );
00105     void doneSync();
00106 
00110     void doneSync( ActionPart * );
00111 };
00112 
00113 }
00114 
00115 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys