From 9c59c739d4ef9a4479ac849badc998b200fddb13 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Wed, 11 Sep 2019 23:32:32 -0400 Subject: moved ExpanderWidget to uibase --- src/expanderwidget.h | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/expanderwidget.h (limited to 'src/expanderwidget.h') diff --git a/src/expanderwidget.h b/src/expanderwidget.h deleted file mode 100644 index 99b2d303..00000000 --- a/src/expanderwidget.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef EXPANDERWIDGET_H -#define EXPANDERWIDGET_H - -#include - -/* 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; - - QByteArray saveState() const; - void restoreState(const QByteArray& a); - - QToolButton* button() const; - -private: - QToolButton* m_button; - QWidget* m_content; - bool opened_; -}; - -#endif // EXPANDERWIDGET_H -- cgit v1.3.1