implemented #92

This commit is contained in:
itsmattkc
2019-03-15 09:59:31 +11:00
parent 058e5b25c5
commit db22704169
27 changed files with 220 additions and 72 deletions
+2 -2
View File
@@ -13,9 +13,9 @@ QColor ColorField::GetColorAt(double timecode)
return GetValueAt(timecode).value<QColor>();
}
QWidget *ColorField::CreateWidget()
QWidget *ColorField::CreateWidget(QWidget *existing)
{
ColorButton* cb = new ColorButton();
ColorButton* cb = (existing != nullptr) ? static_cast<ColorButton*>(existing) : new ColorButton();
connect(cb, SIGNAL(color_changed(const QColor &)), this, SLOT(UpdateFromWidget(const QColor &)));
connect(this, SIGNAL(EnabledChanged(bool)), cb, SLOT(setEnabled(bool)));