-rw-r--r-- | core/pim/addressbook/abview.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/pim/addressbook/abview.h b/core/pim/addressbook/abview.h index 4d35338..201b521 100644 --- a/core/pim/addressbook/abview.h +++ b/core/pim/addressbook/abview.h | |||
@@ -14,25 +14,28 @@ | |||
14 | 14 | ||
15 | class AbView: public QWidget | 15 | class AbView: public QWidget |
16 | { | 16 | { |
17 | Q_OBJECT | 17 | Q_OBJECT |
18 | 18 | ||
19 | public: | 19 | public: |
20 | enum Views{ TableView=0, CardView, PhoneBook, CompanyBook, EmailBook }; | 20 | enum Views{ TableView=0, CardView, PersonalView }; |
21 | 21 | ||
22 | AbView( QWidget* parent, const QValueList<int>& ordered, const QStringList& slOrderedFields ); | 22 | AbView( QWidget* parent, const QValueList<int>& ordered ); |
23 | ~AbView(); | ||
23 | 24 | ||
24 | bool save(); | 25 | bool save(); |
25 | void load(); | 26 | void load(); |
26 | void reload(); | 27 | void reload(); |
27 | void clear(); | 28 | void clear(); |
28 | 29 | ||
29 | void setView( Views view ); | 30 | void setView( Views view ); |
30 | void showContact( const OContact& cnt ); | 31 | void showPersonal( bool personal ); |
31 | void setShowByCategory( Views view, const QString& cat ); | 32 | void setShowByCategory( Views view, const QString& cat ); |
32 | void setShowByLetter( char c ); | 33 | void setShowByLetter( char c ); |
34 | void setListOrder( const QValueList<int>& ordered ); | ||
35 | |||
33 | // Add Entry and put to current | 36 | // Add Entry and put to current |
34 | void addEntry( const OContact &newContact ); | 37 | void addEntry( const OContact &newContact ); |
35 | void removeEntry( const int UID ); | 38 | void removeEntry( const int UID ); |
36 | void replaceEntry( const OContact &contact ); | 39 | void replaceEntry( const OContact &contact ); |
37 | OContact currentEntry(); | 40 | OContact currentEntry(); |
38 | 41 | ||
@@ -50,32 +53,34 @@ signals: | |||
50 | public slots: | 53 | public slots: |
51 | void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, | 54 | void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, |
52 | bool backwards, QString category = QString::null ); | 55 | bool backwards, QString category = QString::null ); |
53 | void slotSwitch(); | 56 | void slotSwitch(); |
54 | 57 | ||
55 | private: | 58 | private: |
59 | void updateListinViews(); | ||
56 | void updateView(); | 60 | void updateView(); |
57 | void clearForCategory(); | 61 | void clearForCategory(); |
58 | bool contactCompare( const OContact &cnt, int category ); | 62 | bool contactCompare( const OContact &cnt, int category ); |
59 | void parseName( const QString& name, QString *first, QString *middle, | 63 | void parseName( const QString& name, QString *first, QString *middle, |
60 | QString * last ); | 64 | QString * last ); |
61 | 65 | ||
62 | Categories mCat; | 66 | Categories mCat; |
63 | bool m_inSearch; | 67 | bool m_inSearch; |
68 | bool m_inPersonal; | ||
64 | int m_curr_category; | 69 | int m_curr_category; |
65 | Views m_curr_View; | 70 | Views m_curr_View; |
66 | Views m_prev_View; | 71 | Views m_prev_View; |
67 | int m_curr_Contact; | 72 | int m_curr_Contact; |
68 | 73 | ||
69 | OContactAccess m_contactdb; | 74 | OContactAccess* m_contactdb; |
75 | OContactAccess* m_storedDB; | ||
70 | OContactAccess::List m_list; | 76 | OContactAccess::List m_list; |
71 | 77 | ||
72 | QWidgetStack* m_viewStack; | 78 | QWidgetStack* m_viewStack; |
73 | AbTable* m_abTable; | 79 | AbTable* m_abTable; |
74 | AbLabel* m_ablabel; | 80 | AbLabel* m_ablabel; |
75 | 81 | ||
76 | QValueList<int> m_orderedFields; | 82 | QValueList<int> m_orderedFields; |
77 | QStringList m_slOrderedFields; | ||
78 | }; | 83 | }; |
79 | 84 | ||
80 | 85 | ||
81 | #endif | 86 | #endif |