summaryrefslogtreecommitdiffabout
path: root/kaddressbook/addresseditwidget.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/addresseditwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/addresseditwidget.cpp55
1 files changed, 31 insertions, 24 deletions
diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp
index 3dcd592..83908d0 100644
--- a/kaddressbook/addresseditwidget.cpp
+++ b/kaddressbook/addresseditwidget.cpp
@@ -22,24 +22,31 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qcheckbox.h>
-#include <qhbox.h>
+#include <q3hbox.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
+#include <q3listbox.h>
+#include <q3listview.h>
#include <qpushbutton.h>
-#include <qsignal.h>
+#include <q3signal.h>
#include <qstring.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
-#include <qtextedit.h>
+#include <q3textedit.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3VBoxLayout>
#include <kaccelmanager.h>
#include <kbuttonbox.h>
#else //KAB_EMBEDDED
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#endif //KAB_EMBEDDED
#include <qtoolbutton.h>
@@ -67,9 +74,9 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
{
mConfig = AddresseeConfig::instance();
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
layout->setSpacing( KDialog::spacingHintSmall() );
- QHBox *b1 = new QHBox( this);
+ Q3HBox *b1 = new Q3HBox( this);
//QLabel * label = new QLabel( b1 );
//label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) );
@@ -84,11 +91,11 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
// layout->addWidget( mTypeCombo );
#ifndef KAB_EMBEDDED
- mAddressTextEdit = new QTextEdit( this );
+ mAddressTextEdit = new Q3TextEdit( this );
mAddressTextEdit->setReadOnly( true );
mAddressTextEdit->setMinimumHeight( 20 );
#else //KAB_EMBEDDED
- mAddressTextEdit = new QMultiLineEdit( this );
+ mAddressTextEdit = new Q3MultiLineEdit( this );
mAddressTextEdit->setReadOnly( true );
mAddressTextEdit->setMinimumHeight( 20 );
#endif //KAB_EMBEDDED
@@ -126,13 +133,13 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr,
// Insert types for existing numbers.
mTypeCombo->insertTypeList( list );
- QValueList<int> defaultTypes;
+ Q3ValueList<int> defaultTypes;
defaultTypes << KABC::Address::Home;
defaultTypes << KABC::Address::Work;
mConfig->setUid( mAddressee.uid() );
- QValueList<int> configList = mConfig->noDefaultAddrTypes();
- QValueList<int>::ConstIterator it;
+ Q3ValueList<int> configList = mConfig->noDefaultAddrTypes();
+ Q3ValueList<int>::ConstIterator it;
for ( it = configList.begin(); it != configList.end(); ++it )
defaultTypes.remove( *it );
@@ -181,7 +188,7 @@ void AddressEditWidget::edit()
}
mConfig->setUid( mAddressee.uid() );
- QValueList<int> configList;
+ Q3ValueList<int> configList;
if ( !hasHome ) {
configList << KABC::Address::Home;
}
@@ -255,7 +262,7 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
QWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 8, 2 );
+ Q3GridLayout *topLayout = new Q3GridLayout( page, 8, 2 );
topLayout->setSpacing( spacingHintSmall() );
mTypeCombo = new AddressTypeCombo( mAddressList, page );
@@ -266,9 +273,9 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
topLayout->addWidget( label, 1, 0 );
#ifndef KAB_EMBEDDED
- mStreetTextEdit = new QTextEdit( page );
+ mStreetTextEdit = new Q3TextEdit( page );
#else //KAB_EMBEDDED
- mStreetTextEdit = new QMultiLineEdit( page );
+ mStreetTextEdit = new Q3MultiLineEdit( page );
//US qDebug("AddressEditDialog::AddressEditDialog has to be changed");
#endif //KAB_EMBEDDED
@@ -311,14 +318,14 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
fillCountryCombo();
label->setBuddy( mCountryCombo );
topLayout->addWidget( mCountryCombo, 6, 1 );
- mCountryCombo->setSizeLimit( 8);
+ mCountryCombo->setMaxVisibleItems( 8);
mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page );
topLayout->addMultiCellWidget( mPreferredCheckBox, 7, 7, 0, 1 );
/*
KSeparator *sep = new KSeparator( KSeparator::HLine, page );
topLayout->addMultiCellWidget( sep, 8, 8, 0, 1 );
*/
- QHBox *buttonBox = new QHBox( page );
+ Q3HBox *buttonBox = new Q3HBox( page );
buttonBox->setSpacing( spacingHint() );
topLayout->addMultiCellWidget( buttonBox, 9, 9, 0, 1 );
@@ -583,9 +590,9 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent )
parent, "AddressTypeDialog" )
{
QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( page );
- mGroup = new QButtonGroup( 2, Horizontal, i18n( "Address Types" ), page );
+ mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Address Types" ), page );
layout->addWidget( mGroup );
mTypeList = KABC::Address::typeList();
@@ -617,6 +624,6 @@ int AddressTypeDialog::type() const
return type;
}
-#ifndef KAB_EMBEDDED
-#include "addresseditwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_addresseditwidget.cpp"
#endif //KAB_EMBEDDED