Commit 27250222 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QCombobox

parent e3fac59a
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <QPixmap> #include <QPixmap>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <KComboBox> #include <QComboBox>
#include <KLocalizedString> #include <KLocalizedString>
// helper method to sort contact fields by field label // helper method to sort contact fields by field label
...@@ -52,7 +52,7 @@ StylePage::StylePage(QWidget *parent, const QString &name) ...@@ -52,7 +52,7 @@ StylePage::StylePage(QWidget *parent, const QString &name)
mSortTypeCombo->addItem(i18nc("@item:inlistbox Ascending sort order", "Ascending")); mSortTypeCombo->addItem(i18nc("@item:inlistbox Ascending sort order", "Ascending"));
mSortTypeCombo->addItem(i18nc("@item:inlistbox Descending sort order", "Descending")); mSortTypeCombo->addItem(i18nc("@item:inlistbox Descending sort order", "Descending"));
connect(mStyleCombo, qOverload<int>(&KComboBox::activated), this, &StylePage::styleChanged); connect(mStyleCombo, qOverload<int>(&QComboBox::activated), this, &StylePage::styleChanged);
} }
StylePage::~StylePage() StylePage::~StylePage()
...@@ -144,7 +144,7 @@ void StylePage::initGUI() ...@@ -144,7 +144,7 @@ void StylePage::initGUI()
label = new QLabel(i18nc("@label:listbox", "Criterion:"), group); label = new QLabel(i18nc("@label:listbox", "Criterion:"), group);
sortLayout->addWidget(label, 0, 0); sortLayout->addWidget(label, 0, 0);
mFieldCombo = new KComboBox(false, group); mFieldCombo = new QComboBox(group);
mFieldCombo->setToolTip( mFieldCombo->setToolTip(
i18nc("@info:tooltip", "Select the primary sort field")); i18nc("@info:tooltip", "Select the primary sort field"));
mFieldCombo->setWhatsThis( mFieldCombo->setWhatsThis(
...@@ -157,7 +157,7 @@ void StylePage::initGUI() ...@@ -157,7 +157,7 @@ void StylePage::initGUI()
label = new QLabel(i18nc("@label:listbox", "Order:"), group); label = new QLabel(i18nc("@label:listbox", "Order:"), group);
sortLayout->addWidget(label, 1, 0); sortLayout->addWidget(label, 1, 0);
mSortTypeCombo = new KComboBox(false, group); mSortTypeCombo = new QComboBox(group);
mSortTypeCombo->setToolTip( mSortTypeCombo->setToolTip(
i18nc("@info:tooltip", "Select the sorting order")); i18nc("@info:tooltip", "Select the sorting order"));
mSortTypeCombo->setWhatsThis( mSortTypeCombo->setWhatsThis(
...@@ -173,7 +173,7 @@ void StylePage::initGUI() ...@@ -173,7 +173,7 @@ void StylePage::initGUI()
QVBoxLayout *styleLayout = new QVBoxLayout(); QVBoxLayout *styleLayout = new QVBoxLayout();
group->setLayout(styleLayout); group->setLayout(styleLayout);
mStyleCombo = new KComboBox(false, group); mStyleCombo = new QComboBox(group);
mStyleCombo->setToolTip( mStyleCombo->setToolTip(
i18nc("@info:tooltip", "Select the print style")); i18nc("@info:tooltip", "Select the print style"));
mStyleCombo->setWhatsThis( mStyleCombo->setWhatsThis(
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
class QLabel; class QLabel;
class QPixmap; class QPixmap;
class KComboBox; class QComboBox;
class StylePage : public QWidget class StylePage : public QWidget
{ {
...@@ -99,9 +99,9 @@ private: ...@@ -99,9 +99,9 @@ private:
void initGUI(); void initGUI();
void initFieldCombo(); void initFieldCombo();
KComboBox *mFieldCombo = nullptr; QComboBox *mFieldCombo = nullptr;
KComboBox *mSortTypeCombo = nullptr; QComboBox *mSortTypeCombo = nullptr;
KComboBox *mStyleCombo = nullptr; QComboBox *mStyleCombo = nullptr;
QLabel *mPreview = nullptr; QLabel *mPreview = nullptr;
KAddressBookImportExport::KAddressBookImportExportContactFields::Fields mFields; KAddressBookImportExport::KAddressBookImportExportContactFields::Fields mFields;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment