summaryrefslogtreecommitdiffabout
path: root/kaddressbook/viewmanager.h
authorzautrix <zautrix>2004-09-09 20:39:55 (UTC)
committer zautrix <zautrix>2004-09-09 20:39:55 (UTC)
commit480ffef4859d24cc0a936377f8983fd59312d4b6 (patch) (unidiff)
tree9661e8b5e892ef653ffc2ed630dbe89acfeb4851 /kaddressbook/viewmanager.h
parent880518b6f1d4b06e3df45224c244d9c62f6fb7a9 (diff)
downloadkdepimpi-480ffef4859d24cc0a936377f8983fd59312d4b6.zip
kdepimpi-480ffef4859d24cc0a936377f8983fd59312d4b6.tar.gz
kdepimpi-480ffef4859d24cc0a936377f8983fd59312d4b6.tar.bz2
Added senseful searching in Kapi
Diffstat (limited to 'kaddressbook/viewmanager.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/viewmanager.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h
index 97c2275..6def6b6 100644
--- a/kaddressbook/viewmanager.h
+++ b/kaddressbook/viewmanager.h
@@ -10,96 +10,97 @@
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
32class KAction; 32class KAction;
33class KSelectAction; 33class KSelectAction;
34 34
35class KABCore; 35class KABCore;
36class QWidgetStack; 36class QWidgetStack;
37class QDropEvent; 37class QDropEvent;
38 38
39namespace KABC { class AddressBook; } 39namespace 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 */
49class ViewManager : public QWidget 49class 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 59
59 void unloadViews(); 60 void unloadViews();
60 KSelectAction * getFilterAction() { return mActionSelectFilter; } 61 KSelectAction * getFilterAction() { return mActionSelectFilter; }
61 62
62 QStringList selectedUids() const; 63 QStringList selectedUids() const;
63 QStringList selectedEmails() const; 64 QStringList selectedEmails() const;
64 KABC::Addressee::List selectedAddressees() const; 65 KABC::Addressee::List selectedAddressees() const;
65 void setListSelected(QStringList); 66 void setListSelected(QStringList);
66 67
67 public slots: 68 public slots:
68 69
69//US void setSelected( const QString &uid = QString::null, bool selected = true ); 70//US void setSelected( const QString &uid = QString::null, bool selected = true );
70 void setSelected( const QString &uid, bool); 71 void setSelected( const QString &uid, bool);
71//US added another method with no parameter, since my moc compiler does not support default parameters. 72//US added another method with no parameter, since my moc compiler does not support default parameters.
72 void setSelected(); 73 void setSelected();
73 74
74 75
75 76
76//US added another method with no parameter, since my moc compiler does not support default parameters. 77//US added another method with no parameter, since my moc compiler does not support default parameters.
77 void refreshView(); 78 void refreshView();
78 void refreshView( const QString &uid); 79 void refreshView( const QString &uid);
79 80
80 void editView(); 81 void editView();
81 void deleteView(); 82 void deleteView();
82 void addView(); 83 void addView();
83 84
84 protected slots: 85 protected slots:
85 /** 86 /**
86 Called whenever the user drops something in the active view. 87 Called whenever the user drops something in the active view.
87 This method will try to decode what was dropped, and if it was 88 This method will try to decode what was dropped, and if it was
88 a valid addressee, add it to the addressbook. 89 a valid addressee, add it to the addressbook.
89 */ 90 */
90 void dropped( QDropEvent* ); 91 void dropped( QDropEvent* );
91 92
92 /** 93 /**
93 Called whenever the user attempts to start a drag in the view. 94 Called whenever the user attempts to start a drag in the view.
94 This method will convert all the selected addressees into text (vcard) 95 This method will convert all the selected addressees into text (vcard)
95 and create a drag object. 96 and create a drag object.
96 */ 97 */
97 void startDrag(); 98 void startDrag();
98 99
99 signals: 100 signals:
100 /** 101 /**
101 Emitted whenever the user selects an entry in the view. 102 Emitted whenever the user selects an entry in the view.
102 */ 103 */
103 void selected( const QString &uid ); 104 void selected( const QString &uid );
104 void deleteRequest( ); 105 void deleteRequest( );
105 106