scripts.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #pragma once
  2. #include <QWidget>
  3. #include <QString>
  4. #include <memory>
  5. class Ui_ScriptsTool;
  6. class ScriptLogWindow : public QWidget {
  7. Q_OBJECT
  8. QString lines;
  9. bool bottomScrolled = true;
  10. void resizeEvent(QResizeEvent *event) override;
  11. public:
  12. ScriptLogWindow();
  13. ~ScriptLogWindow();
  14. public slots:
  15. void AddLogMsg(int log_level, QString msg);
  16. void ClearWindow();
  17. void Clear();
  18. void ScrollChanged(int val);
  19. };
  20. class ScriptsTool : public QWidget {
  21. Q_OBJECT
  22. std::unique_ptr<Ui_ScriptsTool> ui;
  23. QWidget *propertiesView = nullptr;
  24. public:
  25. ScriptsTool();
  26. ~ScriptsTool();
  27. void RemoveScript(const char *path);
  28. void ReloadScript(const char *path);
  29. void RefreshLists();
  30. void SetScriptDefaults(const char *path);
  31. public slots:
  32. void on_close_clicked();
  33. void on_addScripts_clicked();
  34. void on_removeScripts_clicked();
  35. void on_reloadScripts_clicked();
  36. void on_editScript_clicked();
  37. void on_scriptLog_clicked();
  38. void on_defaults_clicked();
  39. void OpenScriptParentDirectory();
  40. void on_scripts_currentRowChanged(int row);
  41. void on_pythonPathBrowse_clicked();
  42. private slots:
  43. void on_description_linkActivated(const QString &link);
  44. void on_scripts_customContextMenuRequested(const QPoint &pos);
  45. };