summaryrefslogtreecommitdiffabout
path: root/kabc/distributionlisteditor.cpp
Side-by-side diff
Diffstat (limited to 'kabc/distributionlisteditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/distributionlisteditor.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp
index 9f5840b..ca5ecb7 100644
--- a/kabc/distributionlisteditor.cpp
+++ b/kabc/distributionlisteditor.cpp
@@ -17,19 +17,23 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-#include <qlistview.h>
+#include <q3listview.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#ifdef DESKTOP_VERSION
#include <qinputdialog.h>
#else
#include <qtcompat/qinputdialog.h>
#endif
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qradiobutton.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3Frame>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kdebug.h>
@@ -47,12 +51,12 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &
QWidget *parent ) :
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 );
QStringList::ConstIterator it;
@@ -65,9 +69,9 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &
}
QString EmailSelectDialog::selected()
{
- QButton *button = mButtonGroup->selected();
+ QAbstractButton *button = mButtonGroup->selected();
if ( button ) return button->text();
return QString::null;
}
@@ -84,14 +88,14 @@ QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &c
return result;
}
-class EditEntryItem : public QListViewItem
+class EditEntryItem : public Q3ListViewItem
{
public:
- EditEntryItem( QListView *parent, const Addressee &addressee,
+ EditEntryItem( Q3ListView *parent, const Addressee &addressee,
const QString &email=QString::null ) :
- QListViewItem( parent ),
+ Q3ListViewItem( parent ),
mAddressee( addressee ),
mEmail( email )
{
setText( 0, addressee.realName() );
@@ -124,13 +128,13 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
mAddressBook( addressBook )
{
kdDebug(5700) << "DistributionListEditor()" << endl;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ;
+ Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ;
mNameCombo = new QComboBox( this );
nameLayout->addWidget( mNameCombo );
connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) );
@@ -142,9 +146,9 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
removeButton = new QPushButton( i18n("Remove List"), this );
nameLayout->addWidget( removeButton );
connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) );
- mEntryView = new QListView( this );
+ mEntryView = new Q3ListView( this );
mEntryView->addColumn( i18n("Name") );
mEntryView->addColumn( i18n("Email") );
mEntryView->addColumn( i18n("Use Preferred") );
topLayout->addWidget( mEntryView );
@@ -161,9 +165,9 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
addEntryButton = new QPushButton( i18n("Add Entry"), this );
topLayout->addWidget( addEntryButton );
connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
- mAddresseeView = new QListView( this );
+ mAddresseeView = new Q3ListView( this );
mAddresseeView->addColumn( i18n("Name") );
mAddresseeView->addColumn( i18n("Preferred Email") );
topLayout->addWidget( mAddresseeView );