-rw-r--r-- | core/pim/addressbook/TODO | 3 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 2 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 84 |
3 files changed, 63 insertions, 26 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO index 83e3c6b..a4fc29a 100644 --- a/core/pim/addressbook/TODO +++ b/core/pim/addressbook/TODO | |||
@@ -7,6 +7,9 @@ Important: | |||
7 | 7 | ||
8 | - Finishing of new View functions (List, Phonebook...) | 8 | - Finishing of new View functions (List, Phonebook...) |
9 | - Reload if contacts were changed externally | 9 | - Reload if contacts were changed externally |
10 | - "What's this" should be added | ||
11 | - The names of the countries are sorted by there english names, only.. | ||
12 | Even if they are translated.. :S | ||
10 | 13 | ||
11 | Less important: | 14 | Less important: |
12 | 15 | ||
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 08c6d0a..70c070f 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -130,7 +130,7 @@ AbTable::AbTable( const QValueList<int> *order, QWidget *parent, const char *nam | |||
130 | intFields( order ), | 130 | intFields( order ), |
131 | currFindRow( -2 ), | 131 | currFindRow( -2 ), |
132 | mCat( 0 ), | 132 | mCat( 0 ), |
133 | m_contactdb ("addressbook") | 133 | m_contactdb ("addressbook", 0l, 0l, false) // Handle syncing myself.. ! |
134 | { | 134 | { |
135 | mCat.load( categoryFileName() ); | 135 | mCat.load( categoryFileName() ); |
136 | setSelectionMode( NoSelection ); | 136 | setSelectionMode( NoSelection ); |
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index bae3a2b..e7f2ebd 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -340,7 +340,6 @@ void ContactEditor::init() { | |||
340 | continue; | 340 | continue; |
341 | } | 341 | } |
342 | 342 | ||
343 | |||
344 | slDynamicEntries.append( *it ); | 343 | slDynamicEntries.append( *it ); |
345 | } | 344 | } |
346 | } | 345 | } |
@@ -708,15 +707,18 @@ void ContactEditor::init() { | |||
708 | 707 | ||
709 | gl = new QGridLayout( container, 1, 2, 2, 4 ); | 708 | gl = new QGridLayout( container, 1, 2, 2, 4 ); |
710 | 709 | ||
710 | // Create Labels and lineedit fields for every dynamic entry | ||
711 | QStringList::ConstIterator it = slDynamicEntries.begin(); | 711 | QStringList::ConstIterator it = slDynamicEntries.begin(); |
712 | for (i = 0; it != slDynamicEntries.end(); i++, ++it) { | 712 | for (i = 0; it != slDynamicEntries.end(); i++, ++it) { |
713 | l = new QLabel( *it, container ); | 713 | l = new QLabel( QString::null , container ); |
714 | listName.append( l ); | 714 | listName.append( l ); |
715 | gl->addWidget( l, i, 0 ); | 715 | gl->addWidget( l, i, 0 ); |
716 | QLineEdit *e = new QLineEdit( container ); | 716 | QLineEdit *e = new QLineEdit( container ); |
717 | listValue.append( e ); | 717 | listValue.append( e ); |
718 | gl->addWidget( e, i, 1); | 718 | gl->addWidget( e, i, 1); |
719 | } | 719 | } |
720 | // Fill labels with names.. | ||
721 | loadFields(); | ||
720 | 722 | ||
721 | l = new QLabel( tr("Gender"), container ); | 723 | l = new QLabel( tr("Gender"), container ); |
722 | gl->addWidget( l, slDynamicEntries.count(), 0 ); | 724 | gl->addWidget( l, slDynamicEntries.count(), 0 ); |
@@ -1012,7 +1014,39 @@ void ContactEditor::loadFields() { | |||
1012 | QStringList::ConstIterator it; | 1014 | QStringList::ConstIterator it; |
1013 | QListIterator<QLabel> lit( listName ); | 1015 | QListIterator<QLabel> lit( listName ); |
1014 | for ( it = slDynamicEntries.begin(); *lit; ++lit, ++it) { | 1016 | for ( it = slDynamicEntries.begin(); *lit; ++lit, ++it) { |
1015 | (*lit)->setText( *it ); | 1017 | |
1018 | if ( *it == "Department" ) | ||
1019 | (*lit)->setText( tr( "Department" ) ); | ||
1020 | |||
1021 | if ( *it == "Company" ) | ||
1022 | (*lit)->setText( tr( "Company" ) ); | ||
1023 | |||
1024 | if ( *it == "Office" ) | ||
1025 | (*lit)->setText( tr( "Office" ) ); | ||
1026 | |||
1027 | if ( *it == "Profession" ) | ||
1028 | (*lit)->setText( tr( "Profession" ) ); | ||
1029 | |||
1030 | if ( *it == "Assistant" ) | ||
1031 | (*lit)->setText( tr( "Assistant" ) ); | ||
1032 | |||
1033 | if ( *it == "Manager" ) | ||
1034 | (*lit)->setText( tr( "Manager" ) ); | ||
1035 | |||
1036 | if ( *it == "Spouse" ) | ||
1037 | (*lit)->setText( tr( "Spouse" ) ); | ||
1038 | |||
1039 | if ( *it == "Birthday" ) | ||
1040 | (*lit)->setText( tr( "Birthday" ) ); | ||
1041 | |||
1042 | if ( *it == "Anniversary" ) | ||
1043 | (*lit)->setText( tr( "Anniversary" ) ); | ||
1044 | |||
1045 | if ( *it == "Nickname" ) | ||
1046 | (*lit)->setText( tr( "Nickname" ) ); | ||
1047 | |||
1048 | if ( *it == "Children" ) | ||
1049 | (*lit)->setText( tr( "Children" ) ); | ||
1016 | } | 1050 | } |
1017 | } | 1051 | } |
1018 | 1052 | ||
@@ -1374,37 +1408,37 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1374 | QStringList::ConstIterator it; | 1408 | QStringList::ConstIterator it; |
1375 | QListIterator<QLineEdit> itLE( listValue ); | 1409 | QListIterator<QLineEdit> itLE( listValue ); |
1376 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { | 1410 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { |
1377 | if ( *it == tr( "Department" ) ) | 1411 | if ( *it == "Department" ) |
1378 | (*itLE)->setText( ent.department() ); | 1412 | (*itLE)->setText( ent.department() ); |
1379 | 1413 | ||
1380 | if ( *it == tr( "Company" ) ) | 1414 | if ( *it == "Company" ) |
1381 | (*itLE)->setText( ent.company() ); | 1415 | (*itLE)->setText( ent.company() ); |
1382 | 1416 | ||
1383 | if ( *it == tr( "Office" ) ) | 1417 | if ( *it == "Office" ) |
1384 | (*itLE)->setText( ent.office() ); | 1418 | (*itLE)->setText( ent.office() ); |
1385 | 1419 | ||
1386 | if ( *it == tr( "Profession" ) ) | 1420 | if ( *it == "Profession" ) |
1387 | (*itLE)->setText( ent.profession() ); | 1421 | (*itLE)->setText( ent.profession() ); |
1388 | 1422 | ||
1389 | if ( *it == tr( "Assistant" ) ) | 1423 | if ( *it == "Assistant" ) |
1390 | (*itLE)->setText( ent.assistant() ); | 1424 | (*itLE)->setText( ent.assistant() ); |
1391 | 1425 | ||
1392 | if ( *it == tr( "Manager" ) ) | 1426 | if ( *it == "Manager" ) |
1393 | (*itLE)->setText( ent.manager() ); | 1427 | (*itLE)->setText( ent.manager() ); |
1394 | 1428 | ||
1395 | if ( *it == tr( "Spouse" ) ) | 1429 | if ( *it == "Spouse" ) |
1396 | (*itLE)->setText( ent.spouse() ); | 1430 | (*itLE)->setText( ent.spouse() ); |
1397 | 1431 | ||
1398 | if ( *it == tr( "Birthday" ) ) | 1432 | if ( *it == "Birthday" ) |
1399 | (*itLE)->setText( ent.birthday() ); | 1433 | (*itLE)->setText( ent.birthday() ); |
1400 | 1434 | ||
1401 | if ( *it == tr( "Anniversary" ) ) | 1435 | if ( *it == "Anniversary" ) |
1402 | (*itLE)->setText( ent.anniversary() ); | 1436 | (*itLE)->setText( ent.anniversary() ); |
1403 | 1437 | ||
1404 | if ( *it == tr( "Nickname" ) ) | 1438 | if ( *it == "Nickname" ) |
1405 | (*itLE)->setText( ent.nickname() ); | 1439 | (*itLE)->setText( ent.nickname() ); |
1406 | 1440 | ||
1407 | if ( *it == tr( "Children" ) ) | 1441 | if ( *it == "Children" ) |
1408 | (*itLE)->setText( ent.children() ); | 1442 | (*itLE)->setText( ent.children() ); |
1409 | 1443 | ||
1410 | } | 1444 | } |
@@ -1572,37 +1606,37 @@ void ContactEditor::saveEntry() { | |||
1572 | QStringList::ConstIterator it; | 1606 | QStringList::ConstIterator it; |
1573 | QListIterator<QLineEdit> itLE( listValue ); | 1607 | QListIterator<QLineEdit> itLE( listValue ); |
1574 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { | 1608 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { |
1575 | if ( *it == tr( "Department" ) ) | 1609 | if ( *it == "Department" ) |
1576 | ent.setDepartment( (*itLE)->text() ); | 1610 | ent.setDepartment( (*itLE)->text() ); |
1577 | 1611 | ||
1578 | if ( *it == tr( "Company" ) ) | 1612 | if ( *it == "Company" ) |
1579 | ent.setCompany( (*itLE)->text() ); | 1613 | ent.setCompany( (*itLE)->text() ); |
1580 | 1614 | ||
1581 | if ( *it == tr( "Office" ) ) | 1615 | if ( *it == "Office" ) |
1582 | ent.setOffice( (*itLE)->text() ); | 1616 | ent.setOffice( (*itLE)->text() ); |
1583 | 1617 | ||
1584 | if ( *it == tr( "Profession" ) ) | 1618 | if ( *it == "Profession" ) |
1585 | ent.setProfession( (*itLE)->text() ); | 1619 | ent.setProfession( (*itLE)->text() ); |
1586 | 1620 | ||
1587 | if ( *it == tr( "Assistant" ) ) | 1621 | if ( *it == "Assistant" ) |
1588 | ent.setAssistant( (*itLE)->text() ); | 1622 | ent.setAssistant( (*itLE)->text() ); |
1589 | 1623 | ||
1590 | if ( *it == tr( "Manager" ) ) | 1624 | if ( *it == "Manager" ) |
1591 | ent.setManager( (*itLE)->text() ); | 1625 | ent.setManager( (*itLE)->text() ); |
1592 | 1626 | ||
1593 | if ( *it == tr( "Spouse" ) ) | 1627 | if ( *it == "Spouse" ) |
1594 | ent.setSpouse( (*itLE)->text() ); | 1628 | ent.setSpouse( (*itLE)->text() ); |
1595 | 1629 | ||
1596 | if ( *it == tr( "Birthday" ) ) | 1630 | if ( *it == "Birthday" ) |
1597 | ent.setBirthday( (*itLE)->text() ); | 1631 | ent.setBirthday( (*itLE)->text() ); |
1598 | 1632 | ||
1599 | if ( *it == tr( "Anniversary" ) ) | 1633 | if ( *it == "Anniversary" ) |
1600 | ent.setAnniversary( (*itLE)->text() ); | 1634 | ent.setAnniversary( (*itLE)->text() ); |
1601 | 1635 | ||
1602 | if ( *it == tr( "Nickname" ) ) | 1636 | if ( *it == "Nickname" ) |
1603 | ent.setNickname( (*itLE)->text() ); | 1637 | ent.setNickname( (*itLE)->text() ); |
1604 | 1638 | ||
1605 | if ( *it == tr( "Children" ) ) | 1639 | if ( *it == "Children" ) |
1606 | ent.setChildren( (*itLE)->text() ); | 1640 | ent.setChildren( (*itLE)->text() ); |
1607 | 1641 | ||
1608 | } | 1642 | } |