Diffstat (limited to 'kabc/distributionlistdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/distributionlistdialog.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp index d2e1144..82883e6 100644 --- a/kabc/distributionlistdialog.cpp +++ b/kabc/distributionlistdialog.cpp | |||
@@ -18,13 +18,19 @@ | |||
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 <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qpushbutton.h> | 24 | #include <qpushbutton.h> |
25 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
26 | //Added by qt3to4: | ||
27 | #include <Q3HBoxLayout> | ||
28 | #include <Q3GridLayout> | ||
29 | #include <Q3Frame> | ||
30 | #include <Q3VBoxLayout> | ||
26 | #include <klineeditdlg.h> | 31 | #include <klineeditdlg.h> |
27 | #include <qbuttongroup.h> | 32 | #include <q3buttongroup.h> |
33 | #include <Q3Button> | ||
28 | #include <qradiobutton.h> | 34 | #include <qradiobutton.h> |
29 | 35 | ||
30 | #include <klocale.h> | 36 | #include <klocale.h> |
@@ -60,10 +66,10 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString ¤t, | |||
60 | KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, | 66 | KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, |
61 | parent ) | 67 | parent ) |
62 | { | 68 | { |
63 | QFrame *topFrame = plainPage(); | 69 | Q3Frame *topFrame = plainPage(); |
64 | QBoxLayout *topLayout = new QVBoxLayout( topFrame ); | 70 | Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); |
65 | 71 | ||
66 | mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), | 72 | mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), |
67 | topFrame ); | 73 | topFrame ); |
68 | topLayout->addWidget( mButtonGroup ); | 74 | topLayout->addWidget( mButtonGroup ); |
69 | 75 | ||
@@ -78,7 +84,7 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString ¤t, | |||
78 | 84 | ||
79 | QString EmailSelector::selected() | 85 | QString EmailSelector::selected() |
80 | { | 86 | { |
81 | QButton *button = mButtonGroup->selected(); | 87 | QAbstractButton *button = mButtonGroup->selected(); |
82 | if ( button ) return button->text(); | 88 | if ( button ) return button->text(); |
83 | return QString::null; | 89 | return QString::null; |
84 | } | 90 | } |
@@ -96,12 +102,12 @@ QString EmailSelector::getEmail( const QStringList &emails, const QString &curre | |||
96 | return result; | 102 | return result; |
97 | } | 103 | } |
98 | 104 | ||
99 | class EntryItem : public QListViewItem | 105 | class EntryItem : public Q3ListViewItem |
100 | { | 106 | { |
101 | public: | 107 | public: |
102 | EntryItem( QListView *parent, const Addressee &addressee, | 108 | EntryItem( Q3ListView *parent, const Addressee &addressee, |
103 | const QString &email=QString::null ) : | 109 | const QString &email=QString::null ) : |
104 | QListViewItem( parent ), | 110 | Q3ListViewItem( parent ), |
105 | mAddressee( addressee ), | 111 | mAddressee( addressee ), |
106 | mEmail( email ) | 112 | mEmail( email ) |
107 | { | 113 | { |
@@ -136,10 +142,10 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address | |||
136 | { | 142 | { |
137 | kdDebug(5700) << "DistributionListEditor()" << endl; | 143 | kdDebug(5700) << "DistributionListEditor()" << endl; |
138 | 144 | ||
139 | QBoxLayout *topLayout = new QVBoxLayout( this ); | 145 | Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); |
140 | topLayout->setSpacing( KDialog::spacingHint() ); | 146 | topLayout->setSpacing( KDialog::spacingHint() ); |
141 | 147 | ||
142 | QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; | 148 | Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ; |
143 | 149 | ||
144 | mNameCombo = new QComboBox( this ); | 150 | mNameCombo = new QComboBox( this ); |
145 | nameLayout->addWidget( mNameCombo ); | 151 | nameLayout->addWidget( mNameCombo ); |
@@ -157,7 +163,7 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address | |||
157 | nameLayout->addWidget( mRemoveButton ); | 163 | nameLayout->addWidget( mRemoveButton ); |
158 | connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) ); | 164 | connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) ); |
159 | 165 | ||
160 | QGridLayout *gridLayout = new QGridLayout( topLayout, 3, 3 ); | 166 | Q3GridLayout *gridLayout = new Q3GridLayout( topLayout, 3, 3 ); |
161 | gridLayout->setColStretch(1, 1); | 167 | gridLayout->setColStretch(1, 1); |
162 | 168 | ||
163 | QLabel *listLabel = new QLabel( i18n("Available addresses:"), this ); | 169 | QLabel *listLabel = new QLabel( i18n("Available addresses:"), this ); |
@@ -166,14 +172,14 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address | |||
166 | mListLabel = new QLabel( this ); | 172 | mListLabel = new QLabel( this ); |
167 | gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); | 173 | gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); |
168 | 174 | ||
169 | mAddresseeView = new QListView( this ); | 175 | mAddresseeView = new Q3ListView( this ); |
170 | mAddresseeView->addColumn( i18n("Name") ); | 176 | mAddresseeView->addColumn( i18n("Name") ); |
171 | mAddresseeView->addColumn( i18n("Preferred Email") ); | 177 | mAddresseeView->addColumn( i18n("Preferred Email") ); |
172 | mAddresseeView->setAllColumnsShowFocus( true ); | 178 | mAddresseeView->setAllColumnsShowFocus( true ); |
173 | gridLayout->addWidget( mAddresseeView, 1, 0 ); | 179 | gridLayout->addWidget( mAddresseeView, 1, 0 ); |
174 | connect( mAddresseeView, SIGNAL( selectionChanged() ), | 180 | connect( mAddresseeView, SIGNAL( selectionChanged() ), |
175 | SLOT( slotSelectionAddresseeViewChanged() ) ); | 181 | SLOT( slotSelectionAddresseeViewChanged() ) ); |
176 | connect( mAddresseeView, SIGNAL( doubleClicked( QListViewItem * ) ), | 182 | connect( mAddresseeView, SIGNAL( doubleClicked( Q3ListViewItem * ) ), |
177 | SLOT( addEntry() ) ); | 183 | SLOT( addEntry() ) ); |
178 | 184 | ||
179 | mAddEntryButton = new QPushButton( i18n("Add Entry"), this ); | 185 | mAddEntryButton = new QPushButton( i18n("Add Entry"), this ); |
@@ -181,7 +187,7 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address | |||
181 | gridLayout->addWidget( mAddEntryButton, 2, 0 ); | 187 | gridLayout->addWidget( mAddEntryButton, 2, 0 ); |
182 | connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); | 188 | connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); |
183 | 189 | ||
184 | mEntryView = new QListView( this ); | 190 | mEntryView = new Q3ListView( this ); |
185 | mEntryView->addColumn( i18n("Name") ); | 191 | mEntryView->addColumn( i18n("Name") ); |
186 | mEntryView->addColumn( i18n("Email") ); | 192 | mEntryView->addColumn( i18n("Email") ); |
187 | mEntryView->addColumn( i18n("Use Preferred") ); | 193 | mEntryView->addColumn( i18n("Use Preferred") ); |