summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp16
-rw-r--r--core/pim/addressbook/contacteditor.cpp243
-rw-r--r--core/pim/addressbook/contacteditor.h4
3 files changed, 255 insertions, 8 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index e8fa37c..5a8038b 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -30,5 +30,9 @@
#include <qpe/config.h>
#include <qpe/contact.h>
+
+#ifndef MAKE_FOR_SHARP_ROM
#include <qpe/finddialog.h>
+#endif
+
#include <qpe/global.h>
#include <qpe/resource.h>
@@ -130,4 +134,5 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
a->addTo( listTools );
+#ifndef MAKE_FOR_SHARP_ROM
a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
QString::null, 0, this, 0 );
@@ -136,4 +141,5 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
a->addTo( edit );
a->addTo( listTools );
+#endif
@@ -511,5 +517,7 @@ void AddressbookWindow::slotPersonalView()
actionNew->setEnabled(TRUE);
actionTrash->setEnabled(TRUE);
+#ifndef MAKE_FOR_SHARP_ROM
actionFind->setEnabled(TRUE);
+#endif
slotUpdateToolbar(); // maybe some of the above could be moved there
showList();
@@ -520,5 +528,7 @@ void AddressbookWindow::slotPersonalView()
actionNew->setEnabled(FALSE);
actionTrash->setEnabled(FALSE);
+#ifndef MAKE_FOR_SHARP_ROM
actionFind->setEnabled(FALSE);
+#endif
actionMail->setEnabled(FALSE);
@@ -777,14 +787,20 @@ AbLabel *AddressbookWindow::abView()
void AddressbookWindow::slotFind()
{
+#ifndef MAKE_FOR_SHARP_ROM
if ( centralWidget() == abView() )
showList();
+
FindDialog frmFind( "Contacts", this );
QObject::connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), abList, SLOT(slotDoFind( const QString&,bool,bool,int)));
QObject::connect( abList, SIGNAL(signalNotFound()), &frmFind, SLOT(slotNotFound()) );
QObject::connect( abList, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) );
+
frmFind.exec();
+
if ( abList->numSelections() )
abList->clearSelection();
+
abList->clearFindRow();
+#endif
}
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 6edab2c..cbcd11f 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -284,5 +284,5 @@ void ContactEditor::init() {
svGeneral->addChild( container );
- QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 3 );
+ QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 );
gl->setResizeMode( QLayout::FreeResize );
@@ -303,5 +303,5 @@ void ContactEditor::init() {
cmbChooserField1 = new QComboBox( FALSE, container );
- cmbChooserField1->setMaximumWidth( 100 );
+ cmbChooserField1->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField1, 3, 0 );
txtChooserField1 = new QLineEdit( container );
@@ -309,5 +309,5 @@ void ContactEditor::init() {
cmbChooserField2 = new QComboBox( FALSE, container );
- cmbChooserField2->setMaximumWidth( 100 );
+ cmbChooserField2->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField2, 4, 0 );
txtChooserField2 = new QLineEdit( container );
@@ -315,5 +315,5 @@ void ContactEditor::init() {
cmbChooserField3 = new QComboBox( FALSE, container );
- cmbChooserField3->setMaximumWidth( 100 );
+ cmbChooserField3->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField3, 5, 0 );
txtChooserField3 = new QLineEdit( container );
@@ -347,5 +347,5 @@ void ContactEditor::init() {
svAddress->addChild( container );
- gl = new QGridLayout( container, 5, 3, 2, 3 );
+ gl = new QGridLayout( container, 6, 3, 2, 4 );
cmbAddress = new QComboBox( FALSE, container );
@@ -390,12 +390,222 @@ void ContactEditor::init() {
cmbCountry->insertItem( tr( "United States" ) );
cmbCountry->insertItem( tr( "United Kingdom" ) );
- cmbCountry->insertItem( tr( "Japan" ) );
+ cmbCountry->insertItem( tr ( "Afganistan" ) );
+ cmbCountry->insertItem( tr ( "Albania" ) );
+ cmbCountry->insertItem( tr ( "Algeria" ) );
+ cmbCountry->insertItem( tr ( "American Samoa" ) );
+ cmbCountry->insertItem( tr ( "Andorra" ) );
+ cmbCountry->insertItem( tr ( "Angola" ) );
+ cmbCountry->insertItem( tr ( "Anguilla" ) );
+ cmbCountry->insertItem( tr ( "Antartica" ) );
+ cmbCountry->insertItem( tr ( "Argentina" ) );
+ cmbCountry->insertItem( tr ( "Armania" ) );
+ cmbCountry->insertItem( tr ( "Aruba" ) );
+ cmbCountry->insertItem( tr ( "Australia" ) );
+ cmbCountry->insertItem( tr ( "Austria" ) );
+ cmbCountry->insertItem( tr ( "Azerbaijan" ) );
+ cmbCountry->insertItem( tr ( "Bahamas" ) );
+ cmbCountry->insertItem( tr ( "Bahrain" ) );
+ cmbCountry->insertItem( tr ( "Bangladesh" ) );
+ cmbCountry->insertItem( tr ( "Barbados" ) );
+ cmbCountry->insertItem( tr ( "Belarus" ) );
+ cmbCountry->insertItem( tr ( "Belgium" ) );
+ cmbCountry->insertItem( tr ( "Belize" ) );
+ cmbCountry->insertItem( tr ( "Benin" ) );
+ cmbCountry->insertItem( tr ( "Bermuda" ) );
+ cmbCountry->insertItem( tr ( "Bhutan" ) );
+ cmbCountry->insertItem( tr ( "Boliva" ) );
+ cmbCountry->insertItem( tr ( "Botswana" ) );
+ cmbCountry->insertItem( tr ( "Bouvet Island" ) );
+ cmbCountry->insertItem( tr ( "Brazil" ) );
+ cmbCountry->insertItem( tr ( "Brunei Darussalam" ) );
+ cmbCountry->insertItem( tr ( "Bulgaria" ) );
+ cmbCountry->insertItem( tr ( "Burkina Faso" ) );
+ cmbCountry->insertItem( tr ( "Burundi" ) );
+ cmbCountry->insertItem( tr ( "Cambodia" ) );
+ cmbCountry->insertItem( tr ( "Camaroon" ) );
+ cmbCountry->insertItem( tr ( "Canada" ) );
+ cmbCountry->insertItem( tr ( "Cape Verde" ) );
+ cmbCountry->insertItem( tr ( "Cayman Islands" ) );
+ cmbCountry->insertItem( tr ( "Chad" ) );
+ cmbCountry->insertItem( tr ( "Chile" ) );
+ cmbCountry->insertItem( tr ( "China" ) );
+ cmbCountry->insertItem( tr ( "Christmas Island" ) );
+ cmbCountry->insertItem( tr ( "Colombia" ) );
+ cmbCountry->insertItem( tr ( "Comoros" ) );
+ cmbCountry->insertItem( tr ( "Congo" ) );
+ cmbCountry->insertItem( tr ( "Cook Island" ) );
+ cmbCountry->insertItem( tr ( "Costa Rica" ) );
+ cmbCountry->insertItem( tr ( "Cote d'Ivoire" ) );
+ cmbCountry->insertItem( tr ( "Croatia" ) );
+ cmbCountry->insertItem( tr ( "Cuba" ) );
+ cmbCountry->insertItem( tr ( "Cyprus" ) );
+ cmbCountry->insertItem( tr ( "Czech Republic" ) );
+ cmbCountry->insertItem( tr ( "Denmark" ) );
+ cmbCountry->insertItem( tr ( "Djibouti" ) );
+ cmbCountry->insertItem( tr ( "Dominica" ) );
+ cmbCountry->insertItem( tr ( "Dominican Republic" ) );
+ cmbCountry->insertItem( tr ( "East Timor" ) );
+ cmbCountry->insertItem( tr ( "Ecuador" ) );
+ cmbCountry->insertItem( tr ( "Egypt" ) );
+ cmbCountry->insertItem( tr ( "El Salvador" ) );
+ cmbCountry->insertItem( tr ( "Equatorial Guinea" ) );
+ cmbCountry->insertItem( tr ( "Eritrea" ) );
+ cmbCountry->insertItem( tr ( "Estonia" ) );
+ cmbCountry->insertItem( tr ( "Ethiopia" ) );
+ cmbCountry->insertItem( tr ( "Falkland Islands" ) );
+ cmbCountry->insertItem( tr ( "Faroe Islands" ) );
+ cmbCountry->insertItem( tr ( "Fiji" ) );
+ cmbCountry->insertItem( tr ( "Finland" ) );
cmbCountry->insertItem( tr( "France" ) );
+ cmbCountry->insertItem( tr ( "French Guiana" ) );
+ cmbCountry->insertItem( tr ( "French Polynesia" ) );
+ cmbCountry->insertItem( tr ( "Gabon" ) );
+ cmbCountry->insertItem( tr ( "Gambia" ) );
+ cmbCountry->insertItem( tr ( "Georgia" ) );
cmbCountry->insertItem( tr( "Germany" ) );
+ cmbCountry->insertItem( tr ( "Gahna" ) );
+ cmbCountry->insertItem( tr ( "Gibraltar" ) );
+ cmbCountry->insertItem( tr ( "Greece" ) );
+ cmbCountry->insertItem( tr ( "Greenland" ) );
+ cmbCountry->insertItem( tr ( "Grenada" ) );
+ cmbCountry->insertItem( tr ( "Guadelupe" ) );
+ cmbCountry->insertItem( tr ( "Guam" ) );
+ cmbCountry->insertItem( tr ( "Guatemala" ) );
+ cmbCountry->insertItem( tr ( "Guinea" ) );
+ cmbCountry->insertItem( tr ( "Guinea-bissau" ) );
+ cmbCountry->insertItem( tr ( "Guyana" ) );
+ cmbCountry->insertItem( tr ( "Haiti" ) );
+ cmbCountry->insertItem( tr ( "Holy See" ) );
+ cmbCountry->insertItem( tr ( "Honduras" ) );
+ cmbCountry->insertItem( tr ( "Hong Kong" ) );
+ cmbCountry->insertItem( tr ( "Hungary" ) );
+ cmbCountry->insertItem( tr ( "Iceland" ) );
+ cmbCountry->insertItem( tr ( "India" ) );
+ cmbCountry->insertItem( tr ( "Indonesia" ) );
+ cmbCountry->insertItem( tr ( "Ireland" ) );
+ cmbCountry->insertItem( tr ( "Israel" ) );
+ cmbCountry->insertItem( tr ( "Italy" ) );
+ cmbCountry->insertItem( tr ( "Jamacia" ) );
+ cmbCountry->insertItem( tr ( "Japan" ) );
+ cmbCountry->insertItem( tr ( "Jordan" ) );
+ cmbCountry->insertItem( tr ( "Kazakhstan" ) );
+ cmbCountry->insertItem( tr ( "Kenya" ) );
+ cmbCountry->insertItem( tr ( "Kribati" ) );
+ cmbCountry->insertItem( tr ( "Korea" ) );
+ cmbCountry->insertItem( tr ( "Kuait" ) );
+ cmbCountry->insertItem( tr ( "Kyrgyztan" ) );
+ cmbCountry->insertItem( tr ( "Laos" ) );
+ cmbCountry->insertItem( tr ( "Latvia" ) );
+ cmbCountry->insertItem( tr ( "Lebanon" ) );
+ cmbCountry->insertItem( tr ( "Lesotho" ) );
+ cmbCountry->insertItem( tr ( "Liberia" ) );
+ cmbCountry->insertItem( tr ( "Liechtenstein" ) );
+ cmbCountry->insertItem( tr ( "Lithuania" ) );
+ cmbCountry->insertItem( tr ( "Luxembourg" ) );
+ cmbCountry->insertItem( tr ( "Macau" ) );
+ cmbCountry->insertItem( tr ( "Macedonia" ) );
+ cmbCountry->insertItem( tr ( "Madagascar" ) );
+ cmbCountry->insertItem( tr ( "Malawi" ) );
+ cmbCountry->insertItem( tr ( "Malaysia" ) );
+ cmbCountry->insertItem( tr ( "Maldives" ) );
+ cmbCountry->insertItem( tr ( "Mali" ) );
+ cmbCountry->insertItem( tr ( "Malta" ) );
+ cmbCountry->insertItem( tr ( "Martinique" ) );
+ cmbCountry->insertItem( tr ( "Mauritania" ) );
+ cmbCountry->insertItem( tr ( "Mauritius" ) );
+ cmbCountry->insertItem( tr ( "Mayotte" ) );
+ cmbCountry->insertItem( tr ( "Mexico" ) );
+ cmbCountry->insertItem( tr ( "Micronesia" ) );
+ cmbCountry->insertItem( tr ( "Moldova" ) );
+ cmbCountry->insertItem( tr ( "Monaco" ) );
+ cmbCountry->insertItem( tr ( "Mongolia" ) );
+ cmbCountry->insertItem( tr ( "Montserrat" ) );
+ cmbCountry->insertItem( tr ( "Morocco" ) );
+ cmbCountry->insertItem( tr ( "Mozambique" ) );
+ cmbCountry->insertItem( tr ( "Myanmar" ) );
+ cmbCountry->insertItem( tr ( "Namibia" ) );
+ cmbCountry->insertItem( tr ( "Nauru" ) );
+ cmbCountry->insertItem( tr ( "Nepal" ) );
+ cmbCountry->insertItem( tr ( "Netherlands" ) );
+ cmbCountry->insertItem( tr ( "New Caledonia" ) );
+ cmbCountry->insertItem( tr ( "New Zealand" ) );
+ cmbCountry->insertItem( tr ( "Nicaragua" ) );
+ cmbCountry->insertItem( tr ( "Niger" ) );
+ cmbCountry->insertItem( tr ( "Nigeria" ) );
+ cmbCountry->insertItem( tr ( "Niue" ) );
cmbCountry->insertItem( tr( "Norway" ) );
- cmbCountry->insertItem( tr( "Canada" ) );
+ cmbCountry->insertItem( tr ( "Oman" ) );
+ cmbCountry->insertItem( tr ( "Pakistan" ) );
+ cmbCountry->insertItem( tr ( "Palau" ) );
+ cmbCountry->insertItem( tr ( "Palestinian Territory" ) );
+ cmbCountry->insertItem( tr ( "Panama" ) );
+ cmbCountry->insertItem( tr ( "Papua New Guinea" ) );
+ cmbCountry->insertItem( tr ( "Paraguay" ) );
+ cmbCountry->insertItem( tr ( "Peru" ) );
+ cmbCountry->insertItem( tr ( "Philippines" ) );
+ cmbCountry->insertItem( tr ( "Pitcairn" ) );
+ cmbCountry->insertItem( tr ( "Poland" ) );
+ cmbCountry->insertItem( tr ( "Portugal" ) );
+ cmbCountry->insertItem( tr ( "Puerto Rico" ) );
+ cmbCountry->insertItem( tr ( "Qatar" ) );
+ cmbCountry->insertItem( tr ( "Reunion" ) );
+ cmbCountry->insertItem( tr ( "Romania" ) );
+ cmbCountry->insertItem( tr ( "Russia" ) );
+ cmbCountry->insertItem( tr ( "Rwanda" ) );
+ cmbCountry->insertItem( tr ( "Saint Lucia" ) );
+ cmbCountry->insertItem( tr ( "Samoa" ) );
+ cmbCountry->insertItem( tr ( "San Marino" ) );
+ cmbCountry->insertItem( tr ( "Saudi Arabia" ) );
+ cmbCountry->insertItem( tr ( "Senegal" ) );
+ cmbCountry->insertItem( tr ( "Seychelles" ) );
+ cmbCountry->insertItem( tr ( "Sierra Leone" ) );
+ cmbCountry->insertItem( tr ( "Singapore" ) );
+ cmbCountry->insertItem( tr ( "Slovakia" ) );
+ cmbCountry->insertItem( tr ( "Slovenia" ) );
+ cmbCountry->insertItem( tr ( "Solomon Islands" ) );
+ cmbCountry->insertItem( tr ( "Somalia" ) );
+ cmbCountry->insertItem( tr ( "South Africa" ) );
+ cmbCountry->insertItem( tr ( "Spain" ) );
+ cmbCountry->insertItem( tr ( "Sri Lanka" ) );
+ cmbCountry->insertItem( tr ( "St. Helena" ) );
+ cmbCountry->insertItem( tr ( "Sudan" ) );
+ cmbCountry->insertItem( tr ( "Suriname" ) );
+ cmbCountry->insertItem( tr ( "Swaziland" ) );
+ cmbCountry->insertItem( tr ( "Sweden" ) );
+ cmbCountry->insertItem( tr ( "Switzerland" ) );
+ cmbCountry->insertItem( tr ( "Taiwan" ) );
+ cmbCountry->insertItem( tr ( "Tajikistan" ) );
+ cmbCountry->insertItem( tr ( "Tanzania" ) );
+ cmbCountry->insertItem( tr ( "Thailand" ) );
+ cmbCountry->insertItem( tr ( "Togo" ) );
+ cmbCountry->insertItem( tr ( "Tokelau" ) );
+ cmbCountry->insertItem( tr ( "Tonga" ) );
+ cmbCountry->insertItem( tr ( "Tunisia" ) );
+ cmbCountry->insertItem( tr ( "Turkey" ) );
+ cmbCountry->insertItem( tr ( "Turkmenistan" ) );
+ cmbCountry->insertItem( tr ( "Tuvalu" ) );
+ cmbCountry->insertItem( tr ( "Uganda" ) );
+ cmbCountry->insertItem( tr ( "Ukraine" ) );
+ cmbCountry->insertItem( tr ( "Uruguay" ) );
+ cmbCountry->insertItem( tr ( "Uzbekistan" ) );
+ cmbCountry->insertItem( tr ( "Vanuatu" ) );
+ cmbCountry->insertItem( tr ( "Venezuela" ) );
+ cmbCountry->insertItem( tr ( "Viet Nam" ) );
+ cmbCountry->insertItem( tr ( "Virgin Islands" ) );
+ cmbCountry->insertItem( tr ( "Western Sahara" ) );
+ cmbCountry->insertItem( tr ( "Yemen" ) );
+ cmbCountry->insertItem( tr ( "Yugoslavia" ) );
+ cmbCountry->insertItem( tr ( "Zambia" ) );
+ cmbCountry->insertItem( tr ( "Zimbabwe" ) );
+
+ cmbCountry->setMaximumWidth( 135 );
gl->addMultiCellWidget( cmbCountry, 5, 5, 1, 2 );
+ cmbChooserField4 = new QComboBox( FALSE, container );
+ cmbChooserField4->setMaximumWidth( 90 );
+ gl->addWidget( cmbChooserField4, 6, 0 );
+ txtChooserField4 = new QLineEdit( container );
+ gl->addMultiCellWidget( txtChooserField4, 6, 6, 1, 2 );
tabMain->insertTab( tabViewport, tr( "Address" ) );
@@ -412,5 +622,5 @@ void ContactEditor::init() {
svDetails->addChild( container );
- gl = new QGridLayout( container, 1, 2, 2, 3 );
+ gl = new QGridLayout( container, 1, 2, 2, 4 );
QStringList::ConstIterator it = slDynamicEntries->begin();
@@ -468,4 +678,5 @@ void ContactEditor::init() {
cmbChooserField2->insertStringList( *slChooserNames );
cmbChooserField3->insertStringList( *slChooserNames );
+ cmbChooserField4->insertStringList( *slChooserNames );
cmbChooserField1->setCurrentItem( 0 );
@@ -480,4 +691,5 @@ void ContactEditor::init() {
connect( txtChooserField2, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser2Change(const QString &)) );
connect( txtChooserField3, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser3Change(const QString &)) );
+ connect( txtChooserField4, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser4Change(const QString &)) );
connect( txtAddress, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddressChange(const QString &)) );
//connect( txtAddress2, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddress2Change(const QString &)) );
@@ -491,4 +703,5 @@ void ContactEditor::init() {
connect( cmbChooserField2, SIGNAL(activated(int)), this, SLOT(slotCmbChooser2Change(int)) );
connect( cmbChooserField3, SIGNAL(activated(int)), this, SLOT(slotCmbChooser3Change(int)) );
+ connect( cmbChooserField4, SIGNAL(activated(int)), this, SLOT(slotCmbChooser4Change(int)) );
connect( cmbAddress, SIGNAL(activated(int)), this, SLOT(slotAddressTypeChange(int)) );
new QPEDialogListener(this);
@@ -547,4 +760,12 @@ void ContactEditor::slotChooser3Change( const QString &textChanged ) {
}
+void ContactEditor::slotChooser4Change( const QString &textChanged ) {
+
+ int index = cmbChooserField4->currentItem();
+
+ (*slChooserValues)[index] = textChanged;
+
+}
+
void ContactEditor::slotAddressChange( const QString &textChanged ) {
@@ -629,4 +850,10 @@ void ContactEditor::slotCmbChooser3Change( int index ) {
}
+void ContactEditor::slotCmbChooser4Change( int index ) {
+
+ txtChooserField4->setText( (*slChooserValues)[index] );
+
+}
+
void ContactEditor::slotAddressTypeChange( int index ) {
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h
index a799672..a58a860 100644
--- a/core/pim/addressbook/contacteditor.h
+++ b/core/pim/addressbook/contacteditor.h
@@ -84,7 +84,9 @@ class ContactEditor : public QDialog {
void slotChooser2Change( const QString &textChanged );
void slotChooser3Change( const QString &textChanged );
+ void slotChooser4Change( const QString &textChanged );
void slotCmbChooser1Change( int index );
void slotCmbChooser2Change( int index );
void slotCmbChooser3Change( int index );
+ void slotCmbChooser4Change( int index );
void slotAddressTypeChange( int index );
void slotAddressChange( const QString &textChanged );
@@ -135,7 +137,9 @@ class ContactEditor : public QDialog {
QLineEdit *txtChooserField2;
QLineEdit *txtChooserField3;
+ QLineEdit *txtChooserField4;
QComboBox *cmbChooserField1;
QComboBox *cmbChooserField2;
QComboBox *cmbChooserField3;
+ QComboBox *cmbChooserField4;
QComboBox *cmbFileAs;
CategorySelect *cmbCat;