summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO35
-rw-r--r--core/pim/addressbook/ablabel.cpp7
-rw-r--r--core/pim/addressbook/abview.cpp55
-rw-r--r--core/pim/addressbook/abview.h2
-rw-r--r--core/pim/addressbook/addressbook.cpp2
-rw-r--r--core/pim/addressbook/configdlg_base.ui10
-rw-r--r--core/pim/addressbook/ocontactfields.cpp4
7 files changed, 68 insertions, 47 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index 1cbee26..93ece13 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -1,106 +1,109 @@
1Stuff todo until OPIE 1.0 : 1Stuff todo until OPIE 1.0 :
2=========================== 2===========================
3 3
4Feature requests: 4Feature requests:
5----------------- 5-----------------
6- Dial by mobile phone by tapping the number.. 6- Dial by mobile phone by tapping the number..
7 (Maybe using gsmtool. And we may 7 (Maybe using gsmtool. And we may
8 add a library class for this) 8 add a library class for this)
9- dial with dtmfdial incase it's installed and there's no mobile 9- dial with dtmfdial incase it's installed and there's no mobile
10- 3rd column for 2. Contact 10- 3rd column for 2. Contact
11- Implementing additional Views (Phonebook, ...) 11- Implementing additional Views (Phonebook, ...)
12- Birthday & Anniversary Reminder 12- Birthday & Anniversary Reminder
13- Plugin for Today for Birthdays and Anniversaries 13- Plugin for Today for Birthdays and Anniversaries
14 14
15Known Bugs: 15Known Bugs:
16----------- 16-----------
17- OK-Key does not switch from Detailview (ablable) to Listview 17- OK-Key does not switch from Detailview (ablable) to Listview
18- After finising search and after Edit: Clear Picker
19- After Edit: Table position back to edited entry.
20- Combo in Contacteditor: Field "Default-Email" is not correctly implemented and
21 should be removed by a picker/combo.
22- Name order selected in "contacteditor" not used in list view. 18- Name order selected in "contacteditor" not used in list view.
19
23- Language not English (tested with german opie-translation): 20- Language not English (tested with german opie-translation):
24 1. Configure nicht übersetzt (alles leer). 21 1. Configure nicht übersetzt (alles leer).
25 2. Contacteditor nur teilweise übersetzt. 22 2. Contacteditor nur teilweise übersetzt.
26 3. Kategorie-Picker geht nicht (nur bei Openzaurus). 23 3. Kategorie-Picker geht nicht.
27 24
28 25
29Bugs but not in addressbook: 26Bugs but not in addressbook:
30----------------------------- 27-----------------------------
31- VCARD: Import of Anniversary does not work correctly (currently disabled) 28- VCARD: Import of Anniversary does not work correctly (currently disabled)
32- VCARD: If umlaut (äöüß) in address, the parser gets confused.. 29- VCARD: If umlaut (äöüß) in address, the parser gets confused..
33- Exporting and reimporting of Jobtitle fails. 30
31- Exporting and reimporting of Jobtitle fails (Could not reproduce this ! (se))
34 32
35 33
36Urgent: 34Urgent:
37-------- 35--------
38- Contact-Editor is temporarely reanabled. Wait for replacement. 36- Implement Button Pics
37- Fix start of opie-mail
38
39ContactEditor:
40- Contact-Editor is temporarely reenabled. Wait for replacement.
39- Redesign of Contacteditor 41- Redesign of Contacteditor
40- Store last settings of combo-boxes 42- Store last settings of combo-boxes
41- Category is on the wrong position after changing to personal and back to normal 43- Category is on the wrong position after changing to personal and back to normal
42 ( Temporarily workaround: Category is never deactivated.. :S ) 44 ( Temporarily workaround: Category is never deactivated.. :S )
43- Optimize Table Update... 45- Personal and Business Web-page is not editable
44- Change MyDialog to Config
45- Implement Button Pics
46- Fix start of opie-mail
47 46
48Important: 47Important:
49---------- 48----------
50 49
50- Implement a picker/combo for the default email.
51- After search (Started with Return): KeyFocus should be on Tabelle 51- After search (Started with Return): KeyFocus should be on Tabelle
52- Searchwidget closed: Selected user is jumping
53- Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist)
54 zu lange..
55
56- Store position and state of toolbar
57 52
58- IRDA Receive: Contact is added, but start of editor with new entry expected.. 53- IRDA Receive: Contact is added, but start of editor with new entry expected..
59- "What's this" should be added (Deleyed after Feature Freeze) 54- "What's this" should be added (Deleyed after Feature Freeze)
60 55
61Less important: 56Less important:
62--------------- 57---------------
63- Reload if contacts were changed externally 58- Reload if contacts were changed externally
64- Overview window cleanup needed.. 59- Overview window cleanup needed..
65- The picker (alphabetical sort widget) should be 60- The picker (alphabetical sort widget) should be
66 placed verticaly or horizontally (configurable) 61 placed verticaly or horizontally (configurable)
67- Find a smart solution for activating/deactivating the "send email" event 62- Find a smart solution for activating/deactivating the "send email" event
68 63
69Should be Fixed (not absolute sure, need further validation): 64Should be Fixed (not absolute sure, need further validation):
70------------------------------------------------------------- 65-------------------------------------------------------------
66- Searchwidget closed: Selected user is jumping
67- Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist)
68 zu lange..
71 69
72 70
73Fixed: 71Fixed:
74------- 72-------
75- Syncing: abtable not reloaded after sync. 73- Syncing: abtable not reloaded after sync.
76- Find widget should be replaced by something like 74- Find widget should be replaced by something like
77 qpdf has. 75 qpdf has.
78- Adding a configuration dialog 76- Adding a configuration dialog
79- Picker: Activated letter schould be more visible 77- Picker: Activated letter schould be more visible
80- Advanced handling of cursor keys (search..) 78- Advanced handling of cursor keys (search..)
81- Mail-Icon is missing 79- Mail-Icon is missing
82- Use opie-mail insted of qt-mail if possible. 80- Use opie-mail insted of qt-mail if possible.
83- Font menu is invisible using german translation 81- Font menu is invisible using german translation
84- Personal contact editor: Disable categories 82- Personal contact editor: Disable categories
85- "Nonenglish" translation bug has to be fixed. 83- "Nonenglish" translation bug has to be fixed.
86- contacteditor: Birthday, annyversary, ... : Use Dateselector 84- contacteditor: Birthday, annyversary, ... : Use Dateselector
87- The names of the countries are sorted by there english names, only.. 85- The names of the countries are sorted by there english names, only..
88 Even if they are translated.. :S 86 Even if they are translated.. :S
89- Cursor keys should work in detail-view (ablabel) 87- Cursor keys should work in detail-view (ablabel)
90 -> Ablabel should be removed and Abtable should be increased with 88 -> Ablabel should be removed and Abtable should be increased with
91 different views (as started by darwin zins).. 89 different views (as started by darwin zins)..
92- Use advanced database functions in abtable to decrease 90- Use advanced database functions in abtable to decrease
93 memory footprint and to make everything more easy ! 91 memory footprint and to make everything more easy !
94 (abtable should store Iterator for selected Category) 92 (abtable should store Iterator for selected Category)
95- Abtable: Configure Contact column (internally already available, 93- Abtable: Configure Contact column (internally already available,
96 need configuration) 94 need configuration)
97- Select of primary contact (see #274 on mantis) 95- Select of primary contact (see #274 on mantis)
98- Category-select does not work completely: "Unfiled" is always in listview .. 96- Category-select does not work completely: "Unfiled" is always in listview ..
99- Return from Contacteditor: Category resettet to all 97- Return from Contacteditor: Category resettet to all
100- Personal Details not working 98- Personal Details not working
101- If category changed, the letterpicker should be resetted 99- If category changed, the letterpicker should be resetted
102- There should be some icons for List and Cardview 100- There should be some icons for List and Cardview
103- If in Cardview and a category change removes all entries: 101- If in Cardview and a category change removes all entries:
104 There are already entries in Cardview after up/down 102 There are already entries in Cardview after up/down
105- Personal Details: Anniversary zeigt Fantasie-Werte 103- Personal Details: Anniversary zeigt Fantasie-Werte
106- Unfiled shown just in Category "All" and "Unfiled". 104- Unfiled shown just in Category "All" and "Unfiled".
105- After finising search and after Edit: Clear Picker
106- After Edit: Table position back to edited entry.
107- Optimize Table Update...
108- Change MyDialog to Config
109- Store position and state of toolbar
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index 5b40dc1..937aaae 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -6,97 +6,102 @@
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "ablabel.h" 21#include "ablabel.h"
22 22
23#include <qpe/stringutil.h> 23#include <qpe/stringutil.h>
24 24
25#include <qregexp.h> 25#include <qregexp.h>
26#include <qstylesheet.h> 26#include <qstylesheet.h>
27 27
28AbLabel::AbLabel( QWidget *parent, const char *name ): 28AbLabel::AbLabel( QWidget *parent, const char *name ):
29 QTextView( parent, name ), 29 QTextView( parent, name ),
30 m_empty( false ) 30 m_empty( false )
31{ 31{
32} 32}
33 33
34AbLabel::~AbLabel() 34AbLabel::~AbLabel()
35{ 35{
36} 36}
37 37
38void AbLabel::setContacts( const OContactAccess::List& viewList ) 38void AbLabel::setContacts( const OContactAccess::List& viewList )
39{ 39{
40 m_viewList = viewList; 40 m_viewList = viewList;
41 if (m_viewList.count() != 0){ 41 if (m_viewList.count() != 0){
42 m_empty = false; 42 m_empty = false;
43 m_itCurContact = m_viewList.begin(); 43 m_itCurContact = m_viewList.begin();
44 sync(); 44 sync();
45 }else{ 45 }else{
46 // m_itCurContact.clear(); 46 // m_itCurContact.clear();
47 m_empty = true; 47 m_empty = true;
48 setText( "" ); 48 setText( "" );
49 } 49 }
50} 50}
51 51
52int AbLabel::currentEntry_UID() 52int AbLabel::currentEntry_UID()
53{ 53{
54 return ( (*m_itCurContact).uid() ); 54 OContact contact = *m_itCurContact;
55
56 if ( contact.isEmpty() )
57 return 0;
58 else
59 return ( contact.uid() );
55} 60}
56 61
57OContact AbLabel::currentEntry() 62OContact AbLabel::currentEntry()
58{ 63{
59 return ( *m_itCurContact ); 64 return ( *m_itCurContact );
60} 65}
61 66
62 67
63bool AbLabel::selectContact( int UID ) 68bool AbLabel::selectContact( int UID )
64{ 69{
65 70
66 for ( m_itCurContact = m_viewList.begin(); m_itCurContact != m_viewList.end(); ++m_itCurContact){ 71 for ( m_itCurContact = m_viewList.begin(); m_itCurContact != m_viewList.end(); ++m_itCurContact){
67 if ( (*m_itCurContact).uid() == UID ) 72 if ( (*m_itCurContact).uid() == UID )
68 break; 73 break;
69 } 74 }
70 sync(); 75 sync();
71 76
72 return true; 77 return true;
73} 78}
74 79
75 80
76 81
77void AbLabel::sync() 82void AbLabel::sync()
78{ 83{
79 QString text = (*m_itCurContact).toRichText(); 84 QString text = (*m_itCurContact).toRichText();
80 setText( text ); 85 setText( text );
81} 86}
82 87
83void AbLabel::keyPressEvent( QKeyEvent *e ) 88void AbLabel::keyPressEvent( QKeyEvent *e )
84{ 89{
85 // Commonly handled keys 90 // Commonly handled keys
86 if ( !m_empty ){ 91 if ( !m_empty ){
87 switch( e->key() ) { 92 switch( e->key() ) {
88 case Qt::Key_Left: 93 case Qt::Key_Left:
89 qWarning( "Left.."); 94 qWarning( "Left..");
90 case Qt::Key_Right: 95 case Qt::Key_Right:
91 qWarning( "Right.."); 96 qWarning( "Right..");
92 case Qt::Key_F33: 97 case Qt::Key_F33:
93 qWarning( "OK.."); 98 qWarning( "OK..");
94 emit signalOkPressed(); 99 emit signalOkPressed();
95 break; 100 break;
96 case Qt::Key_Up: 101 case Qt::Key_Up:
97 qWarning( "UP.."); 102 qWarning( "UP..");
98 --m_itCurContact; 103 --m_itCurContact;
99 if ( *m_itCurContact != OContact() ) 104 if ( *m_itCurContact != OContact() )
100 sync(); 105 sync();
101 else 106 else
102 m_itCurContact = m_viewList.end(); 107 m_itCurContact = m_viewList.end();
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 0f4bd5f..7226e82 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -79,197 +79,203 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
79 this, SLOT( slotSwitch( void ) ) ); 79 this, SLOT( slotSwitch( void ) ) );
80 80
81 load(); 81 load();
82} 82}
83 83
84AbView::~AbView() 84AbView::~AbView()
85{ 85{
86 m_contactdb -> save(); 86 m_contactdb -> save();
87 delete m_contactdb; 87 delete m_contactdb;
88 88
89 if ( m_storedDB ){ 89 if ( m_storedDB ){
90 m_storedDB -> save(); 90 m_storedDB -> save();
91 delete m_storedDB; 91 delete m_storedDB;
92 } 92 }
93} 93}
94 94
95 95
96void AbView::setView( Views view ) 96void AbView::setView( Views view )
97{ 97{
98 qWarning("AbView::setView( Views view )"); 98 qWarning("AbView::setView( Views view )");
99 m_curr_View = view; 99 m_curr_View = view;
100 load(); 100 load();
101} 101}
102 102
103void AbView::addEntry( const OContact &newContact ) 103void AbView::addEntry( const OContact &newContact )
104{ 104{
105 qWarning("abview:AddContact"); 105 qWarning("abview:AddContact");
106 m_contactdb->add ( newContact ); 106 m_contactdb->add ( newContact );
107 load(); 107 load();
108 108
109} 109}
110void AbView::removeEntry( const int UID ) 110void AbView::removeEntry( const int UID )
111{ 111{
112 qWarning("abview:RemoveContact"); 112 qWarning("abview:RemoveContact");
113 m_contactdb->remove( UID ); 113 m_contactdb->remove( UID );
114 load(); 114 load();
115} 115}
116 116
117void AbView::replaceEntry( const OContact &contact ) 117void AbView::replaceEntry( const OContact &contact )
118{ 118{
119 qWarning("abview:ReplaceContact"); 119 qWarning("abview:ReplaceContact");
120 m_contactdb->replace( contact ); 120 m_contactdb->replace( contact );
121 load(); 121 load();
122 122
123} 123}
124 124
125OContact AbView::currentEntry() 125OContact AbView::currentEntry()
126{ 126{
127 OContact currentContact;
128
127 switch ( (int) m_curr_View ) { 129 switch ( (int) m_curr_View ) {
128 case TableView: 130 case TableView:
129 return ( m_abTable -> currentEntry() ); 131 currentContact = m_abTable -> currentEntry();
130 break; 132 break;
131 case CardView: 133 case CardView:
132 return ( m_ablabel -> currentEntry() ); 134 currentContact = m_ablabel -> currentEntry();
133 break; 135 break;
134 } 136 }
135 return OContact(); 137 m_curr_Contact = currentContact.uid();
138 return currentContact;
136} 139}
137 140
138bool AbView::save() 141bool AbView::save()
139{ 142{
140 qWarning("abView:Save data"); 143 qWarning("abView:Save data");
141 144
142 return m_contactdb->save(); 145 return m_contactdb->save();
143} 146}
144 147
145void AbView::load() 148void AbView::load()
146{ 149{
147 qWarning("abView:Load data"); 150 qWarning("abView:Load data");
151
152 // Letter Search is stopped at this place
153 emit signalClearLetterPicker();
148 154
149 if ( m_inPersonal ) 155 if ( m_inPersonal )
150 m_list = m_contactdb->allRecords(); 156 m_list = m_contactdb->allRecords();
151 else 157 else{
152 m_list = m_contactdb->sorted( true, 0, 0, 0 ); 158 m_list = m_contactdb->sorted( true, 0, 0, 0 );
153 159 clearForCategory();
154 clearForCategory(); 160 }
155 161
156 qWarning ("Number of contacts: %d", m_list.count()); 162 qWarning ("Number of contacts: %d", m_list.count());
157 163
158 updateView(); 164 updateView( true );
159 165
160} 166}
161 167
162void AbView::reload() 168void AbView::reload()
163{ 169{
164 qWarning( "void AbView::reload()" ); 170 qWarning( "void AbView::reload()" );
165 171
166 m_contactdb->reload(); 172 m_contactdb->reload();
167 load(); 173 load();
168} 174}
169 175
170void AbView::clear() 176void AbView::clear()
171{ 177{
172 // :SX 178 // :SX
173} 179}
174 180
175void AbView::setShowByCategory( const QString& cat ) 181void AbView::setShowByCategory( const QString& cat )
176{ 182{
177 qWarning("AbView::setShowCategory( const QString& cat )"); 183 qWarning("AbView::setShowCategory( const QString& cat )");
178 184
179 int intCat = 0; 185 int intCat = 0;
180 186
181 // All (cat == NULL) will be stored as -1 187 // All (cat == NULL) will be stored as -1
182 if ( cat.isNull() ) 188 if ( cat.isNull() )
183 intCat = -1; 189 intCat = -1;
184 else 190 else
185 intCat = mCat.id("Contacts", cat ); 191 intCat = mCat.id("Contacts", cat );
186 192
187 // Just do anything if we really change the category 193 // Just do anything if we really change the category
188 if ( intCat != m_curr_category ){ 194 if ( intCat != m_curr_category ){
189 qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category); 195 qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category);
190 196
191 m_curr_category = intCat; 197 m_curr_category = intCat;
192 emit signalClearLetterPicker(); 198 emit signalClearLetterPicker();
193 199
194 load(); 200 load();
195 } 201 }
196 202
197} 203}
198 204
199void AbView::setShowToView( Views view ) 205void AbView::setShowToView( Views view )
200{ 206{
201 qWarning("void AbView::setShowToView( View %d )", view); 207 qWarning("void AbView::setShowToView( View %d )", view);
202 208
203 qWarning ("Change the View (Category is: %d)", m_curr_category); 209 qWarning ("Change the View (Category is: %d)", m_curr_category);
204 210
205 if ( m_curr_View != view ){ 211 if ( m_curr_View != view ){
206 m_prev_View = m_curr_View; 212 m_prev_View = m_curr_View;
207 m_curr_View = view; 213 m_curr_View = view;
208 214
209 updateView(); 215 updateView();
210 } 216 }
211 217
212} 218}
213 219
214void AbView::setShowByLetter( char c ) 220void AbView::setShowByLetter( char c )
215{ 221{
216 qWarning("void AbView::setShowByLetter( %c )", c ); 222 qWarning("void AbView::setShowByLetter( %c )", c );
217 OContact query; 223 OContact query;
218 if ( c == 0 ){ 224 if ( c == 0 ){
219 load(); 225 load();
220 return; 226 return;
221 }else{ 227 }else{
222 query.setLastName( QString("%1*").arg(c) ); 228 query.setLastName( QString("%1*").arg(c) );
223 m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards ); 229 m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards );
224 clearForCategory(); 230 clearForCategory();
225 m_curr_Contact = 0; 231 m_curr_Contact = 0;
226 } 232 }
227 updateView(); 233 updateView( true );
228} 234}
229 235
230void AbView::setListOrder( const QValueList<int>& ordered ) 236void AbView::setListOrder( const QValueList<int>& ordered )
231{ 237{
232 m_orderedFields = ordered; 238 m_orderedFields = ordered;
233 updateView(); 239 updateView();
234} 240}
235 241
236 242
237QString AbView::showCategory() const 243QString AbView::showCategory() const
238{ 244{
239 return mCat.label( "Contacts", m_curr_category ); 245 return mCat.label( "Contacts", m_curr_category );
240} 246}
241 247
242void AbView::showPersonal( bool personal ) 248void AbView::showPersonal( bool personal )
243{ 249{
244 qWarning ("void AbView::showPersonal( %d )", personal); 250 qWarning ("void AbView::showPersonal( %d )", personal);
245 251
246 if ( personal ){ 252 if ( personal ){
247 253
248 if ( m_inPersonal ) 254 if ( m_inPersonal )
249 return; 255 return;
250 256
251 // Now switch to vCard Backend and load data. 257 // Now switch to vCard Backend and load data.
252 // The current default backend will be stored 258 // The current default backend will be stored
253 // to avoid unneeded load/stores. 259 // to avoid unneeded load/stores.
254 m_storedDB = m_contactdb; 260 m_storedDB = m_contactdb;
255 261
256 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 262 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
257 addressbookPersonalVCardName() ); 263 addressbookPersonalVCardName() );
258 m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 264 m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
259 265
260 m_inPersonal = true; 266 m_inPersonal = true;
261 m_curr_View = CardView; 267 m_curr_View = CardView;
262 268
263 }else{ 269 }else{
264 270
265 if ( !m_inPersonal ) 271 if ( !m_inPersonal )
266 return; 272 return;
267 273
268 // Remove vCard Backend and restore default 274 // Remove vCard Backend and restore default
269 m_contactdb->save(); 275 m_contactdb->save();
270 delete m_contactdb; 276 delete m_contactdb;
271 277
272 m_contactdb = m_storedDB; 278 m_contactdb = m_storedDB;
273 m_storedDB = 0l; 279 m_storedDB = 0l;
274 280
275 m_curr_View = TableView; 281 m_curr_View = TableView;
@@ -280,180 +286,183 @@ void AbView::showPersonal( bool personal )
280} 286}
281 287
282QStringList AbView::categories() 288QStringList AbView::categories()
283{ 289{
284 mCat.load( categoryFileName() ); 290 mCat.load( categoryFileName() );
285 QStringList categoryList = mCat.labels( "Contacts" ); 291 QStringList categoryList = mCat.labels( "Contacts" );
286 return categoryList; 292 return categoryList;
287} 293}
288 294
289// BEGIN: Slots 295// BEGIN: Slots
290void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, 296void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
291 bool , QString cat = QString::null ) 297 bool , QString cat = QString::null )
292{ 298{
293 qWarning( "void AbView::slotDoFind" ); 299 qWarning( "void AbView::slotDoFind" );
294 300
295 // We reloading the data: Deselect Letterpicker 301 // We reloading the data: Deselect Letterpicker
296 emit signalClearLetterPicker(); 302 emit signalClearLetterPicker();
297 303
298 // Use the current Category if nothing else selected 304 // Use the current Category if nothing else selected
299 int category = 0; 305 int category = 0;
300 306
301 if ( cat.isEmpty() ) 307 if ( cat.isEmpty() )
302 category = m_curr_category; 308 category = m_curr_category;
303 else{ 309 else{
304 category = mCat.id("Contacts", cat ); 310 category = mCat.id("Contacts", cat );
305 } 311 }
306 312
307 qWarning ("Find in Category %d", category); 313 qWarning ("Find in Category %d", category);
308 314
309 QRegExp r( str ); 315 QRegExp r( str );
310 r.setCaseSensitive( caseSensitive ); 316 r.setCaseSensitive( caseSensitive );
311 r.setWildcard( !useRegExp ); 317 r.setWildcard( !useRegExp );
312 318
313 // Get all matching entries out of the database 319 // Get all matching entries out of the database
314 m_list = m_contactdb->matchRegexp( r ); 320 m_list = m_contactdb->matchRegexp( r );
315 321
316 qWarning( "found: %d", m_list.count() ); 322 qWarning( "found: %d", m_list.count() );
317 if ( m_list.count() == 0 ){ 323 if ( m_list.count() == 0 ){
318 emit signalNotFound(); 324 emit signalNotFound();
319 return; 325 return;
320 } 326 }
321 327
322 // Now remove all contacts with wrong category (if any selected) 328 // Now remove all contacts with wrong category (if any selected)
323 // This algorithm is a litte bit ineffective, but 329 // This algorithm is a litte bit ineffective, but
324 // we will not have a lot of matching entries.. 330 // we will not have a lot of matching entries..
325 clearForCategory(); 331 clearForCategory();
326 332
327 // Now show all found entries 333 // Now show all found entries
328 updateView(); 334 updateView( true );
329} 335}
330 336
331void AbView::offSearch() 337void AbView::offSearch()
332{ 338{
333 m_inSearch = false; 339 m_inSearch = false;
334 340
335 load(); 341 load();
336} 342}
337 343
338void AbView::slotSwitch(){ 344void AbView::slotSwitch(){
339 qWarning("AbView::slotSwitch()"); 345 qWarning("AbView::slotSwitch()");
340 346
341 m_prev_View = m_curr_View; 347 m_prev_View = m_curr_View;
342 switch ( (int) m_curr_View ){ 348 switch ( (int) m_curr_View ){
343 case TableView: 349 case TableView:
344 qWarning("Switching to CardView"); 350 qWarning("Switching to CardView");
345 m_curr_View = CardView; 351 m_curr_View = CardView;
346 break; 352 break;
347 case CardView: 353 case CardView:
348 qWarning("Switching to TableView"); 354 qWarning("Switching to TableView");
349 m_curr_View = TableView; 355 m_curr_View = TableView;
350 break; 356 break;
351 } 357 }
352 updateView(); 358 updateView();
353 359
354} 360}
355 361
356// END: Slots 362// END: Slots
357 363
358void AbView::clearForCategory() 364void AbView::clearForCategory()
359{ 365{
360 OContactAccess::List::Iterator it; 366 OContactAccess::List::Iterator it;
361 // Now remove all contacts with wrong category if any category selected 367 // Now remove all contacts with wrong category if any category selected
362 368
363 OContactAccess::List allList = m_list; 369 OContactAccess::List allList = m_list;
364 if ( m_curr_category != -1 ){ 370 if ( m_curr_category != -1 ){
365 for ( it = allList.begin(); it != allList.end(); ++it ){ 371 for ( it = allList.begin(); it != allList.end(); ++it ){
366 if ( !contactCompare( *it, m_curr_category ) ){ 372 if ( !contactCompare( *it, m_curr_category ) ){
367 qWarning("Removing %d", (*it).uid()); 373 qWarning("Removing %d", (*it).uid());
368 m_list.remove( (*it).uid() ); 374 m_list.remove( (*it).uid() );
369 } 375 }
370 } 376 }
371 } 377 }
372 378
373} 379}
374 380
375bool AbView::contactCompare( const OContact &cnt, int category ) 381bool AbView::contactCompare( const OContact &cnt, int category )
376{ 382{
377 qWarning ("bool AbView::contactCompare( const OContact &cnt, %d )", category); 383 qWarning ("bool AbView::contactCompare( const OContact &cnt, %d )", category);
378 384
379 bool returnMe; 385 bool returnMe;
380 QArray<int> cats; 386 QArray<int> cats;
381 cats = cnt.categories(); 387 cats = cnt.categories();
382 388
383 qWarning ("Number of categories: %d", cats.count() ); 389 qWarning ("Number of categories: %d", cats.count() );
384 390
385 returnMe = false; 391 returnMe = false;
386 if ( cats.count() == 0 && category == 0 ) 392 if ( cats.count() == 0 && category == 0 )
387 // Contacts with no category will just shown on "All" and "Unfiled" 393 // Contacts with no category will just shown on "All" and "Unfiled"
388 returnMe = true; 394 returnMe = true;
389 else { 395 else {
390 int i; 396 int i;
391 for ( i = 0; i < int(cats.count()); i++ ) { 397 for ( i = 0; i < int(cats.count()); i++ ) {
392 qWarning("Comparing %d with %d",cats[i],category ); 398 qWarning("Comparing %d with %d",cats[i],category );
393 if ( cats[i] == category ) { 399 if ( cats[i] == category ) {
394 returnMe = true; 400 returnMe = true;
395 break; 401 break;
396 } 402 }
397 } 403 }
398 } 404 }
399 qWarning ("Return: %d", returnMe); 405 qWarning ("Return: %d", returnMe);
400 return returnMe; 406 return returnMe;
401} 407}
402 408
403// In Some rare cases we have to update all lists.. 409// In Some rare cases we have to update all lists..
404void AbView::updateListinViews() 410void AbView::updateListinViews()
405{ 411{
406 m_abTable -> setContacts( m_list ); 412 m_abTable -> setContacts( m_list );
407 m_ablabel -> setContacts( m_list ); 413 m_ablabel -> setContacts( m_list );
408} 414}
409 415
410void AbView::updateView() 416void AbView::updateView( bool newdata )
411{ 417{
412 qWarning("AbView::updateView()"); 418 qWarning("AbView::updateView()");
413 419
414 if ( m_viewStack -> visibleWidget() ){ 420 if ( m_viewStack -> visibleWidget() ){
415 m_viewStack -> visibleWidget() -> clearFocus(); 421 m_viewStack -> visibleWidget() -> clearFocus();
416 } 422 }
417 423
418 // If we switching the view, we have to store some information 424 // If we switching the view, we have to store some information
419 if ( m_list.count() ){ 425 if ( !newdata ){
420 switch ( (int) m_prev_View ) { 426 if ( m_list.count() ){
421 case TableView: 427 switch ( (int) m_prev_View ) {
422 m_curr_Contact = m_abTable -> currentEntry_UID(); 428 case TableView:
423 break; 429 m_curr_Contact = m_abTable -> currentEntry_UID();
424 case CardView: 430 break;
425 m_curr_Contact = m_ablabel -> currentEntry_UID(); 431 case CardView:
426 break; 432 m_curr_Contact = m_ablabel -> currentEntry_UID();
427 } 433 break;
428 }else 434 }
429 m_curr_Contact = 0; 435 }else
436 m_curr_Contact = 0;
437 }
430 438
431 // Feed all views with new lists 439 // Feed all views with new lists
432 updateListinViews(); 440 if ( newdata )
441 updateListinViews();
433 442
434 // Inform the world that the view is changed 443 // Tell the world that the view is changed
435 if ( m_curr_View != m_prev_View ) 444 if ( m_curr_View != m_prev_View )
436 emit signalViewSwitched ( (int) m_curr_View ); 445 emit signalViewSwitched ( (int) m_curr_View );
437 446
438 m_prev_View = m_curr_View; 447 m_prev_View = m_curr_View;
439 448
440 // Switch to new View 449 // Switch to new View
441 switch ( (int) m_curr_View ) { 450 switch ( (int) m_curr_View ) {
442 case TableView: 451 case TableView:
443 m_abTable -> setChoiceSelection( m_orderedFields ); 452 m_abTable -> setChoiceSelection( m_orderedFields );
444 if ( m_curr_Contact != 0 ) 453 if ( m_curr_Contact != 0 )
445 m_abTable -> selectContact ( m_curr_Contact ); 454 m_abTable -> selectContact ( m_curr_Contact );
446 m_abTable -> setFocus(); 455 m_abTable -> setFocus();
447 break; 456 break;
448 case CardView: 457 case CardView:
449 if ( m_curr_Contact != 0 ) 458 if ( m_curr_Contact != 0 )
450 m_ablabel -> selectContact( m_curr_Contact ); 459 m_ablabel -> selectContact( m_curr_Contact );
451 m_ablabel -> setFocus(); 460 m_ablabel -> setFocus();
452 break; 461 break;
453 } 462 }
454 463
455 // Raise the current View 464 // Raise the current View
456 m_viewStack -> raiseWidget( m_curr_View ); 465 m_viewStack -> raiseWidget( m_curr_View );
457} 466}
458 467
459 468
diff --git a/core/pim/addressbook/abview.h b/core/pim/addressbook/abview.h
index 2c10cfa..8570fe7 100644
--- a/core/pim/addressbook/abview.h
+++ b/core/pim/addressbook/abview.h
@@ -13,75 +13,75 @@
13#include "ablabel.h" 13#include "ablabel.h"
14 14
15class AbView: public QWidget 15class AbView: public QWidget
16{ 16{
17 Q_OBJECT 17 Q_OBJECT
18 18
19public: 19public:
20 enum Views{ TableView=0, CardView, PersonalView }; 20 enum Views{ TableView=0, CardView, PersonalView };
21 21
22 AbView( QWidget* parent, const QValueList<int>& ordered ); 22 AbView( QWidget* parent, const QValueList<int>& ordered );
23 ~AbView(); 23 ~AbView();
24 24
25 bool save(); 25 bool save();
26 void load(); 26 void load();
27 void reload(); 27 void reload();
28 void clear(); 28 void clear();
29 29
30 void setView( Views view ); 30 void setView( Views view );
31 void showPersonal( bool personal ); 31 void showPersonal( bool personal );
32 void setShowByCategory( const QString& cat ); 32 void setShowByCategory( const QString& cat );
33 void setShowToView( Views view ); 33 void setShowToView( Views view );
34 void setShowByLetter( char c ); 34 void setShowByLetter( char c );
35 void setListOrder( const QValueList<int>& ordered ); 35 void setListOrder( const QValueList<int>& ordered );
36 36
37 // Add Entry and put to current 37 // Add Entry and put to current
38 void addEntry( const OContact &newContact ); 38 void addEntry( const OContact &newContact );
39 void removeEntry( const int UID ); 39 void removeEntry( const int UID );
40 void replaceEntry( const OContact &contact ); 40 void replaceEntry( const OContact &contact );
41 OContact currentEntry(); 41 OContact currentEntry();
42 42
43 void inSearch() { m_inSearch = true; } 43 void inSearch() { m_inSearch = true; }
44 void offSearch(); 44 void offSearch();
45 45
46 QString showCategory() const; 46 QString showCategory() const;
47 QStringList categories(); 47 QStringList categories();
48 48
49signals: 49signals:
50 void signalNotFound(); 50 void signalNotFound();
51 void signalClearLetterPicker(); 51 void signalClearLetterPicker();
52 void signalViewSwitched ( int ); 52 void signalViewSwitched ( int );
53 53
54public slots: 54public slots:
55 void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, 55 void slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
56 bool backwards, QString category = QString::null ); 56 bool backwards, QString category = QString::null );
57 void slotSwitch(); 57 void slotSwitch();
58 58
59private: 59private:
60 void updateListinViews(); 60 void updateListinViews();
61 void updateView(); 61 void updateView( bool newdata = false );
62 void clearForCategory(); 62 void clearForCategory();
63 bool contactCompare( const OContact &cnt, int category ); 63 bool contactCompare( const OContact &cnt, int category );
64 void parseName( const QString& name, QString *first, QString *middle, 64 void parseName( const QString& name, QString *first, QString *middle,
65 QString * last ); 65 QString * last );
66 66
67 Categories mCat; 67 Categories mCat;
68 bool m_inSearch; 68 bool m_inSearch;
69 bool m_inPersonal; 69 bool m_inPersonal;
70 int m_curr_category; 70 int m_curr_category;
71 Views m_curr_View; 71 Views m_curr_View;
72 Views m_prev_View; 72 Views m_prev_View;
73 int m_curr_Contact; 73 int m_curr_Contact;
74 74
75 OContactAccess* m_contactdb; 75 OContactAccess* m_contactdb;
76 OContactAccess* m_storedDB; 76 OContactAccess* m_storedDB;
77 OContactAccess::List m_list; 77 OContactAccess::List m_list;
78 78
79 QWidgetStack* m_viewStack; 79 QWidgetStack* m_viewStack;
80 AbTable* m_abTable; 80 AbTable* m_abTable;
81 AbLabel* m_ablabel; 81 AbLabel* m_ablabel;
82 82
83 QValueList<int> m_orderedFields; 83 QValueList<int> m_orderedFields;
84}; 84};
85 85
86 86
87#endif 87#endif
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 5d588da..055124c 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -608,97 +608,97 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
608 // :SXm_abView()->init( cnt ); 608 // :SXm_abView()->init( cnt );
609 editEntry( EditEntry ); 609 editEntry( EditEntry );
610 610
611 611
612 612
613 } 613 }
614#if 0 614#if 0
615 else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) { 615 else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) {
616 QDataStream stream(data,IO_ReadOnly); 616 QDataStream stream(data,IO_ReadOnly);
617 QCString ch,m; 617 QCString ch,m;
618 QStringList types; 618 QStringList types;
619 stream >> ch >> m >> types; 619 stream >> ch >> m >> types;
620 AddressPicker picker(abList,this,0,TRUE); 620 AddressPicker picker(abList,this,0,TRUE);
621 picker.showMaximized(); 621 picker.showMaximized();
622 picker.setChoiceNames(types); 622 picker.setChoiceNames(types);
623 int i=0; 623 int i=0;
624 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { 624 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) {
625 QStringList sel; 625 QStringList sel;
626 stream >> sel; 626 stream >> sel;
627 picker.setSelection(i++,sel); 627 picker.setSelection(i++,sel);
628 } 628 }
629 picker.showMaximized(); 629 picker.showMaximized();
630 picker.exec(); 630 picker.exec();
631 631
632 // ###### note: contacts may have been added - save here! 632 // ###### note: contacts may have been added - save here!
633 633
634 setCentralWidget(abList); 634 setCentralWidget(abList);
635 QCopEnvelope e(ch,m); 635 QCopEnvelope e(ch,m);
636 i=0; 636 i=0;
637 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { 637 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) {
638 QStringList sel = picker.selection(i++); 638 QStringList sel = picker.selection(i++);
639 e << sel; 639 e << sel;
640 } 640 }
641 } 641 }
642#endif 642#endif
643 643
644} 644}
645 645
646void AddressbookWindow::editEntry( EntryMode entryMode ) 646void AddressbookWindow::editEntry( EntryMode entryMode )
647{ 647{
648 OContact entry; 648 OContact entry;
649 if ( !abEditor ) { 649 if ( !abEditor ) {
650 abEditor = new ContactEditor( entry, this, "editor" ); 650 abEditor = new ContactEditor( entry, this, "editor" );
651 } 651 }
652 if ( entryMode == EditEntry ) 652 if ( entryMode == EditEntry )
653 abEditor->setEntry( m_abView -> currentEntry() ); 653 abEditor->setEntry( m_abView -> currentEntry() );
654 else if ( entryMode == NewEntry ) 654 else if ( entryMode == NewEntry )
655 abEditor->setEntry( entry ); 655 abEditor->setEntry( entry );
656 // other things may chane the caption. 656 // other things may change the caption.
657 abEditor->setCaption( tr("Edit Address") ); 657 abEditor->setCaption( tr("Edit Address") );
658 658
659#if defined(Q_WS_QWS) || defined(_WS_QWS_) 659#if defined(Q_WS_QWS) || defined(_WS_QWS_)
660 abEditor->showMaximized(); 660 abEditor->showMaximized();
661#endif 661#endif
662 // fix the foxus... 662 // fix the foxus...
663 abEditor->setNameFocus(); 663 abEditor->setNameFocus();
664 if ( abEditor->exec() ) { 664 if ( abEditor->exec() ) {
665 setFocus(); 665 setFocus();
666 if ( entryMode == NewEntry ) { 666 if ( entryMode == NewEntry ) {
667 OContact insertEntry = abEditor->entry(); 667 OContact insertEntry = abEditor->entry();
668 insertEntry.assignUid(); 668 insertEntry.assignUid();
669 m_abView -> addEntry( insertEntry ); 669 m_abView -> addEntry( insertEntry );
670 } else { 670 } else {
671 OContact replEntry = abEditor->entry(); 671 OContact replEntry = abEditor->entry();
672 672
673 if ( !replEntry.isValidUid() ) 673 if ( !replEntry.isValidUid() )
674 replEntry.assignUid(); 674 replEntry.assignUid();
675 675
676 m_abView -> replaceEntry( replEntry ); 676 m_abView -> replaceEntry( replEntry );
677 } 677 }
678 } 678 }
679 // populateCategories(); 679 // populateCategories();
680 680
681} 681}
682 682
683void AddressbookWindow::editPersonal() 683void AddressbookWindow::editPersonal()
684{ 684{
685 OContact entry; 685 OContact entry;
686 if ( !abEditor ) { 686 if ( !abEditor ) {
687 abEditor = new ContactEditor( entry, this, "editor" ); 687 abEditor = new ContactEditor( entry, this, "editor" );
688 } 688 }
689 689
690 abEditor->setCaption(tr("Edit My Personal Details")); 690 abEditor->setCaption(tr("Edit My Personal Details"));
691 abEditor->setPersonalView( true ); 691 abEditor->setPersonalView( true );
692 editEntry( EditEntry ); 692 editEntry( EditEntry );
693 abEditor->setPersonalView( false ); 693 abEditor->setPersonalView( false );
694 694
695} 695}
696 696
697 697
698void AddressbookWindow::slotPersonalView() 698void AddressbookWindow::slotPersonalView()
699{ 699{
700 if (!actionPersonal->isOn()) { 700 if (!actionPersonal->isOn()) {
701 // we just turned it off 701 // we just turned it off
702 setCaption( tr("Contacts") ); 702 setCaption( tr("Contacts") );
703 actionNew->setEnabled(TRUE); 703 actionNew->setEnabled(TRUE);
704 actionTrash->setEnabled(TRUE); 704 actionTrash->setEnabled(TRUE);
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui
index 408bfa6..8ae2578 100644
--- a/core/pim/addressbook/configdlg_base.ui
+++ b/core/pim/addressbook/configdlg_base.ui
@@ -1,74 +1,78 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ConfigDlg_Base</class> 2<class>ConfigDlg_Base</class>
3<author>Stefan Eilers</author> 3<author>Stefan Eilers</author>
4<widget> 4<widget>
5 <class>QDialog</class> 5 <class>QDialog</class>
6 <property stdset="1"> 6 <property stdset="1">
7 <name>name</name> 7 <name>name</name>
8 <cstring>Configuration</cstring> 8 <cstring>Configuration</cstring>
9 </property> 9 </property>
10 <property stdset="1"> 10 <property stdset="1">
11 <name>geometry</name> 11 <name>geometry</name>
12 <rect> 12 <rect>
13 <x>0</x> 13 <x>0</x>
14 <y>0</y> 14 <y>0</y>
15 <width>276</width> 15 <width>282</width>
16 <height>327</height> 16 <height>327</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>sizePolicy</name> 20 <name>sizePolicy</name>
21 <sizepolicy> 21 <sizepolicy>
22 <hsizetype>5</hsizetype> 22 <hsizetype>5</hsizetype>
23 <vsizetype>5</vsizetype> 23 <vsizetype>5</vsizetype>
24 </sizepolicy> 24 </sizepolicy>
25 </property> 25 </property>
26 <property stdset="1"> 26 <property stdset="1">
27 <name>caption</name>
28 <string>Configuration</string>
29 </property>
30 <property stdset="1">
27 <name>sizeGripEnabled</name> 31 <name>sizeGripEnabled</name>
28 <bool>true</bool> 32 <bool>true</bool>
29 </property> 33 </property>
30 <property> 34 <property>
31 <name>layoutMargin</name> 35 <name>layoutMargin</name>
32 </property> 36 </property>
33 <vbox> 37 <vbox>
34 <property stdset="1"> 38 <property stdset="1">
35 <name>margin</name> 39 <name>margin</name>
36 <number>1</number> 40 <number>1</number>
37 </property> 41 </property>
38 <property stdset="1"> 42 <property stdset="1">
39 <name>spacing</name> 43 <name>spacing</name>
40 <number>6</number> 44 <number>6</number>
41 </property> 45 </property>
42 <widget> 46 <widget>
43 <class>QTabWidget</class> 47 <class>QTabWidget</class>
44 <property stdset="1"> 48 <property stdset="1">
45 <name>name</name> 49 <name>name</name>
46 <cstring>configDlg_base</cstring> 50 <cstring>configDlg_base</cstring>
47 </property> 51 </property>
48 <property stdset="1"> 52 <property stdset="1">
49 <name>sizePolicy</name> 53 <name>sizePolicy</name>
50 <sizepolicy> 54 <sizepolicy>
51 <hsizetype>7</hsizetype> 55 <hsizetype>7</hsizetype>
52 <vsizetype>7</vsizetype> 56 <vsizetype>7</vsizetype>
53 </sizepolicy> 57 </sizepolicy>
54 </property> 58 </property>
55 <property> 59 <property>
56 <name>layoutMargin</name> 60 <name>layoutMargin</name>
57 </property> 61 </property>
58 <property> 62 <property>
59 <name>layoutSpacing</name> 63 <name>layoutSpacing</name>
60 </property> 64 </property>
61 <widget> 65 <widget>
62 <class>QWidget</class> 66 <class>QWidget</class>
63 <property stdset="1"> 67 <property stdset="1">
64 <name>name</name> 68 <name>name</name>
65 <cstring>Widget5</cstring> 69 <cstring>Widget5</cstring>
66 </property> 70 </property>
67 <attribute> 71 <attribute>
68 <name>title</name> 72 <name>title</name>
69 <string>Misc</string> 73 <string>Misc</string>
70 </attribute> 74 </attribute>
71 <vbox> 75 <vbox>
72 <property stdset="1"> 76 <property stdset="1">
73 <name>margin</name> 77 <name>margin</name>
74 <number>5</number> 78 <number>5</number>
@@ -308,101 +312,101 @@
308 <cstring>TextLabel1</cstring> 312 <cstring>TextLabel1</cstring>
309 </property> 313 </property>
310 <property stdset="1"> 314 <property stdset="1">
311 <name>text</name> 315 <name>text</name>
312 <string>Notice: QT-Mail is just 316 <string>Notice: QT-Mail is just
313provided in the SHARP 317provided in the SHARP
314default ROM. Opie-Mail 318default ROM. Opie-Mail
315is provided free !</string> 319is provided free !</string>
316 </property> 320 </property>
317 </widget> 321 </widget>
318 </vbox> 322 </vbox>
319 </widget> 323 </widget>
320 <spacer> 324 <spacer>
321 <property> 325 <property>
322 <name>name</name> 326 <name>name</name>
323 <cstring>Spacer2</cstring> 327 <cstring>Spacer2</cstring>
324 </property> 328 </property>
325 <property stdset="1"> 329 <property stdset="1">
326 <name>orientation</name> 330 <name>orientation</name>
327 <enum>Vertical</enum> 331 <enum>Vertical</enum>
328 </property> 332 </property>
329 <property stdset="1"> 333 <property stdset="1">
330 <name>sizeType</name> 334 <name>sizeType</name>
331 <enum>Expanding</enum> 335 <enum>Expanding</enum>
332 </property> 336 </property>
333 <property> 337 <property>
334 <name>sizeHint</name> 338 <name>sizeHint</name>
335 <size> 339 <size>
336 <width>20</width> 340 <width>20</width>
337 <height>20</height> 341 <height>20</height>
338 </size> 342 </size>
339 </property> 343 </property>
340 </spacer> 344 </spacer>
341 </vbox> 345 </vbox>
342 </widget> 346 </widget>
343 <widget> 347 <widget>
344 <class>QWidget</class> 348 <class>QWidget</class>
345 <property stdset="1"> 349 <property stdset="1">
346 <name>name</name> 350 <name>name</name>
347 <cstring>tab</cstring> 351 <cstring>tab</cstring>
348 </property> 352 </property>
349 <attribute> 353 <attribute>
350 <name>title</name> 354 <name>title</name>
351 <string>Order</string> 355 <string>Order</string>
352 </attribute> 356 </attribute>
353 <vbox> 357 <vbox>
354 <property stdset="1"> 358 <property stdset="1">
355 <name>margin</name> 359 <name>margin</name>
356 <number>-1</number> 360 <number>2</number>
357 </property> 361 </property>
358 <property stdset="1"> 362 <property stdset="1">
359 <name>spacing</name> 363 <name>spacing</name>
360 <number>-1</number> 364 <number>2</number>
361 </property> 365 </property>
362 <widget> 366 <widget>
363 <class>QGroupBox</class> 367 <class>QGroupBox</class>
364 <property stdset="1"> 368 <property stdset="1">
365 <name>name</name> 369 <name>name</name>
366 <cstring>GroupBox9</cstring> 370 <cstring>GroupBox9</cstring>
367 </property> 371 </property>
368 <property stdset="1"> 372 <property stdset="1">
369 <name>title</name> 373 <name>title</name>
370 <string>Select Contact Order:</string> 374 <string>Select Contact Order:</string>
371 </property> 375 </property>
372 <grid> 376 <grid>
373 <property stdset="1"> 377 <property stdset="1">
374 <name>margin</name> 378 <name>margin</name>
375 <number>11</number> 379 <number>11</number>
376 </property> 380 </property>
377 <property stdset="1"> 381 <property stdset="1">
378 <name>spacing</name> 382 <name>spacing</name>
379 <number>6</number> 383 <number>6</number>
380 </property> 384 </property>
381 <widget row="0" column="2" > 385 <widget row="0" column="2" >
382 <class>QPushButton</class> 386 <class>QPushButton</class>
383 <property stdset="1"> 387 <property stdset="1">
384 <name>name</name> 388 <name>name</name>
385 <cstring>m_upButton</cstring> 389 <cstring>m_upButton</cstring>
386 </property> 390 </property>
387 <property stdset="1"> 391 <property stdset="1">
388 <name>sizePolicy</name> 392 <name>sizePolicy</name>
389 <sizepolicy> 393 <sizepolicy>
390 <hsizetype>1</hsizetype> 394 <hsizetype>1</hsizetype>
391 <vsizetype>0</vsizetype> 395 <vsizetype>0</vsizetype>
392 </sizepolicy> 396 </sizepolicy>
393 </property> 397 </property>
394 <property stdset="1"> 398 <property stdset="1">
395 <name>text</name> 399 <name>text</name>
396 <string>Up</string> 400 <string>Up</string>
397 </property> 401 </property>
398 <property stdset="1"> 402 <property stdset="1">
399 <name>autoRepeat</name> 403 <name>autoRepeat</name>
400 <bool>true</bool> 404 <bool>true</bool>
401 </property> 405 </property>
402 </widget> 406 </widget>
403 <widget row="1" column="2" > 407 <widget row="1" column="2" >
404 <class>QPushButton</class> 408 <class>QPushButton</class>
405 <property stdset="1"> 409 <property stdset="1">
406 <name>name</name> 410 <name>name</name>
407 <cstring>m_downButton</cstring> 411 <cstring>m_downButton</cstring>
408 </property> 412 </property>
diff --git a/core/pim/addressbook/ocontactfields.cpp b/core/pim/addressbook/ocontactfields.cpp
index 7823a9c..df57efa 100644
--- a/core/pim/addressbook/ocontactfields.cpp
+++ b/core/pim/addressbook/ocontactfields.cpp
@@ -1,189 +1,189 @@
1 1
2#include "ocontactfields.h" 2#include "ocontactfields.h"
3 3
4#include <qstringlist.h> 4#include <qstringlist.h>
5#include <qobject.h> 5#include <qobject.h>
6 6
7// We should use our own enum in the future .. 7// We should use our own enum in the future ..
8#include <qpe/recordfields.h> 8#include <qpe/recordfields.h>
9 9
10/*! 10/*!
11 \internal 11 \internal
12 Returns a list of details field names for a contact. 12 Returns a list of details field names for a contact.
13*/ 13*/
14QStringList OContactFields::untrdetailsfields( bool sorted ) 14QStringList OContactFields::untrdetailsfields( bool sorted )
15{ 15{
16 QStringList list; 16 QStringList list;
17 17
18 list.append( "Office" ); 18 list.append( "Office" );
19 list.append( "Profession" ); 19 list.append( "Profession" );
20 list.append( "Assistant" ); 20 list.append( "Assistant" );
21 list.append( "Manager" ); 21 list.append( "Manager" );
22 list.append( "Spouse" ); 22 list.append( "Spouse" );
23 list.append( "Gender" ); 23 list.append( "Gender" );
24 list.append( "Birthday" ); 24 list.append( "Birthday" );
25 list.append( "Anniversary" ); 25 list.append( "Anniversary" );
26 list.append( "Nickname" ); 26 list.append( "Nickname" );
27 list.append( "Children" ); 27 list.append( "Children" );
28 28
29 if (sorted) list.sort(); 29 if (sorted) list.sort();
30 30
31 return list; 31 return list;
32} 32}
33 33
34/*! 34/*!
35 \internal 35 \internal
36 Returns a translated list of phone field names for a contact. 36 Returns a translated list of phone field names for a contact.
37*/ 37*/
38QStringList OContactFields::trphonefields( bool sorted ) 38QStringList OContactFields::trphonefields( bool sorted )
39{ 39{
40 QStringList list; 40 QStringList list;
41 list.append( QObject::tr( "Business Phone" ) ); 41 list.append( QObject::tr( "Business Phone" ) );
42 list.append( QObject::tr( "Business Fax" ) ); 42 list.append( QObject::tr( "Business Fax" ) );
43 list.append( QObject::tr( "Business Mobile" ) ); 43 list.append( QObject::tr( "Business Mobile" ) );
44 44
45 list.append( QObject::tr( "Default Email" ) ); 45 // list.append( QObject::tr( "Default Email" ) );
46 list.append( QObject::tr( "Emails" ) ); 46 list.append( QObject::tr( "Emails" ) );
47 47
48 list.append( QObject::tr( "Home Phone" ) ); 48 list.append( QObject::tr( "Home Phone" ) );
49 list.append( QObject::tr( "Home Fax" ) ); 49 list.append( QObject::tr( "Home Fax" ) );
50 list.append( QObject::tr( "Home Mobile" ) ); 50 list.append( QObject::tr( "Home Mobile" ) );
51 51
52 if (sorted) list.sort(); 52 if (sorted) list.sort();
53 53
54 return list; 54 return list;
55} 55}
56 56
57 57
58/*! 58/*!
59 \internal 59 \internal
60 Returns a translated list of details field names for a contact. 60 Returns a translated list of details field names for a contact.
61*/ 61*/
62QStringList OContactFields::trdetailsfields( bool sorted ) 62QStringList OContactFields::trdetailsfields( bool sorted )
63{ 63{
64 QStringList list; 64 QStringList list;
65 65
66 list.append( QObject::tr( "Office" ) ); 66 list.append( QObject::tr( "Office" ) );
67 list.append( QObject::tr( "Profession" ) ); 67 list.append( QObject::tr( "Profession" ) );
68 list.append( QObject::tr( "Assistant" ) ); 68 list.append( QObject::tr( "Assistant" ) );
69 list.append( QObject::tr( "Manager" ) ); 69 list.append( QObject::tr( "Manager" ) );
70 70
71 list.append( QObject::tr( "Spouse" ) ); 71 list.append( QObject::tr( "Spouse" ) );
72 list.append( QObject::tr( "Gender" ) ); 72 list.append( QObject::tr( "Gender" ) );
73 list.append( QObject::tr( "Birthday" ) ); 73 list.append( QObject::tr( "Birthday" ) );
74 list.append( QObject::tr( "Anniversary" ) ); 74 list.append( QObject::tr( "Anniversary" ) );
75 list.append( QObject::tr( "Nickname" ) ); 75 list.append( QObject::tr( "Nickname" ) );
76 list.append( QObject::tr( "Children" ) ); 76 list.append( QObject::tr( "Children" ) );
77 77
78 if (sorted) list.sort(); 78 if (sorted) list.sort();
79 return list; 79 return list;
80} 80}
81 81
82 82
83/*! 83/*!
84 \internal 84 \internal
85 Returns a translated list of field names for a contact. 85 Returns a translated list of field names for a contact.
86*/ 86*/
87QStringList OContactFields::trfields( bool sorted ) 87QStringList OContactFields::trfields( bool sorted )
88{ 88{
89 QStringList list; 89 QStringList list;
90 90
91 list.append( QObject::tr( "Name Title") ); 91 list.append( QObject::tr( "Name Title") );
92 list.append( QObject::tr( "First Name" ) ); 92 list.append( QObject::tr( "First Name" ) );
93 list.append( QObject::tr( "Middle Name" ) ); 93 list.append( QObject::tr( "Middle Name" ) );
94 list.append( QObject::tr( "Last Name" ) ); 94 list.append( QObject::tr( "Last Name" ) );
95 list.append( QObject::tr( "Suffix" ) ); 95 list.append( QObject::tr( "Suffix" ) );
96 list.append( QObject::tr( "File As" ) ); 96 list.append( QObject::tr( "File As" ) );
97 97
98 list.append( QObject::tr( "Job Title" ) ); 98 list.append( QObject::tr( "Job Title" ) );
99 list.append( QObject::tr( "Department" ) ); 99 list.append( QObject::tr( "Department" ) );
100 list.append( QObject::tr( "Company" ) ); 100 list.append( QObject::tr( "Company" ) );
101 101
102 list += trphonefields( sorted ); 102 list += trphonefields( sorted );
103 103
104 list.append( QObject::tr( "Business Street" ) ); 104 list.append( QObject::tr( "Business Street" ) );
105 list.append( QObject::tr( "Business City" ) ); 105 list.append( QObject::tr( "Business City" ) );
106 list.append( QObject::tr( "Business State" ) ); 106 list.append( QObject::tr( "Business State" ) );
107 list.append( QObject::tr( "Business Zip" ) ); 107 list.append( QObject::tr( "Business Zip" ) );
108 list.append( QObject::tr( "Business Country" ) ); 108 list.append( QObject::tr( "Business Country" ) );
109 list.append( QObject::tr( "Business Pager" ) ); 109 list.append( QObject::tr( "Business Pager" ) );
110 list.append( QObject::tr( "Business WebPage" ) ); 110 list.append( QObject::tr( "Business WebPage" ) );
111 111
112 list.append( QObject::tr( "Home Street" ) ); 112 list.append( QObject::tr( "Home Street" ) );
113 list.append( QObject::tr( "Home City" ) ); 113 list.append( QObject::tr( "Home City" ) );
114 list.append( QObject::tr( "Home State" ) ); 114 list.append( QObject::tr( "Home State" ) );
115 list.append( QObject::tr( "Home Zip" ) ); 115 list.append( QObject::tr( "Home Zip" ) );
116 list.append( QObject::tr( "Home Country" ) ); 116 list.append( QObject::tr( "Home Country" ) );
117 list.append( QObject::tr( "Home Web Page" ) ); 117 list.append( QObject::tr( "Home Web Page" ) );
118 118
119 list += trdetailsfields( sorted ); 119 list += trdetailsfields( sorted );
120 120
121 list.append( QObject::tr( "Notes" ) ); 121 list.append( QObject::tr( "Notes" ) );
122 list.append( QObject::tr( "Groups" ) ); 122 list.append( QObject::tr( "Groups" ) );
123 123
124 if (sorted) list.sort(); 124 if (sorted) list.sort();
125 125
126 return list; 126 return list;
127} 127}
128 128
129/*! 129/*!
130 \internal 130 \internal
131 Returns a list of phone field names for a contact. 131 Returns a list of phone field names for a contact.
132*/ 132*/
133QStringList OContactFields::untrphonefields( bool sorted ) 133QStringList OContactFields::untrphonefields( bool sorted )
134{ 134{
135 QStringList list; 135 QStringList list;
136 136
137 list.append( "Business Phone" ); 137 list.append( "Business Phone" );
138 list.append( "Business Fax" ); 138 list.append( "Business Fax" );
139 list.append( "Business Mobile" ); 139 list.append( "Business Mobile" );
140 140
141 list.append( "Default Email" ); 141 // list.append( "Default Email" );
142 list.append( "Emails" ); 142 list.append( "Emails" );
143 143
144 list.append( "Home Phone" ); 144 list.append( "Home Phone" );
145 list.append( "Home Fax" ); 145 list.append( "Home Fax" );
146 list.append( "Home Mobile" ); 146 list.append( "Home Mobile" );
147 147
148 if (sorted) list.sort(); 148 if (sorted) list.sort();
149 149
150 return list; 150 return list;
151} 151}
152 152
153/*! 153/*!
154 \internal 154 \internal
155 Returns an untranslated list of field names for a contact. 155 Returns an untranslated list of field names for a contact.
156*/ 156*/
157QStringList OContactFields::untrfields( bool sorted ) 157QStringList OContactFields::untrfields( bool sorted )
158{ 158{
159 QStringList list; 159 QStringList list;
160 160
161 list.append( "Name Title" ); 161 list.append( "Name Title" );
162 list.append( "First Name" ); 162 list.append( "First Name" );
163 list.append( "Middle Name" ); 163 list.append( "Middle Name" );
164 list.append( "Last Name" ); 164 list.append( "Last Name" );
165 list.append( "Suffix" ); 165 list.append( "Suffix" );
166 list.append( "File As" ); 166 list.append( "File As" );
167 167
168 list.append( "Job Title" ); 168 list.append( "Job Title" );
169 list.append( "Department" ); 169 list.append( "Department" );
170 list.append( "Company" ); 170 list.append( "Company" );
171 171
172 list += untrphonefields( sorted ); 172 list += untrphonefields( sorted );
173 173
174 list.append( "Business Street" ); 174 list.append( "Business Street" );
175 list.append( "Business City" ); 175 list.append( "Business City" );
176 list.append( "Business State" ); 176 list.append( "Business State" );
177 list.append( "Business Zip" ); 177 list.append( "Business Zip" );
178 list.append( "Business Country" ); 178 list.append( "Business Country" );
179 list.append( "Business Pager" ); 179 list.append( "Business Pager" );
180 list.append( "Business WebPage" ); 180 list.append( "Business WebPage" );
181 181
182 list.append( "Office" ); 182 list.append( "Office" );
183 list.append( "Profession" ); 183 list.append( "Profession" );
184 list.append( "Assistant" ); 184 list.append( "Assistant" );
185 list.append( "Manager" ); 185 list.append( "Manager" );
186 186
187 list.append( "Home Street" ); 187 list.append( "Home Street" );
188 list.append( "Home City" ); 188 list.append( "Home City" );
189 list.append( "Home State" ); 189 list.append( "Home State" );