#pragma once #include "macro-action-edit.hpp" #include #include class MacroActionRun : public MacroAction { public: bool PerformAction(); void LogAction(); bool Save(obs_data_t *obj); bool Load(obs_data_t *obj); std::string GetId() { return id; }; static std::shared_ptr Create() { return std::make_shared(); } std::string _path = obs_module_text("AdvSceneSwitcher.enterPath"); private: static bool _registered; static const std::string id; }; class MacroActionRunEdit : public QWidget { Q_OBJECT public: MacroActionRunEdit(QWidget *parent, std::shared_ptr entryData = nullptr); void UpdateEntryData(); static QWidget *Create(QWidget *parent, std::shared_ptr action) { return new MacroActionRunEdit( parent, std::dynamic_pointer_cast(action)); } private slots: void FilePathChanged(); void BrowseButtonClicked(); protected: std::shared_ptr _entryData; private: QLineEdit *_filePath; QPushButton *_browseButton; bool _loading = true; };