Changeset View
Changeset View
Standalone View
Standalone View
src/settings/viewmodes/dolphinfontrequester.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the * | 15 | * along with this program; if not, write to the * | ||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #include "dolphinfontrequester.h" | 20 | #include "dolphinfontrequester.h" | ||
21 | 21 | | |||
22 | #include <KComboBox> | | |||
23 | #include <KLocalizedString> | 22 | #include <KLocalizedString> | ||
24 | 23 | | |||
24 | #include <QComboBox> | ||||
25 | #include <QFontDatabase> | 25 | #include <QFontDatabase> | ||
26 | #include <QFontDialog> | 26 | #include <QFontDialog> | ||
27 | #include <QHBoxLayout> | 27 | #include <QHBoxLayout> | ||
28 | #include <QPushButton> | 28 | #include <QPushButton> | ||
29 | 29 | | |||
30 | DolphinFontRequester::DolphinFontRequester(QWidget* parent) : | 30 | DolphinFontRequester::DolphinFontRequester(QWidget* parent) : | ||
31 | QWidget(parent), | 31 | QWidget(parent), | ||
32 | m_modeCombo(nullptr), | 32 | m_modeCombo(nullptr), | ||
33 | m_chooseFontButton(nullptr), | 33 | m_chooseFontButton(nullptr), | ||
34 | m_mode(SystemFont), | 34 | m_mode(SystemFont), | ||
35 | m_customFont() | 35 | m_customFont() | ||
36 | { | 36 | { | ||
37 | QHBoxLayout* topLayout = new QHBoxLayout(this); | 37 | QHBoxLayout* topLayout = new QHBoxLayout(this); | ||
38 | topLayout->setMargin(0); | 38 | topLayout->setMargin(0); | ||
39 | 39 | | |||
40 | m_modeCombo = new KComboBox(this); | 40 | m_modeCombo = new QComboBox(this); | ||
41 | m_modeCombo->addItem(i18nc("@item:inlistbox Font", "System Font")); | 41 | m_modeCombo->addItem(i18nc("@item:inlistbox Font", "System Font")); | ||
42 | m_modeCombo->addItem(i18nc("@item:inlistbox Font", "Custom Font")); | 42 | m_modeCombo->addItem(i18nc("@item:inlistbox Font", "Custom Font")); | ||
43 | connect(m_modeCombo, static_cast<void(KComboBox::*)(int)>(&KComboBox::activated), | 43 | connect(m_modeCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), | ||
44 | this, &DolphinFontRequester::changeMode); | 44 | this, &DolphinFontRequester::changeMode); | ||
45 | 45 | | |||
46 | m_chooseFontButton = new QPushButton(i18nc("@action:button Choose font", "Choose..."), this); | 46 | m_chooseFontButton = new QPushButton(i18nc("@action:button Choose font", "Choose..."), this); | ||
47 | connect(m_chooseFontButton, &QPushButton::clicked, | 47 | connect(m_chooseFontButton, &QPushButton::clicked, | ||
48 | this, &DolphinFontRequester::openFontDialog); | 48 | this, &DolphinFontRequester::openFontDialog); | ||
49 | 49 | | |||
50 | changeMode(m_modeCombo->currentIndex()); | 50 | changeMode(m_modeCombo->currentIndex()); | ||
51 | 51 | | |||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |