File: macro-action-script-inline.hpp

package info (click to toggle)
obs-advanced-scene-switcher 1.32.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,492 kB
  • sloc: xml: 297,593; cpp: 147,875; python: 387; sh: 280; ansic: 170; makefile: 33
file content (39 lines) | stat: -rw-r--r-- 912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "macro-action-edit.hpp"
#include "macro-segment-script-inline.hpp"

namespace advss {

class MacroActionScriptInline : public MacroAction,
				public MacroSegmentScriptInline {
public:
	MacroActionScriptInline(Macro *m) : MacroAction(m) {}

	bool PerformAction();
	void LogAction() const;

	bool Save(obs_data_t *obj) const;
	bool Load(obs_data_t *obj);

	std::string GetId() const { return _id; };

	static std::shared_ptr<MacroAction> Create(Macro *m);
	std::shared_ptr<MacroAction> Copy() const;

	void ResolveVariablesToFixedValues();

private:
	static bool _registered;
	static const std::string _id;
};

class MacroActionScriptInlineEdit : public MacroSegmentScriptInlineEdit {
	Q_OBJECT

public:
	MacroActionScriptInlineEdit(
		QWidget *, std::shared_ptr<MacroActionScriptInline> = nullptr);
	static QWidget *Create(QWidget *, std::shared_ptr<MacroAction>);
};

} // namespace advss