mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-15 06:06:44 -05:00
The "core" macro conditions and actions have been extracted out to the "base" plugin. The library now mostly contains functionality which is required across all plugins and (e.g. definitions for macro segments). The goal is to reduce the complexity and cross-dependencies and group the source files in a better way. This should relsove the "library limit of 65535 objects exceeded" build issue occuring in some Windows build environments.
77 lines
2.0 KiB
C++
77 lines
2.0 KiB
C++
#pragma once
|
|
#include "variable-line-edit.hpp"
|
|
|
|
#include <QWidget>
|
|
#include <QDialog>
|
|
#include <QCheckBox>
|
|
#include <QGroupBox>
|
|
#include <QLineEdit>
|
|
#include <QGridLayout>
|
|
#include <obs-data.h>
|
|
|
|
namespace advss {
|
|
|
|
class Macro;
|
|
|
|
class MacroProperties {
|
|
public:
|
|
void Save(obs_data_t *obj) const;
|
|
void Load(obs_data_t *obj);
|
|
|
|
bool _highlightExecuted = false;
|
|
bool _highlightConditions = false;
|
|
bool _highlightActions = false;
|
|
bool _newMacroRegisterHotkeys = true;
|
|
};
|
|
|
|
// Dialog for configuring global and individual macro specific settings
|
|
class MacroPropertiesDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MacroPropertiesDialog(QWidget *parent, const MacroProperties &,
|
|
Macro *macro);
|
|
static bool AskForSettings(QWidget *parent, MacroProperties &userInput,
|
|
Macro *macro);
|
|
private slots:
|
|
void DockEnableChanged(int);
|
|
void RunButtonEnableChanged(int);
|
|
void PauseButtonEnableChanged(int);
|
|
void StatusLabelEnableChanged(int);
|
|
|
|
private:
|
|
void Resize();
|
|
|
|
QCheckBox *_executed;
|
|
QCheckBox *_conditions;
|
|
QCheckBox *_actions;
|
|
QCheckBox *_newMacroRegisterHotkeys;
|
|
// Current macro specific settings
|
|
QCheckBox *_currentMacroRegisterHotkeys;
|
|
QCheckBox *_currentSkipOnStartup;
|
|
QCheckBox *_currentMacroRegisterDock;
|
|
QCheckBox *_currentMacroDockAddRunButton;
|
|
QCheckBox *_currentMacroDockAddPauseButton;
|
|
QCheckBox *_currentMacroDockAddStatusLabel;
|
|
QCheckBox *_currentMacroDockHighlightIfConditionsTrue;
|
|
VariableLineEdit *_runButtonText;
|
|
VariableLineEdit *_pauseButtonText;
|
|
VariableLineEdit *_unpauseButtonText;
|
|
VariableLineEdit *_conditionsTrueStatusText;
|
|
VariableLineEdit *_conditionsFalseStatusText;
|
|
QGroupBox *_dockOptions;
|
|
QGridLayout *_dockLayout;
|
|
|
|
int _runButtonTextRow = -1;
|
|
int _pauseButtonTextRow = -1;
|
|
int _unpauseButtonTextRow = -1;
|
|
int _conditionsTrueTextRow = -1;
|
|
int _conditionsFalseTextRow = -1;
|
|
};
|
|
|
|
MacroProperties &GetGlobalMacroProperties();
|
|
void SaveGlobalMacroProperties(obs_data_t *obj);
|
|
void LoadGlobalMacroProperties(obs_data_t *obj);
|
|
|
|
} // namespace advss
|