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.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 @@
#include <qlabel.h>
-#include <qtabwidget.h>
#include <qlayout.h>
@@ -60,3 +59,3 @@ ContactEditor::ContactEditor( const Opie::OPimContact &entry,
WFlags )
- : QDialog( parent, name, TRUE, WStyle_ContextHelp ),
+ : QDialog( parent, name, true, WStyle_ContextHelp ),
defaultEmailChooserPosition( -1 ),
@@ -121,10 +120,10 @@ void ContactEditor::init() {
- tabMain = new QTabWidget( this );
+ tabMain = new Opie::Ui::OTabWidget( this );
vb->addWidget( tabMain );
- QWidget *tabViewport = new QWidget ( tabMain );
+ m_generalWidget = new QWidget ( tabMain );
- vb = new QVBoxLayout( tabViewport );
+ vb = new QVBoxLayout( m_generalWidget );
- svGeneral = new QScrollView( tabViewport );
+ svGeneral = new QScrollView( m_generalWidget );
vb->addWidget( svGeneral, 0, 0 );
@@ -138,4 +137,3 @@ void ContactEditor::init() {
- QGridLayout *gl = new QGridLayout( container, 1, 1, 2, 4 );
- gl->setResizeMode( QLayout::FreeResize );
+ QGridLayout *gl = new QGridLayout( container, 10, 2, 2, 4 );
@@ -170,3 +168,3 @@ void ContactEditor::init() {
// Chooser 1
- cmbChooserField1 = new QComboBox( FALSE, container );
+ cmbChooserField1 = new QComboBox( false, container );
QWhatsThis::add( cmbChooserField1, tr( "Press to select attribute to change" ) );
@@ -183,3 +181,3 @@ void ContactEditor::init() {
// Chooser 2
- cmbChooserField2 = new QComboBox( FALSE, container );
+ cmbChooserField2 = new QComboBox( false, container );
QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) );
@@ -196,3 +194,3 @@ void ContactEditor::init() {
// Chooser 3
- cmbChooserField3 = new QComboBox( FALSE, container );
+ cmbChooserField3 = new QComboBox( false, container );
QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) );
@@ -211,3 +209,3 @@ void ContactEditor::init() {
gl->addWidget( l, 7, 0 );
- cmbFileAs = new QComboBox( TRUE, container );
+ cmbFileAs = new QComboBox( true, container );
gl->addWidget( cmbFileAs, 7, 1 );
@@ -221,8 +219,8 @@ void ContactEditor::init() {
- btnNote = new QPushButton( tr( "Notes..." ), container );
+ btnNote = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Notes..." ), container );
gl->addWidget( btnNote, 9, 1 );
- tabMain->insertTab( tabViewport, tr( "General" ) );
+ tabMain->addTab( m_generalWidget, "addressbook/AddressBookSmall", tr( "General" ) );
- tabViewport = new QWidget ( tabMain );
+ QWidget *tabViewport = new QWidget ( tabMain );
@@ -240,3 +238,3 @@ void ContactEditor::init() {
- cmbAddress = new QComboBox( FALSE, container );
+ cmbAddress = new QComboBox( false, container );
cmbAddress->insertItem( tr( "Business" ) );
@@ -267,3 +265,3 @@ void ContactEditor::init() {
gl->addWidget( l, 5, 0 );
- cmbCountry = new QComboBox( TRUE, container );
+ cmbCountry = new QComboBox( true, container );
cmbCountry->insertItem( "" );
@@ -487,3 +485,3 @@ void ContactEditor::init() {
// Chooser 4
- cmbChooserField4 = new QComboBox( FALSE, container );
+ cmbChooserField4 = new QComboBox( false, container );
cmbChooserField4->setMaximumWidth( 90 );
@@ -503,3 +501,3 @@ void ContactEditor::init() {
- tabMain->insertTab( tabViewport, tr( "Address" ) );
+ tabMain->addTab( tabViewport, "home", tr( "Address" ) );
@@ -527,3 +525,3 @@ void ContactEditor::init() {
QPopupMenu* m1 = new QPopupMenu( container );
- birthdayPicker = new DateBookMonth( m1, 0, TRUE );
+ birthdayPicker = new DateBookMonth( m1, 0, true );
m1->insertItem( birthdayPicker );
@@ -552,3 +550,3 @@ void ContactEditor::init() {
m1 = new QPopupMenu( container );
- anniversaryPicker = new DateBookMonth( m1, 0, TRUE );
+ anniversaryPicker = new DateBookMonth( m1, 0, true );
m1->insertItem( anniversaryPicker );
@@ -601,5 +599,5 @@ void ContactEditor::init() {
- tabMain->insertTab( tabViewport, tr( "Details" ) );
+ tabMain->addTab( tabViewport, "UtilsIcon", tr( "Details" ) );
- dlgNote = new QDialog( this, "Note Dialog", TRUE );
+ dlgNote = new QDialog( this, "Note Dialog", true );
dlgNote->setCaption( tr("Enter Note") );
@@ -610,3 +608,3 @@ void ContactEditor::init() {
- dlgName = new QDialog( this, "Name Dialog", TRUE );
+ dlgName = new QDialog( this, "Name Dialog", true );
dlgName->setCaption( tr("Edit Name") );
@@ -1095,3 +1093,3 @@ void ContactEditor::slotName() {
if ( QPEApplication::execDialog( dlgName ) ) {
- if ( txtLastName->text().contains( ' ', TRUE ) )
+ if ( txtLastName->text().contains( ' ', true ) )
tmpName = txtLastName->text() + ", " + txtFirstName->text() + " " + txtMiddleName->text();
@@ -1140,3 +1138,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) {
- commapos = simplifiedName.find( ',', 0, TRUE);
+ commapos = simplifiedName.find( ',', 0, true);
if ( commapos >= 0 ) {
@@ -1264,3 +1262,3 @@ void ContactEditor::setEntry( const Opie::OPimContact &entry ) {
cleanupFields();
- tabMain->setCurrentPage( 0 );
+ tabMain->setCurrentTab( m_generalWidget );
@@ -1285,3 +1283,3 @@ void ContactEditor::setEntry( const Opie::OPimContact &entry ) {
// Lastnames with multiple words need to be protected by a comma !
- if ( ent.lastName().contains( ' ', TRUE ) )
+ if ( ent.lastName().contains( ' ', true ) )
txtFullName->setText( ent.lastName() + ", " + ent.firstName() + " " + ent.middleName() );
@@ -1689,4 +1687,4 @@ static inline bool containsAlphaNum( const QString &str )
if ( !str[i].isSpace() )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
@@ -1699,4 +1697,4 @@ static inline bool constainsWhiteSpace( const QString &str )
if ( str[i].isSpace() )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}