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 <tqwidget.h>
00027 
00028 class TDEAboutData;
00029 class TDEAction;
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 TQWidget
00040 {
00041     Q_OBJECT
00042   
00043   public:
00044     MainWidget( KXMLGUIClient *guiClient, TQWidget *widget = 0, const char *name = 0 );
00045     ~MainWidget();
00046 
00047     virtual KXMLGUIClient *guiClient() const;
00048     static TDEAboutData *aboutData();
00049 
00050   public slots:
00051     void addGroup();
00052     void deleteGroup();
00053     void editGroup();
00054     void editGroup( SyncProcess *syncProcess );
00055 
00056     void sync();
00057     void sync( SyncProcess *syncProcess );
00058     void abortSync( SyncProcess *syncProcess );
00059 
00060   private:
00061     void initGUI();
00062     void initActions();
00063     void enableActions();
00064 
00065     KXMLGUIClient *mGUIClient;
00066     TDEAction *mActionSynchronize;
00067     TDEAction *mActionAddGroup;
00068     TDEAction *mActionDeleteGroup;
00069     TDEAction *mActionEditGroup;
00070 
00071     GroupView *mGroupView;
00072 };
00073 
00074 #endif