summaryrefslogtreecommitdiffabout
path: root/kabc/distributionlisteditor.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) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/distributionlisteditor.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kabc/distributionlisteditor.cpp') (more/less context) (ignore 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
@@ -18,7 +18,7 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qlistview.h> 21#include <q3listview.h>
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qpushbutton.h> 23#include <qpushbutton.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
@@ -27,8 +27,12 @@
27#else 27#else
28#include <qtcompat/qinputdialog.h> 28#include <qtcompat/qinputdialog.h>
29#endif 29#endif
30#include <qbuttongroup.h> 30#include <q3buttongroup.h>
31#include <qradiobutton.h> 31#include <qradiobutton.h>
32//Added by qt3to4:
33#include <Q3HBoxLayout>
34#include <Q3Frame>
35#include <Q3VBoxLayout>
32 36
33#include <klocale.h> 37#include <klocale.h>
34#include <kdebug.h> 38#include <kdebug.h>
@@ -48,10 +52,10 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &
48 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, 52 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
49 parent ) 53 parent )
50{ 54{
51 QFrame *topFrame = plainPage(); 55 Q3Frame *topFrame = plainPage();
52 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 56 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
53 57
54 mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), 58 mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
55 topFrame ); 59 topFrame );
56 topLayout->addWidget( mButtonGroup ); 60 topLayout->addWidget( mButtonGroup );
57 61
@@ -66,7 +70,7 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &
66 70
67QString EmailSelectDialog::selected() 71QString EmailSelectDialog::selected()
68{ 72{
69 QButton *button = mButtonGroup->selected(); 73 QAbstractButton *button = mButtonGroup->selected();
70 if ( button ) return button->text(); 74 if ( button ) return button->text();
71 return QString::null; 75 return QString::null;
72} 76}
@@ -85,12 +89,12 @@ QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &c
85 return result; 89 return result;
86} 90}
87 91
88class EditEntryItem : public QListViewItem 92class EditEntryItem : public Q3ListViewItem
89{ 93{
90 public: 94 public:
91 EditEntryItem( QListView *parent, const Addressee &addressee, 95 EditEntryItem( Q3ListView *parent, const Addressee &addressee,
92 const QString &email=QString::null ) : 96 const QString &email=QString::null ) :
93 QListViewItem( parent ), 97 Q3ListViewItem( parent ),
94 mAddressee( addressee ), 98 mAddressee( addressee ),
95 mEmail( email ) 99 mEmail( email )
96 { 100 {
@@ -125,11 +129,11 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
125{ 129{
126 kdDebug(5700) << "DistributionListEditor()" << endl; 130 kdDebug(5700) << "DistributionListEditor()" << endl;
127 131
128 QBoxLayout *topLayout = new QVBoxLayout( this ); 132 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
129 topLayout->setMargin( KDialog::marginHint() ); 133 topLayout->setMargin( KDialog::marginHint() );
130 topLayout->setSpacing( KDialog::spacingHint() ); 134 topLayout->setSpacing( KDialog::spacingHint() );
131 135
132 QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; 136 Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ;
133 137
134 mNameCombo = new QComboBox( this ); 138 mNameCombo = new QComboBox( this );
135 nameLayout->addWidget( mNameCombo ); 139 nameLayout->addWidget( mNameCombo );
@@ -143,7 +147,7 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
143 nameLayout->addWidget( removeButton ); 147 nameLayout->addWidget( removeButton );
144 connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) ); 148 connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) );
145 149
146 mEntryView = new QListView( this ); 150 mEntryView = new Q3ListView( this );
147 mEntryView->addColumn( i18n("Name") ); 151 mEntryView->addColumn( i18n("Name") );
148 mEntryView->addColumn( i18n("Email") ); 152 mEntryView->addColumn( i18n("Email") );
149 mEntryView->addColumn( i18n("Use Preferred") ); 153 mEntryView->addColumn( i18n("Use Preferred") );
@@ -162,7 +166,7 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
162 topLayout->addWidget( addEntryButton ); 166 topLayout->addWidget( addEntryButton );
163 connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); 167 connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
164 168
165 mAddresseeView = new QListView( this ); 169 mAddresseeView = new Q3ListView( this );
166 mAddresseeView->addColumn( i18n("Name") ); 170 mAddresseeView->addColumn( i18n("Name") );
167 mAddresseeView->addColumn( i18n("Preferred Email") ); 171 mAddresseeView->addColumn( i18n("Preferred Email") );
168 topLayout->addWidget( mAddresseeView ); 172 topLayout->addWidget( mAddresseeView );