qt/LedOK/base/extendedgroupbox.h
2022-08-25 18:37:24 +08:00

33 lines
604 B
C++

#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