3 #include <Scenario/Commands/Metadata/ChangeElementColor.hpp>
4 #include <Scenario/Commands/Metadata/ChangeElementComments.hpp>
5 #include <Scenario/Commands/Metadata/ChangeElementLabel.hpp>
6 #include <Scenario/Commands/Metadata/ChangeElementName.hpp>
7 #include <Scenario/Inspector/CommentEdit.hpp>
9 #include <Inspector/InspectorLayout.hpp>
11 #include <score/command/Dispatchers/CommandDispatcher.hpp>
12 #include <score/model/IdentifiedObject.hpp>
13 #include <score/widgets/MarginLess.hpp>
14 #include <score/widgets/TextLabel.hpp>
19 #include <QToolButton>
35 namespace color_widgets
37 class ColorPaletteModel;
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::labelChanged, [&](
const QString& newLabel) {
63 if(newLabel != model.metadata().getLabel())
67 connect(
this, &MetadataWidget::commentsChanged, [&](
const QString& newComments) {
68 if(newComments != model.metadata().getComment())
72 connect(
this, &MetadataWidget::colorChanged, [&](
score::ColorRef newColor) {
73 if(newColor != model.metadata().getColor())
91 void labelChanged(QString arg) W_SIGNAL(labelChanged, arg);
92 void commentsChanged(QString arg) W_SIGNAL(commentsChanged, arg);
94 void extendedMetadataChanged(
const QVariantMap& arg)
95 W_SIGNAL(extendedMetadataChanged, arg);
98 static const constexpr
int m_colorIconSize{21};
104 QLineEdit m_labelLine;
106 color_widgets::Swatch* m_palette_widget;
107 QPixmap m_colorButtonPixmap{4 * m_colorIconSize / 3, 4 * m_colorIconSize / 3};
The CommandDispatcher class.
Definition: CommandDispatcher.hpp:13
Definition: lib/score/widgets/Layout.hpp:41
Definition: ChangeElementColor.hpp:15
Definition: ChangeElementLabel.hpp:14
A small abstraction layer over the score::CommandStack.
Definition: CommandStackFacade.hpp:20
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
A reference to a color. Used for skinning.
Definition: ColorReference.hpp:21