3 #include <widgets/tgbutton.h>
6 #include <QSharedPointer>
18 void deRegisterRadioButton(
RadioButton *radioButton);
21 void onRadioButtonCheckedChanged(
const bool checked);
24 QList<QPointer<RadioButton>> _members;
27 using ExclusiveGroupPointer = QSharedPointer<ExclusiveGroup>;
33 Q_PROPERTY(
bool checked READ checked WRITE setChecked NOTIFY checkedChanged)
34 Q_PROPERTY(
bool autoExclusive READ autoExclusive WRITE setAutoExclusive NOTIFY autoExclusiveChanged)
45 bool autoExclusive()
const;
46 ExclusiveGroupPointer exclusiveGroup()
const;
49 void setChecked(
const bool checked);
50 void setAutoExclusive(
const bool autoExclusive);
53 void checkedChanged(
const bool checked)
const;
54 void autoExclusiveChanged(
const bool autoExclusive)
const;
59 QString radioButtonText()
const;
62 void prepareAutoExclusiveGroup();
65 bool _autoExclusive =
true;
66 ExclusiveGroupPointer _group;