mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-30 05:06:14 -05:00
Compare commits
3 Commits
nested-que
...
lind-clean
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
189fa5c314 | ||
|
|
393d70be33 | ||
|
|
422c1a39cb |
@@ -157,13 +157,11 @@ AdvSceneSwitcher.mqttConnectionTab.removeMultipleConnectionsPopup.text="Are you
|
|||||||
|
|
||||||
# Macro Tab
|
# Macro Tab
|
||||||
AdvSceneSwitcher.macroTab.title="Macro"
|
AdvSceneSwitcher.macroTab.title="Macro"
|
||||||
AdvSceneSwitcher.macroTab.macros="Macros"
|
|
||||||
AdvSceneSwitcher.macroTab.priorityWarning="Note: It is recommended to configure macros to be the highest priority functionality.\nThis setting can be changed on the General tab."
|
AdvSceneSwitcher.macroTab.priorityWarning="Note: It is recommended to configure macros to be the highest priority functionality.\nThis setting can be changed on the General tab."
|
||||||
AdvSceneSwitcher.macroTab.help="Macros allow you to execute a string of actions depending on multiple conditions.\n\nClick on the highlighted plus symbol to add a new Macro."
|
AdvSceneSwitcher.macroTab.help="Macros allow you to execute a string of actions depending on multiple conditions.\n\nClick on the highlighted plus symbol to add a new Macro."
|
||||||
AdvSceneSwitcher.macroTab.editConditionHelp="This section allows you to define macro conditions.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new condition."
|
AdvSceneSwitcher.macroTab.editConditionHelp="This section allows you to define macro conditions.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new condition."
|
||||||
AdvSceneSwitcher.macroTab.editActionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are met.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new action."
|
AdvSceneSwitcher.macroTab.editActionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are met.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new action."
|
||||||
AdvSceneSwitcher.macroTab.editElseActionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are *not* met.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new action."
|
AdvSceneSwitcher.macroTab.editElseActionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are *not* met.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new action."
|
||||||
AdvSceneSwitcher.macroTab.edit="Edit macro"
|
|
||||||
AdvSceneSwitcher.macroTab.edit.logic="Logic type:"
|
AdvSceneSwitcher.macroTab.edit.logic="Logic type:"
|
||||||
AdvSceneSwitcher.macroTab.edit.condition="Condition type:"
|
AdvSceneSwitcher.macroTab.edit.condition="Condition type:"
|
||||||
AdvSceneSwitcher.macroTab.edit.action="Action type:"
|
AdvSceneSwitcher.macroTab.edit.action="Action type:"
|
||||||
|
|||||||
@@ -68,10 +68,22 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>962</width>
|
<width>962</width>
|
||||||
<height>1160</height>
|
<height>1142</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_19">
|
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="statusBox">
|
<widget class="QGroupBox" name="statusBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -590,11 +602,8 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QGroupBox" name="groupBox_5">
|
<widget class="QWidget" name="wrapper">
|
||||||
<property name="title">
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
<string>AdvSceneSwitcher.macroTab.macros</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_36">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="macroPriorityWarning">
|
<widget class="QLabel" name="macroPriorityWarning">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -677,66 +686,34 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="macroControlLayout">
|
<widget class="QToolBar" name="macrosToolbar">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<widget class="QToolButton" name="macroAdd">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<property name="toolTip">
|
<horstretch>0</horstretch>
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.macroAddButton</string>
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="themeID" stdset="0">
|
<property name="iconSize">
|
||||||
<string notr="true">addIconSmall</string>
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="class" stdset="0">
|
<property name="floatable">
|
||||||
<string notr="true">icon-plus</string>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="macroAdd"/>
|
||||||
|
<addaction name="macroRemove"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="macroUp"/>
|
||||||
|
<addaction name="macroDown"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="macroRemove">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.macroRemoveButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">removeIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-trash</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="macroUp">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.macroUpButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">upArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-up</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="macroDown">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.macroDownButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">downArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-down</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="macroEditGroup">
|
<widget class="QGroupBox" name="macroEditGroup">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>AdvSceneSwitcher.macroTab.edit</string>
|
<string>AdvSceneSwitcher.macroTab.title</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_38">
|
<layout class="QVBoxLayout" name="verticalLayout_38">
|
||||||
<item>
|
<item>
|
||||||
@@ -4045,6 +4022,78 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
<action name="macroAdd">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>:/res/images/plus.svg</normaloff>:/res/images/plus.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.macroAddButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-plus</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">addIconSmall</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="macroRemove">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>:/res/images/minus.svg</normaloff>:/res/images/minus.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Remove</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.macroRemoveButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Del</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcutContext">
|
||||||
|
<enum>Qt::WidgetWithChildrenShortcut</enum>
|
||||||
|
</property>
|
||||||
|
<property name="iconVisibleInMenu">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-trash</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="macroUp">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>:/res/images/up.svg</normaloff>:/res/images/up.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>MoveUp</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.macroUpButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-up</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="macroDown">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>:/res/images/down.svg</normaloff>:/res/images/down.svg</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>MoveDown</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.macroDownButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-down</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
@@ -4110,11 +4159,6 @@
|
|||||||
<tabstop>priorityUp</tabstop>
|
<tabstop>priorityUp</tabstop>
|
||||||
<tabstop>priorityDown</tabstop>
|
<tabstop>priorityDown</tabstop>
|
||||||
<tabstop>threadPriority</tabstop>
|
<tabstop>threadPriority</tabstop>
|
||||||
<tabstop>macros</tabstop>
|
|
||||||
<tabstop>macroAdd</tabstop>
|
|
||||||
<tabstop>macroRemove</tabstop>
|
|
||||||
<tabstop>macroUp</tabstop>
|
|
||||||
<tabstop>macroDown</tabstop>
|
|
||||||
<tabstop>macroName</tabstop>
|
<tabstop>macroName</tabstop>
|
||||||
<tabstop>runMacro</tabstop>
|
<tabstop>runMacro</tabstop>
|
||||||
<tabstop>runMacroInParallel</tabstop>
|
<tabstop>runMacroInParallel</tabstop>
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ public:
|
|||||||
void HighlightMacroSettingsButton(bool enable = true);
|
void HighlightMacroSettingsButton(bool enable = true);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void on_macroAdd_clicked();
|
void on_macroAdd_triggered();
|
||||||
void on_macroRemove_clicked();
|
void on_macroRemove_triggered();
|
||||||
void on_macroUp_clicked() const;
|
void on_macroUp_triggered() const;
|
||||||
void on_macroDown_clicked() const;
|
void on_macroDown_triggered() const;
|
||||||
void on_macroName_editingFinished();
|
void on_macroName_editingFinished();
|
||||||
void on_runMacroInParallel_stateChanged(int value) const;
|
void on_runMacroInParallel_stateChanged(int value) const;
|
||||||
void on_runMacroOnChange_stateChanged(int value) const;
|
void on_runMacroOnChange_stateChanged(int value) const;
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ bool AdvSceneSwitcher::AddNewMacro(std::shared_ptr<Macro> &res,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_macroAdd_clicked()
|
void AdvSceneSwitcher::on_macroAdd_triggered()
|
||||||
{
|
{
|
||||||
// Hotkey to add new macro will also use this function.
|
// Hotkey to add new macro will also use this function.
|
||||||
// Since we don't want the hotkey to have an effect if the macro tab is
|
// Since we don't want the hotkey to have an effect if the macro tab is
|
||||||
@@ -247,12 +247,12 @@ void AdvSceneSwitcher::RenameMacro(std::shared_ptr<Macro> ¯o,
|
|||||||
MacroSignalManager::Instance()->Rename(oldName, name);
|
MacroSignalManager::Instance()->Rename(oldName, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_macroRemove_clicked()
|
void AdvSceneSwitcher::on_macroRemove_triggered()
|
||||||
{
|
{
|
||||||
RemoveSelectedMacros();
|
RemoveSelectedMacros();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_macroUp_clicked() const
|
void AdvSceneSwitcher::on_macroUp_triggered() const
|
||||||
{
|
{
|
||||||
auto macro = GetSelectedMacro();
|
auto macro = GetSelectedMacro();
|
||||||
if (!macro) {
|
if (!macro) {
|
||||||
@@ -261,7 +261,7 @@ void AdvSceneSwitcher::on_macroUp_clicked() const
|
|||||||
ui->macros->Up(macro);
|
ui->macros->Up(macro);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_macroDown_clicked() const
|
void AdvSceneSwitcher::on_macroDown_triggered() const
|
||||||
{
|
{
|
||||||
auto macro = GetSelectedMacro();
|
auto macro = GetSelectedMacro();
|
||||||
if (!macro) {
|
if (!macro) {
|
||||||
@@ -632,13 +632,11 @@ void AdvSceneSwitcher::SetupMacroTab()
|
|||||||
auto ¯os = GetTopLevelMacros();
|
auto ¯os = GetTopLevelMacros();
|
||||||
|
|
||||||
if (macros.size() == 0 && !switcher->disableHints) {
|
if (macros.size() == 0 && !switcher->disableHints) {
|
||||||
addPulse = HighlightWidget(ui->macroAdd, QColor(Qt::green));
|
addPulse = HighlightWidget(
|
||||||
|
ui->macrosToolbar->widgetForAction(ui->macroAdd),
|
||||||
|
QColor(Qt::green));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto macroControls = setupToolBar({{ui->macroAdd, ui->macroRemove},
|
|
||||||
{ui->macroUp, ui->macroDown}});
|
|
||||||
ui->macroControlLayout->addWidget(macroControls);
|
|
||||||
|
|
||||||
ui->macros->Reset(macros, GetGlobalMacroSettings()._highlightExecuted);
|
ui->macros->Reset(macros, GetGlobalMacroSettings()._highlightExecuted);
|
||||||
connect(ui->macros, SIGNAL(MacroSelectionChanged()), this,
|
connect(ui->macros, SIGNAL(MacroSelectionChanged()), this,
|
||||||
SLOT(MacroSelectionChanged()));
|
SLOT(MacroSelectionChanged()));
|
||||||
@@ -683,7 +681,7 @@ void AdvSceneSwitcher::ShowMacroContextMenu(const QPoint &pos)
|
|||||||
|
|
||||||
menu.addAction(
|
menu.addAction(
|
||||||
obs_module_text("AdvSceneSwitcher.macroTab.contextMenuAdd"),
|
obs_module_text("AdvSceneSwitcher.macroTab.contextMenuAdd"),
|
||||||
this, &AdvSceneSwitcher::on_macroAdd_clicked);
|
this, &AdvSceneSwitcher::on_macroAdd_triggered);
|
||||||
|
|
||||||
auto copy = menu.addAction(
|
auto copy = menu.addAction(
|
||||||
obs_module_text("AdvSceneSwitcher.macroTab.copy"), this,
|
obs_module_text("AdvSceneSwitcher.macroTab.copy"), this,
|
||||||
@@ -699,7 +697,7 @@ void AdvSceneSwitcher::ShowMacroContextMenu(const QPoint &pos)
|
|||||||
|
|
||||||
auto remove = menu.addAction(
|
auto remove = menu.addAction(
|
||||||
obs_module_text("AdvSceneSwitcher.macroTab.remove"), this,
|
obs_module_text("AdvSceneSwitcher.macroTab.remove"), this,
|
||||||
&AdvSceneSwitcher::on_macroRemove_clicked);
|
&AdvSceneSwitcher::on_macroRemove_triggered);
|
||||||
remove->setDisabled(ui->macros->SelectionEmpty());
|
remove->setDisabled(ui->macros->SelectionEmpty());
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ ResourceTable::ResourceTable(QWidget *parent, const QString &help,
|
|||||||
auto layout = new QVBoxLayout();
|
auto layout = new QVBoxLayout();
|
||||||
layout->addLayout(helpAndTableLayout);
|
layout->addLayout(helpAndTableLayout);
|
||||||
layout->addLayout(controlLayout);
|
layout->addLayout(controlLayout);
|
||||||
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
QWidget::connect(_add, SIGNAL(clicked()), this, SLOT(Add()));
|
QWidget::connect(_add, SIGNAL(clicked()), this, SLOT(Add()));
|
||||||
|
|||||||
Reference in New Issue
Block a user