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