12 : qWidget(new QWidget)
13 , qCheckBox(new QCheckBox)
17 qCheckBox->setProperty(
"type",
"nlmItem");
22 QObject::connect(qCheckBox, &QCheckBox::toggled, cb);
32 return qCheckBox->isChecked();
37 qLayout =
new QHBoxLayout(qWidget);
38 qLayout->addWidget(qCheckBox);
39 qLayout->setAlignment(Qt::AlignCenter);
40 qLayout->setContentsMargins(0, 0, 0, 0);
41 qWidget->setLayout(qLayout);
46 if (qCheckBox->isChecked() != state) {
47 qCheckBox->setChecked(state);
48 emit qCheckBox->released();
54 qCheckBox->setDisabled(state);
Definition checkboxinterface.h:7
std::function< void(bool)> toggled_t
Definition checkboxinterface.h:12
Definition nlmcheckbox.h:9
NLMCheckBox()
Definition nlmcheckbox.h:11
bool getState() override
Definition nlmcheckbox.h:30
QWidget * mainWidget() override
Definition nlmcheckbox.h:25
void init()
Definition nlmcheckbox.h:35
void setState(bool state) override
Definition nlmcheckbox.h:44
void setDisabled(bool state) override
Definition nlmcheckbox.h:52
void toggledCbk(const toggled_t &cb) override
Definition nlmcheckbox.h:20