mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -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.
38 lines
782 B
C++
38 lines
782 B
C++
#pragma once
|
|
#include "variable-spinbox.hpp"
|
|
|
|
namespace advss {
|
|
|
|
class Macro;
|
|
|
|
class MacroSegmentSelection : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
enum class Type { CONDITION, ACTION };
|
|
|
|
MacroSegmentSelection(QWidget *parent, Type type,
|
|
bool allowVariables = true);
|
|
void SetMacro(const std::shared_ptr<Macro> ¯o);
|
|
void SetMacro(Macro *macro);
|
|
void SetValue(const IntVariable &value);
|
|
void SetType(const Type &value);
|
|
|
|
private slots:
|
|
void IndexChanged(const NumberVariable<int> &value);
|
|
void MacroSegmentOrderChanged();
|
|
signals:
|
|
void SelectionChanged(const IntVariable &value);
|
|
|
|
private:
|
|
void SetupDescription() const;
|
|
void MarkSelectedSegment();
|
|
|
|
VariableSpinBox *_index;
|
|
QLabel *_description;
|
|
|
|
Type _type;
|
|
Macro *_macro = nullptr;
|
|
};
|
|
|
|
} // namespace advss
|