scripts.hpp 979 B

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