24 lines
699 B
C++
24 lines
699 B
C++
#include "buttonwidget.h"
|
|
|
|
ButtonWidget::ButtonWidget(Effect* parent, const QString& name, const QString& text) :
|
|
EffectRow(parent, nullptr, name, false, false)
|
|
{
|
|
ButtonField* button_field = new ButtonField(this, text);
|
|
|
|
connect(button_field, SIGNAL(CheckedChanged(bool)), this, SIGNAL(CheckedChanged(bool)));
|
|
connect(button_field, SIGNAL(Toggled(bool)), this, SIGNAL(Toggled(bool)));
|
|
connect(this, SLOT(SetChecked(bool)), button_field, SLOT(SetChecked(bool)));
|
|
|
|
AddField(button_field);
|
|
}
|
|
|
|
void ButtonWidget::SetCheckable(bool c)
|
|
{
|
|
static_cast<ButtonField*>(Field(0))->SetCheckable(c);
|
|
}
|
|
|
|
void ButtonWidget::SetChecked(bool c)
|
|
{
|
|
static_cast<ButtonField*>(Field(0))->SetChecked(c);
|
|
}
|