mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-09 01:56:00 -05:00
Add MacroSelection widget
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <QDoubleSpinBox>
|
||||
#include "macro-action-edit.hpp"
|
||||
#include "macro-selection.hpp"
|
||||
|
||||
enum class PauseAction {
|
||||
PAUSE,
|
||||
@@ -45,13 +46,11 @@ public:
|
||||
|
||||
private slots:
|
||||
void MacroChanged(const QString &text);
|
||||
void ActionChanged(int value);
|
||||
void MacroAdd(const QString &name);
|
||||
void MacroRemove(const QString &name);
|
||||
void MacroRename(const QString &oldName, const QString &newName);
|
||||
void ActionChanged(int value);
|
||||
|
||||
protected:
|
||||
QComboBox *_macros;
|
||||
MacroSelection *_macros;
|
||||
QComboBox *_actions;
|
||||
std::shared_ptr<MacroActionPause> _entryData;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "macro.hpp"
|
||||
#include "macro-selection.hpp"
|
||||
#include <QWidget>
|
||||
#include <QSpinBox>
|
||||
#include <QLabel>
|
||||
@@ -49,16 +50,14 @@ public:
|
||||
|
||||
private slots:
|
||||
void MacroChanged(const QString &text);
|
||||
void MacroRemove(const QString &name);
|
||||
void CountChanged(int value);
|
||||
void ConditionChanged(int cond);
|
||||
void MacroAdd(const QString &name);
|
||||
void MacroRemove(const QString &name);
|
||||
void MacroRename(const QString &oldName, const QString &newName);
|
||||
void ResetClicked();
|
||||
void UpdateCount();
|
||||
|
||||
protected:
|
||||
QComboBox *_macros;
|
||||
MacroSelection *_macros;
|
||||
QComboBox *_conditions;
|
||||
QSpinBox *_count;
|
||||
QLabel *_currentCount;
|
||||
|
||||
17
src/headers/macro-selection.hpp
Normal file
17
src/headers/macro-selection.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <QComboBox>
|
||||
|
||||
class Macro;
|
||||
|
||||
class MacroSelection : public QComboBox {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MacroSelection(QWidget *parent);
|
||||
void SetCurrentMacro(Macro *);
|
||||
|
||||
private slots:
|
||||
void MacroAdd(const QString &name);
|
||||
void MacroRemove(const QString &name);
|
||||
void MacroRename(const QString &oldName, const QString &newName);
|
||||
};
|
||||
Reference in New Issue
Block a user