Changeset View
Changeset View
Standalone View
Standalone View
kcms/componentchooser/componentchooser.h
Show All 33 Lines | |||||
34 | class CfgPlugin | 34 | class CfgPlugin | ||
35 | { | 35 | { | ||
36 | public: | 36 | public: | ||
37 | CfgPlugin(){} | 37 | CfgPlugin(){} | ||
38 | virtual ~CfgPlugin(){} | 38 | virtual ~CfgPlugin(){} | ||
39 | virtual void load(KConfig *cfg)=0; | 39 | virtual void load(KConfig *cfg)=0; | ||
40 | virtual void save(KConfig *cfg)=0; | 40 | virtual void save(KConfig *cfg)=0; | ||
41 | virtual void defaults()=0; | 41 | virtual void defaults()=0; | ||
42 | virtual bool isDefaults() const=0; | ||||
crossi: Can you make it const please. | |||||
Wrong indentation for that file which happens to be non standard Also it's probably best to keep it pure-virtual to avoid the bastardization of something which looks like an interface into an abstract class. ervin: Wrong indentation for that file which happens to be non standard
Also it's probably best to… | |||||
42 | }; | 43 | }; | ||
43 | 44 | | |||
44 | class CfgComponent: public QWidget, public Ui::ComponentConfig_UI, public CfgPlugin | 45 | class CfgComponent: public QWidget, public Ui::ComponentConfig_UI, public CfgPlugin | ||
45 | { | 46 | { | ||
46 | Q_OBJECT | 47 | Q_OBJECT | ||
47 | public: | 48 | public: | ||
48 | CfgComponent(QWidget *parent); | 49 | CfgComponent(QWidget *parent); | ||
49 | ~CfgComponent() override; | 50 | ~CfgComponent() override; | ||
50 | void load(KConfig *cfg) override; | 51 | void load(KConfig *cfg) override; | ||
51 | void save(KConfig *cfg) override; | 52 | void save(KConfig *cfg) override; | ||
52 | void defaults() override; | 53 | void defaults() override; | ||
54 | bool isDefaults() const override; | ||||
53 | 55 | | |||
54 | protected: | 56 | protected: | ||
55 | QHash<QString, QString> m_lookupDict,m_revLookupDict; | 57 | QHash<QString, QString> m_lookupDict,m_revLookupDict; | ||
56 | 58 | | |||
57 | protected Q_SLOTS: | 59 | protected Q_SLOTS: | ||
58 | void slotComponentChanged(const QString&); | 60 | void slotComponentChanged(const QString&); | ||
59 | Q_SIGNALS: | 61 | Q_SIGNALS: | ||
60 | void changed(bool); | 62 | void changed(bool); | ||
63 | void defaulted(bool); | ||||
ervin: ditto | |||||
61 | }; | 64 | }; | ||
62 | 65 | | |||
63 | class ComponentChooser : public QWidget, public Ui::ComponentChooser_UI | 66 | class ComponentChooser : public QWidget, public Ui::ComponentChooser_UI | ||
64 | { | 67 | { | ||
65 | 68 | | |||
66 | Q_OBJECT | 69 | Q_OBJECT | ||
67 | 70 | | |||
68 | public: | 71 | public: | ||
Show All 13 Lines | 78 | private: | |||
82 | void loadConfigWidget(const QString &, const QString &, const QString &); | 85 | void loadConfigWidget(const QString &, const QString &, const QString &); | ||
83 | 86 | | |||
84 | protected Q_SLOTS: | 87 | protected Q_SLOTS: | ||
85 | void emitChanged(bool); | 88 | void emitChanged(bool); | ||
86 | void slotServiceSelected(QListWidgetItem *); | 89 | void slotServiceSelected(QListWidgetItem *); | ||
87 | 90 | | |||
88 | Q_SIGNALS: | 91 | Q_SIGNALS: | ||
89 | void changed(bool); | 92 | void changed(bool); | ||
93 | void defaulted(bool); | ||||
ervin: ditto | |||||
90 | 94 | | |||
91 | }; | 95 | }; | ||
92 | 96 | | |||
93 | 97 | | |||
94 | #endif | 98 | #endif |
Can you make it const please.