aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/preferences/abstractpreferenceswidget.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-09-17 14:04:27 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-30 10:36:49 -0700
commitb35ccc3a3533a3fcf9c7434584470537b6d0001e (patch)
tree8b8b4ebbb7c9e705c430fb5c9d38c40fa6cf386a /desktop-widgets/preferences/abstractpreferenceswidget.cpp
parent225ac07005e72d52b1f70ae88e7033528789fc21 (diff)
downloadsubsurface-b35ccc3a3533a3fcf9c7434584470537b6d0001e.tar.gz
Preferences: start to port preferences to a more sane design
Our preferences dialog right now is a rather huge dialog with more than 9 subpages, and all of those pages are programmed inside of the same class, same methods and all that - which means that if I change something on the dialog I can break any other thing quite easily. The idea of this patch series is to make it harder to break user settings and the settings dialog. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/preferences/abstractpreferenceswidget.cpp')
-rw-r--r--desktop-widgets/preferences/abstractpreferenceswidget.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/desktop-widgets/preferences/abstractpreferenceswidget.cpp b/desktop-widgets/preferences/abstractpreferenceswidget.cpp
new file mode 100644
index 000000000..9334c74ed
--- /dev/null
+++ b/desktop-widgets/preferences/abstractpreferenceswidget.cpp
@@ -0,0 +1,21 @@
+#include "abstractpreferenceswidget.h"
+
+AbstractPreferencesWidget::AbstractPreferencesWidget(const QString& name, const QIcon& icon, float positionHeight)
+: QWidget(), _name(name), _icon(icon), _positionHeight(positionHeight)
+{
+}
+
+QIcon AbstractPreferencesWidget::icon() const
+{
+ return _icon;
+}
+
+QString AbstractPreferencesWidget::name() const
+{
+ return _name;
+}
+
+float AbstractPreferencesWidget::positionHeight() const
+{
+ return _positionHeight;
+}