summaryrefslogtreecommitdiff
path: root/src/gui/setuptab.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/setuptab.h')
-rw-r--r--src/gui/setuptab.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/gui/setuptab.h b/src/gui/setuptab.h
index c4f9f1dd..7b92e2fe 100644
--- a/src/gui/setuptab.h
+++ b/src/gui/setuptab.h
@@ -24,11 +24,39 @@
#include "gui/widgets/gccontainer.h"
+#include <string>
+
+/**
+ * A container for the contents of a tab in the setup window.
+ */
class SetupTab : public GCContainer
{
- public:
- virtual void apply() = 0;
- virtual void cancel() = 0;
+public:
+ SetupTab();
+
+ const std::string &getName() const
+ { return mName; }
+
+ /**
+ * Called when the Apply button is pressed in the setup window.
+ */
+ virtual void apply() = 0;
+
+ /**
+ * Called when the Cancel button is pressed in the setup window.
+ */
+ virtual void cancel() = 0;
+
+protected:
+ /**
+ * Sets the name displayed on the tab. Should be set in the
+ * constructor of a subclass.
+ */
+ void setName(const std::string &name)
+ { mName = name; }
+
+private:
+ std::string mName;
};
#endif