summaryrefslogtreecommitdiff
path: root/src/modinfodialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modinfodialog.h')
-rw-r--r--src/modinfodialog.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/modinfodialog.h b/src/modinfodialog.h
index 3ce76740..dc04deb3 100644
--- a/src/modinfodialog.h
+++ b/src/modinfodialog.h
@@ -183,16 +183,38 @@ private:
};
+/* Takes a QToolButton and a widget and creates an expandable widget.
+ **/
class ExpanderWidget
{
public:
+ /** empty expander, use set()
+ **/
ExpanderWidget();
+
+ /** see set()
+ **/
ExpanderWidget(QToolButton* button, QWidget* content);
+ /** @brief sets the button and content widgets to use
+ * the button will be given an arrow icon, clicking it will toggle the
+ * visibility of the given widget
+ * @param button the button that toggles the content
+ * @param content the widget that will be shown or hidden
+ * @param opened initial state, defaults to closed
+ **/
void set(QToolButton* button, QWidget* content, bool opened=false);
+ /** either opens or closes the expander depending on the current state
+ **/
void toggle();
+
+ /** sets the current state of the expander
+ **/
void toggle(bool b);
+
+ /** returns whether the expander is currently opened
+ **/
bool opened() const;
private: