Diffstat (limited to 'kaddressbook/extensionwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/extensionwidget.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/extensionwidget.h b/kaddressbook/extensionwidget.h index fc91f21..9fcfba9 100644 --- a/kaddressbook/extensionwidget.h +++ b/kaddressbook/extensionwidget.h | |||
@@ -1,119 +1,119 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressBook. | 2 | This file is part of KAddressBook. |
3 | Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2002 Tobias Koenig <tokoe@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 EXTENSIONWIDGET_H | 24 | #ifndef EXTENSIONWIDGET_H |
25 | #define EXTENSIONWIDGET_H | 25 | #define EXTENSIONWIDGET_H |
26 | 26 | ||
27 | #include <qwidget.h> | 27 | #include <qwidget.h> |
28 | 28 | ||
29 | #include <kabc/addressbook.h> | 29 | #include <kabc/addressbook.h> |
30 | #ifndef KAB_EMBEDDED | 30 | #ifndef KAB_EMBEDDED |
31 | #include <klibloader.h> | 31 | #include <klibloader.h> |
32 | #endif //KAB_EMBEDDED | 32 | #endif //KAB_EMBEDDED |
33 | 33 | ||
34 | class ConfigureWidget; | 34 | class ConfigureWidget; |
35 | class KABCore; | 35 | class KABCore; |
36 | 36 | ||
37 | class ExtensionWidget : public QWidget | 37 | class ExtensionWidget : public QWidget |
38 | { | 38 | { |
39 | Q_OBJECT | 39 | Q_OBJECT |
40 | 40 | ||
41 | public: | 41 | public: |
42 | ExtensionWidget( KABCore *core, QWidget *parent, const char *name = 0 ); | 42 | ExtensionWidget( KABCore *core, QWidget *parent, const char *name = 0 ); |
43 | ~ExtensionWidget(); | 43 | ~ExtensionWidget(); |
44 | 44 | ||
45 | /** | 45 | /** |
46 | @return A pointer to the core object | 46 | @return A pointer to the core object |
47 | */ | 47 | */ |
48 | KABCore *core() const; | 48 | KABCore *core() const; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | Returns whether there are selected contacts in the view. | 51 | Returns whether there are selected contacts in the view. |
52 | */ | 52 | */ |
53 | bool contactsSelected() const; | 53 | bool contactsSelected() const; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | Returns a list of contacts that are selected in the view. | 56 | Returns a list of contacts that are selected in the view. |
57 | Use @ref addresseesSelected() to test if there exists selected | 57 | Use @ref addresseesSelected() to test if there exists selected |
58 | contacts. | 58 | contacts. |
59 | */ | 59 | */ |
60 | KABC::Addressee::List selectedContacts(); | 60 | KABC::Addressee::List selectedContacts(); |
61 | 61 | ||
62 | /** | 62 | /** |
63 | This method is called whenever the selection in the view changed. | 63 | This method is called whenever the selection in the view changed. |
64 | */ | 64 | */ |
65 | virtual void contactsSelectionChanged(); | 65 | virtual void contactsSelectionChanged(); |
66 | 66 | ||
67 | /** | 67 | /** |
68 | This method should be reimplemented and return the i18ned title of this | 68 | This method should be reimplemented and return the i18ned title of this |
69 | widget. | 69 | widget. |
70 | */ | 70 | */ |
71 | virtual QString title() const; | 71 | virtual QString title() const; |
72 | 72 | ||
73 | /** | 73 | /** |
74 | This method should be reimplemented and return a unique identifier. | 74 | This method should be reimplemented and return a unique identifier. |
75 | */ | 75 | */ |
76 | virtual QString identifier() const; | 76 | virtual QString identifier() const; |
77 | 77 | ||
78 | signals: | 78 | signals: |
79 | void modified( const KABC::Addressee::List &list ); | 79 | void modified( const KABC::Addressee::List &list ); |
80 | 80 | ||
81 | private: | 81 | private: |
82 | KABCore *mCore; | 82 | KABCore *mCore; |
83 | 83 | ||
84 | class ExtensionWidgetPrivate; | 84 | class ExtensionWidgetPrivate; |
85 | ExtensionWidgetPrivate *d; | 85 | ExtensionWidgetPrivate *d; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | #ifndef KAB_EMBEDDED | 88 | #ifndef KAB_EMBEDDED |
89 | //MOC_SKIP_BEGIN | 89 | #ifndef Q_MOC_RUN |
90 | class ExtensionFactory : public KLibFactory | 90 | class ExtensionFactory : public KLibFactory |
91 | //MOC_SKIP_END | 91 | #endif |
92 | #else //KAB_EMBEDDED | 92 | #else //KAB_EMBEDDED |
93 | class ExtensionFactory | 93 | class ExtensionFactory |
94 | #endif //KAB_EMBEDDED | 94 | #endif //KAB_EMBEDDED |
95 | { | 95 | { |
96 | public: | 96 | public: |
97 | virtual ExtensionWidget *extension( KABCore *core, QWidget *parent, | 97 | virtual ExtensionWidget *extension( KABCore *core, QWidget *parent, |
98 | const char *name = 0 ) = 0; | 98 | const char *name = 0 ) = 0; |
99 | 99 | ||
100 | virtual ConfigureWidget *configureWidget( QWidget *parent, | 100 | virtual ConfigureWidget *configureWidget( QWidget *parent, |
101 | const char *name = 0 ); | 101 | const char *name = 0 ); |
102 | 102 | ||
103 | virtual bool configureWidgetAvailable() { return false; } | 103 | virtual bool configureWidgetAvailable() { return false; } |
104 | 104 | ||
105 | /** | 105 | /** |
106 | This method should return the same identifier like the config | 106 | This method should return the same identifier like the config |
107 | widget. | 107 | widget. |
108 | */ | 108 | */ |
109 | virtual QString identifier() const = 0; | 109 | virtual QString identifier() const = 0; |
110 | 110 | ||
111 | protected: | 111 | protected: |
112 | virtual QObject* createObject( QObject*, const char*, const char*, | 112 | virtual QObject* createObject( QObject*, const char*, const char*, |
113 | const QStringList & ) | 113 | const QStringList & ) |
114 | { | 114 | { |
115 | return 0; | 115 | return 0; |
116 | } | 116 | } |
117 | }; | 117 | }; |
118 | 118 | ||
119 | #endif | 119 | #endif |