From 71f88c02f79a1164430eec1de3e15edec011a15e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Sep 2013 18:35:21 +0300 Subject: improve construcors in abstract classes. Also add some missing final to classes. --- src/gui/widgets/setupitem.h | 52 ++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'src/gui/widgets/setupitem.h') diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index 476a31ae4..9c5cc11e3 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -57,15 +57,6 @@ class SetupItem : public gcn::ActionListener, VNONE }; - SetupItem(const std::string &text, const std::string &description, - const std::string &keyName, SetupTabScroll *const parent, - const std::string &eventName, const bool mainConfig); - - SetupItem(const std::string &text, const std::string &description, - const std::string &keyName, SetupTabScroll *const parent, - const std::string &eventName, const std::string &def, - const bool mainConfig); - A_DELETE_COPY(SetupItem) ~SetupItem(); @@ -106,6 +97,15 @@ class SetupItem : public gcn::ActionListener, void rereadValue(); protected: + SetupItem(const std::string &text, const std::string &description, + const std::string &keyName, SetupTabScroll *const parent, + const std::string &eventName, const bool mainConfig); + + SetupItem(const std::string &text, const std::string &description, + const std::string &keyName, SetupTabScroll *const parent, + const std::string &eventName, const std::string &def, + const bool mainConfig); + std::string mText; std::string mDescription; @@ -427,6 +427,23 @@ class SetupItemSlider2 final : public SetupItem class SetupItemSliderList : public SetupItem { public: + A_DELETE_COPY(SetupItemSliderList) + + ~SetupItemSliderList(); + + void createControls(); + + void fromWidget() override; + + void toWidget() override; + + virtual void action(const gcn::ActionEvent &event) override; + + void apply(const std::string &eventName) override; + + virtual void addMoreControls() = 0; + + protected: SetupItemSliderList(const std::string &text, const std::string &description, const std::string &keyName, @@ -446,23 +463,6 @@ class SetupItemSliderList : public SetupItem const bool onTheFly = false, const bool mainConfig = true); - A_DELETE_COPY(SetupItemSliderList) - - ~SetupItemSliderList(); - - void createControls(); - - void fromWidget() override; - - void toWidget() override; - - virtual void action(const gcn::ActionEvent &event) override; - - void apply(const std::string &eventName) override; - - virtual void addMoreControls() = 0; - - protected: HorizontContainer *mHorizont; Label *mLabel; SliderList *mSlider; -- cgit v1.2.3-70-g09d2