13 #ifndef __SCRIPTENTRY_H__ 14 #define __SCRIPTENTRY_H__ 36 static QString
entryTemplate(
const char* entryType) {
return QString(
"%1 %2").arg(entryType); }
42 static std::unique_ptr<ScriptEntry>
deserialize(
const QString& line);
57 static std::unique_ptr<ScriptEntry>
deserialize(
const QStringList& tokens);
80 std::vector<std::pair<Pid, QString>>
_props;
81 static const std::initializer_list<Pid>
_pids;
89 static std::unique_ptr<ScriptEntry>
deserialize(
const QStringList& tokens);
104 : _type(type), _parentLevel(parentLevel), _pid(pid), _val(std::move(value)) {}
107 static std::unique_ptr<ScriptEntry> fromContext(
const Element*,
const InspectorItem&,
const QVariant&);
108 static std::unique_ptr<ScriptEntry>
deserialize(
const QStringList& tokens);
123 static std::unique_ptr<ScriptEntry> fromContext(
const ScriptContext&);
124 static std::unique_ptr<ScriptEntry>
deserialize(
const QStringList& tokens);
static std::unique_ptr< ScriptEntry > deserialize(const QString &line)
Definition: scriptentry.cpp:37
CommandScriptEntry(const QByteArray &cmd)
Definition: scriptentry.h:67
Pid
Definition: property.h:62
static constexpr const char * SCRIPT_EXCERPT_CHANGE
Definition: scriptentry.h:33
InspectorScriptEntry(ElementType type, int parentLevel, Pid pid, QVariant value)
Definition: scriptentry.h:103
CommandScriptEntry(const char *cmd)
Definition: scriptentry.h:69
static constexpr const char * SCRIPT_INSPECTOR
Definition: scriptentry.h:32
Base class of score layout elements.
Definition: element.h:158
Represents switching between excerpt tabs.
Definition: scriptentry.h:116
virtual bool execute(ScriptContext &ctx) const =0
static QString entryTemplate(const char *entryType)
Definition: scriptentry.h:36
Definition: scriptentry.h:78
virtual ~ScriptEntry()=default
Definition: inspectorBase.h:37
QByteArray _command
Definition: scriptentry.h:65
ElementType _type
Definition: scriptentry.h:79
static constexpr const char * SCRIPT_TEST
Definition: scriptentry.h:34
QString serialize() const override
Definition: scriptentry.h:71
int _parentLevel
Definition: scriptentry.h:98
static constexpr const char * SCRIPT_CMD
Definition: scriptentry.h:30
Definition: scriptentry.h:96
InitScriptEntry(const QString &filePath)
Definition: scriptentry.h:54
ElementType _type
Definition: scriptentry.h:97
std::vector< std::pair< Pid, QString > > _props
Definition: scriptentry.h:80
Definition: aeolus.cpp:26
static constexpr const char * SCRIPT_INIT
Definition: scriptentry.h:29
Definition: scriptentry.h:50
PaletteElementScriptEntry(ElementType type, std::vector< std::pair< Pid, QString >> &&props)
Definition: scriptentry.h:83
int _index
Definition: scriptentry.h:117
QVariant _val
Definition: scriptentry.h:100
ExcerptChangeScriptEntry(int idx)
Definition: scriptentry.h:120
Definition: scriptentry.h:64
Pid _pid
Definition: scriptentry.h:99
ElementType
Definition: types.h:34
static const std::initializer_list< Pid > _pids
Definition: scriptentry.h:81
static constexpr const char * SCRIPT_PALETTE
Definition: scriptentry.h:31
Definition: scriptentry.h:27
CommandScriptEntry(const QString &cmd)
Definition: scriptentry.h:68
virtual QString serialize() const =0
QString _filePath
Definition: scriptentry.h:51