Changeset View
Changeset View
Standalone View
Standalone View
kcms/colors/editor/scmeditordialog.h
Show All 35 Lines | |||||
36 | class SchemeEditorDialog : public QDialog, public Ui::ScmEditorDialog | 36 | class SchemeEditorDialog : public QDialog, public Ui::ScmEditorDialog | ||
37 | { | 37 | { | ||
38 | Q_OBJECT | 38 | Q_OBJECT | ||
39 | 39 | | |||
40 | public: | 40 | public: | ||
41 | SchemeEditorDialog(const QString &path, QWidget *parent = nullptr); | 41 | SchemeEditorDialog(const QString &path, QWidget *parent = nullptr); | ||
42 | SchemeEditorDialog(KSharedConfigPtr config, QWidget *parent = nullptr); | 42 | SchemeEditorDialog(KSharedConfigPtr config, QWidget *parent = nullptr); | ||
43 | 43 | | |||
44 | bool overwriteOnSave() const; | 44 | bool showApplyOverwriteButton() const; | ||
45 | void setOverwriteOnSave(bool overwrite); | 45 | void setShowApplyOverwriteButton(bool show); | ||
46 | 46 | | |||
47 | Q_SIGNALS: | 47 | Q_SIGNALS: | ||
48 | void changed(bool); | 48 | void changed(bool); | ||
49 | 49 | | |||
50 | private Q_SLOTS: | 50 | private Q_SLOTS: | ||
51 | 51 | | |||
52 | /** slot called when the upload scheme button is clicked */ | 52 | /** slot called when the upload scheme button is clicked */ | ||
53 | void on_schemeKnsUploadButton_clicked(); | 53 | void on_schemeKnsUploadButton_clicked(); | ||
54 | 54 | | |||
55 | void on_buttonBox_clicked(QAbstractButton *button); | 55 | void on_buttonBox_clicked(QAbstractButton *button); | ||
56 | 56 | | |||
57 | void updateTabs(bool byUser=false); | 57 | void updateTabs(bool byUser=false); | ||
58 | 58 | | |||
59 | private: | 59 | private: | ||
60 | void init(); | 60 | void init(); | ||
61 | /** save the current scheme */ | 61 | /** save the current scheme */ | ||
62 | void saveScheme(); | 62 | void saveScheme(bool overwrite); | ||
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 = false; | 68 | bool m_disableUpdates = false; | ||
69 | bool m_unsavedChanges = false; | 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 | 75 | | |||
76 | bool m_overwriteOnSave = false; | 76 | bool m_showApplyOverwriteButton = false; | ||
77 | }; | 77 | }; | ||
78 | 78 | | |||
79 | #endif | 79 | #endif |