finished moving field data retrieving to row
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#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);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef BUTTONWIDGET_H
|
||||
#define BUTTONWIDGET_H
|
||||
|
||||
#include "effects/effectrow.h"
|
||||
|
||||
class ButtonWidget : public EffectRow
|
||||
{
|
||||
public:
|
||||
ButtonWidget(Effect* parent, const QString& name, const QString& text);
|
||||
|
||||
/**
|
||||
* @brief Wrapper for ButtonField::SetCheckable.
|
||||
*/
|
||||
void SetCheckable(bool c);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @brief Wrapper for ButtonField::SetChecked()
|
||||
*/
|
||||
void SetChecked(bool c);
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief Wrapper for ButtonField::CheckedChanged()
|
||||
*/
|
||||
void CheckedChanged(bool);
|
||||
|
||||
/**
|
||||
* @brief Wrapper for ButtonField::Toggled()
|
||||
*/
|
||||
void Toggled(bool);
|
||||
|
||||
};
|
||||
|
||||
#endif // BUTTONWIDGET_H
|
||||
@@ -0,0 +1,7 @@
|
||||
#include "labelwidget.h"
|
||||
|
||||
LabelWidget::LabelWidget(Effect *parent, const QString &name, const QString &text) :
|
||||
EffectRow(parent, nullptr, name, false, false)
|
||||
{
|
||||
AddField(new LabelField(this, text));
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef LABELWIDGET_H
|
||||
#define LABELWIDGET_H
|
||||
|
||||
#include "effects/effectrow.h"
|
||||
|
||||
class LabelWidget : public EffectRow
|
||||
{
|
||||
public:
|
||||
LabelWidget(Effect* parent, const QString& name, const QString& text);
|
||||
};
|
||||
|
||||
#endif // LABELWIDGET_H
|
||||
Reference in New Issue
Block a user