Diffstat (limited to 'core/pim/addressbook/abtable.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.h | 87 |
1 files changed, 31 insertions, 56 deletions
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index 35a1e9e..83bd5a7 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h | |||
@@ -2,2 +2,3 @@ | |||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** Copyright (c) 2002 Stefan Eilers (eilers.stefan@epost.de) | ||
3 | ** | 4 | ** |
@@ -25,2 +26,3 @@ | |||
25 | #include <opie/ocontact.h> | 26 | #include <opie/ocontact.h> |
27 | #include <opie/ocontactaccess.h> | ||
26 | 28 | ||
@@ -31,4 +33,2 @@ | |||
31 | 33 | ||
32 | #include <opie/ocontactaccess.h> | ||
33 | |||
34 | class AbTableItem : public QTableItem | 34 | class AbTableItem : public QTableItem |
@@ -65,31 +65,21 @@ class AbTable : public QTable | |||
65 | public: | 65 | public: |
66 | AbTable( const QValueList<int> *ordered, QWidget *parent, const char *name=0 ); | 66 | AbTable( const QValueList<int> ordered, QWidget *parent, const char *name=0 ); |
67 | ~AbTable(); | 67 | ~AbTable(); |
68 | // NEW | 68 | |
69 | void addEntry( const OContact &newContact ); | 69 | // Set the contacts shown in the table |
70 | void setContacts( const OContactAccess::List& viewList ); | ||
71 | // Selects a contact of a specific UID | ||
72 | bool selectContact( int UID ); | ||
73 | |||
74 | // Get the current selected entry | ||
70 | OContact currentEntry(); | 75 | OContact currentEntry(); |
71 | void replaceCurrentEntry( const OContact &newContact ); | ||
72 | 76 | ||
73 | void init(); | 77 | // Get the UID of the current selected Entry |
78 | int currentEntry_UID(); | ||
79 | |||
80 | QString findContactName( const OContact &entry ); | ||
74 | 81 | ||
75 | void deleteCurrentEntry(); | 82 | void init(); |
76 | void clear(); | 83 | void clear(); |
77 | void clearFindRow() { currFindRow = -1; } | ||
78 | void loadFields(); | ||
79 | void refresh(); | 84 | void refresh(); |
80 | bool save(); | ||
81 | void load(); | ||
82 | void reload(); | ||
83 | |||
84 | // addresspicker mode | ||
85 | void setChoiceNames( const QStringList& list); | ||
86 | QStringList choiceNames() const; | ||
87 | void setChoiceSelection(int index, const QStringList& list); | ||
88 | QStringList choiceSelection(int index) const; | ||
89 | void setShowCategory( const QString &b, const QString &c ); | ||
90 | void setShowByLetter( char c ); | ||
91 | QString showCategory() const; | ||
92 | QStringList categories(); | ||
93 | |||
94 | void resizeRows(); | ||
95 | 85 | ||
@@ -98,17 +88,13 @@ public: | |||
98 | 88 | ||
99 | QString showBook() const; | 89 | // addresspicker mode (What's that ? se) |
100 | 90 | void setChoiceNames( const QStringList& list); | |
101 | void inSearch() { m_inSearch = true; } | 91 | QStringList choiceNames() const; |
102 | void offSearch() { m_inSearch = false; } | 92 | void setChoiceSelection( const QValueList<int>& list ); |
93 | QStringList choiceSelection(int index) const; | ||
103 | 94 | ||
104 | public slots: | ||
105 | void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, bool backwards, | ||
106 | QString category = QString::null ); | ||
107 | signals: | 95 | signals: |
108 | void empty( bool ); | 96 | void signalSwitch(); |
109 | void details(); | 97 | void signalEditor(); |
110 | void signalNotFound(); | 98 | void signalKeyDown(); |
111 | void signalWrapAround(); | 99 | void signalKeyUp(); |
112 | void signalSearchBackward(); // Signalled if backward search is requested | ||
113 | void signalSearchNext(); // Singalled if forward search is requested | ||
114 | 100 | ||
@@ -129,31 +115,20 @@ protected slots: | |||
129 | private: | 115 | private: |
130 | void loadFile( const QString &strFile, bool journalFile ); | 116 | void insertIntoTable( const OContact &cnt, int row ); |
117 | QString findContactContact( const OContact &entry, int row ); | ||
131 | void fitColumns(); | 118 | void fitColumns(); |
119 | void resizeRows(); | ||
120 | void realignTable(); | ||
132 | void resort(); | 121 | void resort(); |
133 | void updateJournal( const OContact &contact, OContact::journal_action action, | ||
134 | int row = -1 ); | ||
135 | void insertIntoTable( const OContact &contact, int row ); | ||
136 | QString findContactName( const OContact &entry ); | ||
137 | QString findContactContact( const OContact &entry, int row ); | ||
138 | void journalFreeReplace( const OContact &cnt, int row ); | ||
139 | void journalFreeRemove( int row ); | ||
140 | void realignTable( int ); | ||
141 | void updateVisible(); | 122 | void updateVisible(); |
123 | |||
142 | int lastSortCol; | 124 | int lastSortCol; |
143 | bool asc; | 125 | bool asc; |
144 | char showChar; | ||
145 | QMap<AbTableItem*, OContact> contactList; | 126 | QMap<AbTableItem*, OContact> contactList; |
146 | const QValueList<int> *intFields; | 127 | QValueList<int> intFields; |
147 | int currFindRow; | ||
148 | QString showCat; | ||
149 | QStringList choicenames; | 128 | QStringList choicenames; |
150 | bool enablePainting; | 129 | bool enablePainting; |
151 | Categories mCat; | ||
152 | 130 | ||
153 | QString showBk; | ||
154 | bool columnVisible; | 131 | bool columnVisible; |
155 | 132 | ||
156 | bool m_inSearch; | 133 | OContactAccess::List m_viewList; |
157 | |||
158 | OContactAccess m_contactdb; | ||
159 | 134 | ||