Changeset View
Changeset View
Standalone View
Standalone View
kcms/colors/editor/scmeditordialog.h
- This file was moved from 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; | | |||
36 | 35 | | |||
37 | class SchemeEditorDialog : public QDialog, public Ui::ScmEditorDialog | 36 | class SchemeEditorDialog : public QDialog, public Ui::ScmEditorDialog | ||
38 | { | 37 | { | ||
39 | Q_OBJECT | 38 | Q_OBJECT | ||
40 | 39 | | |||
41 | public: | 40 | public: | ||
42 | SchemeEditorDialog(const QString &path, KColorCm *parent = nullptr); | 41 | SchemeEditorDialog(const QString &path, QWidget *parent = nullptr); | ||
43 | SchemeEditorDialog(KSharedConfigPtr config, KColorCm *parent = nullptr); | 42 | SchemeEditorDialog(KSharedConfigPtr config, QWidget *parent = nullptr); | ||
43 | | ||||
44 | bool overwriteOnSave() const; | ||||
45 | void setOverwriteOnSave(bool overwrite); | ||||
44 | 46 | | |||
45 | Q_SIGNALS: | 47 | Q_SIGNALS: | ||
46 | void changed(bool); | 48 | void changed(bool); | ||
47 | void applied(); | | |||
48 | 49 | | |||
49 | private Q_SLOTS: | 50 | private Q_SLOTS: | ||
50 | 51 | | |||
51 | /** slot called when the upload scheme button is clicked */ | 52 | /** slot called when the upload scheme button is clicked */ | ||
52 | void on_schemeKnsUploadButton_clicked(); | 53 | void on_schemeKnsUploadButton_clicked(); | ||
53 | 54 | | |||
54 | void on_buttonBox_clicked(QAbstractButton *button); | 55 | void on_buttonBox_clicked(QAbstractButton *button); | ||
55 | 56 | | |||
56 | void updateTabs(bool byUser=false); | 57 | void updateTabs(bool byUser=false); | ||
57 | 58 | | |||
58 | private: | 59 | private: | ||
59 | void init(); | 60 | void init(); | ||
60 | void applyScheme(); | | |||
61 | /** save the current scheme */ | 61 | /** save the current scheme */ | ||
62 | void saveScheme(); | 62 | void saveScheme(); | ||
63 | void setUnsavedChanges(bool changes); | 63 | void setUnsavedChanges(bool changes); | ||
64 | 64 | | |||
65 | const QString m_filePath; | 65 | const QString m_filePath; | ||
66 | QString m_schemeName; | 66 | QString m_schemeName; | ||
67 | KSharedConfigPtr m_config; | 67 | KSharedConfigPtr m_config; | ||
68 | bool m_disableUpdates; | 68 | bool m_disableUpdates = false; | ||
69 | bool m_unsavedChanges; | 69 | bool m_unsavedChanges = false; | ||
70 | 70 | | |||
71 | SchemeEditorOptions *m_optionTab; | 71 | SchemeEditorOptions *m_optionTab; | ||
72 | SchemeEditorColors *m_colorTab; | 72 | SchemeEditorColors *m_colorTab; | ||
73 | SchemeEditorEffects *m_disabledTab; | 73 | SchemeEditorEffects *m_disabledTab; | ||
74 | SchemeEditorEffects *m_inactiveTab; | 74 | SchemeEditorEffects *m_inactiveTab; | ||
75 | KColorCm *m_kcm; | 75 | | ||
76 | bool m_overwriteOnSave = false; | ||||
76 | }; | 77 | }; | ||
77 | 78 | | |||
78 | #endif | 79 | #endif |