kitchensync

mainwidget.h
1 /*
2  This file is part of KitchenSync.
3 
4  Copyright (c) 2005 Tobias Koenig <tokoe@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20 #ifndef MAINWIDGET_H
21 #define MAINWIDGET_H
22 
23 #include <libqopensync/engine.h>
24 #include <kdemacros.h>
25 
26 #include <tqwidget.h>
27 
28 class TDEAboutData;
29 class TDEAction;
30 class KXMLGUIClient;
31 class GroupView;
32 class SyncProcess;
33 class SyncProcessManager;
34 
35 namespace QSync {
36 class Environment;
37 }
38 
39 class KDE_EXPORT MainWidget : public TQWidget
40 {
41  Q_OBJECT
42 
43  public:
44  MainWidget( KXMLGUIClient *guiClient, TQWidget *widget = 0, const char *name = 0 );
45  ~MainWidget();
46 
47  virtual KXMLGUIClient *guiClient() const;
48  static TDEAboutData *aboutData();
49 
50  public slots:
51  void addGroup();
52  void deleteGroup();
53  void editGroup();
54  void editGroup( SyncProcess *syncProcess );
55 
56  void sync();
57  void sync( SyncProcess *syncProcess );
58  void abortSync( SyncProcess *syncProcess );
59 
60  private:
61  void initGUI();
62  void initActions();
63  void enableActions();
64 
65  KXMLGUIClient *mGUIClient;
66  TDEAction *mActionSynchronize;
67  TDEAction *mActionAddGroup;
68  TDEAction *mActionDeleteGroup;
69  TDEAction *mActionEditGroup;
70 
71  GroupView *mGroupView;
72 };
73 
74 #endif