summaryrefslogtreecommitdiffstats
path: root/src/extension/prefdialog/parameter-bool.h
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-07-22 23:06:21 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-08-31 14:50:38 +0000
commit8f7a3a637f6a465e78e88490a03f539f0d8fdc1a (patch)
treee503502036ba4268921ded10a81ab3b4157d89d5 /src/extension/prefdialog/parameter-bool.h
parentMove error classes to Parameter where they belong (diff)
downloadinkscape-8f7a3a637f6a465e78e88490a03f539f0d8fdc1a.tar.gz
inkscape-8f7a3a637f6a465e78e88490a03f539f0d8fdc1a.zip
Refactor a lot of the parameter handling code
Many fixes, improvements and simplifications to existing code. Implements the first part of the changes discussed in https://gitlab.com/inkscape/inkscape/issues/333
Diffstat (limited to 'src/extension/prefdialog/parameter-bool.h')
-rw-r--r--src/extension/prefdialog/parameter-bool.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/extension/prefdialog/parameter-bool.h b/src/extension/prefdialog/parameter-bool.h
index 9864cac38..5a73b42b3 100644
--- a/src/extension/prefdialog/parameter-bool.h
+++ b/src/extension/prefdialog/parameter-bool.h
@@ -29,17 +29,7 @@ namespace Extension {
*/
class ParamBool : public Parameter {
public:
-
- /**
- * Use the superclass' allocator and set the \c _value.
- */
- ParamBool(const gchar * name,
- const gchar * text,
- const gchar * description,
- bool hidden,
- int indent,
- Inkscape::Extension::Extension * ext,
- Inkscape::XML::Node * xml);
+ ParamBool(Inkscape::XML::Node *xml, Inkscape::Extension::Extension *ext);
/**
* Returns the current state/value.
@@ -56,13 +46,13 @@ public:
* @param doc A document that should be used to set the value.
* @param node The node where the value may be placed
*/
- bool set(bool in, SPDocument * doc, Inkscape::XML::Node * node);
+ bool set(bool in, SPDocument *doc, Inkscape::XML::Node *node);
/**
* Creates a bool check button for a bool parameter.
* Builds a hbox with a label and a check button in it.
*/
- Gtk::Widget *get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) override;
+ Gtk::Widget *get_widget(SPDocument *doc, Inkscape::XML::Node *node, sigc::signal<void> *changeSignal) override;
// Explicitly call superclass version to avoid method being hidden.
void string(std::list <std::string> &list) const override { return Parameter::string(list); }
@@ -75,7 +65,7 @@ public:
private:
/** Internal value. */
- bool _value;
+ bool _value = true;
};
} // namespace Extension