Diffstat (limited to 'kaddressbook/features/distributionlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/features/distributionlistwidget.cpp | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp index bfcb121..996177b 100644 --- a/kaddressbook/features/distributionlistwidget.cpp +++ b/kaddressbook/features/distributionlistwidget.cpp @@ -21,13 +21,20 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcombobox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> #include <qradiobutton.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDropEvent> +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> +#include <QDragEnterEvent> #ifndef KAB_EMBEDDED #include <kaccelmanager.h> @@ -77,12 +84,12 @@ extern "C" { } #endif //KAB_EMBEDDED -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { public: ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, const QString &email = QString::null ) : - QListViewItem( parent ), + Q3ListViewItem( parent ), mAddressee( addressee ), mEmail( email ) { @@ -121,7 +128,7 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, const char *name ) : ExtensionWidget( core, parent, name ), mManager( 0 ) { - QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() ); if (KGlobal::getOrientation() == KGlobal::Portrait) @@ -166,8 +173,8 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 ); connect( mContactView, SIGNAL( selectionChanged() ), SLOT( selectionContactViewChanged() ) ); - connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), - SLOT( dropped( QDropEvent*, QListViewItem* ) ) ); + connect( mContactView, SIGNAL( dropped( QDropEvent*, Q3ListViewItem* ) ), + SLOT( dropped( QDropEvent*, Q3ListViewItem* ) ) ); mAddContactButton->setEnabled( false ); topLayout->addWidget( mAddContactButton, 2, 0 ); @@ -410,7 +417,7 @@ QString DistributionListWidget::identifier() const return "distribution_list_editor"; } -void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) +void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* ) { dropEvent( e ); } @@ -432,7 +439,7 @@ DistributionListView::DistributionListView( QWidget *parent, const char* name ) void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) { #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); #endif //KAB_EMBEDDED } @@ -440,7 +447,7 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) { #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); #endif //KAB_EMBEDDED } @@ -461,10 +468,10 @@ EmailSelector::EmailSelector( const QStringList &emails, : KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, parent ) { - QFrame *topFrame = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = plainPage(); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); - mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), + mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), topFrame ); topLayout->addWidget( mButtonGroup ); @@ -479,7 +486,7 @@ EmailSelector::EmailSelector( const QStringList &emails, QString EmailSelector::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) return button->text(); @@ -496,6 +503,6 @@ QString EmailSelector::getEmail( const QStringList &emails, } -#ifndef KAB_EMBEDDED -#include "distributionlistwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_distributionlistwidget.cpp" #endif //KAB_EMBEDDED |