summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/contacteditor.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 9c13017..312c663 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -77,385 +77,385 @@ ContactEditor::ContactEditor( const Opie::OPimContact &entry,
ContactEditor::~ContactEditor() {
}
void ContactEditor::init() {
owarn << "init() START" << oendl;
uint i = 0;
QStringList trlChooserNames;
for (i = 0; i <= 6; i++) {
slHomeAddress.append( "" );
slBusinessAddress.append( "" );
}
trlChooserNames = Opie::OPimContactFields::trphonefields( false );
slChooserNames = Opie::OPimContactFields::untrphonefields( false );
slDynamicEntries = Opie::OPimContactFields::untrdetailsfields( false );
trlDynamicEntries = Opie::OPimContactFields::trdetailsfields( false );
// Ok, we have to remove elements from the list of dynamic entries
// which are now stored in special (not dynamic) widgets..
// Otherwise we will get problems with field assignments! (se)
slDynamicEntries.remove("Anniversary");
slDynamicEntries.remove("Birthday");
slDynamicEntries.remove("Gender");
// The same with translated fields.. But I will
// use the translation map to avoid mismatches..
QMap<int, QString> translMap = Opie::OPimContactFields::idToTrFields();
trlDynamicEntries.remove( translMap[Qtopia::Anniversary] );
trlDynamicEntries.remove( translMap[Qtopia::Birthday] );
trlDynamicEntries.remove( translMap[Qtopia::Gender] );
// Last Check to be sure..
assert( slDynamicEntries.count() == trlDynamicEntries.count() );
assert( slChooserNames.count() == trlChooserNames.count() );
for (i = 0; i < slChooserNames.count(); i++)
slChooserValues.append("");
QVBoxLayout *vb = new QVBoxLayout( this );
tabMain = new QTabWidget( this );
vb->addWidget( tabMain );
QWidget *tabViewport = new QWidget ( tabMain );
vb = new QVBoxLayout( tabViewport );
svGeneral = new QScrollView( tabViewport );
vb->addWidget( svGeneral, 0, 0 );
svGeneral->setResizePolicy( QScrollView::AutoOneFit );
// svGeneral->setHScrollBarMode( QScrollView::AlwaysOff );
// svGeneral->setVScrollBarMode( QScrollView::AlwaysOff );
svGeneral->setFrameStyle( QFrame::NoFrame );
QWidget *container = new QWidget( svGeneral->viewport() );
svGeneral->addChild( container );
QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 );
gl->setResizeMode( QLayout::FreeResize );
btnFullName = new QPushButton( tr( "Full Name..." ), container );
QWhatsThis::add( btnFullName, tr( "Press to enter last- middle and firstname" ) );
gl->addWidget( btnFullName, 0, 0 );
txtFullName = new ABOOK::NameLineEdit( container );
QWhatsThis::add( txtFullName, tr( "Enter fullname directly ! If you have a lastname with multiple words ( for instance \"de la Guerra\"), please write <lastname>,<firstnames> like this: \"de la Guerra, Carlos Pedro\"" ) );
gl->addWidget( txtFullName, 0, 1 );
QLabel *l = new QLabel( tr( "Job Title" ), container );
QWhatsThis::add( l, tr( "The jobtitle.." ) );
gl->addWidget( l, 1, 0 );
txtJobTitle = new QLineEdit( container );
QWhatsThis::add( txtJobTitle, tr( "The jobtitle.." ) );
gl->addWidget( txtJobTitle, 1, 1 );
l = new QLabel( tr("Suffix"), container );
QWhatsThis::add( l, tr( "Something like \"jr.\".." ) );
gl->addWidget( l, 2, 0 );
txtSuffix = new QLineEdit( container );
QWhatsThis::add( txtSuffix, tr( "Something like \"jr.\".." ) );
gl->addWidget( txtSuffix, 2, 1 );
l = new QLabel( tr( "Organization" ), container );
QWhatsThis::add( l, tr( "The working place of the contact" ) );
gl->addWidget( l, 3, 0 );
txtOrganization = new QLineEdit( container );
QWhatsThis::add( txtOrganization, tr( "The working place of the contact" ) );
gl->addWidget( txtOrganization, 3, 1 );
// Chooser 1
cmbChooserField1 = new QComboBox( FALSE, container );
QWhatsThis::add( cmbChooserField1, tr( "Press to select attribute to change" ) );
cmbChooserField1->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField1, 4, 0 );
// Textfield for chooser 1.
// Now use Widgetstack to contain the textfield and the default-email combo !
m_widgetStack1 = new QWidgetStack( container );
txtChooserField1 = new QLineEdit( m_widgetStack1 );
m_widgetStack1 -> addWidget( txtChooserField1, TextField );
gl->addWidget( m_widgetStack1, 4, 1 );
m_widgetStack1 -> raiseWidget( TextField );
// Chooser 2
cmbChooserField2 = new QComboBox( FALSE, container );
QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) );
cmbChooserField2->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField2, 5, 0 );
// Textfield for chooser 2
// Now use WidgetStack to contain the textfield and the default-email combo!
m_widgetStack2 = new QWidgetStack( container );
txtChooserField2 = new QLineEdit( m_widgetStack2 );
m_widgetStack2 -> addWidget( txtChooserField2, TextField );
gl->addWidget( m_widgetStack2, 5, 1 );
m_widgetStack2 -> raiseWidget( TextField );
// Chooser 3
cmbChooserField3 = new QComboBox( FALSE, container );
QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) );
cmbChooserField3->setMaximumWidth( 90 );
gl->addWidget( cmbChooserField3, 6, 0 );
// Textfield for chooser 2
// Now use WidgetStack to contain the textfield and the default-email combo!
m_widgetStack3 = new QWidgetStack( container );
txtChooserField3 = new QLineEdit( m_widgetStack3 );
m_widgetStack3 -> addWidget( txtChooserField3, TextField );
gl->addWidget( m_widgetStack3, 6, 1 );
m_widgetStack3 -> raiseWidget( TextField );
l = new QLabel( tr( "File As" ), container );
QWhatsThis::add( l, tr( "Press to select how to store the name (and howto show it in the listview)" ) );
gl->addWidget( l, 7, 0 );
cmbFileAs = new QComboBox( TRUE, container );
gl->addWidget( cmbFileAs, 7, 1 );
labCat = new QLabel( tr( "Category" ), container );
gl->addWidget( labCat, 8, 0 );
cmbCat = new CategorySelect( container );
gl->addWidget( cmbCat, 8, 1 );
labCat->show();
cmbCat->show();
btnNote = new QPushButton( tr( "Notes..." ), container );
gl->addWidget( btnNote, 9, 1 );
tabMain->insertTab( tabViewport, tr( "General" ) );
tabViewport = new QWidget ( tabMain );
vb = new QVBoxLayout( tabViewport );
svAddress = new QScrollView( tabViewport );
vb->addWidget( svAddress, 0, 0 );
svAddress->setResizePolicy( QScrollView::AutoOneFit );
svAddress->setFrameStyle( QFrame::NoFrame );
container = new QWidget( svAddress->viewport() );
svAddress->addChild( container );
gl = new QGridLayout( container, 8, 3, 2, 4 ); // row 7 QSpacerItem
cmbAddress = new QComboBox( FALSE, container );
cmbAddress->insertItem( tr( "Business" ) );
cmbAddress->insertItem( tr( "Home" ) );
gl->addMultiCellWidget( cmbAddress, 0, 0, 0, 1 );
l = new QLabel( tr( "Address" ), container );
gl->addWidget( l, 1, 0 );
txtAddress = new QLineEdit( container );
gl->addMultiCellWidget( txtAddress, 1, 1, 1, 2 );
l = new QLabel( tr( "City" ), container );
gl->addWidget( l, 2, 0 );
txtCity = new QLineEdit( container );
gl->addMultiCellWidget( txtCity, 2, 2, 1, 2 );
l = new QLabel( tr( "State" ), container );
gl->addWidget( l, 3, 0 );
txtState = new QLineEdit( container );
gl->addMultiCellWidget( txtState, 3, 3, 1, 2 );
l = new QLabel( tr( "Zip Code" ), container );
gl->addWidget( l, 4, 0 );
txtZip = new QLineEdit( container );
gl->addMultiCellWidget( txtZip, 4, 4, 1, 2 );
l = new QLabel( tr( "Country" ), container );
gl->addWidget( l, 5, 0 );
cmbCountry = new QComboBox( TRUE, container );
- cmbCountry->insertItem( tr( "" ) );
+ cmbCountry->insertItem( "" );
cmbCountry->insertItem( tr ( "United States" ) );
cmbCountry->insertItem( tr ( "United Kingdom" ) );
cmbCountry->insertItem( tr ( "Afghanistan" ) );
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 ( "Antarctica" ) );
cmbCountry->insertItem( tr ( "Argentina" ) );
cmbCountry->insertItem( tr ( "Armenia" ) );
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 ( "Bolivia" ) );
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 ( "Cameroon" ) );
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 ( "Ghana" ) );
cmbCountry->insertItem( tr ( "Gibraltar" ) );
cmbCountry->insertItem( tr ( "Greece" ) );
cmbCountry->insertItem( tr ( "Greenland" ) );
cmbCountry->insertItem( tr ( "Grenada" ) );
cmbCountry->insertItem( tr ( "Guadeloupe" ) );
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 ( "Jamaica" ) );
cmbCountry->insertItem( tr ( "Japan" ) );
cmbCountry->insertItem( tr ( "Jordan" ) );
cmbCountry->insertItem( tr ( "Kazakhstan" ) );
cmbCountry->insertItem( tr ( "Kenya" ) );
cmbCountry->insertItem( tr ( "Kiribati" ) );
cmbCountry->insertItem( tr ( "Korea" ) );
cmbCountry->insertItem( tr ( "Kuwait" ) );
cmbCountry->insertItem( tr ( "Kyrgyzstan" ) );
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 ( "Oman" ) );
cmbCountry->insertItem( tr ( "Pakistan" ) );
cmbCountry->insertItem( tr ( "Palau" ) );
cmbCountry->insertItem( tr ( "Palestinian Sovereign Areas" ) );
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 Islands" ) );
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" ) );