Changeset View
Changeset View
Standalone View
Standalone View
kcms/colors/scmeditordialog.h
Show All 26 Lines | |||||
27 | #include <QPalette> | 27 | #include <QPalette> | ||
28 | #include <QDialog> | 28 | #include <QDialog> | ||
29 | 29 | | |||
30 | #include "ui_scmeditordialog.h" | 30 | #include "ui_scmeditordialog.h" | ||
31 | 31 | | |||
32 | class SchemeEditorOptions; | 32 | class SchemeEditorOptions; | ||
33 | class SchemeEditorColors; | 33 | class SchemeEditorColors; | ||
34 | class SchemeEditorEffects; | 34 | class SchemeEditorEffects; | ||
35 | class KColorCm; | ||||
35 | 36 | | |||
36 | class SchemeEditorDialog : public QDialog, public Ui::ScmEditorDialog | 37 | class SchemeEditorDialog : public QDialog, public Ui::ScmEditorDialog | ||
37 | { | 38 | { | ||
38 | Q_OBJECT | 39 | Q_OBJECT | ||
39 | 40 | | |||
40 | public: | 41 | public: | ||
41 | SchemeEditorDialog(const QString &path, QWidget *parent=Q_NULLPTR); | 42 | SchemeEditorDialog(const QString &path, KColorCm *parent = Q_NULLPTR); | ||
43 | SchemeEditorDialog(KSharedConfigPtr config, KColorCm *parent = Q_NULLPTR); | ||||
42 | 44 | | |||
43 | Q_SIGNALS: | 45 | Q_SIGNALS: | ||
44 | void changed(bool); | 46 | void changed(bool); | ||
47 | void applied(); | ||||
45 | 48 | | |||
46 | private Q_SLOTS: | 49 | private Q_SLOTS: | ||
47 | 50 | | |||
48 | /** slot called when the upload scheme button is clicked */ | 51 | /** slot called when the upload scheme button is clicked */ | ||
49 | void on_schemeKnsUploadButton_clicked(); | 52 | void on_schemeKnsUploadButton_clicked(); | ||
50 | 53 | | |||
51 | void on_buttonBox_clicked(QAbstractButton *button); | 54 | void on_buttonBox_clicked(QAbstractButton *button); | ||
52 | 55 | | |||
53 | void updateTabs(bool byUser=false); | 56 | void updateTabs(bool byUser=false); | ||
54 | 57 | | |||
55 | private: | 58 | private: | ||
59 | void init(); | ||||
60 | void applyScheme(); | ||||
56 | /** save the current scheme */ | 61 | /** save the current scheme */ | ||
57 | void saveScheme(); | 62 | void saveScheme(); | ||
58 | void setUnsavedChanges(bool changes); | 63 | void setUnsavedChanges(bool changes); | ||
59 | 64 | | |||
60 | const QString m_filePath; | 65 | const QString m_filePath; | ||
61 | QString m_schemeName; | 66 | QString m_schemeName; | ||
62 | KSharedConfigPtr m_config; | 67 | KSharedConfigPtr m_config; | ||
63 | bool m_disableUpdates; | 68 | bool m_disableUpdates; | ||
64 | bool m_unsavedChanges; | 69 | bool m_unsavedChanges; | ||
65 | 70 | | |||
66 | SchemeEditorOptions *m_optionTab; | 71 | SchemeEditorOptions *m_optionTab; | ||
67 | SchemeEditorColors *m_colorTab; | 72 | SchemeEditorColors *m_colorTab; | ||
68 | SchemeEditorEffects *m_disabledTab; | 73 | SchemeEditorEffects *m_disabledTab; | ||
69 | SchemeEditorEffects *m_inactiveTab; | 74 | SchemeEditorEffects *m_inactiveTab; | ||
75 | KColorCm *m_kcm; | ||||
70 | }; | 76 | }; | ||
71 | 77 | | |||
72 | #endif | 78 | #endif |