Diffstat (limited to 'kaddressbook/configurewidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/configurewidget.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/kaddressbook/configurewidget.h b/kaddressbook/configurewidget.h new file mode 100644 index 0000000..2528c9d --- a/dev/null +++ b/kaddressbook/configurewidget.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | This file is part of KAddressBook. | ||
3 | Copyright (c) 2002 Tobias Koenig <tokoe@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 CONFIGUREWIDGET_H | ||
25 | #define CONFIGUREWIDGET_H | ||
26 | |||
27 | |||
28 | #include <qwidget.h> | ||
29 | #include <kconfig.h> | ||
30 | |||
31 | namespace KABC { | ||
32 | class AddressBook; | ||
33 | } | ||
34 | |||
35 | class ConfigureWidget : public QWidget | ||
36 | { | ||
37 | public: | ||
38 | ConfigureWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); | ||
39 | ~ConfigureWidget(); | ||
40 | |||
41 | /** | ||
42 | This method is called before the configure dialog is shown. | ||
43 | The widget should reimplement it and fill the GUI with the | ||
44 | values from the config file. | ||
45 | Important: Don't change the group of cfg! | ||
46 | */ | ||
47 | virtual void restoreSettings( KConfig *cfg ); | ||
48 | |||
49 | /** | ||
50 | This method is called after the user clicked the 'Ok' button. | ||
51 | The widget should reimplement it and save all values from | ||
52 | the GUI to the config file. | ||
53 | Important: Don't change the group of cfg! | ||
54 | */ | ||
55 | virtual void saveSettings( KConfig *cfg ); | ||
56 | |||
57 | |||
58 | /** | ||
59 | Returns a pointer to the address book of this widget. | ||
60 | */ | ||
61 | KABC::AddressBook *addressBook() const; | ||
62 | |||
63 | private: | ||
64 | KABC::AddressBook *mAddressBook; | ||
65 | }; | ||
66 | |||
67 | #endif | ||