-rw-r--r-- | core/pim/addressbook/ablabel.cpp | 14 | ||||
-rw-r--r-- | core/pim/addressbook/ablabel.h | 14 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 85 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.h | 23 | ||||
-rw-r--r-- | core/pim/addressbook/abview.cpp | 38 | ||||
-rw-r--r-- | core/pim/addressbook/abview.h | 31 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 58 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.pro | 2 | ||||
-rw-r--r-- | core/pim/addressbook/config.in | 2 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg.cpp | 38 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 327 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.h | 16 | ||||
-rw-r--r-- | core/pim/addressbook/main.cpp | 4 | ||||
-rw-r--r-- | core/pim/addressbook/opie-addressbook.control | 2 |
14 files changed, 328 insertions, 326 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp index 076e2e0..70a66a0 100644 --- a/core/pim/addressbook/ablabel.cpp +++ b/core/pim/addressbook/ablabel.cpp | |||
@@ -34,3 +34,3 @@ AbLabel::~AbLabel() | |||
34 | 34 | ||
35 | void AbLabel::setContacts( const OContactAccess::List& viewList ) | 35 | void AbLabel::setContacts( const Opie::OPimContactAccess::List& viewList ) |
36 | { | 36 | { |
@@ -50,3 +50,3 @@ int AbLabel::currentEntry_UID() | |||
50 | { | 50 | { |
51 | OContact contact = currentEntry(); | 51 | Opie::OPimContact contact = currentEntry(); |
52 | 52 | ||
@@ -58,3 +58,3 @@ int AbLabel::currentEntry_UID() | |||
58 | 58 | ||
59 | OContact AbLabel::currentEntry() | 59 | Opie::OPimContact AbLabel::currentEntry() |
60 | { | 60 | { |
@@ -63,3 +63,3 @@ OContact AbLabel::currentEntry() | |||
63 | else | 63 | else |
64 | return OContact(); | 64 | return Opie::OPimContact(); |
65 | } | 65 | } |
@@ -111,3 +111,3 @@ void AbLabel::keyPressEvent( QKeyEvent *e ) | |||
111 | --m_itCurContact; | 111 | --m_itCurContact; |
112 | if ( *m_itCurContact != OContact() ) | 112 | if ( *m_itCurContact != Opie::OPimContact() ) |
113 | sync(); | 113 | sync(); |
@@ -120,3 +120,3 @@ void AbLabel::keyPressEvent( QKeyEvent *e ) | |||
120 | qWarning( "DOWN.."); | 120 | qWarning( "DOWN.."); |
121 | // qWarning( "visible: %d, content: %d",visibleHeight(),contentsHeight()); | 121 | // qWarning( "visible: %d, content: %d",visibleHeight(),contentsHeight()); |
122 | // qWarning( "value: %d; barMaxValue: %d", verticalScrollBar()->value() | 122 | // qWarning( "value: %d; barMaxValue: %d", verticalScrollBar()->value() |
@@ -128,3 +128,3 @@ void AbLabel::keyPressEvent( QKeyEvent *e ) | |||
128 | ++m_itCurContact; | 128 | ++m_itCurContact; |
129 | if ( *m_itCurContact != OContact() ) | 129 | if ( *m_itCurContact != Opie::OPimContact() ) |
130 | sync(); | 130 | sync(); |
diff --git a/core/pim/addressbook/ablabel.h b/core/pim/addressbook/ablabel.h index 80336dc..8d7f2ac 100644 --- a/core/pim/addressbook/ablabel.h +++ b/core/pim/addressbook/ablabel.h | |||
@@ -22,6 +22,6 @@ | |||
22 | 22 | ||
23 | #include <opie/ocontact.h> | 23 | #include <opie2/opimcontact.h> |
24 | #include <qtextview.h> | 24 | #include <opie2/ocontactaccess.h> |
25 | 25 | ||
26 | #include <opie/ocontactaccess.h> | 26 | #include <qtextview.h> |
27 | 27 | ||
@@ -36,3 +36,3 @@ public: | |||
36 | // Set the contacts | 36 | // Set the contacts |
37 | void setContacts( const OContactAccess::List& viewList ); | 37 | void setContacts( const Opie::OPimContactAccess::List& viewList ); |
38 | 38 | ||
@@ -45,3 +45,3 @@ public: | |||
45 | // | 45 | // |
46 | OContact currentEntry(); | 46 | Opie::OPimContact currentEntry(); |
47 | 47 | ||
@@ -55,4 +55,4 @@ protected: | |||
55 | private: | 55 | private: |
56 | OContactAccess::List m_viewList; | 56 | Opie::OPimContactAccess::List m_viewList; |
57 | OContactAccess::List::Iterator m_itCurContact; | 57 | Opie::OPimContactAccess::List::Iterator m_itCurContact; |
58 | 58 | ||
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 29f4383..cd77b13 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -22,2 +22,4 @@ | |||
22 | 22 | ||
23 | #include <opie2/opimrecordlist.h> | ||
24 | |||
23 | #include <qpe/timestring.h> | 25 | #include <qpe/timestring.h> |
@@ -25,5 +27,2 @@ | |||
25 | 27 | ||
26 | #include <opie/orecordlist.h> | ||
27 | |||
28 | |||
29 | #include "abtable.h" | 28 | #include "abtable.h" |
@@ -41,3 +40,3 @@ | |||
41 | \class AbTableItem abtable.h | 40 | \class AbTableItem abtable.h |
42 | 41 | ||
43 | \brief QTableItem based class for showing a field of an entry | 42 | \brief QTableItem based class for showing a field of an entry |
@@ -68,3 +67,3 @@ void AbTableItem::setItem( const QString &txt, const QString &secondKey ) | |||
68 | sortKey = Qtopia::buildSortKey( txt, secondKey ); | 67 | sortKey = Qtopia::buildSortKey( txt, secondKey ); |
69 | 68 | ||
70 | // sortKey = txt.lower() + QChar( '\0' ) + secondKey.lower(); | 69 | // sortKey = txt.lower() + QChar( '\0' ) + secondKey.lower(); |
@@ -74,3 +73,3 @@ void AbTableItem::setItem( const QString &txt, const QString &secondKey ) | |||
74 | \class AbPickItem abtable.h | 73 | \class AbPickItem abtable.h |
75 | 74 | ||
76 | \brief QTableItem based class for showing slection of an entry | 75 | \brief QTableItem based class for showing slection of an entry |
@@ -111,3 +110,3 @@ void AbPickItem::setContentFromEditor( QWidget *w ) | |||
111 | \class AbTable abtable.h | 110 | \class AbTable abtable.h |
112 | 111 | ||
113 | \brief QTable based class for showing a list of entries | 112 | \brief QTable based class for showing a list of entries |
@@ -145,3 +144,3 @@ void AbTable::init() | |||
145 | setNumCols( 2 ); | 144 | setNumCols( 2 ); |
146 | 145 | ||
147 | horizontalHeader()->setLabel( 0, tr( "Full Name" )); | 146 | horizontalHeader()->setLabel( 0, tr( "Full Name" )); |
@@ -153,3 +152,3 @@ void AbTable::init() | |||
153 | 152 | ||
154 | void AbTable::setContacts( const OContactAccess::List& viewList ) | 153 | void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList ) |
155 | { | 154 | { |
@@ -162,4 +161,4 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) | |||
162 | setPaintingEnabled( FALSE ); | 161 | setPaintingEnabled( FALSE ); |
163 | 162 | ||
164 | OContactAccess::List::Iterator it; | 163 | Opie::OPimContactAccess::List::Iterator it; |
165 | setNumRows( m_viewList.count() ); | 164 | setNumRows( m_viewList.count() ); |
@@ -168,3 +167,3 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) | |||
168 | // insertIntoTable( *it, row++ ); | 167 | // insertIntoTable( *it, row++ ); |
169 | 168 | ||
170 | // setSorting( true ); | 169 | // setSorting( true ); |
@@ -189,3 +188,3 @@ bool AbTable::selectContact( int UID ) | |||
189 | int rows = numRows(); | 188 | int rows = numRows(); |
190 | OContact* foundContact = 0l; | 189 | Opie::OPimContact* foundContact = 0l; |
191 | bool found = false; | 190 | bool found = false; |
@@ -215,11 +214,11 @@ bool AbTable::selectContact( int UID ) | |||
215 | #if 0 | 214 | #if 0 |
216 | void AbTable::insertIntoTable( const OContact& cnt, int row ) | 215 | void AbTable::insertIntoTable( const Opie::OPimContact& cnt, int row ) |
217 | { | 216 | { |
218 | qWarning( "void AbTable::insertIntoTable( const OContact& cnt, %d )", row ); | 217 | qWarning( "void AbTable::insertIntoTable( const Opie::OPimContact& cnt, %d )", row ); |
219 | QString strName; | 218 | QString strName; |
220 | ContactItem contactItem; | 219 | ContactItem contactItem; |
221 | 220 | ||
222 | strName = findContactName( cnt ); | 221 | strName = findContactName( cnt ); |
223 | contactItem = findContactContact( cnt, row ); | 222 | contactItem = findContactContact( cnt, row ); |
224 | 223 | ||
225 | AbTableItem *ati; | 224 | AbTableItem *ati; |
@@ -232,6 +231,6 @@ void AbTable::insertIntoTable( const OContact& cnt, int row ) | |||
232 | setItem( row, 1, ati ); | 231 | setItem( row, 1, ati ); |
233 | 232 | ||
234 | //### cannot do this; table only has two columns at this point | 233 | //### cannot do this; table only has two columns at this point |
235 | // setItem( row, 2, new AbPickItem( this ) ); | 234 | // setItem( row, 2, new AbPickItem( this ) ); |
236 | 235 | ||
237 | } | 236 | } |
@@ -244,6 +243,6 @@ void AbTable::columnClicked( int col ) | |||
244 | return; | 243 | return; |
245 | 244 | ||
246 | if ( lastSortCol == -1 ) | 245 | if ( lastSortCol == -1 ) |
247 | lastSortCol = col; | 246 | lastSortCol = col; |
248 | 247 | ||
249 | if ( col == lastSortCol ) { | 248 | if ( col == lastSortCol ) { |
@@ -274,4 +273,4 @@ void AbTable::resort() | |||
274 | 273 | ||
275 | OContact AbTable::currentEntry() | 274 | Opie::OPimContact AbTable::currentEntry() |
276 | { | 275 | { |
277 | return m_viewList[currentRow()]; | 276 | return m_viewList[currentRow()]; |
@@ -333,6 +332,6 @@ void AbTable::keyPressEvent( QKeyEvent *e ) | |||
333 | char key = toupper( e->ascii() ); | 332 | char key = toupper( e->ascii() ); |
334 | 333 | ||
335 | if ( key >= 'A' && key <= 'Z' ) | 334 | if ( key >= 'A' && key <= 'Z' ) |
336 | moveTo( key ); | 335 | moveTo( key ); |
337 | 336 | ||
338 | //qWarning("Received key .."); | 337 | //qWarning("Received key .."); |
@@ -355,3 +354,3 @@ void AbTable::keyPressEvent( QKeyEvent *e ) | |||
355 | } | 354 | } |
356 | 355 | ||
357 | } | 356 | } |
@@ -361,3 +360,3 @@ void AbTable::moveTo( char c ) | |||
361 | qWarning( "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" ); | 360 | qWarning( "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" ); |
362 | 361 | ||
363 | #if 0 | 362 | #if 0 |
@@ -396,3 +395,3 @@ void AbTable::moveTo( char c ) | |||
396 | // Useless.. Nobody uses it .. (se) | 395 | // Useless.. Nobody uses it .. (se) |
397 | QString AbTable::findContactName( const OContact &entry ) | 396 | QString AbTable::findContactName( const Opie::OPimContact &entry ) |
398 | { | 397 | { |
@@ -477,8 +476,8 @@ void AbTable::fitColumns() | |||
477 | qWarning( "void AbTable::fitColumns()" ); | 476 | qWarning( "void AbTable::fitColumns()" ); |
478 | int contentsWidth = visibleWidth() / 2; | 477 | int contentsWidth = visibleWidth() / 2; |
479 | // Fix to better value | 478 | // Fix to better value |
480 | // contentsWidth = 130; | 479 | // contentsWidth = 130; |
481 | 480 | ||
482 | setPaintingEnabled( FALSE ); | 481 | setPaintingEnabled( FALSE ); |
483 | 482 | ||
484 | if ( columnVisible == false ){ | 483 | if ( columnVisible == false ){ |
@@ -487,3 +486,3 @@ void AbTable::fitColumns() | |||
487 | } | 486 | } |
488 | 487 | ||
489 | //qWarning("Width: %d", contentsWidth); | 488 | //qWarning("Width: %d", contentsWidth); |
@@ -549,6 +548,6 @@ QStringList AbTable::choiceSelection(int /*index*/) const | |||
549 | /* ###### | 548 | /* ###### |
550 | 549 | ||
551 | QString selname = choicenames.at(index); | 550 | QString selname = choicenames.at(index); |
552 | for (each row) { | 551 | for (each row) { |
553 | OContact *c = contactForRow(row); | 552 | Opie::OPimContact *c = contactForRow(row); |
554 | if ( text(row,2) == selname ) { | 553 | if ( text(row,2) == selname ) { |
@@ -557,3 +556,3 @@ QStringList AbTable::choiceSelection(int /*index*/) const | |||
557 | } | 556 | } |
558 | 557 | ||
559 | */ | 558 | */ |
@@ -571,5 +570,5 @@ void AbTable::updateVisible() | |||
571 | selectedRow = 0; | 570 | selectedRow = 0; |
572 | 571 | ||
573 | visible = 0; | 572 | visible = 0; |
574 | 573 | ||
575 | setPaintingEnabled( FALSE ); | 574 | setPaintingEnabled( FALSE ); |
@@ -594,3 +593,3 @@ void AbTable::updateVisible() | |||
594 | setCurrentCell( -1, 0 ); | 593 | setCurrentCell( -1, 0 ); |
595 | 594 | ||
596 | setPaintingEnabled( TRUE ); | 595 | setPaintingEnabled( TRUE ); |
@@ -633,3 +632,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) | |||
633 | 632 | ||
634 | OContact act_contact = m_viewList[row]; | 633 | Opie::OPimContact act_contact = m_viewList[row]; |
635 | 634 | ||
@@ -655,3 +654,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) | |||
655 | switch( col ){ | 654 | switch( col ){ |
656 | case 0: | 655 | case 0: |
657 | p->drawText( x + marg,2 + fm.ascent(), nameText ); | 656 | p->drawText( x + marg,2 + fm.ascent(), nameText ); |
@@ -663,3 +662,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) | |||
663 | QString contactText = contactItem.value; | 662 | QString contactText = contactItem.value; |
664 | 663 | ||
665 | if ( !contactPic.isNull() ) | 664 | if ( !contactPic.isNull() ) |
@@ -667,3 +666,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) | |||
667 | p->drawPixmap( x + marg, y, contactPic ); | 666 | p->drawPixmap( x + marg, y, contactPic ); |
668 | p->drawText( x + marg + contactPic.width() | 667 | p->drawText( x + marg + contactPic.width() |
669 | + 4,2 + fm.ascent(), contactText ); | 668 | + 4,2 + fm.ascent(), contactText ); |
@@ -686,3 +685,3 @@ void AbTable::rowHeightChanged( int row ) | |||
686 | } | 685 | } |
687 | ContactItem AbTable::findContactContact( const OContact &entry, int /* row */ ) | 686 | ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* row */ ) |
688 | { | 687 | { |
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index b9ebe27..927a5a9 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h | |||
@@ -24,5 +24,6 @@ | |||
24 | 24 | ||
25 | #include <opie2/opimcontact.h> | ||
26 | #include <opie2/ocontactaccess.h> | ||
27 | |||
25 | #include <qpe/categories.h> | 28 | #include <qpe/categories.h> |
26 | #include <opie/ocontact.h> | ||
27 | #include <opie/ocontactaccess.h> | ||
28 | 29 | ||
@@ -32,3 +33,3 @@ | |||
32 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
33 | #include <qpixmap.h> | 34 | #include <qpixmap.h> |
34 | 35 | ||
@@ -85,3 +86,3 @@ public: | |||
85 | // Set the contacts shown in the table | 86 | // Set the contacts shown in the table |
86 | void setContacts( const OContactAccess::List& viewList ); | 87 | void setContacts( const Opie::OPimContactAccess::List& viewList ); |
87 | 88 | ||
@@ -92,5 +93,5 @@ public: | |||
92 | bool selectContact( int UID ); | 93 | bool selectContact( int UID ); |
93 | 94 | ||
94 | // Get the current selected entry | 95 | // Get the current selected entry |
95 | OContact currentEntry(); | 96 | Opie::OPimContact currentEntry(); |
96 | 97 | ||
@@ -99,3 +100,3 @@ public: | |||
99 | 100 | ||
100 | // QString findContactName( const OContact &entry ); | 101 | // QString findContactName( const Opie::OPimContact &entry ); |
101 | 102 | ||
@@ -137,4 +138,4 @@ protected slots: | |||
137 | private: | 138 | private: |
138 | // void insertIntoTable( const OContact &cnt, int row ); | 139 | // void insertIntoTable( const Opie::OPimContact &cnt, int row ); |
139 | ContactItem findContactContact( const OContact &entry, int row ); | 140 | ContactItem findContactContact( const Opie::OPimContact &entry, int row ); |
140 | void fitColumns(); | 141 | void fitColumns(); |
@@ -147,3 +148,3 @@ private: | |||
147 | bool asc; | 148 | bool asc; |
148 | // QMap<AbTableItem*, OContact> contactList; | 149 | // QMap<AbTableItem*, Opie::OPimContact> contactList; |
149 | QValueList<int> intFields; | 150 | QValueList<int> intFields; |
@@ -154,3 +155,3 @@ private: | |||
154 | 155 | ||
155 | OContactAccess::List m_viewList; | 156 | Opie::OPimContactAccess::List m_viewList; |
156 | 157 | ||
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 8d61582..aa242b7 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp | |||
@@ -18,3 +18,3 @@ | |||
18 | 18 | ||
19 | #include <qlayout.h> | 19 | #include <opie2/ocontactaccessbackend_vcard.h> |
20 | 20 | ||
@@ -22,3 +22,3 @@ | |||
22 | 22 | ||
23 | #include <opie/ocontactaccessbackend_vcard.h> | 23 | #include <qlayout.h> |
24 | 24 | ||
@@ -55,3 +55,3 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): | |||
55 | // Load default database and handle syncing myself.. ! | 55 | // Load default database and handle syncing myself.. ! |
56 | m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false ); | 56 | m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false ); |
57 | m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available | 57 | m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available |
@@ -106,3 +106,3 @@ void AbView::setView( Views view ) | |||
106 | 106 | ||
107 | void AbView::addEntry( const OContact &newContact ) | 107 | void AbView::addEntry( const Opie::OPimContact &newContact ) |
108 | { | 108 | { |
@@ -120,3 +120,3 @@ void AbView::removeEntry( const int UID ) | |||
120 | 120 | ||
121 | void AbView::replaceEntry( const OContact &contact ) | 121 | void AbView::replaceEntry( const Opie::OPimContact &contact ) |
122 | { | 122 | { |
@@ -128,5 +128,5 @@ void AbView::replaceEntry( const OContact &contact ) | |||
128 | 128 | ||
129 | OContact AbView::currentEntry() | 129 | Opie::OPimContact AbView::currentEntry() |
130 | { | 130 | { |
131 | OContact currentContact; | 131 | Opie::OPimContact currentContact; |
132 | 132 | ||
@@ -159,3 +159,3 @@ void AbView::load() | |||
159 | if ( m_inPersonal ) | 159 | if ( m_inPersonal ) |
160 | // VCard Backend does not sort.. | 160 | // VCard Backend does not sort.. |
161 | m_list = m_contactdb->allRecords(); | 161 | m_list = m_contactdb->allRecords(); |
@@ -230,3 +230,3 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) | |||
230 | 230 | ||
231 | OContact query; | 231 | Opie::OPimContact query; |
232 | if ( c == 0 ){ | 232 | if ( c == 0 ){ |
@@ -235,5 +235,5 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) | |||
235 | }else{ | 235 | }else{ |
236 | // If the current Backend is unable to solve the query, we will | 236 | // If the current Backend is unable to solve the query, we will |
237 | // ignore the request .. | 237 | // ignore the request .. |
238 | if ( ! m_contactdb->hasQuerySettings( OContactAccess::WildCards | OContactAccess::IgnoreCase ) ){ | 238 | if ( ! m_contactdb->hasQuerySettings( Opie::OPimContactAccess::WildCards | Opie::OPimContactAccess::IgnoreCase ) ){ |
239 | return; | 239 | return; |
@@ -253,3 +253,3 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) | |||
253 | } | 253 | } |
254 | m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards | OContactAccess::IgnoreCase ); | 254 | m_list = m_contactdb->queryByExample( query, Opie::OPimContactAccess::WildCards | Opie::OPimContactAccess::IgnoreCase ); |
255 | if ( m_curr_category != -1 ) | 255 | if ( m_curr_category != -1 ) |
@@ -291,5 +291,5 @@ void AbView::showPersonal( bool personal ) | |||
291 | 291 | ||
292 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 292 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
293 | addressbookPersonalVCardName() ); | 293 | addressbookPersonalVCardName() ); |
294 | m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 294 | m_contactdb = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
295 | 295 | ||
@@ -320,3 +320,3 @@ void AbView::setCurrentUid( int uid ){ | |||
320 | m_curr_Contact = uid; | 320 | m_curr_Contact = uid; |
321 | updateView( true ); //true: Don't modificate the UID ! | 321 | updateView( true ); //true: Don't modificate the UID ! |
322 | } | 322 | } |
@@ -403,6 +403,6 @@ void AbView::clearForCategory() | |||
403 | { | 403 | { |
404 | OContactAccess::List::Iterator it; | 404 | Opie::OPimContactAccess::List::Iterator it; |
405 | // Now remove all contacts with wrong category if any category selected | 405 | // Now remove all contacts with wrong category if any category selected |
406 | 406 | ||
407 | OContactAccess::List allList = m_list; | 407 | Opie::OPimContactAccess::List allList = m_list; |
408 | if ( m_curr_category != -1 ){ | 408 | if ( m_curr_category != -1 ){ |
@@ -418,5 +418,5 @@ void AbView::clearForCategory() | |||
418 | 418 | ||
419 | bool AbView::contactCompare( const OContact &cnt, int category ) | 419 | bool AbView::contactCompare( const Opie::OPimContact &cnt, int category ) |
420 | { | 420 | { |
421 | //qWarning ("bool AbView::contactCompare( const OContact &cnt, %d )", category); | 421 | //qWarning ("bool AbView::contactCompare( const Opie::OPimContact &cnt, %d )", category); |
422 | 422 | ||
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 | |||
@@ -3,8 +3,9 @@ | |||
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 | ||
@@ -39,6 +40,6 @@ public: | |||
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 | ||
@@ -56,5 +57,5 @@ signals: | |||
56 | public slots: | 57 | public 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 | ||
@@ -62,5 +63,5 @@ private: | |||
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, |
@@ -75,6 +76,6 @@ private: | |||
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 | ||
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 8a5f9d5..9ae66d1 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -25,6 +25,6 @@ | |||
25 | 25 | ||
26 | #include <opie/ofileselector.h> | 26 | #include <opie2/ofileselector.h> |
27 | #include <opie/ofiledialog.h> | 27 | #include <opie2/ofiledialog.h> |
28 | #include <opie/ocontact.h> | 28 | #include <opie2/opimcontact.h> |
29 | #include <opie/ocontactaccessbackend_vcard.h> | 29 | #include <opie2/ocontactaccessbackend_vcard.h> |
30 | 30 | ||
@@ -319,3 +319,3 @@ void AddressbookWindow::slotSetFont( int size ) | |||
319 | void AddressbookWindow::importvCard() { | 319 | void AddressbookWindow::importvCard() { |
320 | QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); | 320 | QString str = Opie::Ui::OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); |
321 | if(!str.isEmpty() ){ | 321 | if(!str.isEmpty() ){ |
@@ -328,10 +328,10 @@ void AddressbookWindow::exportvCard() | |||
328 | qWarning(" void AddressbookWindow::exportvCard()"); | 328 | qWarning(" void AddressbookWindow::exportvCard()"); |
329 | QString filename = OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this ); | 329 | QString filename = Opie::Ui::OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this ); |
330 | if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){ | 330 | if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){ |
331 | qWarning(" Save to file %s, (%d)", filename.latin1(), filename.length()-1 ); | 331 | qWarning(" Save to file %s, (%d)", filename.latin1(), filename.length()-1 ); |
332 | OContact curCont = m_abView->currentEntry(); | 332 | Opie::OPimContact curCont = m_abView->currentEntry(); |
333 | if ( !curCont.isEmpty() ){ | 333 | if ( !curCont.isEmpty() ){ |
334 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 334 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
335 | filename ); | 335 | filename ); |
336 | OContactAccess* access = new OContactAccess ( "addressbook_exp", QString::null , vcard_backend, true ); | 336 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook_exp", QString::null , vcard_backend, true ); |
337 | if ( access ){ | 337 | if ( access ){ |
@@ -373,6 +373,6 @@ void AddressbookWindow::setDocument( const QString &filename ) | |||
373 | 373 | ||
374 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 374 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
375 | filename ); | 375 | filename ); |
376 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 376 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
377 | OContactAccess::List allList = access->allRecords(); | 377 | Opie::OPimContactAccess::List allList = access->allRecords(); |
378 | qWarning( "Found number of contacts in File: %d", allList.count() ); | 378 | qWarning( "Found number of contacts in File: %d", allList.count() ); |
@@ -386,3 +386,3 @@ void AddressbookWindow::setDocument( const QString &filename ) | |||
386 | bool doAsk = true; | 386 | bool doAsk = true; |
387 | OContactAccess::List::Iterator it; | 387 | Opie::OPimContactAccess::List::Iterator it; |
388 | for ( it = allList.begin(); it != allList.end(); ++it ){ | 388 | for ( it = allList.begin(); it != allList.end(); ++it ){ |
@@ -435,3 +435,3 @@ void AddressbookWindow::slotUpdateToolbar() | |||
435 | { | 435 | { |
436 | OContact ce = m_abView->currentEntry(); | 436 | Opie::OPimContact ce = m_abView->currentEntry(); |
437 | actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); | 437 | actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); |
@@ -441,3 +441,3 @@ void AddressbookWindow::slotListNew() | |||
441 | { | 441 | { |
442 | OContact cnt; | 442 | Opie::OPimContact cnt; |
443 | if( !syncing ) { | 443 | if( !syncing ) { |
@@ -460,3 +460,3 @@ void AddressbookWindow::slotListDelete() | |||
460 | if(!syncing) { | 460 | if(!syncing) { |
461 | OContact tmpEntry = m_abView ->currentEntry(); | 461 | Opie::OPimContact tmpEntry = m_abView ->currentEntry(); |
462 | 462 | ||
@@ -527,3 +527,3 @@ void AddressbookWindow::writeMail() | |||
527 | { | 527 | { |
528 | OContact c = m_abView -> currentEntry(); | 528 | Opie::OPimContact c = m_abView -> currentEntry(); |
529 | QString name = c.fileAs(); | 529 | QString name = c.fileAs(); |
@@ -567,3 +567,3 @@ void AddressbookWindow::slotBeam() | |||
567 | QString beamFilename; | 567 | QString beamFilename; |
568 | OContact c; | 568 | Opie::OPimContact c; |
569 | if ( actionPersonal->isOn() ) { | 569 | if ( actionPersonal->isOn() ) { |
@@ -572,7 +572,7 @@ void AddressbookWindow::slotBeam() | |||
572 | return; // can't beam a non-existent file | 572 | return; // can't beam a non-existent file |
573 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 573 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
574 | beamFilename ); | 574 | beamFilename ); |
575 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 575 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
576 | OContactAccess::List allList = access->allRecords(); | 576 | Opie::OPimContactAccess::List allList = access->allRecords(); |
577 | OContactAccess::List::Iterator it = allList.begin(); // Just take first | 577 | Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first |
578 | c = *it; | 578 | c = *it; |
@@ -584,5 +584,5 @@ void AddressbookWindow::slotBeam() | |||
584 | c = m_abView -> currentEntry(); | 584 | c = m_abView -> currentEntry(); |
585 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 585 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
586 | beamfile ); | 586 | beamfile ); |
587 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 587 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
588 | access->add( c ); | 588 | access->add( c ); |
@@ -654,3 +654,3 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) | |||
654 | 654 | ||
655 | OContact cnt; | 655 | Opie::OPimContact cnt; |
656 | QString fn, mn, ln; | 656 | QString fn, mn, ln; |
@@ -724,3 +724,3 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) | |||
724 | { | 724 | { |
725 | OContact entry; | 725 | Opie::OPimContact entry; |
726 | if ( !abEditor ) { | 726 | if ( !abEditor ) { |
@@ -740,3 +740,3 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) | |||
740 | if ( entryMode == NewEntry ) { | 740 | if ( entryMode == NewEntry ) { |
741 | OContact insertEntry = abEditor->entry(); | 741 | Opie::OPimContact insertEntry = abEditor->entry(); |
742 | insertEntry.assignUid(); | 742 | insertEntry.assignUid(); |
@@ -745,3 +745,3 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) | |||
745 | } else { | 745 | } else { |
746 | OContact replEntry = abEditor->entry(); | 746 | Opie::OPimContact replEntry = abEditor->entry(); |
747 | 747 | ||
@@ -759,3 +759,3 @@ void AddressbookWindow::editPersonal() | |||
759 | { | 759 | { |
760 | OContact entry; | 760 | Opie::OPimContact entry; |
761 | 761 | ||
diff --git a/core/pim/addressbook/addressbook.pro b/core/pim/addressbook/addressbook.pro index afd3b92..05f02c3 100644 --- a/core/pim/addressbook/addressbook.pro +++ b/core/pim/addressbook/addressbook.pro | |||
@@ -25,3 +25,3 @@ INCLUDEPATH += $(OPIEDIR)/include | |||
25 | DEPENDPATH+= $(OPIEDIR)/include | 25 | DEPENDPATH+= $(OPIEDIR)/include |
26 | LIBS += -lqpe -lopie | 26 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopiepim2 -lopiedb2 |
27 | 27 | ||
diff --git a/core/pim/addressbook/config.in b/core/pim/addressbook/config.in index 3377763..7ecf14c 100644 --- a/core/pim/addressbook/config.in +++ b/core/pim/addressbook/config.in | |||
@@ -3,2 +3,2 @@ | |||
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2DB |
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index dee0f11..6c98b5d 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp | |||
@@ -2,2 +2,7 @@ | |||
2 | 2 | ||
3 | #include <opie2/opimcontact.h> | ||
4 | #include "opie2/opimcontactfields.h" | ||
5 | |||
6 | #include <qpe/resource.h> | ||
7 | |||
3 | #include <qcheckbox.h> | 8 | #include <qcheckbox.h> |
@@ -7,7 +12,2 @@ | |||
7 | 12 | ||
8 | #include <qpe/resource.h> | ||
9 | |||
10 | #include <opie/ocontact.h> | ||
11 | #include "opie/ocontactfields.h" | ||
12 | |||
13 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): | 13 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): |
@@ -15,3 +15,3 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name): | |||
15 | { | 15 | { |
16 | contFields = OContactFields::trfields(); | 16 | contFields = Opie::OPimContactFields::trfields(); |
17 | 17 | ||
@@ -23,3 +23,3 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name): | |||
23 | // Reset Widget Flags: This was not changeable by designer :( | 23 | // Reset Widget Flags: This was not changeable by designer :( |
24 | setWFlags ( WStyle_ContextHelp ); | 24 | setWFlags ( WStyle_ContextHelp ); |
25 | 25 | ||
@@ -30,7 +30,7 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name): | |||
30 | m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) ); | 30 | m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) ); |
31 | 31 | ||
32 | 32 | ||
33 | // Get the translation maps between Field ID and translated strings | 33 | // Get the translation maps between Field ID and translated strings |
34 | m_mapStrToID = OContactFields::trFieldsToId(); | 34 | m_mapStrToID = Opie::OPimContactFields::trFieldsToId(); |
35 | m_mapIDToStr = OContactFields::idToTrFields(); | 35 | m_mapIDToStr = Opie::OPimContactFields::idToTrFields(); |
36 | 36 | ||
@@ -78,3 +78,3 @@ void ConfigDlg::slotItemAdd() | |||
78 | fieldListBox->insertItem( item ); | 78 | fieldListBox->insertItem( item ); |
79 | } | 79 | } |
80 | } | 80 | } |
@@ -88,8 +88,8 @@ void ConfigDlg::slotItemRemove() | |||
88 | fieldListBox->removeItem( i ); | 88 | fieldListBox->removeItem( i ); |
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | void ConfigDlg::setConfig( const AbConfig& cnf ) | 92 | void ConfigDlg::setConfig( const AbConfig& cnf ) |
93 | { | 93 | { |
94 | m_config = cnf; | 94 | m_config = cnf; |
95 | 95 | ||
@@ -107,3 +107,3 @@ void ConfigDlg::setConfig( const AbConfig& cnf ) | |||
107 | break; | 107 | break; |
108 | case 1: | 108 | case 1: |
109 | m_smallFont->setChecked( false ); | 109 | m_smallFont->setChecked( false ); |
@@ -112,3 +112,3 @@ void ConfigDlg::setConfig( const AbConfig& cnf ) | |||
112 | break; | 112 | break; |
113 | case 2: | 113 | case 2: |
114 | m_smallFont->setChecked( false ); | 114 | m_smallFont->setChecked( false ); |
@@ -126,5 +126,5 @@ void ConfigDlg::setConfig( const AbConfig& cnf ) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | AbConfig ConfigDlg::getConfig() | 128 | AbConfig ConfigDlg::getConfig() |
129 | { | 129 | { |
130 | m_config.setUseRegExp( m_useRegExp->isOn() ); | 130 | m_config.setUseRegExp( m_useRegExp->isOn() ); |
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 8acf570..534666d 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -23,2 +23,4 @@ | |||
23 | 23 | ||
24 | #include <opie2/opimcontact.h> | ||
25 | |||
24 | #include <qpe/categoryselect.h> | 26 | #include <qpe/categoryselect.h> |
@@ -26,3 +28,2 @@ | |||
26 | #include <qpe/qpedialog.h> | 28 | #include <qpe/qpedialog.h> |
27 | #include <opie/ocontact.h> | ||
28 | #include <qpe/resource.h> | 29 | #include <qpe/resource.h> |
@@ -35,4 +36,4 @@ | |||
35 | #include <qtoolbutton.h> | 36 | #include <qtoolbutton.h> |
36 | #include <qlistbox.h> | 37 | #include <qlistbox.h> |
37 | #include <qmessagebox.h> | 38 | #include <qmessagebox.h> |
38 | #include <qwhatsthis.h> | 39 | #include <qwhatsthis.h> |
@@ -53,3 +54,3 @@ void parseEmailTo( const QString &strDefaultEmail, | |||
53 | 54 | ||
54 | ContactEditor::ContactEditor(const OContact &entry, | 55 | ContactEditor::ContactEditor(const Opie::OPimContact &entry, |
55 | QWidget *parent, | 56 | QWidget *parent, |
@@ -79,3 +80,3 @@ void ContactEditor::init() { | |||
79 | qWarning("init() START"); | 80 | qWarning("init() START"); |
80 | 81 | ||
81 | uint i = 0; | 82 | uint i = 0; |
@@ -89,6 +90,6 @@ void ContactEditor::init() { | |||
89 | 90 | ||
90 | trlChooserNames = OContactFields::trphonefields( false ); | 91 | trlChooserNames = Opie::OPimContactFields::trphonefields( false ); |
91 | slChooserNames = OContactFields::untrphonefields( false ); | 92 | slChooserNames = Opie::OPimContactFields::untrphonefields( false ); |
92 | slDynamicEntries = OContactFields::untrdetailsfields( false ); | 93 | slDynamicEntries = Opie::OPimContactFields::untrdetailsfields( false ); |
93 | trlDynamicEntries = OContactFields::trdetailsfields( false ); | 94 | trlDynamicEntries = Opie::OPimContactFields::trdetailsfields( false ); |
94 | 95 | ||
@@ -103,3 +104,3 @@ void ContactEditor::init() { | |||
103 | // use the translation map to avoid mismatches.. | 104 | // use the translation map to avoid mismatches.. |
104 | QMap<int, QString> translMap = OContactFields::idToTrFields(); | 105 | QMap<int, QString> translMap = Opie::OPimContactFields::idToTrFields(); |
105 | trlDynamicEntries.remove( translMap[Qtopia::Anniversary] ); | 106 | trlDynamicEntries.remove( translMap[Qtopia::Anniversary] ); |
@@ -166,3 +167,3 @@ void ContactEditor::init() { | |||
166 | 167 | ||
167 | // Chooser 1 | 168 | // Chooser 1 |
168 | cmbChooserField1 = new QComboBox( FALSE, container ); | 169 | cmbChooserField1 = new QComboBox( FALSE, container ); |
@@ -531,3 +532,3 @@ void ContactEditor::init() { | |||
531 | 532 | ||
532 | QPushButton* deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), | 533 | QPushButton* deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), |
533 | tr( "Delete" ), | 534 | tr( "Delete" ), |
@@ -556,3 +557,3 @@ void ContactEditor::init() { | |||
556 | 557 | ||
557 | deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), | 558 | deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), |
558 | tr( "Delete" ), | 559 | tr( "Delete" ), |
@@ -580,7 +581,7 @@ void ContactEditor::init() { | |||
580 | QStringList::ConstIterator it = slDynamicEntries.begin(); | 581 | QStringList::ConstIterator it = slDynamicEntries.begin(); |
581 | QMap<QString, int> mapStrToID = OContactFields::untrFieldsToId(); | 582 | QMap<QString, int> mapStrToID = Opie::OPimContactFields::untrFieldsToId(); |
582 | QMap<int, QString> mapIdToStr = OContactFields::idToTrFields(); | 583 | QMap<int, QString> mapIdToStr = Opie::OPimContactFields::idToTrFields(); |
583 | for (i = counter; it != slDynamicEntries.end(); i++, ++it ) { | 584 | for (i = counter; it != slDynamicEntries.end(); i++, ++it ) { |
584 | 585 | ||
585 | if (((*it) == "Anniversary") || | 586 | if (((*it) == "Anniversary") || |
586 | ((*it) == "Birthday")|| ((*it) == "Gender")) continue; | 587 | ((*it) == "Birthday")|| ((*it) == "Gender")) continue; |
@@ -646,7 +647,7 @@ void ContactEditor::init() { | |||
646 | 647 | ||
647 | connect( txtFullName, SIGNAL(textChanged(const QString&)), | 648 | connect( txtFullName, SIGNAL(textChanged(const QString&)), |
648 | this, SLOT(slotFullNameChange(const QString&)) ); | 649 | this, SLOT(slotFullNameChange(const QString&)) ); |
649 | connect( txtSuffix, SIGNAL(textChanged(const QString&)), | 650 | connect( txtSuffix, SIGNAL(textChanged(const QString&)), |
650 | this, SLOT(slotSuffixChange(const QString&)) ); | 651 | this, SLOT(slotSuffixChange(const QString&)) ); |
651 | connect( txtOrganization, SIGNAL(textChanged(const QString&)), | 652 | connect( txtOrganization, SIGNAL(textChanged(const QString&)), |
652 | this, SLOT(slotOrganizationChange(const QString&)) ); | 653 | this, SLOT(slotOrganizationChange(const QString&)) ); |
@@ -702,3 +703,3 @@ void ContactEditor::defaultEmailChanged(int i){ | |||
702 | 703 | ||
703 | void ContactEditor::populateDefaultEmailCmb(){ | 704 | void ContactEditor::populateDefaultEmailCmb(){ |
704 | 705 | ||
@@ -707,6 +708,6 @@ void ContactEditor::populateDefaultEmailCmb(){ | |||
707 | if ( !cmbDefaultEmail ){ | 708 | if ( !cmbDefaultEmail ){ |
708 | cmbDefaultEmail = new QComboBox(this); | 709 | cmbDefaultEmail = new QComboBox(this); |
709 | cmbDefaultEmail -> hide(); | 710 | cmbDefaultEmail -> hide(); |
710 | } | 711 | } |
711 | cmbDefaultEmail->clear(); | 712 | cmbDefaultEmail->clear(); |
712 | cmbDefaultEmail->insertStringList( emails ); | 713 | cmbDefaultEmail->insertStringList( emails ); |
@@ -726,3 +727,3 @@ void ContactEditor::populateDefaultEmailCmb(){ | |||
726 | } | 727 | } |
727 | 728 | ||
728 | // If the current default email is not found in the list, we choose the | 729 | // If the current default email is not found in the list, we choose the |
@@ -743,8 +744,8 @@ bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int w | |||
743 | 744 | ||
744 | // Create and connect combobox for selecting the default email | 745 | // Create and connect combobox for selecting the default email |
745 | if ( type == "Default Email"){ | 746 | if ( type == "Default Email"){ |
746 | qWarning("Choosing default-email (defaultEmailChooserPosition= %d) ", defaultEmailChooserPosition); | 747 | qWarning("Choosing default-email (defaultEmailChooserPosition= %d) ", defaultEmailChooserPosition); |
747 | 748 | ||
748 | // More than one default-email chooser is not allowed ! | 749 | // More than one default-email chooser is not allowed ! |
749 | if ( ( defaultEmailChooserPosition != -1 ) && | 750 | if ( ( defaultEmailChooserPosition != -1 ) && |
750 | defaultEmailChooserPosition != widgetPos && !initializing){ | 751 | defaultEmailChooserPosition != widgetPos && !initializing){ |
@@ -755,3 +756,3 @@ bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int w | |||
755 | QComboBox* cmbo = ( QComboBox* ) inputStack -> widget( Combo ); | 756 | QComboBox* cmbo = ( QComboBox* ) inputStack -> widget( Combo ); |
756 | if ( cmbo ){ | 757 | if ( cmbo ){ |
757 | inputStack->raiseWidget( TextField ); | 758 | inputStack->raiseWidget( TextField ); |
@@ -770,3 +771,3 @@ bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int w | |||
770 | connect( cmbo,SIGNAL( activated(int) ), | 771 | connect( cmbo,SIGNAL( activated(int) ), |
771 | SLOT( defaultEmailChanged(int) ) ); | 772 | SLOT( defaultEmailChanged(int) ) ); |
772 | 773 | ||
@@ -775,3 +776,3 @@ bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int w | |||
775 | 776 | ||
776 | 777 | ||
777 | } else { | 778 | } else { |
@@ -783,3 +784,3 @@ bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int w | |||
783 | QComboBox* cmbo = ( QComboBox* ) inputStack -> widget( Combo ); | 784 | QComboBox* cmbo = ( QComboBox* ) inputStack -> widget( Combo ); |
784 | if ( cmbo ){ | 785 | if ( cmbo ){ |
785 | inputStack->raiseWidget( TextField ); | 786 | inputStack->raiseWidget( TextField ); |
@@ -803,3 +804,3 @@ void ContactEditor::chooserError( int index ) | |||
803 | { | 804 | { |
804 | qWarning("ContactEditor::chooserError( %d )", index); | 805 | qWarning("ContactEditor::chooserError( %d )", index); |
805 | QMessageBox::warning( this, "Chooser Error", | 806 | QMessageBox::warning( this, "Chooser Error", |
@@ -812,3 +813,3 @@ void ContactEditor::chooserError( int index ) | |||
812 | // Reset the selected Chooser. Unfortunately the chooser | 813 | // Reset the selected Chooser. Unfortunately the chooser |
813 | // generates no signal, therfore we have to | 814 | // generates no signal, therfore we have to |
814 | // call the cmbChooserChange function manually.. | 815 | // call the cmbChooserChange function manually.. |
@@ -819,3 +820,3 @@ void ContactEditor::chooserError( int index ) | |||
819 | break; | 820 | break; |
820 | case 2: | 821 | case 2: |
821 | cmbChooserField2 -> setCurrentItem( 0 ); | 822 | cmbChooserField2 -> setCurrentItem( 0 ); |
@@ -823,3 +824,3 @@ void ContactEditor::chooserError( int index ) | |||
823 | break; | 824 | break; |
824 | case 3: | 825 | case 3: |
825 | cmbChooserField3 -> setCurrentItem( 0 ); | 826 | cmbChooserField3 -> setCurrentItem( 0 ); |
@@ -827,3 +828,3 @@ void ContactEditor::chooserError( int index ) | |||
827 | break; | 828 | break; |
828 | case 4: | 829 | case 4: |
829 | cmbChooserField4 -> setCurrentItem( 0 ); | 830 | cmbChooserField4 -> setCurrentItem( 0 ); |
@@ -835,3 +836,3 @@ void ContactEditor::chooserError( int index ) | |||
835 | // Called when something was changed in a textfield (shouldn't it called textchanged? (se)) | 836 | // Called when something was changed in a textfield (shouldn't it called textchanged? (se)) |
836 | void ContactEditor::chooserChange( const QString &textChanged, int index, | 837 | void ContactEditor::chooserChange( const QString &textChanged, int index, |
837 | QLineEdit* , int widgetPos ) { | 838 | QLineEdit* , int widgetPos ) { |
@@ -842,3 +843,3 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, | |||
842 | 843 | ||
843 | if ( type == "Default Email"){ | 844 | if ( type == "Default Email"){ |
844 | qWarning ("??? Wozu??: %s", textChanged.latin1()); | 845 | qWarning ("??? Wozu??: %s", textChanged.latin1()); |
@@ -856,3 +857,3 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, | |||
856 | } | 857 | } |
857 | 858 | ||
858 | slChooserValues[index] = textChanged; | 859 | slChooserValues[index] = textChanged; |
@@ -950,3 +951,3 @@ void ContactEditor::slotCmbChooser1Change( int index ) { | |||
950 | if ( !cmbChooserChange( cmbChooserField1->currentItem(), m_widgetStack1, 1) ){ | 951 | if ( !cmbChooserChange( cmbChooserField1->currentItem(), m_widgetStack1, 1) ){ |
951 | 952 | ||
952 | txtChooserField1->setText( slChooserValues[index] ); | 953 | txtChooserField1->setText( slChooserValues[index] ); |
@@ -1051,3 +1052,3 @@ void ContactEditor::slotOrganizationChange( const QString &textChanged ){ | |||
1051 | qWarning( "ContactEditor::slotOrganizationChange( %s )", textChanged.latin1() ); | 1052 | qWarning( "ContactEditor::slotOrganizationChange( %s )", textChanged.latin1() ); |
1052 | // Special handling for storing Companies: | 1053 | // Special handling for storing Companies: |
1053 | // If no Fullname is given, we store the Company-Name as lastname | 1054 | // If no Fullname is given, we store the Company-Name as lastname |
@@ -1056,3 +1057,3 @@ void ContactEditor::slotOrganizationChange( const QString &textChanged ){ | |||
1056 | txtFullName->setText( textChanged ); | 1057 | txtFullName->setText( textChanged ); |
1057 | 1058 | ||
1058 | } | 1059 | } |
@@ -1139,3 +1140,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1139 | // A comma (",") separates the lastname from one or | 1140 | // A comma (",") separates the lastname from one or |
1140 | // many first names. Thus, remove the lastname from the | 1141 | // many first names. Thus, remove the lastname from the |
1141 | // String and parse the firstnames. | 1142 | // String and parse the firstnames. |
@@ -1156,3 +1157,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1156 | allSecondNames.append( *it ); | 1157 | allSecondNames.append( *it ); |
1157 | 1158 | ||
1158 | strMiddleName = allSecondNames.join(" "); | 1159 | strMiddleName = allSecondNames.join(" "); |
@@ -1161,3 +1162,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1161 | 1162 | ||
1162 | // No comma separator used: We use the first word as firstname, the | 1163 | // No comma separator used: We use the first word as firstname, the |
1163 | // last as second/lastname and everything in the middle as middlename | 1164 | // last as second/lastname and everything in the middle as middlename |
@@ -1170,6 +1171,6 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1170 | allSecondNames.append( *it ); | 1171 | allSecondNames.append( *it ); |
1171 | 1172 | ||
1172 | strMiddleName = allSecondNames.join(" "); | 1173 | strMiddleName = allSecondNames.join(" "); |
1173 | strLastName = *(--allNames.end()); | 1174 | strLastName = *(--allNames.end()); |
1174 | 1175 | ||
1175 | } | 1176 | } |
@@ -1187,24 +1188,24 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1187 | return strFirstName + " " + strLastName; | 1188 | return strFirstName + " " + strLastName; |
1188 | 1189 | ||
1189 | case NAME_LF: | 1190 | case NAME_LF: |
1190 | return strLastName + ", " + strFirstName; | 1191 | return strLastName + ", " + strFirstName; |
1191 | 1192 | ||
1192 | case NAME_LFM: | 1193 | case NAME_LFM: |
1193 | return strLastName + ", " + strFirstName + " " + strMiddleName; | 1194 | return strLastName + ", " + strFirstName + " " + strMiddleName; |
1194 | 1195 | ||
1195 | case NAME_FML: | 1196 | case NAME_FML: |
1196 | return strFirstName + " " + strMiddleName + " " + strLastName ; | 1197 | return strFirstName + " " + strMiddleName + " " + strLastName ; |
1197 | 1198 | ||
1198 | case NAME_F: | 1199 | case NAME_F: |
1199 | return strFirstName; | 1200 | return strFirstName; |
1200 | 1201 | ||
1201 | case NAME_M: | 1202 | case NAME_M: |
1202 | return strMiddleName; | 1203 | return strMiddleName; |
1203 | 1204 | ||
1204 | case NAME_L: | 1205 | case NAME_L: |
1205 | return strLastName; | 1206 | return strLastName; |
1206 | 1207 | ||
1207 | case NAME_S: | 1208 | case NAME_S: |
1208 | return txtSuffix->text(); | 1209 | return txtSuffix->text(); |
1209 | 1210 | ||
1210 | } | 1211 | } |
@@ -1215,3 +1216,3 @@ void ContactEditor::cleanupFields() { | |||
1215 | QStringList::Iterator it = slChooserValues.begin(); | 1216 | QStringList::Iterator it = slChooserValues.begin(); |
1216 | 1217 | ||
1217 | for ( int i = 0; it != slChooserValues.end(); i++, ++it ) { | 1218 | for ( int i = 0; it != slChooserValues.end(); i++, ++it ) { |
@@ -1219,3 +1220,3 @@ void ContactEditor::cleanupFields() { | |||
1219 | } | 1220 | } |
1220 | 1221 | ||
1221 | for ( int i = 0; i < 7; i++ ) { | 1222 | for ( int i = 0; i < 7; i++ ) { |
@@ -1224,3 +1225,3 @@ void ContactEditor::cleanupFields() { | |||
1224 | } | 1225 | } |
1225 | 1226 | ||
1226 | QListIterator<QLineEdit> itLV( listValue ); | 1227 | QListIterator<QLineEdit> itLV( listValue ); |
@@ -1228,4 +1229,4 @@ void ContactEditor::cleanupFields() { | |||
1228 | (*itLV)->setText( "" ); | 1229 | (*itLV)->setText( "" ); |
1229 | } | 1230 | } |
1230 | 1231 | ||
1231 | txtFirstName->setText(""); | 1232 | txtFirstName->setText(""); |
@@ -1249,9 +1250,9 @@ void ContactEditor::cleanupFields() { | |||
1249 | txtTmp->setText(""); | 1250 | txtTmp->setText(""); |
1250 | 1251 | ||
1251 | } | 1252 | } |
1252 | 1253 | ||
1253 | void ContactEditor::setEntry( const OContact &entry ) { | 1254 | void ContactEditor::setEntry( const Opie::OPimContact &entry ) { |
1254 | 1255 | ||
1255 | initializing = true; | 1256 | initializing = true; |
1256 | 1257 | ||
1257 | // Cleanup and activate the general Page .. | 1258 | // Cleanup and activate the general Page .. |
@@ -1259,5 +1260,5 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1259 | tabMain->setCurrentPage( 0 ); | 1260 | tabMain->setCurrentPage( 0 ); |
1260 | 1261 | ||
1261 | ent = entry; | 1262 | ent = entry; |
1262 | 1263 | ||
1263 | emails = QStringList(ent.emailList()); | 1264 | emails = QStringList(ent.emailList()); |
@@ -1266,3 +1267,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1266 | qDebug("default email=%s",defaultEmail.latin1()); | 1267 | qDebug("default email=%s",defaultEmail.latin1()); |
1267 | 1268 | ||
1268 | txtFirstName->setText( ent.firstName() ); | 1269 | txtFirstName->setText( ent.firstName() ); |
@@ -1271,3 +1272,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1271 | txtSuffix->setText( ent.suffix() ); | 1272 | txtSuffix->setText( ent.suffix() ); |
1272 | 1273 | ||
1273 | // QString *tmpString = new QString; | 1274 | // QString *tmpString = new QString; |
@@ -1284,14 +1285,14 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1284 | } | 1285 | } |
1285 | 1286 | ||
1286 | cmbFileAs->setEditText( ent.fileAs() ); | 1287 | cmbFileAs->setEditText( ent.fileAs() ); |
1287 | 1288 | ||
1288 | //if (hasTitle) | 1289 | //if (hasTitle) |
1289 | txtJobTitle->setText( ent.jobTitle() ); | 1290 | txtJobTitle->setText( ent.jobTitle() ); |
1290 | 1291 | ||
1291 | //if (hasCompany) | 1292 | //if (hasCompany) |
1292 | txtOrganization->setText( ent.company() ); | 1293 | txtOrganization->setText( ent.company() ); |
1293 | 1294 | ||
1294 | //if (hasNotes) | 1295 | //if (hasNotes) |
1295 | txtNote->setText( ent.notes() ); | 1296 | txtNote->setText( ent.notes() ); |
1296 | 1297 | ||
1297 | //if (hasStreet) { | 1298 | //if (hasStreet) { |
@@ -1300,3 +1301,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1300 | //} | 1301 | //} |
1301 | 1302 | ||
1302 | //if (hasCity) { | 1303 | //if (hasCity) { |
@@ -1305,3 +1306,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1305 | //} | 1306 | //} |
1306 | 1307 | ||
1307 | //if (hasState) { | 1308 | //if (hasState) { |
@@ -1310,3 +1311,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1310 | //} | 1311 | //} |
1311 | 1312 | ||
1312 | //if (hasZip) { | 1313 | //if (hasZip) { |
@@ -1315,3 +1316,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1315 | //} | 1316 | //} |
1316 | 1317 | ||
1317 | //if (hasCountry) { | 1318 | //if (hasCountry) { |
@@ -1320,3 +1321,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1320 | //} | 1321 | //} |
1321 | 1322 | ||
1322 | QStringList::ConstIterator it; | 1323 | QStringList::ConstIterator it; |
@@ -1324,26 +1325,26 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1324 | for ( it = slDynamicEntries.begin(); itLE.current()/* != slDynamicEntries.end()*/; ++it, ++itLE) { | 1325 | for ( it = slDynamicEntries.begin(); itLE.current()/* != slDynamicEntries.end()*/; ++it, ++itLE) { |
1325 | 1326 | ||
1326 | qWarning(" Filling dynamic Field: %s", (*it).latin1() ); | 1327 | qWarning(" Filling dynamic Field: %s", (*it).latin1() ); |
1327 | 1328 | ||
1328 | if ( *it == "Department" ) | 1329 | if ( *it == "Department" ) |
1329 | (*itLE)->setText( ent.department() ); | 1330 | (*itLE)->setText( ent.department() ); |
1330 | 1331 | ||
1331 | if ( *it == "Company" ) | 1332 | if ( *it == "Company" ) |
1332 | (*itLE)->setText( ent.company() ); | 1333 | (*itLE)->setText( ent.company() ); |
1333 | 1334 | ||
1334 | if ( *it == "Office" ) | 1335 | if ( *it == "Office" ) |
1335 | (*itLE)->setText( ent.office() ); | 1336 | (*itLE)->setText( ent.office() ); |
1336 | 1337 | ||
1337 | if ( *it == "Profession" ) | 1338 | if ( *it == "Profession" ) |
1338 | (*itLE)->setText( ent.profession() ); | 1339 | (*itLE)->setText( ent.profession() ); |
1339 | 1340 | ||
1340 | if ( *it == "Assistant" ) | 1341 | if ( *it == "Assistant" ) |
1341 | (*itLE)->setText( ent.assistant() ); | 1342 | (*itLE)->setText( ent.assistant() ); |
1342 | 1343 | ||
1343 | if ( *it == "Manager" ) | 1344 | if ( *it == "Manager" ) |
1344 | (*itLE)->setText( ent.manager() ); | 1345 | (*itLE)->setText( ent.manager() ); |
1345 | 1346 | ||
1346 | if ( *it == "Spouse" ) | 1347 | if ( *it == "Spouse" ) |
1347 | (*itLE)->setText( ent.spouse() ); | 1348 | (*itLE)->setText( ent.spouse() ); |
1348 | 1349 | ||
1349 | if ( *it == "Nickname" ){ | 1350 | if ( *it == "Nickname" ){ |
@@ -1352,11 +1353,11 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1352 | } | 1353 | } |
1353 | 1354 | ||
1354 | if ( *it == "Children" ) | 1355 | if ( *it == "Children" ) |
1355 | (*itLE)->setText( ent.children() ); | 1356 | (*itLE)->setText( ent.children() ); |
1356 | 1357 | ||
1357 | } | 1358 | } |
1358 | 1359 | ||
1359 | QStringList::Iterator itV; | 1360 | QStringList::Iterator itV; |
1360 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1361 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1361 | 1362 | ||
1362 | if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) | 1363 | if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) |
@@ -1369,3 +1370,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1369 | *itV = ent.businessFax(); | 1370 | *itV = ent.businessFax(); |
1370 | 1371 | ||
1371 | if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) ) | 1372 | if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) ) |
@@ -1378,6 +1379,6 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1378 | *itV = ent.defaultEmail(); | 1379 | *itV = ent.defaultEmail(); |
1379 | 1380 | ||
1380 | if ( *it == "Emails" ) | 1381 | if ( *it == "Emails" ) |
1381 | *itV = ent.emailList().join(", "); // :SX | 1382 | *itV = ent.emailList().join(", "); // :SX |
1382 | 1383 | ||
1383 | if ( *it == "Home Phone" ) | 1384 | if ( *it == "Home Phone" ) |
@@ -1390,3 +1391,3 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1390 | *itV = ent.homeFax(); | 1391 | *itV = ent.homeFax(); |
1391 | 1392 | ||
1392 | if ( *it == "Home Mobile" ) | 1393 | if ( *it == "Home Mobile" ) |
@@ -1396,6 +1397,6 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1396 | *itV = ent.carPhone(); | 1397 | *itV = ent.carPhone(); |
1397 | 1398 | ||
1398 | if ( *it == "ISDN Phone" ) | 1399 | if ( *it == "ISDN Phone" ) |
1399 | *itV = ent.ISDNPhone(); | 1400 | *itV = ent.ISDNPhone(); |
1400 | 1401 | ||
1401 | if ( *it == "Other Phone" ) | 1402 | if ( *it == "Other Phone" ) |
@@ -1408,15 +1409,15 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1408 | *itV = ent.homePager(); | 1409 | *itV = ent.homePager(); |
1409 | 1410 | ||
1410 | if ( *it == "AIM IM" ) | 1411 | if ( *it == "AIM IM" ) |
1411 | *itV = ent.AIMIM(); | 1412 | *itV = ent.AIMIM(); |
1412 | 1413 | ||
1413 | if ( *it == "ICQ IM" ) | 1414 | if ( *it == "ICQ IM" ) |
1414 | *itV = ent.ICQIM(); | 1415 | *itV = ent.ICQIM(); |
1415 | 1416 | ||
1416 | if ( *it == "Jabber IM" ) | 1417 | if ( *it == "Jabber IM" ) |
1417 | *itV = ent.jabberIM(); | 1418 | *itV = ent.jabberIM(); |
1418 | 1419 | ||
1419 | if ( *it == "MSN IM" ) | 1420 | if ( *it == "MSN IM" ) |
1420 | *itV = ent.MSNIM(); | 1421 | *itV = ent.MSNIM(); |
1421 | 1422 | ||
1422 | if ( *it == "Yahoo IM" ) | 1423 | if ( *it == "Yahoo IM" ) |
@@ -1426,19 +1427,19 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1426 | *itV = ent.homeWebpage(); | 1427 | *itV = ent.homeWebpage(); |
1427 | 1428 | ||
1428 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) | 1429 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) |
1429 | *itV = ent.businessWebpage(); | 1430 | *itV = ent.businessWebpage(); |
1430 | 1431 | ||
1431 | 1432 | ||
1432 | } | 1433 | } |
1433 | 1434 | ||
1434 | 1435 | ||
1435 | cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); | 1436 | cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); |
1436 | 1437 | ||
1437 | QString gender = ent.gender(); | 1438 | QString gender = ent.gender(); |
1438 | cmbGender->setCurrentItem( gender.toInt() ); | 1439 | cmbGender->setCurrentItem( gender.toInt() ); |
1439 | 1440 | ||
1440 | txtNote->setText( ent.notes() ); | 1441 | txtNote->setText( ent.notes() ); |
1441 | 1442 | ||
1442 | slotAddressTypeChange( cmbAddress->currentItem() ); | 1443 | slotAddressTypeChange( cmbAddress->currentItem() ); |
1443 | 1444 | ||
1444 | // Get combo-settings from contact and set preset.. | 1445 | // Get combo-settings from contact and set preset.. |
@@ -1455,5 +1456,5 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1455 | slotAddressTypeChange( cmbAddress->currentItem() ); | 1456 | slotAddressTypeChange( cmbAddress->currentItem() ); |
1456 | 1457 | ||
1457 | updateDatePicker(); | 1458 | updateDatePicker(); |
1458 | 1459 | ||
1459 | initializing = false; | 1460 | initializing = false; |
@@ -1468,3 +1469,3 @@ void ContactEditor::updateDatePicker() | |||
1468 | birthdayButton->setText( tr ("Unknown") ); | 1469 | birthdayButton->setText( tr ("Unknown") ); |
1469 | 1470 | ||
1470 | if ( !ent.anniversary().isNull() ){ | 1471 | if ( !ent.anniversary().isNull() ){ |
@@ -1474,3 +1475,3 @@ void ContactEditor::updateDatePicker() | |||
1474 | anniversaryButton->setText( tr ("Unknown") ); | 1475 | anniversaryButton->setText( tr ("Unknown") ); |
1475 | 1476 | ||
1476 | } | 1477 | } |
@@ -1478,6 +1479,6 @@ void ContactEditor::updateDatePicker() | |||
1478 | void ContactEditor::saveEntry() { | 1479 | void ContactEditor::saveEntry() { |
1479 | 1480 | ||
1480 | // Store current combo into contact | 1481 | // Store current combo into contact |
1481 | contactfields.saveToRecord( ent ); | 1482 | contactfields.saveToRecord( ent ); |
1482 | 1483 | ||
1483 | txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) ); | 1484 | txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) ); |
@@ -1486,3 +1487,3 @@ void ContactEditor::saveEntry() { | |||
1486 | // txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); | 1487 | // txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); |
1487 | 1488 | ||
1488 | ent.setFirstName( txtFirstName->text() ); | 1489 | ent.setFirstName( txtFirstName->text() ); |
@@ -1491,17 +1492,17 @@ void ContactEditor::saveEntry() { | |||
1491 | ent.setSuffix( txtSuffix->text() ); | 1492 | ent.setSuffix( txtSuffix->text() ); |
1492 | 1493 | ||
1493 | ent.setFileAs( cmbFileAs->currentText() ); | 1494 | ent.setFileAs( cmbFileAs->currentText() ); |
1494 | 1495 | ||
1495 | ent.setCategories( cmbCat->currentCategories() ); | 1496 | ent.setCategories( cmbCat->currentCategories() ); |
1496 | 1497 | ||
1497 | 1498 | ||
1498 | //if (hasTitle) | 1499 | //if (hasTitle) |
1499 | ent.setJobTitle( txtJobTitle->text() ); | 1500 | ent.setJobTitle( txtJobTitle->text() ); |
1500 | 1501 | ||
1501 | //if (hasCompany) | 1502 | //if (hasCompany) |
1502 | ent.setCompany( txtOrganization->text() ); | 1503 | ent.setCompany( txtOrganization->text() ); |
1503 | 1504 | ||
1504 | //if (hasNotes) | 1505 | //if (hasNotes) |
1505 | ent.setNotes( txtNote->text() ); | 1506 | ent.setNotes( txtNote->text() ); |
1506 | 1507 | ||
1507 | //if (hasStreet) { | 1508 | //if (hasStreet) { |
@@ -1510,3 +1511,3 @@ void ContactEditor::saveEntry() { | |||
1510 | //} | 1511 | //} |
1511 | 1512 | ||
1512 | //if (hasCity) { | 1513 | //if (hasCity) { |
@@ -1515,3 +1516,3 @@ void ContactEditor::saveEntry() { | |||
1515 | //} | 1516 | //} |
1516 | 1517 | ||
1517 | //if (hasState) { | 1518 | //if (hasState) { |
@@ -1520,3 +1521,3 @@ void ContactEditor::saveEntry() { | |||
1520 | //} | 1521 | //} |
1521 | 1522 | ||
1522 | //if (hasZip) { | 1523 | //if (hasZip) { |
@@ -1525,3 +1526,3 @@ void ContactEditor::saveEntry() { | |||
1525 | //} | 1526 | //} |
1526 | 1527 | ||
1527 | //if (hasCountry) { | 1528 | //if (hasCountry) { |
@@ -1530,3 +1531,3 @@ void ContactEditor::saveEntry() { | |||
1530 | //} | 1531 | //} |
1531 | 1532 | ||
1532 | QStringList::ConstIterator it; | 1533 | QStringList::ConstIterator it; |
@@ -1534,45 +1535,45 @@ void ContactEditor::saveEntry() { | |||
1534 | for ( it = slDynamicEntries.begin(); itLE.current() && it != slDynamicEntries.end(); ++it, ++itLE) { | 1535 | for ( it = slDynamicEntries.begin(); itLE.current() && it != slDynamicEntries.end(); ++it, ++itLE) { |
1535 | 1536 | ||
1536 | if ( *it == "Department" ) | 1537 | if ( *it == "Department" ) |
1537 | ent.setDepartment( (*itLE)->text() ); | 1538 | ent.setDepartment( (*itLE)->text() ); |
1538 | 1539 | ||
1539 | if ( *it == "Company" ) | 1540 | if ( *it == "Company" ) |
1540 | ent.setCompany( (*itLE)->text() ); | 1541 | ent.setCompany( (*itLE)->text() ); |
1541 | 1542 | ||
1542 | if ( *it == "Office" ) | 1543 | if ( *it == "Office" ) |
1543 | ent.setOffice( (*itLE)->text() ); | 1544 | ent.setOffice( (*itLE)->text() ); |
1544 | 1545 | ||
1545 | if ( *it == "Profession" ) | 1546 | if ( *it == "Profession" ) |
1546 | ent.setProfession( (*itLE)->text() ); | 1547 | ent.setProfession( (*itLE)->text() ); |
1547 | 1548 | ||
1548 | if ( *it == "Assistant" ) | 1549 | if ( *it == "Assistant" ) |
1549 | ent.setAssistant( (*itLE)->text() ); | 1550 | ent.setAssistant( (*itLE)->text() ); |
1550 | 1551 | ||
1551 | if ( *it == "Manager" ) | 1552 | if ( *it == "Manager" ) |
1552 | ent.setManager( (*itLE)->text() ); | 1553 | ent.setManager( (*itLE)->text() ); |
1553 | 1554 | ||
1554 | if ( *it == "Spouse" ) | 1555 | if ( *it == "Spouse" ) |
1555 | ent.setSpouse( (*itLE)->text() ); | 1556 | ent.setSpouse( (*itLE)->text() ); |
1556 | 1557 | ||
1557 | if ( *it == "Nickname" ) | 1558 | if ( *it == "Nickname" ) |
1558 | ent.setNickname( (*itLE)->text() ); | 1559 | ent.setNickname( (*itLE)->text() ); |
1559 | 1560 | ||
1560 | if ( *it == "Children" ) | 1561 | if ( *it == "Children" ) |
1561 | ent.setChildren( (*itLE)->text() ); | 1562 | ent.setChildren( (*itLE)->text() ); |
1562 | 1563 | ||
1563 | } | 1564 | } |
1564 | 1565 | ||
1565 | 1566 | ||
1566 | QStringList::ConstIterator itV; | 1567 | QStringList::ConstIterator itV; |
1567 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1568 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1568 | 1569 | ||
1569 | if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) | 1570 | if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) |
1570 | ent.setBusinessPhone( *itV ); | 1571 | ent.setBusinessPhone( *itV ); |
1571 | 1572 | ||
1572 | if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) ) | 1573 | if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) ) |
1573 | ent.setBusinessFax( *itV ); | 1574 | ent.setBusinessFax( *itV ); |
1574 | 1575 | ||
1575 | if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) ) | 1576 | if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) ) |
1576 | ent.setBusinessMobile( *itV ); | 1577 | ent.setBusinessMobile( *itV ); |
1577 | 1578 | ||
1578 | if ( *it == "Emails" ){ | 1579 | if ( *it == "Emails" ){ |
@@ -1588,30 +1589,30 @@ void ContactEditor::saveEntry() { | |||
1588 | } | 1589 | } |
1589 | 1590 | ||
1590 | if ( *it == "Default Email") | 1591 | if ( *it == "Default Email") |
1591 | ent.setDefaultEmail( defaultEmail /* *itV */ ); | 1592 | ent.setDefaultEmail( defaultEmail /* *itV */ ); |
1592 | 1593 | ||
1593 | if ( *it == "Home Phone" ) | 1594 | if ( *it == "Home Phone" ) |
1594 | ent.setHomePhone( *itV ); | 1595 | ent.setHomePhone( *itV ); |
1595 | 1596 | ||
1596 | if ( *it == "Home Fax" ) | 1597 | if ( *it == "Home Fax" ) |
1597 | ent.setHomeFax( *itV ); | 1598 | ent.setHomeFax( *itV ); |
1598 | 1599 | ||
1599 | if ( *it == "Home Mobile" ) | 1600 | if ( *it == "Home Mobile" ) |
1600 | ent.setHomeMobile( *itV ); | 1601 | ent.setHomeMobile( *itV ); |
1601 | 1602 | ||
1602 | if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) ) | 1603 | if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) ) |
1603 | ent.setBusinessPager( *itV ); | 1604 | ent.setBusinessPager( *itV ); |
1604 | 1605 | ||
1605 | if ( *it == "Home Web Page" ) | 1606 | if ( *it == "Home Web Page" ) |
1606 | ent.setHomeWebpage( *itV ); | 1607 | ent.setHomeWebpage( *itV ); |
1607 | 1608 | ||
1608 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) | 1609 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) |
1609 | ent.setBusinessWebpage( *itV ); | 1610 | ent.setBusinessWebpage( *itV ); |
1610 | 1611 | ||
1611 | 1612 | ||
1612 | } | 1613 | } |
1613 | 1614 | ||
1614 | int gender = cmbGender->currentItem(); | 1615 | int gender = cmbGender->currentItem(); |
1615 | ent.setGender( QString::number( gender ) ); | 1616 | ent.setGender( QString::number( gender ) ); |
1616 | 1617 | ||
1617 | QString str = txtNote->text(); | 1618 | QString str = txtNote->text(); |
@@ -1619,3 +1620,3 @@ void ContactEditor::saveEntry() { | |||
1619 | ent.setNotes( str ); | 1620 | ent.setNotes( str ); |
1620 | 1621 | ||
1621 | } | 1622 | } |
@@ -1700,3 +1701,3 @@ void ContactEditor::setPersonalView( bool personal ) | |||
1700 | m_personalView = personal; | 1701 | m_personalView = personal; |
1701 | 1702 | ||
1702 | // Currently disbled due to the fact that | 1703 | // Currently disbled due to the fact that |
@@ -1704,3 +1705,3 @@ void ContactEditor::setPersonalView( bool personal ) | |||
1704 | return; | 1705 | return; |
1705 | 1706 | ||
1706 | if ( personal ){ | 1707 | if ( personal ){ |
@@ -1708,6 +1709,6 @@ void ContactEditor::setPersonalView( bool personal ) | |||
1708 | labCat->hide(); | 1709 | labCat->hide(); |
1709 | 1710 | ||
1710 | } else{ | 1711 | } else{ |
1711 | cmbCat->show(); | 1712 | cmbCat->show(); |
1712 | labCat->show(); | 1713 | labCat->show(); |
1713 | } | 1714 | } |
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h index 72d14a9..1b86e6f 100644 --- a/core/pim/addressbook/contacteditor.h +++ b/core/pim/addressbook/contacteditor.h | |||
@@ -23,4 +23,4 @@ | |||
23 | 23 | ||
24 | #include <opie/ocontact.h> | 24 | #include <opie2/opimcontact.h> |
25 | #include <opie/ocontactfields.h> | 25 | #include <opie2/opimcontactfields.h> |
26 | 26 | ||
@@ -32,3 +32,3 @@ | |||
32 | #include <qstringlist.h> | 32 | #include <qstringlist.h> |
33 | #include <qwidgetstack.h> | 33 | #include <qwidgetstack.h> |
34 | 34 | ||
@@ -58,3 +58,3 @@ class ContactEditor : public QDialog { | |||
58 | public: | 58 | public: |
59 | ContactEditor(const OContact &entry, | 59 | ContactEditor(const Opie::OPimContact &entry, |
60 | QWidget *parent = 0, | 60 | QWidget *parent = 0, |
@@ -65,3 +65,3 @@ class ContactEditor : public QDialog { | |||
65 | void setPersonalView( bool personal = true ); | 65 | void setPersonalView( bool personal = true ); |
66 | OContact entry() const { return ent; } | 66 | Opie::OPimContact entry() const { return ent; } |
67 | 67 | ||
@@ -70,3 +70,3 @@ class ContactEditor : public QDialog { | |||
70 | void slotName(); | 70 | void slotName(); |
71 | void setEntry(const OContact &entry); | 71 | void setEntry(const Opie::OPimContact &entry); |
72 | 72 | ||
@@ -115,5 +115,5 @@ class ContactEditor : public QDialog { | |||
115 | bool cmbChooserChange( int , QWidgetStack*, int ); | 115 | bool cmbChooserChange( int , QWidgetStack*, int ); |
116 | OContactFields contactfields; | 116 | Opie::OPimContactFields contactfields; |
117 | 117 | ||
118 | OContact ent; | 118 | Opie::OPimContact ent; |
119 | 119 | ||
diff --git a/core/pim/addressbook/main.cpp b/core/pim/addressbook/main.cpp index 47d370a..660fae6 100644 --- a/core/pim/addressbook/main.cpp +++ b/core/pim/addressbook/main.cpp | |||
@@ -23,5 +23,5 @@ | |||
23 | 23 | ||
24 | #include <opie/oapplicationfactory.h> | 24 | #include <opie2/oapplicationfactory.h> |
25 | 25 | ||
26 | OPIE_EXPORT_APP( OApplicationFactory<AddressbookWindow> ) | 26 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<AddressbookWindow> ) |
27 | 27 | ||
diff --git a/core/pim/addressbook/opie-addressbook.control b/core/pim/addressbook/opie-addressbook.control index 2d30dc5..18a3791 100644 --- a/core/pim/addressbook/opie-addressbook.control +++ b/core/pim/addressbook/opie-addressbook.control | |||
@@ -7,3 +7,3 @@ Maintainer: Stefan Eilers <eilers.stefan@epost.de> | |||
7 | Architecture: arm | 7 | Architecture: arm |
8 | Depends: task-opie-minimal, libopie1, opie-pics | 8 | Depends: task-opie-minimal, opie-pics, libopiecore2, libopieui2, libopiepim2, libopiedb2 |
9 | Description: Contacts | 9 | Description: Contacts |