author | tille <tille> | 2002-10-25 21:13:51 (UTC) |
---|---|---|
committer | tille <tille> | 2002-10-25 21:13:51 (UTC) |
commit | 595407074ac5724eb33aeb151ce27e38fbca21d5 (patch) (unidiff) | |
tree | 5f29c9fe9e2c06cc887726e475e50da47e67803c | |
parent | 437330505960e2783e088049665e0a11b2dc7edb (diff) | |
download | opie-595407074ac5724eb33aeb151ce27e38fbca21d5.zip opie-595407074ac5724eb33aeb151ce27e38fbca21d5.tar.gz opie-595407074ac5724eb33aeb151ce27e38fbca21d5.tar.bz2 |
sorts the tanslated country now
-rw-r--r-- | core/pim/addressbook/TODO | 4 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO index 100a6fd..654bbd2 100644 --- a/core/pim/addressbook/TODO +++ b/core/pim/addressbook/TODO | |||
@@ -1,46 +1,46 @@ | |||
1 | Stuff todo until OPIE 1.0 : | 1 | Stuff todo until OPIE 1.0 : |
2 | 2 | ||
3 | Pending bugfixes from previous work: | 3 | Pending bugfixes from previous work: |
4 | 4 | ||
5 | Urgent: | 5 | Urgent: |
6 | 6 | ||
7 | 7 | ||
8 | Important: | 8 | Important: |
9 | 9 | ||
10 | - Name order selected in "contacteditor" not used in list view. | 10 | - Name order selected in "contacteditor" not used in list view. |
11 | 11 | ||
12 | - Overview window cleanup needed.. | 12 | - Overview window cleanup needed.. |
13 | - Cursor keys should work in detail-view (ablabel) | 13 | - Cursor keys should work in detail-view (ablabel) |
14 | -> Ablabel should be removed and Abtable should be increased with | 14 | -> Ablabel should be removed and Abtable should be increased with |
15 | different views (as started by darwin zins).. | 15 | different views (as started by darwin zins).. |
16 | - Store last settings of combo-boxes | 16 | - Store last settings of combo-boxes |
17 | - Finishing of new View functions (List, Phonebook...) | 17 | - Finishing of new View functions (List, Phonebook...) |
18 | - The names of the countries are sorted by there english names, only.. | ||
19 | Even if they are translated.. :S | ||
20 | - Reload if contacts were changed externally | 18 | - Reload if contacts were changed externally |
21 | - "What's this" should be added | 19 | - "What's this" should be added |
22 | 20 | ||
23 | Less important: | 21 | Less important: |
24 | 22 | ||
25 | - The picker (alphabetical sort widget) should be | 23 | - The picker (alphabetical sort widget) should be |
26 | placed verticaly or horizontally (configurable) | 24 | placed verticaly or horizontally (configurable) |
27 | - Use advanced database functions in abtable to decrease | 25 | - Use advanced database functions in abtable to decrease |
28 | memory footprint and to make everything more easy ! | 26 | memory footprint and to make everything more easy ! |
29 | (abtable should store Iterator for selected Category) | 27 | (abtable should store Iterator for selected Category) |
30 | 28 | ||
31 | Should be Fixed (not absolute sure, need further validation): | 29 | Should be Fixed (not absolute sure, need further validation): |
32 | 30 | ||
33 | 31 | ||
34 | Fixed: | 32 | Fixed: |
35 | - Syncing: abtable not reloaded after sync. | 33 | - Syncing: abtable not reloaded after sync. |
36 | - Find widget should be replaced by something like | 34 | - Find widget should be replaced by something like |
37 | qpdf has. | 35 | qpdf has. |
38 | - Adding a configuration dialog | 36 | - Adding a configuration dialog |
39 | - Picker: Activated letter schould be more visible | 37 | - Picker: Activated letter schould be more visible |
40 | - Advanced handling of cursor keys (search..) | 38 | - Advanced handling of cursor keys (search..) |
41 | - Mail-Icon is missing | 39 | - Mail-Icon is missing |
42 | - Use opie-mail insted of qt-mail if possible. | 40 | - Use opie-mail insted of qt-mail if possible. |
43 | - Font menu is invisible using german translation | 41 | - Font menu is invisible using german translation |
44 | - Personal contact editor: Disable categories | 42 | - Personal contact editor: Disable categories |
45 | - "Nonenglish" translation bug has to be fixed. | 43 | - "Nonenglish" translation bug has to be fixed. |
46 | - contacteditor: Birthday, annyversary, ... : Use Dateselector | 44 | - contacteditor: Birthday, annyversary, ... : Use Dateselector |
45 | - The names of the countries are sorted by there english names, only.. | ||
46 | Even if they are translated.. :S | ||
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index a59a927..52ab0f2 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -1,136 +1,137 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> | 2 | * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> |
3 | * | 3 | * |
4 | * This file is an add-on for the OPIE Palmtop Environment | 4 | * This file is an add-on for the OPIE Palmtop Environment |
5 | * | 5 | * |
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 pacakaging | 8 | * Foundation and appearing in the file LICENSE.GPL included in the pacakaging |
9 | * of this file. | 9 | * 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 | * | 14 | * |
15 | * This is a rewrite of the abeditor.h file, modified to provide a more | 15 | * This is a rewrite of the abeditor.h file, modified to provide a more |
16 | * intuitive interface to TrollTech's original Address Book editor. This | 16 | * intuitive interface to TrollTech's original Address Book editor. This |
17 | * is made to operate exactly in interface with the exception of name. | 17 | * is made to operate exactly in interface with the exception of name. |
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "contacteditor.h" | 21 | #include "contacteditor.h" |
22 | #include "addresspicker.h" | 22 | #include "addresspicker.h" |
23 | 23 | ||
24 | #include <qpe/categoryselect.h> | 24 | #include <qpe/categoryselect.h> |
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/qpedialog.h> | 26 | #include <qpe/qpedialog.h> |
27 | #include <qpe/timeconversion.h> | 27 | #include <qpe/timeconversion.h> |
28 | 28 | ||
29 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qtabwidget.h> | 31 | #include <qtabwidget.h> |
32 | #include <qlayout.h> | 32 | #include <qlayout.h> |
33 | #include <qlineedit.h> | 33 | #include <qlineedit.h> |
34 | #include <qmultilineedit.h> | 34 | #include <qmultilineedit.h> |
35 | #include <qscrollview.h> | 35 | #include <qscrollview.h> |
36 | #include <qtoolbutton.h> | 36 | #include <qtoolbutton.h> |
37 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
38 | #include <qmainwindow.h> | 38 | #include <qmainwindow.h> |
39 | #include <qvaluelist.h> | 39 | #include <qvaluelist.h> |
40 | #include <qpopupmenu.h> | 40 | #include <qpopupmenu.h> |
41 | #include <qlistbox.h> | ||
41 | 42 | ||
42 | static inline bool containsAlphaNum( const QString &str ); | 43 | static inline bool containsAlphaNum( const QString &str ); |
43 | static inline bool constainsWhiteSpace( const QString &str ); | 44 | static inline bool constainsWhiteSpace( const QString &str ); |
44 | 45 | ||
45 | // helper functions, convert our comma delimited list to proper | 46 | // helper functions, convert our comma delimited list to proper |
46 | // file format... | 47 | // file format... |
47 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, | 48 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, |
48 | QString &strAll ); | 49 | QString &strAll ); |
49 | 50 | ||
50 | // helper convert from file format to comma delimited... | 51 | // helper convert from file format to comma delimited... |
51 | void parseEmailTo( const QString &strDefaultEmail, | 52 | void parseEmailTo( const QString &strDefaultEmail, |
52 | const QString &strOtherEmail, QString &strBack ); | 53 | const QString &strOtherEmail, QString &strBack ); |
53 | 54 | ||
54 | ContactEditor::ContactEditor(const OContact &entry, | 55 | ContactEditor::ContactEditor(const OContact &entry, |
55 | const QValueList<int> *newOrderedValues, | 56 | const QValueList<int> *newOrderedValues, |
56 | QStringList *slNewOrdered, | 57 | QStringList *slNewOrdered, |
57 | QWidget *parent, | 58 | QWidget *parent, |
58 | const char *name, | 59 | const char *name, |
59 | WFlags fl ) | 60 | WFlags fl ) |
60 | : QDialog( parent, name, TRUE, fl ), | 61 | : QDialog( parent, name, TRUE, fl ), |
61 | orderedValues( newOrderedValues ), | 62 | orderedValues( newOrderedValues ), |
62 | slOrdered( *slNewOrdered ), | 63 | slOrdered( *slNewOrdered ), |
63 | m_personalView ( false ) | 64 | m_personalView ( false ) |
64 | { | 65 | { |
65 | 66 | ||
66 | init(); | 67 | init(); |
67 | initMap(); | 68 | initMap(); |
68 | setEntry( entry ); | 69 | setEntry( entry ); |
69 | qDebug("finish"); | 70 | qDebug("finish"); |
70 | } | 71 | } |
71 | 72 | ||
72 | ContactEditor::~ContactEditor() { | 73 | ContactEditor::~ContactEditor() { |
73 | } | 74 | } |
74 | 75 | ||
75 | void ContactEditor::init() { | 76 | void ContactEditor::init() { |
76 | 77 | ||
77 | useFullName = TRUE; | 78 | useFullName = TRUE; |
78 | 79 | ||
79 | int i = 0; | 80 | int i = 0; |
80 | /** SHut up and stop leaking | 81 | /** SHut up and stop leaking |
81 | slHomeAddress = new QStringList; | 82 | slHomeAddress = new QStringList; |
82 | slBusinessAddress = new QStringList; | 83 | slBusinessAddress = new QStringList; |
83 | slChooserNames = new QStringList; | 84 | slChooserNames = new QStringList; |
84 | slChooserValues = new QStringList; | 85 | slChooserValues = new QStringList; |
85 | 86 | ||
86 | slDynamicEntries = new QStringList; | 87 | slDynamicEntries = new QStringList; |
87 | */ | 88 | */ |
88 | //*slDynamicEntries = *slOrdered; | 89 | //*slDynamicEntries = *slOrdered; |
89 | 90 | ||
90 | QStringList trlChooserNames; | 91 | QStringList trlChooserNames; |
91 | 92 | ||
92 | for (i = 0; i <= 6; i++) { | 93 | for (i = 0; i <= 6; i++) { |
93 | slHomeAddress.append( "" ); | 94 | slHomeAddress.append( "" ); |
94 | slBusinessAddress.append( "" ); | 95 | slBusinessAddress.append( "" ); |
95 | } | 96 | } |
96 | 97 | ||
97 | { | 98 | { |
98 | hasGender = FALSE; | 99 | hasGender = FALSE; |
99 | hasTitle = FALSE; | 100 | hasTitle = FALSE; |
100 | hasCompany = FALSE; | 101 | hasCompany = FALSE; |
101 | hasNotes = FALSE; | 102 | hasNotes = FALSE; |
102 | hasStreet = FALSE; | 103 | hasStreet = FALSE; |
103 | hasStreet2 = FALSE; | 104 | hasStreet2 = FALSE; |
104 | hasPOBox = FALSE; | 105 | hasPOBox = FALSE; |
105 | hasCity = FALSE; | 106 | hasCity = FALSE; |
106 | hasState = FALSE; | 107 | hasState = FALSE; |
107 | hasZip = FALSE; | 108 | hasZip = FALSE; |
108 | hasCountry = FALSE; | 109 | hasCountry = FALSE; |
109 | 110 | ||
110 | QStringList::ConstIterator it = slOrdered.begin(); | 111 | QStringList::ConstIterator it = slOrdered.begin(); |
111 | 112 | ||
112 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { | 113 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { |
113 | 114 | ||
114 | if ( (*it) == "Business Fax" ) { | 115 | if ( (*it) == "Business Fax" ) { |
115 | trlChooserNames.append( tr( "Business Fax" ) ); | 116 | trlChooserNames.append( tr( "Business Fax" ) ); |
116 | slChooserNames.append( *it ); | 117 | slChooserNames.append( *it ); |
117 | slChooserValues.append("" ); | 118 | slChooserValues.append("" ); |
118 | //slDynamicEntries->remove( it ); | 119 | //slDynamicEntries->remove( it ); |
119 | continue; | 120 | continue; |
120 | } | 121 | } |
121 | 122 | ||
122 | if ( (*it) == "Home Fax" ) { | 123 | if ( (*it) == "Home Fax" ) { |
123 | trlChooserNames.append( tr( "Home Fax" ) ); | 124 | trlChooserNames.append( tr( "Home Fax" ) ); |
124 | slChooserNames.append( *it ); | 125 | slChooserNames.append( *it ); |
125 | slChooserValues.append("" ); | 126 | slChooserValues.append("" ); |
126 | //slDynamicEntries->remove( it ); | 127 | //slDynamicEntries->remove( it ); |
127 | continue; | 128 | continue; |
128 | } | 129 | } |
129 | 130 | ||
130 | 131 | ||
131 | if ( (*it) == "Business Phone" ) { | 132 | if ( (*it) == "Business Phone" ) { |
132 | trlChooserNames.append( tr( "Business Phone" ) ); | 133 | trlChooserNames.append( tr( "Business Phone" ) ); |
133 | slChooserNames.append( *it ); | 134 | slChooserNames.append( *it ); |
134 | slChooserValues.append( "" ); | 135 | slChooserValues.append( "" ); |
135 | //slDynamicEntries->remove( it ); | 136 | //slDynamicEntries->remove( it ); |
136 | continue; | 137 | continue; |
@@ -604,192 +605,194 @@ void ContactEditor::init() { | |||
604 | cmbCountry->insertItem( tr ( "Luxembourg" ) ); | 605 | cmbCountry->insertItem( tr ( "Luxembourg" ) ); |
605 | cmbCountry->insertItem( tr ( "Macau" ) ); | 606 | cmbCountry->insertItem( tr ( "Macau" ) ); |
606 | cmbCountry->insertItem( tr ( "Macedonia" ) ); | 607 | cmbCountry->insertItem( tr ( "Macedonia" ) ); |
607 | cmbCountry->insertItem( tr ( "Madagascar" ) ); | 608 | cmbCountry->insertItem( tr ( "Madagascar" ) ); |
608 | cmbCountry->insertItem( tr ( "Malawi" ) ); | 609 | cmbCountry->insertItem( tr ( "Malawi" ) ); |
609 | cmbCountry->insertItem( tr ( "Malaysia" ) ); | 610 | cmbCountry->insertItem( tr ( "Malaysia" ) ); |
610 | cmbCountry->insertItem( tr ( "Maldives" ) ); | 611 | cmbCountry->insertItem( tr ( "Maldives" ) ); |
611 | cmbCountry->insertItem( tr ( "Mali" ) ); | 612 | cmbCountry->insertItem( tr ( "Mali" ) ); |
612 | cmbCountry->insertItem( tr ( "Malta" ) ); | 613 | cmbCountry->insertItem( tr ( "Malta" ) ); |
613 | cmbCountry->insertItem( tr ( "Martinique" ) ); | 614 | cmbCountry->insertItem( tr ( "Martinique" ) ); |
614 | cmbCountry->insertItem( tr ( "Mauritania" ) ); | 615 | cmbCountry->insertItem( tr ( "Mauritania" ) ); |
615 | cmbCountry->insertItem( tr ( "Mauritius" ) ); | 616 | cmbCountry->insertItem( tr ( "Mauritius" ) ); |
616 | cmbCountry->insertItem( tr ( "Mayotte" ) ); | 617 | cmbCountry->insertItem( tr ( "Mayotte" ) ); |
617 | cmbCountry->insertItem( tr ( "Mexico" ) ); | 618 | cmbCountry->insertItem( tr ( "Mexico" ) ); |
618 | cmbCountry->insertItem( tr ( "Micronesia" ) ); | 619 | cmbCountry->insertItem( tr ( "Micronesia" ) ); |
619 | cmbCountry->insertItem( tr ( "Moldova" ) ); | 620 | cmbCountry->insertItem( tr ( "Moldova" ) ); |
620 | cmbCountry->insertItem( tr ( "Monaco" ) ); | 621 | cmbCountry->insertItem( tr ( "Monaco" ) ); |
621 | cmbCountry->insertItem( tr ( "Mongolia" ) ); | 622 | cmbCountry->insertItem( tr ( "Mongolia" ) ); |
622 | cmbCountry->insertItem( tr ( "Montserrat" ) ); | 623 | cmbCountry->insertItem( tr ( "Montserrat" ) ); |
623 | cmbCountry->insertItem( tr ( "Morocco" ) ); | 624 | cmbCountry->insertItem( tr ( "Morocco" ) ); |
624 | cmbCountry->insertItem( tr ( "Mozambique" ) ); | 625 | cmbCountry->insertItem( tr ( "Mozambique" ) ); |
625 | cmbCountry->insertItem( tr ( "Myanmar" ) ); | 626 | cmbCountry->insertItem( tr ( "Myanmar" ) ); |
626 | cmbCountry->insertItem( tr ( "Namibia" ) ); | 627 | cmbCountry->insertItem( tr ( "Namibia" ) ); |
627 | cmbCountry->insertItem( tr ( "Nauru" ) ); | 628 | cmbCountry->insertItem( tr ( "Nauru" ) ); |
628 | cmbCountry->insertItem( tr ( "Nepal" ) ); | 629 | cmbCountry->insertItem( tr ( "Nepal" ) ); |
629 | cmbCountry->insertItem( tr ( "Netherlands" ) ); | 630 | cmbCountry->insertItem( tr ( "Netherlands" ) ); |
630 | cmbCountry->insertItem( tr ( "New Caledonia" ) ); | 631 | cmbCountry->insertItem( tr ( "New Caledonia" ) ); |
631 | cmbCountry->insertItem( tr ( "New Zealand" ) ); | 632 | cmbCountry->insertItem( tr ( "New Zealand" ) ); |
632 | cmbCountry->insertItem( tr ( "Nicaragua" ) ); | 633 | cmbCountry->insertItem( tr ( "Nicaragua" ) ); |
633 | cmbCountry->insertItem( tr ( "Niger" ) ); | 634 | cmbCountry->insertItem( tr ( "Niger" ) ); |
634 | cmbCountry->insertItem( tr ( "Nigeria" ) ); | 635 | cmbCountry->insertItem( tr ( "Nigeria" ) ); |
635 | cmbCountry->insertItem( tr ( "Niue" ) ); | 636 | cmbCountry->insertItem( tr ( "Niue" ) ); |
636 | cmbCountry->insertItem( tr ( "Norway" ) ); | 637 | cmbCountry->insertItem( tr ( "Norway" ) ); |
637 | cmbCountry->insertItem( tr ( "Oman" ) ); | 638 | cmbCountry->insertItem( tr ( "Oman" ) ); |
638 | cmbCountry->insertItem( tr ( "Pakistan" ) ); | 639 | cmbCountry->insertItem( tr ( "Pakistan" ) ); |
639 | cmbCountry->insertItem( tr ( "Palau" ) ); | 640 | cmbCountry->insertItem( tr ( "Palau" ) ); |
640 | cmbCountry->insertItem( tr ( "Palestinian Territory" ) ); | 641 | cmbCountry->insertItem( tr ( "Palestinian Territory" ) ); |
641 | cmbCountry->insertItem( tr ( "Panama" ) ); | 642 | cmbCountry->insertItem( tr ( "Panama" ) ); |
642 | cmbCountry->insertItem( tr ( "Papua New Guinea" ) ); | 643 | cmbCountry->insertItem( tr ( "Papua New Guinea" ) ); |
643 | cmbCountry->insertItem( tr ( "Paraguay" ) ); | 644 | cmbCountry->insertItem( tr ( "Paraguay" ) ); |
644 | cmbCountry->insertItem( tr ( "Peru" ) ); | 645 | cmbCountry->insertItem( tr ( "Peru" ) ); |
645 | cmbCountry->insertItem( tr ( "Philippines" ) ); | 646 | cmbCountry->insertItem( tr ( "Philippines" ) ); |
646 | cmbCountry->insertItem( tr ( "Pitcairn" ) ); | 647 | cmbCountry->insertItem( tr ( "Pitcairn" ) ); |
647 | cmbCountry->insertItem( tr ( "Poland" ) ); | 648 | cmbCountry->insertItem( tr ( "Poland" ) ); |
648 | cmbCountry->insertItem( tr ( "Portugal" ) ); | 649 | cmbCountry->insertItem( tr ( "Portugal" ) ); |
649 | cmbCountry->insertItem( tr ( "Puerto Rico" ) ); | 650 | cmbCountry->insertItem( tr ( "Puerto Rico" ) ); |
650 | cmbCountry->insertItem( tr ( "Qatar" ) ); | 651 | cmbCountry->insertItem( tr ( "Qatar" ) ); |
651 | cmbCountry->insertItem( tr ( "Reunion" ) ); | 652 | cmbCountry->insertItem( tr ( "Reunion" ) ); |
652 | cmbCountry->insertItem( tr ( "Romania" ) ); | 653 | cmbCountry->insertItem( tr ( "Romania" ) ); |
653 | cmbCountry->insertItem( tr ( "Russia" ) ); | 654 | cmbCountry->insertItem( tr ( "Russia" ) ); |
654 | cmbCountry->insertItem( tr ( "Rwanda" ) ); | 655 | cmbCountry->insertItem( tr ( "Rwanda" ) ); |
655 | cmbCountry->insertItem( tr ( "Saint Lucia" ) ); | 656 | cmbCountry->insertItem( tr ( "Saint Lucia" ) ); |
656 | cmbCountry->insertItem( tr ( "Samoa" ) ); | 657 | cmbCountry->insertItem( tr ( "Samoa" ) ); |
657 | cmbCountry->insertItem( tr ( "San Marino" ) ); | 658 | cmbCountry->insertItem( tr ( "San Marino" ) ); |
658 | cmbCountry->insertItem( tr ( "Saudi Arabia" ) ); | 659 | cmbCountry->insertItem( tr ( "Saudi Arabia" ) ); |
659 | cmbCountry->insertItem( tr ( "Senegal" ) ); | 660 | cmbCountry->insertItem( tr ( "Senegal" ) ); |
660 | cmbCountry->insertItem( tr ( "Seychelles" ) ); | 661 | cmbCountry->insertItem( tr ( "Seychelles" ) ); |
661 | cmbCountry->insertItem( tr ( "Sierra Leone" ) ); | 662 | cmbCountry->insertItem( tr ( "Sierra Leone" ) ); |
662 | cmbCountry->insertItem( tr ( "Singapore" ) ); | 663 | cmbCountry->insertItem( tr ( "Singapore" ) ); |
663 | cmbCountry->insertItem( tr ( "Slovakia" ) ); | 664 | cmbCountry->insertItem( tr ( "Slovakia" ) ); |
664 | cmbCountry->insertItem( tr ( "Slovenia" ) ); | 665 | cmbCountry->insertItem( tr ( "Slovenia" ) ); |
665 | cmbCountry->insertItem( tr ( "Solomon Islands" ) ); | 666 | cmbCountry->insertItem( tr ( "Solomon Islands" ) ); |
666 | cmbCountry->insertItem( tr ( "Somalia" ) ); | 667 | cmbCountry->insertItem( tr ( "Somalia" ) ); |
667 | cmbCountry->insertItem( tr ( "South Africa" ) ); | 668 | cmbCountry->insertItem( tr ( "South Africa" ) ); |
668 | cmbCountry->insertItem( tr ( "Spain" ) ); | 669 | cmbCountry->insertItem( tr ( "Spain" ) ); |
669 | cmbCountry->insertItem( tr ( "Sri Lanka" ) ); | 670 | cmbCountry->insertItem( tr ( "Sri Lanka" ) ); |
670 | cmbCountry->insertItem( tr ( "St. Helena" ) ); | 671 | cmbCountry->insertItem( tr ( "St. Helena" ) ); |
671 | cmbCountry->insertItem( tr ( "Sudan" ) ); | 672 | cmbCountry->insertItem( tr ( "Sudan" ) ); |
672 | cmbCountry->insertItem( tr ( "Suriname" ) ); | 673 | cmbCountry->insertItem( tr ( "Suriname" ) ); |
673 | cmbCountry->insertItem( tr ( "Swaziland" ) ); | 674 | cmbCountry->insertItem( tr ( "Swaziland" ) ); |
674 | cmbCountry->insertItem( tr ( "Sweden" ) ); | 675 | cmbCountry->insertItem( tr ( "Sweden" ) ); |
675 | cmbCountry->insertItem( tr ( "Switzerland" ) ); | 676 | cmbCountry->insertItem( tr ( "Switzerland" ) ); |
676 | cmbCountry->insertItem( tr ( "Taiwan" ) ); | 677 | cmbCountry->insertItem( tr ( "Taiwan" ) ); |
677 | cmbCountry->insertItem( tr ( "Tajikistan" ) ); | 678 | cmbCountry->insertItem( tr ( "Tajikistan" ) ); |
678 | cmbCountry->insertItem( tr ( "Tanzania" ) ); | 679 | cmbCountry->insertItem( tr ( "Tanzania" ) ); |
679 | cmbCountry->insertItem( tr ( "Thailand" ) ); | 680 | cmbCountry->insertItem( tr ( "Thailand" ) ); |
680 | cmbCountry->insertItem( tr ( "Togo" ) ); | 681 | cmbCountry->insertItem( tr ( "Togo" ) ); |
681 | cmbCountry->insertItem( tr ( "Tokelau" ) ); | 682 | cmbCountry->insertItem( tr ( "Tokelau" ) ); |
682 | cmbCountry->insertItem( tr ( "Tonga" ) ); | 683 | cmbCountry->insertItem( tr ( "Tonga" ) ); |
683 | cmbCountry->insertItem( tr ( "Tunisia" ) ); | 684 | cmbCountry->insertItem( tr ( "Tunisia" ) ); |
684 | cmbCountry->insertItem( tr ( "Turkey" ) ); | 685 | cmbCountry->insertItem( tr ( "Turkey" ) ); |
685 | cmbCountry->insertItem( tr ( "Turkmenistan" ) ); | 686 | cmbCountry->insertItem( tr ( "Turkmenistan" ) ); |
686 | cmbCountry->insertItem( tr ( "Tuvalu" ) ); | 687 | cmbCountry->insertItem( tr ( "Tuvalu" ) ); |
687 | cmbCountry->insertItem( tr ( "Uganda" ) ); | 688 | cmbCountry->insertItem( tr ( "Uganda" ) ); |
688 | cmbCountry->insertItem( tr ( "Ukraine" ) ); | 689 | cmbCountry->insertItem( tr ( "Ukraine" ) ); |
689 | cmbCountry->insertItem( tr ( "Uruguay" ) ); | 690 | cmbCountry->insertItem( tr ( "Uruguay" ) ); |
690 | cmbCountry->insertItem( tr ( "Uzbekistan" ) ); | 691 | cmbCountry->insertItem( tr ( "Uzbekistan" ) ); |
691 | cmbCountry->insertItem( tr ( "Vanuatu" ) ); | 692 | cmbCountry->insertItem( tr ( "Vanuatu" ) ); |
692 | cmbCountry->insertItem( tr ( "Venezuela" ) ); | 693 | cmbCountry->insertItem( tr ( "Venezuela" ) ); |
693 | cmbCountry->insertItem( tr ( "Viet Nam" ) ); | 694 | cmbCountry->insertItem( tr ( "Viet Nam" ) ); |
694 | cmbCountry->insertItem( tr ( "Virgin Islands" ) ); | 695 | cmbCountry->insertItem( tr ( "Virgin Islands" ) ); |
695 | cmbCountry->insertItem( tr ( "Western Sahara" ) ); | 696 | cmbCountry->insertItem( tr ( "Western Sahara" ) ); |
696 | cmbCountry->insertItem( tr ( "Yemen" ) ); | 697 | cmbCountry->insertItem( tr ( "Yemen" ) ); |
697 | cmbCountry->insertItem( tr ( "Yugoslavia" ) ); | 698 | cmbCountry->insertItem( tr ( "Yugoslavia" ) ); |
698 | cmbCountry->insertItem( tr ( "Zambia" ) ); | 699 | cmbCountry->insertItem( tr ( "Zambia" ) ); |
699 | cmbCountry->insertItem( tr ( "Zimbabwe" ) ); | 700 | cmbCountry->insertItem( tr ( "Zimbabwe" ) ); |
701 | if (cmbCountry->listBox()!=0) | ||
702 | cmbCountry->listBox()->sort(); | ||
700 | 703 | ||
701 | cmbCountry->setMaximumWidth( 135 ); | 704 | cmbCountry->setMaximumWidth( 135 ); |
702 | 705 | ||
703 | gl->addMultiCellWidget( cmbCountry, 5, 5, 1, 2 ); | 706 | gl->addMultiCellWidget( cmbCountry, 5, 5, 1, 2 ); |
704 | 707 | ||
705 | cmbChooserField4 = new QComboBox( FALSE, container ); | 708 | cmbChooserField4 = new QComboBox( FALSE, container ); |
706 | cmbChooserField4->setMaximumWidth( 90 ); | 709 | cmbChooserField4->setMaximumWidth( 90 ); |
707 | gl->addWidget( cmbChooserField4, 6, 0 ); | 710 | gl->addWidget( cmbChooserField4, 6, 0 ); |
708 | txtChooserField4 = new QLineEdit( container ); | 711 | txtChooserField4 = new QLineEdit( container ); |
709 | gl->addMultiCellWidget( txtChooserField4, 6, 6, 1, 2 ); | 712 | gl->addMultiCellWidget( txtChooserField4, 6, 6, 1, 2 ); |
710 | 713 | ||
711 | QSpacerItem *space = new QSpacerItem(1,1, | 714 | QSpacerItem *space = new QSpacerItem(1,1, |
712 | QSizePolicy::Maximum, | 715 | QSizePolicy::Maximum, |
713 | QSizePolicy::MinimumExpanding ); | 716 | QSizePolicy::MinimumExpanding ); |
714 | gl->addItem( space, 7, 0 ); | 717 | gl->addItem( space, 7, 0 ); |
715 | 718 | ||
716 | tabMain->insertTab( tabViewport, tr( "Address" ) ); | 719 | tabMain->insertTab( tabViewport, tr( "Address" ) ); |
717 | 720 | ||
718 | tabViewport = new QWidget ( tabMain ); | 721 | tabViewport = new QWidget ( tabMain ); |
719 | 722 | ||
720 | vb = new QVBoxLayout( tabViewport ); | 723 | vb = new QVBoxLayout( tabViewport ); |
721 | 724 | ||
722 | svDetails = new QScrollView( tabViewport ); | 725 | svDetails = new QScrollView( tabViewport ); |
723 | vb->addWidget( svDetails, 0, 0 ); | 726 | vb->addWidget( svDetails, 0, 0 ); |
724 | svDetails->setResizePolicy( QScrollView::AutoOneFit ); | 727 | svDetails->setResizePolicy( QScrollView::AutoOneFit ); |
725 | svDetails->setFrameStyle( QFrame::NoFrame ); | 728 | svDetails->setFrameStyle( QFrame::NoFrame ); |
726 | 729 | ||
727 | container = new QWidget( svDetails->viewport() ); | 730 | container = new QWidget( svDetails->viewport() ); |
728 | svDetails->addChild( container ); | 731 | svDetails->addChild( container ); |
729 | 732 | ||
730 | gl = new QGridLayout( container, 1, 2, 2, 4 ); | 733 | gl = new QGridLayout( container, 1, 2, 2, 4 ); |
731 | 734 | ||
732 | int counter = 0; | 735 | int counter = 0; |
733 | 736 | ||
734 | // Birthday | 737 | // Birthday |
735 | l = new QLabel( tr("Birthday"), container ); | 738 | l = new QLabel( tr("Birthday"), container ); |
736 | gl->addWidget( l, counter, 0 ); | 739 | gl->addWidget( l, counter, 0 ); |
737 | 740 | ||
738 | QPopupMenu* m1 = new QPopupMenu( container ); | 741 | QPopupMenu* m1 = new QPopupMenu( container ); |
739 | birthdayPicker = new DateBookMonth( m1, 0, TRUE ); | 742 | birthdayPicker = new DateBookMonth( m1, 0, TRUE ); |
740 | m1->insertItem( birthdayPicker ); | 743 | m1->insertItem( birthdayPicker ); |
741 | 744 | ||
742 | birthdayButton= new QToolButton( container, "buttonStart" ); | 745 | birthdayButton= new QToolButton( container, "buttonStart" ); |
743 | birthdayButton->setPopup( m1 ); | 746 | birthdayButton->setPopup( m1 ); |
744 | birthdayButton->setPopupDelay(0); | 747 | birthdayButton->setPopupDelay(0); |
745 | gl->addWidget( birthdayButton, counter , 1 ); | 748 | gl->addWidget( birthdayButton, counter , 1 ); |
746 | connect( birthdayPicker, SIGNAL( dateClicked( int, int, int ) ), | 749 | connect( birthdayPicker, SIGNAL( dateClicked( int, int, int ) ), |
747 | this, SLOT( slotBirthdayDateChanged( int, int, int ) ) ); | 750 | this, SLOT( slotBirthdayDateChanged( int, int, int ) ) ); |
748 | 751 | ||
749 | ++counter; | 752 | ++counter; |
750 | 753 | ||
751 | // Anniversary | 754 | // Anniversary |
752 | l = new QLabel( tr("Anniversary"), container ); | 755 | l = new QLabel( tr("Anniversary"), container ); |
753 | gl->addWidget( l, counter, 0 ); | 756 | gl->addWidget( l, counter, 0 ); |
754 | 757 | ||
755 | m1 = new QPopupMenu( container ); | 758 | m1 = new QPopupMenu( container ); |
756 | anniversaryPicker = new DateBookMonth( m1, 0, TRUE ); | 759 | anniversaryPicker = new DateBookMonth( m1, 0, TRUE ); |
757 | m1->insertItem( anniversaryPicker ); | 760 | m1->insertItem( anniversaryPicker ); |
758 | 761 | ||
759 | anniversaryButton= new QToolButton( container, "buttonStart" ); | 762 | anniversaryButton= new QToolButton( container, "buttonStart" ); |
760 | anniversaryButton->setPopup( m1 ); | 763 | anniversaryButton->setPopup( m1 ); |
761 | anniversaryButton->setPopupDelay(0); | 764 | anniversaryButton->setPopupDelay(0); |
762 | gl->addWidget( anniversaryButton, counter , 1 ); | 765 | gl->addWidget( anniversaryButton, counter , 1 ); |
763 | connect( anniversaryPicker, SIGNAL( dateClicked( int, int, int ) ), | 766 | connect( anniversaryPicker, SIGNAL( dateClicked( int, int, int ) ), |
764 | this, SLOT( slotAnniversaryDateChanged( int, int, int ) ) ); | 767 | this, SLOT( slotAnniversaryDateChanged( int, int, int ) ) ); |
765 | 768 | ||
766 | ++counter; | 769 | ++counter; |
767 | 770 | ||
768 | // Gender | 771 | // Gender |
769 | l = new QLabel( tr("Gender"), container ); | 772 | l = new QLabel( tr("Gender"), container ); |
770 | gl->addWidget( l, counter, 0 ); | 773 | gl->addWidget( l, counter, 0 ); |
771 | cmbGender = new QComboBox( container ); | 774 | cmbGender = new QComboBox( container ); |
772 | cmbGender->insertItem( "", 0 ); | 775 | cmbGender->insertItem( "", 0 ); |
773 | cmbGender->insertItem( tr("Male"), 1); | 776 | cmbGender->insertItem( tr("Male"), 1); |
774 | cmbGender->insertItem( tr("Female"), 2); | 777 | cmbGender->insertItem( tr("Female"), 2); |
775 | gl->addWidget( cmbGender, counter, 1 ); | 778 | gl->addWidget( cmbGender, counter, 1 ); |
776 | 779 | ||
777 | ++counter; | 780 | ++counter; |
778 | 781 | ||
779 | // Create Labels and lineedit fields for every dynamic entry | 782 | // Create Labels and lineedit fields for every dynamic entry |
780 | QStringList::ConstIterator it = slDynamicEntries.begin(); | 783 | QStringList::ConstIterator it = slDynamicEntries.begin(); |
781 | for (i = counter; it != slDynamicEntries.end(); i++, ++it) { | 784 | for (i = counter; it != slDynamicEntries.end(); i++, ++it) { |
782 | l = new QLabel( QString::null , container ); | 785 | l = new QLabel( QString::null , container ); |
783 | listName.append( l ); | 786 | listName.append( l ); |
784 | gl->addWidget( l, i, 0 ); | 787 | gl->addWidget( l, i, 0 ); |
785 | QLineEdit *e = new QLineEdit( container ); | 788 | QLineEdit *e = new QLineEdit( container ); |
786 | listValue.append( e ); | 789 | listValue.append( e ); |
787 | gl->addWidget( e, i, 1); | 790 | gl->addWidget( e, i, 1); |
788 | } | 791 | } |
789 | // Fill labels with names.. | 792 | // Fill labels with names.. |
790 | loadFields(); | 793 | loadFields(); |
791 | 794 | ||
792 | 795 | ||
793 | tabMain->insertTab( tabViewport, tr( "Details" ) ); | 796 | tabMain->insertTab( tabViewport, tr( "Details" ) ); |
794 | 797 | ||
795 | dlgNote = new QDialog( this, "Note Dialog", TRUE ); | 798 | dlgNote = new QDialog( this, "Note Dialog", TRUE ); |