kitchensync

mainwidget.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2005 Tobias Koenig <tokoe@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 #ifndef MAINWIDGET_H
00021 #define MAINWIDGET_H
00022 
00023 #include <libqopensync/engine.h>
00024 #include <kdemacros.h>
00025 
00026 #include <qwidget.h>
00027 
00028 class KAboutData;
00029 class KAction;
00030 class KXMLGUIClient;
00031 class GroupView;
00032 class SyncProcess;
00033 class SyncProcessManager;
00034 
00035 namespace QSync {
00036 class Environment;
00037 }
00038 
00039 class KDE_EXPORT MainWidget : public QWidget
00040 {
00041     Q_OBJECT
00042   public:
00043     MainWidget( KXMLGUIClient *guiClient, QWidget *widget = 0, const char *name = 0 );
00044     ~MainWidget();
00045 
00046     virtual KXMLGUIClient *guiClient() const;
00047     static KAboutData *aboutData();
00048 
00049   public slots:
00050     void addGroup();
00051     void deleteGroup();
00052     void editGroup();
00053     void editGroup( SyncProcess *syncProcess );
00054 
00055     void sync();
00056     void sync( SyncProcess *syncProcess );
00057     void abortSync( SyncProcess *syncProcess );
00058 
00059   private:
00060     void initGUI();
00061     void initActions();
00062     void enableActions();
00063 
00064     KXMLGUIClient *mGUIClient;
00065     KAction *mActionSynchronize;
00066     KAction *mActionAddGroup;
00067     KAction *mActionDeleteGroup;
00068     KAction *mActionEditGroup;
00069 
00070     GroupView *mGroupView;
00071 };
00072 
00073 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys