mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-26 00:01:13 -05:00
Add button to manually run macro actions
This commit is contained in:
parent
eafad7fe7f
commit
9dd47b811b
|
|
@ -66,6 +66,7 @@ AdvSceneSwitcher.macroTab.edit.condition="Condition type:"
|
||||||
AdvSceneSwitcher.macroTab.edit.action="Action type:"
|
AdvSceneSwitcher.macroTab.edit.action="Action type:"
|
||||||
AdvSceneSwitcher.macroTab.add="Add new macro"
|
AdvSceneSwitcher.macroTab.add="Add new macro"
|
||||||
AdvSceneSwitcher.macroTab.name="Name:"
|
AdvSceneSwitcher.macroTab.name="Name:"
|
||||||
|
AdvSceneSwitcher.macroTab.run="Run macro"
|
||||||
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
||||||
AdvSceneSwitcher.macroTab.exists="Macro name exists already"
|
AdvSceneSwitcher.macroTab.exists="Macro name exists already"
|
||||||
AdvSceneSwitcher.macroTab.copy="Create copy"
|
AdvSceneSwitcher.macroTab.copy="Create copy"
|
||||||
|
|
|
||||||
|
|
@ -722,7 +722,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_34">
|
<layout class="QVBoxLayout" name="verticalLayout_34">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_18" stretch="0,0,0">
|
<layout class="QHBoxLayout" name="horizontalLayout_18" stretch="0,0,0,0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_20">
|
<widget class="QLabel" name="label_20">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -733,6 +733,13 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="macroName"/>
|
<widget class="QLineEdit" name="macroName"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="runMacro">
|
||||||
|
<property name="text">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.run</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_13">
|
<spacer name="horizontalSpacer_13">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
@ -763,7 +770,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>767</width>
|
<width>767</width>
|
||||||
<height>220</height>
|
<height>218</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_35" stretch="10,1">
|
<layout class="QVBoxLayout" name="verticalLayout_35" stretch="10,1">
|
||||||
|
|
@ -862,7 +869,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>767</width>
|
<width>767</width>
|
||||||
<height>219</height>
|
<height>218</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_33" stretch="10,1">
|
<layout class="QVBoxLayout" name="verticalLayout_33" stretch="10,1">
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ public slots:
|
||||||
void on_macroUp_clicked();
|
void on_macroUp_clicked();
|
||||||
void on_macroDown_clicked();
|
void on_macroDown_clicked();
|
||||||
void on_macroName_editingFinished();
|
void on_macroName_editingFinished();
|
||||||
|
void on_runMacro_clicked();
|
||||||
void on_macros_currentRowChanged(int idx);
|
void on_macros_currentRowChanged(int idx);
|
||||||
void on_macros_itemChanged(QListWidgetItem *);
|
void on_macros_itemChanged(QListWidgetItem *);
|
||||||
void on_conditionAdd_clicked();
|
void on_conditionAdd_clicked();
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,16 @@ void AdvSceneSwitcher::on_macroName_editingFinished()
|
||||||
emit MacroRenamed(oldName, newName);
|
emit MacroRenamed(oldName, newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AdvSceneSwitcher::on_runMacro_clicked()
|
||||||
|
{
|
||||||
|
Macro *macro = getSelectedMacro();
|
||||||
|
if (!macro) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
macro->PerformAction();
|
||||||
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::PopulateMacroActions(Macro &m, uint32_t afterIdx)
|
void AdvSceneSwitcher::PopulateMacroActions(Macro &m, uint32_t afterIdx)
|
||||||
{
|
{
|
||||||
auto &actions = m.Actions();
|
auto &actions = m.Actions();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user