summaryrefslogtreecommitdiffabout
path: root/kaddressbook/features
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/features
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/features') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/features/distributionlistwidget.cpp39
-rw-r--r--kaddressbook/features/distributionlistwidget.h13
-rw-r--r--kaddressbook/features/mergewidget.cpp14
-rw-r--r--kaddressbook/features/mergewidget.h2
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
@@ -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
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
@@ -28,11 +28,16 @@
#include <klistview.h>
#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;
class KABCore;
@@ -57,7 +62,7 @@ class DistributionListWidget : public ExtensionWidget
public slots:
void save();
- void dropped( QDropEvent*, QListViewItem* );
+ void dropped( QDropEvent*, Q3ListViewItem* );
private slots:
void createList();
@@ -120,7 +125,7 @@ class EmailSelector : public KDialogBase
QWidget *parent );
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
@@ -23,6 +23,8 @@
#include <qlayout.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#ifndef KAB_EMBEDDED
#include <kaccelmanager.h>
@@ -63,11 +65,11 @@ 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();
KABC::Field::List::ConstIterator it;
@@ -94,7 +96,7 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name )
parent->setMaximumSize( KGlobal::getDesktopWidth() , 180);
#endif //KAB_EMBEDDED
- QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(),
+ Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(),
KDialog::spacingHint() );
mContactView = new KListView( this );
@@ -214,7 +216,7 @@ void MergeWidget::mergeAndRemove()
emit modified( retval );
mBlockUpdate = true;
- core()->deleteContacts( oldUID );
+ core()->deleteContacts( QStringList(oldUID) );
core()->setContactSelected( mMasterAddressee.uid() );
mBlockUpdate = false;
@@ -369,6 +371,6 @@ void MergeWidget::doMerge( const KABC::Addressee &addr )
mMasterAddressee.setCustoms( newCustoms );
}
-#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
@@ -29,7 +29,7 @@
#include "extensionwidget.h"
-class QListView;
+class Q3ListView;
class KABCore;