2019-04-01 02:10:25 -05:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-25 14:11:19 -08:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class Ui_ScriptsTool;
|
|
|
|
|
|
|
|
class ScriptLogWindow : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QString lines;
|
|
|
|
bool bottomScrolled = true;
|
|
|
|
|
|
|
|
void resizeEvent(QResizeEvent *event) override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ScriptLogWindow();
|
|
|
|
~ScriptLogWindow();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void AddLogMsg(int log_level, QString msg);
|
2018-01-18 14:42:24 -08:00
|
|
|
void ClearWindow();
|
2017-12-25 14:11:19 -08:00
|
|
|
void Clear();
|
|
|
|
void ScrollChanged(int val);
|
|
|
|
};
|
|
|
|
|
|
|
|
class ScriptsTool : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
Ui_ScriptsTool *ui;
|
|
|
|
QWidget *propertiesView = nullptr;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ScriptsTool();
|
|
|
|
~ScriptsTool();
|
|
|
|
|
|
|
|
void RemoveScript(const char *path);
|
|
|
|
void ReloadScript(const char *path);
|
|
|
|
void RefreshLists();
|
2020-05-10 04:35:25 -05:00
|
|
|
void SetScriptDefaults(const char *path);
|
2017-12-25 14:11:19 -08:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void on_close_clicked();
|
|
|
|
|
|
|
|
void on_addScripts_clicked();
|
|
|
|
void on_removeScripts_clicked();
|
|
|
|
void on_reloadScripts_clicked();
|
2020-04-22 14:01:18 +02:00
|
|
|
void on_editScript_clicked();
|
2017-12-25 14:11:19 -08:00
|
|
|
void on_scriptLog_clicked();
|
2020-05-10 04:35:25 -05:00
|
|
|
void on_defaults_clicked();
|
2017-12-25 14:11:19 -08:00
|
|
|
|
2020-07-30 23:09:34 +10:00
|
|
|
void OpenScriptParentDirectory();
|
|
|
|
|
2017-12-25 14:11:19 -08:00
|
|
|
void on_scripts_currentRowChanged(int row);
|
|
|
|
|
|
|
|
void on_pythonPathBrowse_clicked();
|
2020-07-09 20:49:14 +10:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_description_linkActivated(const QString &link);
|
2020-07-30 23:07:36 +10:00
|
|
|
void on_scripts_customContextMenuRequested(const QPoint &pos);
|
2017-12-25 14:11:19 -08:00
|
|
|
};
|