Diffstat (limited to 'core/pim/addressbook/abtable.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index d5ff279..84aef1e 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h | |||
@@ -22,13 +22,15 @@ | |||
22 | #define ABTABLE_H | 22 | #define ABTABLE_H |
23 | 23 | ||
24 | #include <qpe/categories.h> | 24 | #include <qpe/categories.h> |
25 | #include <qpe/contact.h> | 25 | #include <opie/ocontact.h> |
26 | 26 | ||
27 | #include <qmap.h> | 27 | #include <qmap.h> |
28 | #include <qtable.h> | 28 | #include <qtable.h> |
29 | #include <qstringlist.h> | 29 | #include <qstringlist.h> |
30 | #include <qcombobox.h> | 30 | #include <qcombobox.h> |
31 | 31 | ||
32 | #include <opie/ocontactaccess.h> | ||
33 | |||
32 | class AbTableItem : public QTableItem | 34 | class AbTableItem : public QTableItem |
33 | { | 35 | { |
34 | public: | 36 | public: |
@@ -64,9 +66,9 @@ public: | |||
64 | AbTable( const QValueList<int> *ordered, QWidget *parent, const char *name=0 ); | 66 | AbTable( const QValueList<int> *ordered, QWidget *parent, const char *name=0 ); |
65 | ~AbTable(); | 67 | ~AbTable(); |
66 | // NEW | 68 | // NEW |
67 | void addEntry( const Contact &newContact ); | 69 | void addEntry( const OContact &newContact ); |
68 | Contact currentEntry(); | 70 | OContact currentEntry(); |
69 | void replaceCurrentEntry( const Contact &newContact ); | 71 | void replaceCurrentEntry( const OContact &newContact ); |
70 | 72 | ||
71 | void init(); | 73 | void init(); |
72 | 74 | ||
@@ -83,15 +85,18 @@ public: | |||
83 | QStringList choiceNames() const; | 85 | QStringList choiceNames() const; |
84 | void setChoiceSelection(int index, const QStringList& list); | 86 | void setChoiceSelection(int index, const QStringList& list); |
85 | QStringList choiceSelection(int index) const; | 87 | QStringList choiceSelection(int index) const; |
86 | void setShowCategory( const QString &c ); | 88 | void setShowCategory( const QString &b, const QString &c ); |
87 | void setShowByLetter( char c ); | 89 | void setShowByLetter( char c ); |
88 | QString showCategory() const; | 90 | QString showCategory() const; |
89 | QStringList categories(); | 91 | QStringList categories(); |
90 | void resizeRows( int size ); | 92 | |
93 | void resizeRows(); | ||
91 | 94 | ||
92 | void show(); | 95 | void show(); |
93 | void setPaintingEnabled( bool e ); | 96 | void setPaintingEnabled( bool e ); |
94 | 97 | ||
98 | QString showBook() const; | ||
99 | |||
95 | public slots: | 100 | public slots: |
96 | void slotDoFind( const QString &str, bool caseSensitive, bool backwards, | 101 | void slotDoFind( const QString &str, bool caseSensitive, bool backwards, |
97 | int category ); | 102 | int category ); |
@@ -119,25 +124,30 @@ private: | |||
119 | void loadFile( const QString &strFile, bool journalFile ); | 124 | void loadFile( const QString &strFile, bool journalFile ); |
120 | void fitColumns(); | 125 | void fitColumns(); |
121 | void resort(); | 126 | void resort(); |
122 | void updateJournal( const Contact &contact, Contact::journal_action action, | 127 | void updateJournal( const OContact &contact, OContact::journal_action action, |
123 | int row = -1 ); | 128 | int row = -1 ); |
124 | void insertIntoTable( const Contact &contact, int row ); | 129 | void insertIntoTable( const OContact &contact, int row ); |
125 | void internalAddEntries( QList<Contact> &list ); | 130 | QString findContactName( const OContact &entry ); |
126 | QString findContactName( const Contact &entry ); | 131 | QString findContactContact( const OContact &entry, int row ); |
127 | QString findContactContact( const Contact &entry ); | 132 | void journalFreeReplace( const OContact &cnt, int row ); |
128 | void journalFreeReplace( const Contact &cnt, int row ); | ||
129 | void journalFreeRemove( int row ); | 133 | void journalFreeRemove( int row ); |
130 | void realignTable( int ); | 134 | void realignTable( int ); |
131 | void updateVisible(); | 135 | void updateVisible(); |
132 | int lastSortCol; | 136 | int lastSortCol; |
133 | bool asc; | 137 | bool asc; |
134 | char showChar; | 138 | char showChar; |
135 | QMap<AbTableItem*, Contact> contactList; | 139 | QMap<AbTableItem*, OContact> contactList; |
136 | const QValueList<int> *intFields; | 140 | const QValueList<int> *intFields; |
137 | int currFindRow; | 141 | int currFindRow; |
138 | QString showCat; | 142 | QString showCat; |
139 | QStringList choicenames; | 143 | QStringList choicenames; |
140 | bool enablePainting; | 144 | bool enablePainting; |
141 | Categories mCat; | 145 | Categories mCat; |
146 | |||
147 | QString showBk; | ||
148 | bool columnVisible; | ||
149 | |||
150 | OContactAccess m_contactdb; | ||
151 | |||
142 | }; | 152 | }; |
143 | #endif // ABTABLE_H | 153 | #endif // ABTABLE_H |