summaryrefslogtreecommitdiffabout
path: root/kaddressbook/emaileditwidget.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/emaileditwidget.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-p1.zip
kdepimpi-p1.tar.gz
kdepimpi-p1.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/emaileditwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/emaileditwidget.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp
index e72face..09df47f 100644
--- a/kaddressbook/emaileditwidget.cpp
+++ b/kaddressbook/emaileditwidget.cpp
@@ -23,17 +23,19 @@
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qtoolbutton.h>
#include <qtooltip.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
#include <kaccelmanager.h>
#endif //KAB_EMBEDDED
#include <kconfig.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -43,24 +45,24 @@
#include <klocale.h>
#include <kmessagebox.h>
#include "emaileditwidget.h"
EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 2 );
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 2 );
topLayout->setSpacing( KDialog::spacingHint() );
QLabel* label = new QLabel( this );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "mail_send", KIcon::Desktop, 0) );
topLayout->addWidget( label, 0, 0 );
- label->setAlignment( AlignCenter );
+ label->setAlignment( Qt::AlignCenter );
QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this);
topLayout->addWidget( editButton, 0, 1 );
label = new QLabel( i18n( "Email:" ), this );
topLayout->addWidget( label, 1, 0 );
mEmailEdit = new KLineEdit( this );
connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ),
SLOT( textChanged( const QString& ) ) );
@@ -132,34 +134,34 @@ void EmailEditWidget::textChanged( const QString &text )
EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
const char *name )
: KDialogBase( KDialogBase::Plain, i18n( "Edit Email Addresses" ),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
parent, name, true )
{
QWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 4, 3 );
+ Q3GridLayout *topLayout = new Q3GridLayout( page, 4, 3 );
QLabel *label = new QLabel( i18n( "Email address:" ), page );
topLayout->addWidget( label, 0, 0 );
mEmailEdit = new KLineEdit( page );
label->setBuddy( mEmailEdit );
topLayout->addWidget( mEmailEdit, 0, 1 );
connect( mEmailEdit, SIGNAL( returnPressed() ), SLOT( add() ) );
connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ),
SLOT( emailChanged() ) );
mAddButton = new QPushButton( i18n( "Add" ), page );
mAddButton->setEnabled( false );
connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
topLayout->addWidget( mAddButton, 0, 2 );
- mEmailListBox = new QListBox( page );
+ mEmailListBox = new Q3ListBox( page );
// Make sure there is room for the scrollbar
mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 );
connect( mEmailListBox, SIGNAL( highlighted( int ) ),
SLOT( selectionChanged( int ) ) );
topLayout->addMultiCellWidget( mEmailListBox, 1, 3, 0, 1 );
mEditButton = new QPushButton( i18n( "Change" ), page );
@@ -267,11 +269,11 @@ void EmailEditDialog::selectionChanged( int index )
mStandardButton->setEnabled( value );
}
void EmailEditDialog::emailChanged()
{
mAddButton->setEnabled( !mEmailEdit->text().isEmpty() );
}
-#ifndef KAB_EMBEDDED
-#include "emaileditwidget.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_emaileditwidget.cpp"
#endif //KAB_EMBEDDED