53 const QObject* docObject, QWidget* parent =
nullptr);
58 void setupConnections(
const T& model)
60 using namespace Scenario::Command;
61 using namespace score::IDocument;
62 connect(
this, &MetadataWidget::scriptingNameChanged, [&](
const QString& name) {
63 if(!name.isEmpty() && name != model.metadata().getName())
67 connect(
this, &MetadataWidget::labelChanged, [&](
const QString& newLabel) {
68 if(newLabel != model.metadata().getLabel())
72 connect(
this, &MetadataWidget::commentsChanged, [&](
const QString& newComments) {
73 if(newComments != model.metadata().getComment())
77 connect(
this, &MetadataWidget::colorChanged, [&](
score::ColorRef newColor) {
78 if(newColor != model.metadata().getColor())
96 void scriptingNameChanged(QString arg) W_SIGNAL(scriptingNameChanged, arg);
97 void labelChanged(QString arg) W_SIGNAL(labelChanged, arg);
98 void commentsChanged(QString arg) W_SIGNAL(commentsChanged, arg);
100 void extendedMetadataChanged(
const QVariantMap& arg)
101 W_SIGNAL(extendedMetadataChanged, arg);
104 static const constexpr int m_colorIconSize{21};
110 QLineEdit m_nameLine;
111 QLineEdit m_labelLine;
113 color_widgets::Swatch* m_palette_widget;
114 QPixmap m_colorButtonPixmap{4 * m_colorIconSize / 3, 4 * m_colorIconSize / 3};