author | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
commit | ea40295e233db219dc2431960e18fb4398ddb75c (patch) (unidiff) | |
tree | 1d654ae51d7f65f4375787105951a8f4f9fc359e /kaddressbook/viewmanager.h | |
parent | 640874bb21ea348edb33a54690ad225e0efdd1e4 (diff) | |
download | kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.zip kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.gz kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.bz2 |
added better searching in kapi
-rw-r--r-- | kaddressbook/viewmanager.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h index 6def6b6..585f4e9 100644 --- a/kaddressbook/viewmanager.h +++ b/kaddressbook/viewmanager.h | |||
@@ -5,128 +5,130 @@ | |||
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 VIEWMANAGER_H | 24 | #ifndef VIEWMANAGER_H |
25 | #define VIEWMANAGER_H | 25 | #define VIEWMANAGER_H |
26 | 26 | ||
27 | #include <qwidget.h> | 27 | #include <qwidget.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | #include <kaddressbookview.h> | 29 | #include <kaddressbookview.h> |
30 | #include <qdict.h> | 30 | #include <qdict.h> |
31 | 31 | ||
32 | class KAction; | 32 | class KAction; |
33 | class KSelectAction; | 33 | class KSelectAction; |
34 | 34 | ||
35 | class KABCore; | 35 | class KABCore; |
36 | class QWidgetStack; | 36 | class QWidgetStack; |
37 | class QDropEvent; | 37 | class QDropEvent; |
38 | 38 | ||
39 | namespace KABC { class AddressBook; } | 39 | namespace KABC { class AddressBook; } |
40 | 40 | ||
41 | /** | 41 | /** |
42 | The view manager manages the views and everything related to them. The | 42 | The view manager manages the views and everything related to them. The |
43 | manager will load the views at startup and display a view when told to | 43 | manager will load the views at startup and display a view when told to |
44 | make one active. | 44 | make one active. |
45 | 45 | ||
46 | The view manager will also create and manage all dialogs directly related to | 46 | The view manager will also create and manage all dialogs directly related to |
47 | views (ie: AddView, ConfigureView, DeleteView, etc). | 47 | views (ie: AddView, ConfigureView, DeleteView, etc). |
48 | */ | 48 | */ |
49 | class ViewManager : public QWidget | 49 | class ViewManager : public QWidget |
50 | { | 50 | { |
51 | Q_OBJECT | 51 | Q_OBJECT |
52 | public: | 52 | public: |
53 | ViewManager( KABCore *core, QWidget *parent, const char *name = 0 ); | 53 | ViewManager( KABCore *core, QWidget *parent, const char *name = 0 ); |
54 | ~ViewManager(); | 54 | ~ViewManager(); |
55 | 55 | ||
56 | void restoreSettings(); | 56 | void restoreSettings(); |
57 | void saveSettings(); | 57 | void saveSettings(); |
58 | void doSearch( const QString& s ,KABC::Field *field ); | 58 | void doSearch( const QString& s ,KABC::Field *field ); |
59 | 59 | ||
60 | void unloadViews(); | 60 | void unloadViews(); |
61 | KSelectAction * getFilterAction() { return mActionSelectFilter; } | 61 | KSelectAction * getFilterAction() { return mActionSelectFilter; } |
62 | 62 | ||
63 | QStringList selectedUids() const; | 63 | QStringList selectedUids() const; |
64 | QStringList selectedEmails() const; | 64 | QStringList selectedEmails() const; |
65 | KABC::Addressee::List selectedAddressees() const; | 65 | KABC::Addressee::List selectedAddressees() const; |
66 | void setListSelected(QStringList); | 66 | void setListSelected(QStringList); |
67 | 67 | ||
68 | public slots: | 68 | public slots: |
69 | void scrollUP(); | ||
70 | void scrollDOWN(); | ||
69 | 71 | ||
70 | //US void setSelected( const QString &uid = QString::null, bool selected = true ); | 72 | //US void setSelected( const QString &uid = QString::null, bool selected = true ); |
71 | void setSelected( const QString &uid, bool); | 73 | void setSelected( const QString &uid, bool); |
72 | //US added another method with no parameter, since my moc compiler does not support default parameters. | 74 | //US added another method with no parameter, since my moc compiler does not support default parameters. |
73 | void setSelected(); | 75 | void setSelected(); |
74 | 76 | ||
75 | 77 | ||
76 | 78 | ||
77 | //US added another method with no parameter, since my moc compiler does not support default parameters. | 79 | //US added another method with no parameter, since my moc compiler does not support default parameters. |
78 | void refreshView(); | 80 | void refreshView(); |
79 | void refreshView( const QString &uid); | 81 | void refreshView( const QString &uid); |
80 | 82 | ||
81 | void editView(); | 83 | void editView(); |
82 | void deleteView(); | 84 | void deleteView(); |
83 | void addView(); | 85 | void addView(); |
84 | 86 | ||
85 | protected slots: | 87 | protected slots: |
86 | /** | 88 | /** |
87 | Called whenever the user drops something in the active view. | 89 | Called whenever the user drops something in the active view. |
88 | This method will try to decode what was dropped, and if it was | 90 | This method will try to decode what was dropped, and if it was |
89 | a valid addressee, add it to the addressbook. | 91 | a valid addressee, add it to the addressbook. |
90 | */ | 92 | */ |
91 | void dropped( QDropEvent* ); | 93 | void dropped( QDropEvent* ); |
92 | 94 | ||
93 | /** | 95 | /** |
94 | Called whenever the user attempts to start a drag in the view. | 96 | Called whenever the user attempts to start a drag in the view. |
95 | This method will convert all the selected addressees into text (vcard) | 97 | This method will convert all the selected addressees into text (vcard) |
96 | and create a drag object. | 98 | and create a drag object. |
97 | */ | 99 | */ |
98 | void startDrag(); | 100 | void startDrag(); |
99 | 101 | ||
100 | signals: | 102 | signals: |
101 | /** | 103 | /** |
102 | Emitted whenever the user selects an entry in the view. | 104 | Emitted whenever the user selects an entry in the view. |
103 | */ | 105 | */ |
104 | void selected( const QString &uid ); | 106 | void selected( const QString &uid ); |
105 | void deleteRequest( ); | 107 | void deleteRequest( ); |
106 | 108 | ||
107 | /** | 109 | /** |
108 | Emitted whenever the user activates an entry in the view. | 110 | Emitted whenever the user activates an entry in the view. |
109 | */ | 111 | */ |
110 | void executed( const QString &uid ); | 112 | void executed( const QString &uid ); |
111 | 113 | ||
112 | /** | 114 | /** |
113 | Emitted whenever the address book is modified in some way. | 115 | Emitted whenever the address book is modified in some way. |
114 | */ | 116 | */ |
115 | void modified(); | 117 | void modified(); |
116 | 118 | ||
117 | /** | 119 | /** |
118 | Emitted whenever a url is dragged on a view. | 120 | Emitted whenever a url is dragged on a view. |
119 | */ | 121 | */ |
120 | void urlDropped( const KURL& ); | 122 | void urlDropped( const KURL& ); |
121 | 123 | ||
122 | private slots: | 124 | private slots: |
123 | void setActiveView( const QString &name ); | 125 | void setActiveView( const QString &name ); |
124 | void setActiveFilter( int index ); | 126 | void setActiveFilter( int index ); |
125 | void configureFilters(); | 127 | void configureFilters(); |
126 | 128 | ||
127 | private: | 129 | private: |
128 | void createViewFactories(); | 130 | void createViewFactories(); |
129 | QStringList filterNames() const; | 131 | QStringList filterNames() const; |
130 | int filterPosition( const QString &name ) const; | 132 | int filterPosition( const QString &name ) const; |
131 | QStringList viewNames() const; | 133 | QStringList viewNames() const; |
132 | int viewPosition( const QString &name ) const; | 134 | int viewPosition( const QString &name ) const; |