summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/contacteditor.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp62
1 files changed, 30 insertions, 32 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index b078968..dec4c7c 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -33,3 +33,2 @@
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qtabwidget.h>
35#include <qlayout.h> 34#include <qlayout.h>
@@ -60,3 +59,3 @@ ContactEditor::ContactEditor( const Opie::OPimContact &entry,
60 WFlags ) 59 WFlags )
61 : QDialog( parent, name, TRUE, WStyle_ContextHelp ), 60 : QDialog( parent, name, true, WStyle_ContextHelp ),
62 defaultEmailChooserPosition( -1 ), 61 defaultEmailChooserPosition( -1 ),
@@ -121,10 +120,10 @@ void ContactEditor::init() {
121 120
122 tabMain = new QTabWidget( this ); 121 tabMain = new Opie::Ui::OTabWidget( this );
123 vb->addWidget( tabMain ); 122 vb->addWidget( tabMain );
124 123
125 QWidget *tabViewport = new QWidget ( tabMain ); 124 m_generalWidget = new QWidget ( tabMain );
126 125
127 vb = new QVBoxLayout( tabViewport ); 126 vb = new QVBoxLayout( m_generalWidget );
128 127
129 svGeneral = new QScrollView( tabViewport ); 128 svGeneral = new QScrollView( m_generalWidget );
130 vb->addWidget( svGeneral, 0, 0 ); 129 vb->addWidget( svGeneral, 0, 0 );
@@ -138,4 +137,3 @@ void ContactEditor::init() {
138 137
139 QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 ); 138 QGridLayout *gl = new QGridLayout( container, 10, 2, 2, 4 );
140 gl->setResizeMode( QLayout::FreeResize );
141 139
@@ -170,3 +168,3 @@ void ContactEditor::init() {
170 // Chooser 1 168 // Chooser 1
171 cmbChooserField1 = new QComboBox( FALSE, container ); 169 cmbChooserField1 = new QComboBox( false, container );
172 QWhatsThis::add( cmbChooserField1, tr( "Press to select attribute to change" ) ); 170 QWhatsThis::add( cmbChooserField1, tr( "Press to select attribute to change" ) );
@@ -183,3 +181,3 @@ void ContactEditor::init() {
183 // Chooser 2 181 // Chooser 2
184 cmbChooserField2 = new QComboBox( FALSE, container ); 182 cmbChooserField2 = new QComboBox( false, container );
185 QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) ); 183 QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) );
@@ -196,3 +194,3 @@ void ContactEditor::init() {
196 // Chooser 3 194 // Chooser 3
197 cmbChooserField3 = new QComboBox( FALSE, container ); 195 cmbChooserField3 = new QComboBox( false, container );
198 QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) ); 196 QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) );
@@ -211,3 +209,3 @@ void ContactEditor::init() {
211 gl->addWidget( l, 7, 0 ); 209 gl->addWidget( l, 7, 0 );
212 cmbFileAs = new QComboBox( TRUE, container ); 210 cmbFileAs = new QComboBox( true, container );
213 gl->addWidget( cmbFileAs, 7, 1 ); 211 gl->addWidget( cmbFileAs, 7, 1 );
@@ -221,8 +219,8 @@ void ContactEditor::init() {
221 219
222 btnNote = new QPushButton( tr( "Notes..." ), container ); 220 btnNote = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Notes..." ), container );
223 gl->addWidget( btnNote, 9, 1 ); 221 gl->addWidget( btnNote, 9, 1 );
224 222
225 tabMain->insertTab( tabViewport, tr( "General" ) ); 223 tabMain->addTab( m_generalWidget, "addressbook/AddressBookSmall", tr( "General" ) );
226 224
227 tabViewport = new QWidget ( tabMain ); 225 QWidget *tabViewport = new QWidget ( tabMain );
228 226
@@ -240,3 +238,3 @@ void ContactEditor::init() {
240 238
241 cmbAddress = new QComboBox( FALSE, container ); 239 cmbAddress = new QComboBox( false, container );
242 cmbAddress->insertItem( tr( "Business" ) ); 240 cmbAddress->insertItem( tr( "Business" ) );
@@ -267,3 +265,3 @@ void ContactEditor::init() {
267 gl->addWidget( l, 5, 0 ); 265 gl->addWidget( l, 5, 0 );
268 cmbCountry = new QComboBox( TRUE, container ); 266 cmbCountry = new QComboBox( true, container );
269 cmbCountry->insertItem( "" ); 267 cmbCountry->insertItem( "" );
@@ -487,3 +485,3 @@ void ContactEditor::init() {
487 // Chooser 4 485 // Chooser 4
488 cmbChooserField4 = new QComboBox( FALSE, container ); 486 cmbChooserField4 = new QComboBox( false, container );
489 cmbChooserField4->setMaximumWidth( 90 ); 487 cmbChooserField4->setMaximumWidth( 90 );
@@ -503,3 +501,3 @@ void ContactEditor::init() {
503 501
504 tabMain->insertTab( tabViewport, tr( "Address" ) ); 502 tabMain->addTab( tabViewport, "home", tr( "Address" ) );
505 503
@@ -527,3 +525,3 @@ void ContactEditor::init() {
527 QPopupMenu* m1 = new QPopupMenu( container ); 525 QPopupMenu* m1 = new QPopupMenu( container );
528 birthdayPicker = new DateBookMonth( m1, 0, TRUE ); 526 birthdayPicker = new DateBookMonth( m1, 0, true );
529 m1->insertItem( birthdayPicker ); 527 m1->insertItem( birthdayPicker );
@@ -552,3 +550,3 @@ void ContactEditor::init() {
552 m1 = new QPopupMenu( container ); 550 m1 = new QPopupMenu( container );
553 anniversaryPicker = new DateBookMonth( m1, 0, TRUE ); 551 anniversaryPicker = new DateBookMonth( m1, 0, true );
554 m1->insertItem( anniversaryPicker ); 552 m1->insertItem( anniversaryPicker );
@@ -601,5 +599,5 @@ void ContactEditor::init() {
601 599
602 tabMain->insertTab( tabViewport, tr( "Details" ) ); 600 tabMain->addTab( tabViewport, "UtilsIcon", tr( "Details" ) );
603 601
604 dlgNote = new QDialog( this, "Note Dialog", TRUE ); 602 dlgNote = new QDialog( this, "Note Dialog", true );
605 dlgNote->setCaption( tr("Enter Note") ); 603 dlgNote->setCaption( tr("Enter Note") );
@@ -610,3 +608,3 @@ void ContactEditor::init() {
610 608
611 dlgName = new QDialog( this, "Name Dialog", TRUE ); 609 dlgName = new QDialog( this, "Name Dialog", true );
612 dlgName->setCaption( tr("Edit Name") ); 610 dlgName->setCaption( tr("Edit Name") );
@@ -1095,3 +1093,3 @@ void ContactEditor::slotName() {
1095 if ( QPEApplication::execDialog( dlgName ) ) { 1093 if ( QPEApplication::execDialog( dlgName ) ) {
1096 if ( txtLastName->text().contains( ' ', TRUE ) ) 1094 if ( txtLastName->text().contains( ' ', true ) )
1097 tmpName = txtLastName->text() + ", " + txtFirstName->text() + " " + txtMiddleName->text(); 1095 tmpName = txtLastName->text() + ", " + txtFirstName->text() + " " + txtMiddleName->text();
@@ -1140,3 +1138,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) {
1140 1138
1141 commapos = simplifiedName.find( ',', 0, TRUE); 1139 commapos = simplifiedName.find( ',', 0, true);
1142 if ( commapos >= 0 ) { 1140 if ( commapos >= 0 ) {
@@ -1264,3 +1262,3 @@ void ContactEditor::setEntry( const Opie::OPimContact &entry ) {
1264 cleanupFields(); 1262 cleanupFields();
1265 tabMain->setCurrentPage( 0 ); 1263 tabMain->setCurrentTab( m_generalWidget );
1266 1264
@@ -1285,3 +1283,3 @@ void ContactEditor::setEntry( const Opie::OPimContact &entry ) {
1285 // Lastnames with multiple words need to be protected by a comma ! 1283 // Lastnames with multiple words need to be protected by a comma !
1286 if ( ent.lastName().contains( ' ', TRUE ) ) 1284 if ( ent.lastName().contains( ' ', true ) )
1287 txtFullName->setText( ent.lastName() + ", " + ent.firstName() + " " + ent.middleName() ); 1285 txtFullName->setText( ent.lastName() + ", " + ent.firstName() + " " + ent.middleName() );
@@ -1689,4 +1687,4 @@ static inline bool containsAlphaNum( const QString &str )
1689 if ( !str[i].isSpace() ) 1687 if ( !str[i].isSpace() )
1690 return TRUE; 1688 return true;
1691 return FALSE; 1689 return false;
1692} 1690}
@@ -1699,4 +1697,4 @@ static inline bool constainsWhiteSpace( const QString &str )
1699 if ( str[i].isSpace() ) 1697 if ( str[i].isSpace() )
1700 return TRUE; 1698 return true;
1701 return FALSE; 1699 return false;
1702} 1700}