summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaddressbookmain.h
Unidiff
Diffstat (limited to 'kaddressbook/kaddressbookmain.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbookmain.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h
new file mode 100644
index 0000000..81ae09c
--- a/dev/null
+++ b/kaddressbook/kaddressbookmain.h
@@ -0,0 +1,126 @@
1/*
2 This file is part of KAddressbook.
3 Copyright (c) 1999 Don Sanders <dsanders@kde.org>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
22*/
23
24#ifndef KADDRESSBOOKMAIN_H
25#define KADDRESSBOOKMAIN_H
26
27#include <qptrlist.h>
28
29#ifdef KAB_EMBEDDED
30class QToolBar;
31#include <qaction.h>
32//#include <qmainwindow.h>
33#include <kmainwindow.h>
34#else //KAB_EMBEDDED
35#include <kaction.h>
36#include <kapplication.h>
37#include <kmainwindow.h>
38#include "kaddressbookiface.h"
39#endif //KAB_EMBEDDED
40
41class KABCore;
42class KConfig;
43
44/**
45 This class serves as the main window for KAddressBook. It handles the
46 menus, toolbars, and status bars.
47
48 @short Main window class
49 @author Don Sanders <dsanders@kde.org>
50 @version 0.1
51 */
52#ifdef KAB_EMBEDDED
53class KAddressBookMain : public KMainWindow
54#else //KAB_EMBEDDED
55//MOC_SKIP_BEGIN
56class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
57//MOC_SKIP_END
58#endif //KAB_EMBEDDED
59{
60 Q_OBJECT
61
62 public:
63 KAddressBookMain();
64 virtual ~KAddressBookMain();
65
66#ifdef KAB_EMBEDDED
67// QPEToolBar * getIconToolBar();
68 // QToolBar * getIconToolBar();
69#endif //KAB_EMBEDDED
70
71
72 public slots:
73#ifndef DESKTOP_VERSION
74 void show();
75#endif
76
77 void showMinimized () ;
78 virtual void addEmail( QString addr );
79#ifndef KAB_EMBEDDED
80//MOC_SKIP_BEGIN
81 virtual ASYNC showContactEditor( QString uid );
82//MOC_SKIP_END
83#endif //KAB_EMBEDDED
84 virtual void newContact();
85 virtual QString getNameByPhone( QString phone );
86 virtual void save();
87 virtual void exit();
88
89 protected:
90 void initActions();
91#ifdef KAB_EMBEDDED
92 //US new method to setup menues and toolbars on embedded systems
93 void createGUI();
94#endif //KAB_EMBEDDED
95
96 /**
97 This function is called when it is time for the app to save its
98 properties for session management purposes.
99 */
100 void saveProperties( KConfig* );
101
102 /**
103 This function is called when this app is restored. The KConfig
104 object points to the session management config file that was saved
105 with @ref saveProperties
106 */
107 void readProperties( KConfig* );
108
109 void closeEvent( QCloseEvent* ce );
110
111 protected slots:
112 void configureToolbars();
113 void configureKeys();
114
115 void slotNewToolbarConfig();
116
117 private:
118 KABCore *mCore;
119
120#ifdef KAB_EMBEDDED
121 // QToolBar *iconToolBar;
122#endif //KAB_EMBEDDED
123
124};
125
126#endif