author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/features | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kaddressbook/features/distributionlistwidget.cpp | 39 | ||||
-rw-r--r-- | kaddressbook/features/distributionlistwidget.h | 13 | ||||
-rw-r--r-- | kaddressbook/features/mergewidget.cpp | 14 | ||||
-rw-r--r-- | kaddressbook/features/mergewidget.h | 2 |
4 files changed, 41 insertions, 27 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 @@ -22,11 +22,18 @@ */ -#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 @@ -78,10 +85,10 @@ 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 ) @@ -122,5 +129,5 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, : 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() ); @@ -167,6 +174,6 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, 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 ); @@ -411,5 +418,5 @@ QString DistributionListWidget::identifier() const } -void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) +void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* ) { dropEvent( e ); @@ -433,5 +440,5 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) { #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); #endif //KAB_EMBEDDED @@ -441,5 +448,5 @@ void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) { #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); #endif //KAB_EMBEDDED @@ -462,8 +469,8 @@ EmailSelector::EmailSelector( const QStringList &emails, 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 ); @@ -480,5 +487,5 @@ EmailSelector::EmailSelector( const QStringList &emails, QString EmailSelector::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) return button->text(); @@ -497,5 +504,5 @@ QString EmailSelector::getEmail( const QStringList &emails, -#ifndef KAB_EMBEDDED -#include "distributionlistwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_distributionlistwidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/features/distributionlistwidget.h b/kaddressbook/features/distributionlistwidget.h index 82bac3d..f619389 100644 --- a/kaddressbook/features/distributionlistwidget.h +++ b/kaddressbook/features/distributionlistwidget.h @@ -29,9 +29,14 @@ #include "extensionwidget.h" +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> +#include <QLabel> +#include <QDragMoveEvent> -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; class QLabel; -class QListView; +class Q3ListView; class DistributionListView; @@ -58,5 +63,5 @@ class DistributionListWidget : public ExtensionWidget public slots: void save(); - void dropped( QDropEvent*, QListViewItem* ); + void dropped( QDropEvent*, Q3ListViewItem* ); private slots: @@ -121,5 +126,5 @@ class EmailSelector : public KDialogBase private: - QButtonGroup *mButtonGroup; + Q3ButtonGroup *mButtonGroup; }; diff --git a/kaddressbook/features/mergewidget.cpp b/kaddressbook/features/mergewidget.cpp index 2476e42..1becc2f 100644 --- a/kaddressbook/features/mergewidget.cpp +++ b/kaddressbook/features/mergewidget.cpp @@ -24,4 +24,6 @@ #include <qlayout.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> #ifndef KAB_EMBEDDED @@ -64,9 +66,9 @@ extern "C" { #endif //KAB_EMBEDDED -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { public: ContactItem( KListView *parent, const KABC::Addressee &addressee ) - : QListViewItem( parent ), mAddressee( addressee ) + : Q3ListViewItem( parent ), mAddressee( addressee ) { KABC::Field::List fieldList = KABC::Field::defaultFields(); @@ -95,5 +97,5 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name ) #endif //KAB_EMBEDDED - QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(), KDialog::spacingHint() ); @@ -215,5 +217,5 @@ void MergeWidget::mergeAndRemove() mBlockUpdate = true; - core()->deleteContacts( oldUID ); + core()->deleteContacts( QStringList(oldUID) ); core()->setContactSelected( mMasterAddressee.uid() ); mBlockUpdate = false; @@ -370,5 +372,5 @@ void MergeWidget::doMerge( const KABC::Addressee &addr ) } -#ifndef KAB_EMBEDDED -#include "mergewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_mergewidget.cpp" #endif //KAB_EMBEDDED diff --git a/kaddressbook/features/mergewidget.h b/kaddressbook/features/mergewidget.h index 1063c80..bb16282 100644 --- a/kaddressbook/features/mergewidget.h +++ b/kaddressbook/features/mergewidget.h @@ -30,5 +30,5 @@ #include "extensionwidget.h" -class QListView; +class Q3ListView; class KABCore; |