36 lines
710 B
C++
36 lines
710 B
C++
#ifndef EXTENDED_GROUP_BOX_H_
|
|
#define EXTENDED_GROUP_BOX_H_
|
|
|
|
#include <QGroupBox>
|
|
#include <QVector>
|
|
#pragma execution_character_set("utf-8")
|
|
class ExtendedGroupBox : public QGroupBox
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum State
|
|
{
|
|
STATE_NORMAL,
|
|
STATE_EXPAND
|
|
};
|
|
|
|
public:
|
|
ExtendedGroupBox(QWidget* parent = nullptr, State state = STATE_NORMAL);
|
|
ExtendedGroupBox(const QString& title, QWidget* parent = nullptr, State state = STATE_NORMAL);
|
|
|
|
private Q_SLOTS:
|
|
void onChecked(bool checked);
|
|
|
|
public:
|
|
void addWidget(QWidget* widget);
|
|
State getState() const;
|
|
QString m_tittle;
|
|
|
|
private:
|
|
QVector<QWidget*> children_;
|
|
State state_;
|
|
};
|
|
|
|
|
|
#endif//EXTENDED_GROUP_BOX_H_
|