qt/LedOK/base/extendedgroupbox.h

33 lines
604 B
C
Raw Normal View History

2022-01-04 18:11:48 +08:00
#ifndef EXTENDEDGROUPBOX_H
#define EXTENDEDGROUPBOX_H
#include <QGroupBox>
#include <QVector>
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;
private:
State state_;
};
#endif // EXTENDEDGROUPBOX_H