31 lines
552 B
C
31 lines
552 B
C
|
|
#ifndef TOOLPAGE_H
|
||
|
|
#define TOOLPAGE_H
|
||
|
|
|
||
|
|
#include <QWidget>
|
||
|
|
|
||
|
|
class QFormLayout;
|
||
|
|
class QLabel;
|
||
|
|
class QPushButton;
|
||
|
|
|
||
|
|
|
||
|
|
class ToolPage : public QWidget
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
explicit ToolPage(QWidget *parent = nullptr);
|
||
|
|
~ToolPage();
|
||
|
|
public slots:
|
||
|
|
void addWidget(const QString &title, QWidget *widget);
|
||
|
|
void expand();
|
||
|
|
void collapse();
|
||
|
|
private slots:
|
||
|
|
void onPushButtonFoldClicked();
|
||
|
|
private:
|
||
|
|
|
||
|
|
bool m_bIsExpanded;
|
||
|
|
QLabel *m_pLabel;
|
||
|
|
QPushButton *m_pPushButtonFold;
|
||
|
|
QWidget *m_pContent;
|
||
|
|
};
|
||
|
|
#endif // TOOLPAGE_H
|