|
Lines 6-12
Link Here
|
| 6 |
|
6 |
|
| 7 |
#include "layoutselector.h" |
7 |
#include "layoutselector.h" |
| 8 |
#include "dbusprovider.h" |
8 |
#include "dbusprovider.h" |
|
|
9 |
#ifdef ENABLE_X11 |
| 9 |
#include "keyboardlayoutwidget.h" |
10 |
#include "keyboardlayoutwidget.h" |
|
|
11 |
#endif // ENABLE_X11 |
| 10 |
#include "layoutmodel.h" |
12 |
#include "layoutmodel.h" |
| 11 |
#include "ui_layoutselector.h" |
13 |
#include "ui_layoutselector.h" |
| 12 |
#include <QDBusPendingCallWatcher> |
14 |
#include <QDBusPendingCallWatcher> |
|
Lines 45-50
LayoutSelector::LayoutSelector(DBusProvider *dbus, QWidget *parent)
Link Here
|
| 45 |
connect(ui_->variantComboBox, |
47 |
connect(ui_->variantComboBox, |
| 46 |
qOverload<int>(&QComboBox::currentIndexChanged), this, |
48 |
qOverload<int>(&QComboBox::currentIndexChanged), this, |
| 47 |
&LayoutSelector::variantComboBoxChanged); |
49 |
&LayoutSelector::variantComboBoxChanged); |
|
|
50 |
#ifdef ENABLE_X11 |
| 48 |
if (qApp->platformName() == "xcb") { |
51 |
if (qApp->platformName() == "xcb") { |
| 49 |
keyboardLayoutWidget_ = new KeyboardLayoutWidget(this); |
52 |
keyboardLayoutWidget_ = new KeyboardLayoutWidget(this); |
| 50 |
keyboardLayoutWidget_->setMinimumSize(QSize(400, 200)); |
53 |
keyboardLayoutWidget_->setMinimumSize(QSize(400, 200)); |
|
Lines 52-57
LayoutSelector::LayoutSelector(DBusProvider *dbus, QWidget *parent)
Link Here
|
| 52 |
QSizePolicy::Expanding); |
55 |
QSizePolicy::Expanding); |
| 53 |
ui_->verticalLayout->addWidget(keyboardLayoutWidget_); |
56 |
ui_->verticalLayout->addWidget(keyboardLayoutWidget_); |
| 54 |
} |
57 |
} |
|
|
58 |
#endif // ENABLE_X11 |
| 55 |
} |
59 |
} |
| 56 |
|
60 |
|
| 57 |
LayoutSelector::~LayoutSelector() {} |
61 |
LayoutSelector::~LayoutSelector() {} |
|
Lines 128-133
void LayoutSelector::layoutComboBoxChanged() {
Link Here
|
| 128 |
ui_->variantComboBox->setCurrentIndex(0); |
132 |
ui_->variantComboBox->setCurrentIndex(0); |
| 129 |
} |
133 |
} |
| 130 |
|
134 |
|
|
|
135 |
#ifdef ENABLE_X11 |
| 131 |
void LayoutSelector::variantComboBoxChanged() { |
136 |
void LayoutSelector::variantComboBoxChanged() { |
| 132 |
if (!keyboardLayoutWidget_) { |
137 |
if (!keyboardLayoutWidget_) { |
| 133 |
return; |
138 |
return; |
|
Lines 142-147
void LayoutSelector::variantComboBoxChanged() {
Link Here
|
| 142 |
keyboardLayoutWidget_->setVisible(true); |
147 |
keyboardLayoutWidget_->setVisible(true); |
| 143 |
} |
148 |
} |
| 144 |
} |
149 |
} |
|
|
150 |
#else |
| 151 |
void LayoutSelector::variantComboBoxChanged() { return; } |
| 152 |
#endif // ENABLE_X11 |
| 145 |
|
153 |
|
| 146 |
} // namespace kcm |
154 |
} // namespace kcm |
| 147 |
} // namespace fcitx |
155 |
} // namespace fcitx |