author | zautrix <zautrix> | 2004-09-09 20:39:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-09 20:39:55 (UTC) |
commit | 480ffef4859d24cc0a936377f8983fd59312d4b6 (patch) (unidiff) | |
tree | 9661e8b5e892ef653ffc2ed630dbe89acfeb4851 /kaddressbook/kaddressbookview.h | |
parent | 880518b6f1d4b06e3df45224c244d9c62f6fb7a9 (diff) | |
download | kdepimpi-480ffef4859d24cc0a936377f8983fd59312d4b6.zip kdepimpi-480ffef4859d24cc0a936377f8983fd59312d4b6.tar.gz kdepimpi-480ffef4859d24cc0a936377f8983fd59312d4b6.tar.bz2 |
Added senseful searching in Kapi
Diffstat (limited to 'kaddressbook/kaddressbookview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kaddressbookview.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h index 7457080..17106e8 100644 --- a/kaddressbook/kaddressbookview.h +++ b/kaddressbook/kaddressbookview.h | |||
@@ -19,96 +19,97 @@ | |||
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 KADDRESSBOOKVIEW_H | 24 | #ifndef KADDRESSBOOKVIEW_H |
25 | #define KADDRESSBOOKVIEW_H | 25 | #define KADDRESSBOOKVIEW_H |
26 | 26 | ||
27 | #ifndef KAB_EMBEDDED | 27 | #ifndef KAB_EMBEDDED |
28 | #include <klibloader.h> | 28 | #include <klibloader.h> |
29 | #endif //KAB_EMBEDDED | 29 | #endif //KAB_EMBEDDED |
30 | 30 | ||
31 | class KConfig; | 31 | class KConfig; |
32 | class QDropEvent; | 32 | class QDropEvent; |
33 | 33 | ||
34 | #include <qstringlist.h> | 34 | #include <qstringlist.h> |
35 | #include <kabc/field.h> | 35 | #include <kabc/field.h> |
36 | #include <qwidget.h> | 36 | #include <qwidget.h> |
37 | 37 | ||
38 | #include "viewconfigurewidget.h" | 38 | #include "viewconfigurewidget.h" |
39 | #include "filter.h" | 39 | #include "filter.h" |
40 | 40 | ||
41 | namespace KABC { class AddressBook; } | 41 | namespace KABC { class AddressBook; } |
42 | 42 | ||
43 | /** | 43 | /** |
44 | Base class for all views in kaddressbook. This class implements | 44 | Base class for all views in kaddressbook. This class implements |
45 | all the common methods needed to provide a view to the user. | 45 | all the common methods needed to provide a view to the user. |
46 | 46 | ||
47 | To implement a specific view (table, card, etc), just inherit from | 47 | To implement a specific view (table, card, etc), just inherit from |
48 | this class and implement all the pure virtuals. | 48 | this class and implement all the pure virtuals. |
49 | 49 | ||
50 | @author Mike Pilone <mpilone@slac.com> | 50 | @author Mike Pilone <mpilone@slac.com> |
51 | */ | 51 | */ |
52 | class KAddressBookView : public QWidget | 52 | class KAddressBookView : public QWidget |
53 | { | 53 | { |
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | 55 | ||
56 | public: | 56 | public: |
57 | enum DefaultFilterType { None = 0, Active = 1, Specific = 2 }; | 57 | enum DefaultFilterType { None = 0, Active = 1, Specific = 2 }; |
58 | 58 | ||
59 | KAddressBookView( KABC::AddressBook *ab, QWidget *parent, const char *name ); | 59 | KAddressBookView( KABC::AddressBook *ab, QWidget *parent, const char *name ); |
60 | virtual ~KAddressBookView(); | 60 | virtual ~KAddressBookView(); |
61 | 61 | ||
62 | /** | 62 | /** |
63 | Must be overloaded in subclasses. Should return a list of | 63 | Must be overloaded in subclasses. Should return a list of |
64 | all the uids of selected contacts. | 64 | all the uids of selected contacts. |
65 | */ | 65 | */ |
66 | virtual QStringList selectedUids() = 0; | 66 | virtual QStringList selectedUids() = 0; |
67 | virtual void doSearch( const QString& s ,KABC::Field *field ) = 0; | ||
67 | 68 | ||
68 | /** | 69 | /** |
69 | Called whenever this view should read the config. This can be used | 70 | Called whenever this view should read the config. This can be used |
70 | as a sign that the config has changed, therefore the view should | 71 | as a sign that the config has changed, therefore the view should |
71 | assume the worst and rebuild itself if necessary. For example, | 72 | assume the worst and rebuild itself if necessary. For example, |
72 | in a table view this method may be called when the user adds or | 73 | in a table view this method may be called when the user adds or |
73 | removes columns from the view. | 74 | removes columns from the view. |
74 | 75 | ||
75 | If overloaded in the subclass, do not forget to call super class's | 76 | If overloaded in the subclass, do not forget to call super class's |
76 | method. | 77 | method. |
77 | 78 | ||
78 | @param config The KConfig object to read from. The group will already | 79 | @param config The KConfig object to read from. The group will already |
79 | be set, so do not change the group. | 80 | be set, so do not change the group. |
80 | */ | 81 | */ |
81 | virtual void readConfig( KConfig *config ); | 82 | virtual void readConfig( KConfig *config ); |
82 | 83 | ||
83 | /** | 84 | /** |
84 | Called whenever this view should write the config. The view should not | 85 | Called whenever this view should write the config. The view should not |
85 | write out information handled by the application, such as which fields | 86 | write out information handled by the application, such as which fields |
86 | are visible. The view should only write out information specific | 87 | are visible. The view should only write out information specific |
87 | to itself (i.e.: All information in the ViewConfigWidget) | 88 | to itself (i.e.: All information in the ViewConfigWidget) |
88 | 89 | ||
89 | If overloaded in the subclass, do not forget to call the super class's | 90 | If overloaded in the subclass, do not forget to call the super class's |
90 | method. | 91 | method. |
91 | 92 | ||
92 | @param config The KConfig object to read from. The group will already | 93 | @param config The KConfig object to read from. The group will already |
93 | be set, so do not change the group. | 94 | be set, so do not change the group. |
94 | */ | 95 | */ |
95 | virtual void writeConfig( KConfig *config ); | 96 | virtual void writeConfig( KConfig *config ); |
96 | 97 | ||
97 | /** | 98 | /** |
98 | Returns a QString with all the selected email addresses concatenated | 99 | Returns a QString with all the selected email addresses concatenated |
99 | together with a ',' seperator. | 100 | together with a ',' seperator. |
100 | */ | 101 | */ |
101 | virtual QString selectedEmails(); | 102 | virtual QString selectedEmails(); |
102 | 103 | ||
103 | /** | 104 | /** |
104 | Return the type of the view: Icon, Table, etc. Please make sure that | 105 | Return the type of the view: Icon, Table, etc. Please make sure that |
105 | this is the same value that ViewWrapper::type() will return for your | 106 | this is the same value that ViewWrapper::type() will return for your |
106 | view. | 107 | view. |
107 | */ | 108 | */ |
108 | virtual QString type() const = 0; | 109 | virtual QString type() const = 0; |
109 | 110 | ||
110 | /** | 111 | /** |
111 | Returns a list of the fields that should be displayed. The list | 112 | Returns a list of the fields that should be displayed. The list |
112 | is composed of the fields proper names (ie: Home Address), so | 113 | is composed of the fields proper names (ie: Home Address), so |
113 | the view may need to translate them in order to get the | 114 | the view may need to translate them in order to get the |
114 | value from the addressee. | 115 | value from the addressee. |