summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abview.h
Unidiff
Diffstat (limited to 'core/pim/addressbook/abview.h') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/abview.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/core/pim/addressbook/abview.h b/core/pim/addressbook/abview.h
index 49bb4be..b8c8a08 100644
--- a/core/pim/addressbook/abview.h
+++ b/core/pim/addressbook/abview.h
@@ -1,21 +1,22 @@
1#ifndef _ABVIEW_H_ 1#ifndef _ABVIEW_H_
2#define _ABVIEW_H_ 2#define _ABVIEW_H_
3 3
4#include <qwidget.h> 4#include <opie2/opimcontact.h>
5#include <qwidgetstack.h> 5#include <opie2/ocontactaccess.h>
6 6
7#include <qpe/categories.h> 7#include <qpe/categories.h>
8#include <opie/ocontact.h> 8
9#include <opie/ocontactaccess.h> 9#include <qwidget.h>
10#include <qwidgetstack.h>
10 11
11#include "contacteditor.h" 12#include "contacteditor.h"
12#include "abtable.h" 13#include "abtable.h"
13#include "ablabel.h" 14#include "ablabel.h"
14#include "abconfig.h" 15#include "abconfig.h"
15 16
16class AbView: public QWidget 17class AbView: public QWidget
17{ 18{
18 Q_OBJECT 19 Q_OBJECT
19 20
20public: 21public:
21 enum Views{ TableView=0, CardView, PersonalView }; 22 enum Views{ TableView=0, CardView, PersonalView };
@@ -28,62 +29,62 @@ public:
28 void reload(); 29 void reload();
29 void clear(); 30 void clear();
30 31
31 void setView( Views view ); 32 void setView( Views view );
32 void showPersonal( bool personal ); 33 void showPersonal( bool personal );
33 void setCurrentUid( int uid ); 34 void setCurrentUid( int uid );
34 void setShowByCategory( const QString& cat ); 35 void setShowByCategory( const QString& cat );
35 void setShowToView( Views view ); 36 void setShowToView( Views view );
36 void setShowByLetter( char c, AbConfig::LPSearchMode mode = AbConfig::LastName ); 37 void setShowByLetter( char c, AbConfig::LPSearchMode mode = AbConfig::LastName );
37 void setListOrder( const QValueList<int>& ordered ); 38 void setListOrder( const QValueList<int>& ordered );
38 39
39 // Add Entry and put to current 40 // Add Entry and put to current
40 void addEntry( const OContact &newContact ); 41 void addEntry( const Opie::OPimContact &newContact );
41 void removeEntry( const int UID ); 42 void removeEntry( const int UID );
42 void replaceEntry( const OContact &contact ); 43 void replaceEntry( const Opie::OPimContact &contact );
43 OContact currentEntry(); 44 Opie::OPimContact currentEntry();
44 45
45 void inSearch() { m_inSearch = true; } 46 void inSearch() { m_inSearch = true; }
46 void offSearch(); 47 void offSearch();
47 48
48 QString showCategory() const; 49 QString showCategory() const;
49 QStringList categories(); 50 QStringList categories();
50 51
51signals: 52signals:
52 void signalNotFound(); 53 void signalNotFound();
53 void signalClearLetterPicker(); 54 void signalClearLetterPicker();
54 void signalViewSwitched ( int ); 55 void signalViewSwitched ( int );
55 56
56public slots: 57public slots:
57 void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, 58 void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
58 bool backwards, QString category = QString::null ); 59 bool backwards, QString category = QString::null );
59 void slotSwitch(); 60 void slotSwitch();
60 61
61private: 62private:
62 void updateListinViews(); 63 void updateListinViews();
63 void updateView( bool newdata = false ); 64 void updateView( bool newdata = false );
64 void clearForCategory(); 65 void clearForCategory();
65 bool contactCompare( const OContact &cnt, int category ); 66 bool contactCompare( const Opie::OPimContact &cnt, int category );
66 void parseName( const QString& name, QString *first, QString *middle, 67 void parseName( const QString& name, QString *first, QString *middle,
67 QString * last ); 68 QString * last );
68 69
69 Categories mCat; 70 Categories mCat;
70 bool m_inSearch; 71 bool m_inSearch;
71 bool m_inPersonal; 72 bool m_inPersonal;
72 int m_curr_category; 73 int m_curr_category;
73 Views m_curr_View; 74 Views m_curr_View;
74 Views m_prev_View; 75 Views m_prev_View;
75 int m_curr_Contact; 76 int m_curr_Contact;
76 77
77 OContactAccess* m_contactdb; 78 Opie::OPimContactAccess* m_contactdb;
78 OContactAccess* m_storedDB; 79 Opie::OPimContactAccess* m_storedDB;
79 OContactAccess::List m_list; 80 Opie::OPimContactAccess::List m_list;
80 81
81 QWidgetStack* m_viewStack; 82 QWidgetStack* m_viewStack;
82 AbTable* m_abTable; 83 AbTable* m_abTable;
83 AbLabel* m_ablabel; 84 AbLabel* m_ablabel;
84 85
85 QValueList<int> m_orderedFields; 86 QValueList<int> m_orderedFields;
86}; 87};
87 88
88 89
89#endif 90#endif