Changeset View
Changeset View
Standalone View
Standalone View
kcms/keyboard/kcm_add_layout_dialog.h
Show All 17 Lines | |||||
18 | 18 | | |||
19 | 19 | | |||
20 | #ifndef KCM_ADD_LAYOUT_DIALOG_H_ | 20 | #ifndef KCM_ADD_LAYOUT_DIALOG_H_ | ||
21 | #define KCM_ADD_LAYOUT_DIALOG_H_ | 21 | #define KCM_ADD_LAYOUT_DIALOG_H_ | ||
22 | 22 | | |||
23 | #include <QDialog> | 23 | #include <QDialog> | ||
24 | 24 | | |||
25 | #include "keyboard_config.h" | 25 | #include "keyboard_config.h" | ||
26 | #include "preview/keyboardpainter.h" | | |||
27 | 26 | | |||
28 | #include <config-keyboard.h> | 27 | #include <config-keyboard.h> | ||
29 | 28 | | |||
30 | struct Rules; | 29 | struct Rules; | ||
31 | class Flags; | 30 | class Flags; | ||
32 | class Ui_AddLayoutDialog; | 31 | class Ui_AddLayoutDialog; | ||
33 | 32 | | |||
34 | class AddLayoutDialog: public QDialog | 33 | class AddLayoutDialog: public QDialog | ||
35 | { | 34 | { | ||
36 | Q_OBJECT | 35 | Q_OBJECT | ||
37 | 36 | | |||
38 | public: | 37 | public: | ||
39 | AddLayoutDialog(const Rules* rules, Flags* flags, const QString& model, bool showLabel, QWidget* parent=nullptr); | 38 | AddLayoutDialog(const Rules* rules, Flags* flags, const QString& model, | ||
39 | const QStringList &options, bool showLabel, QWidget* parent=nullptr); | ||||
40 | 40 | | |||
41 | LayoutUnit getSelectedLayoutUnit() { return selectedLayoutUnit; } | 41 | LayoutUnit getSelectedLayoutUnit() { return selectedLayoutUnit; } | ||
42 | QString getvariant(QString variant); | 42 | QString getvariant(QString variant); | ||
43 | void accept() override; | 43 | void accept() override; | ||
44 | 44 | | |||
45 | public Q_SLOTS: | 45 | public Q_SLOTS: | ||
46 | void languageChanged(int langIdx); | 46 | void languageChanged(int langIdx); | ||
47 | void layoutChanged(int layoutIdx); | 47 | void layoutChanged(int layoutIdx); | ||
48 | #ifdef NEW_GEOMETRY | | |||
49 | void preview(); | 48 | void preview(); | ||
50 | #endif | | |||
51 | 49 | | |||
52 | private: | 50 | private: | ||
53 | const Rules* rules; | 51 | const Rules* rules; | ||
54 | Flags* flags; | 52 | Flags* flags; | ||
55 | const QString& model; | 53 | const QString& model; | ||
54 | const QStringList &options; | ||||
56 | Ui_AddLayoutDialog* layoutDialogUi; | 55 | Ui_AddLayoutDialog* layoutDialogUi; | ||
57 | QString selectedLanguage; | 56 | QString selectedLanguage; | ||
58 | QString selectedLayout; | 57 | QString selectedLayout; | ||
59 | LayoutUnit selectedLayoutUnit; | 58 | LayoutUnit selectedLayoutUnit; | ||
60 | }; | 59 | }; | ||
61 | 60 | | |||
62 | 61 | | |||
63 | #endif /* KCM_ADD_LAYOUT_DIALOG_H_ */ | 62 | #endif /* KCM_ADD_LAYOUT_DIALOG_H_ */ |