Showing the changes to interface/src/ui/ScriptEditorWindow.cpp (1 of 2 files). Show all
Unified · Split
| @@ -30,6 +30,7 @@ · 29 unmodified lines | |||
| 30 | #include "Application.h" | 30 | #include "Application.h" |
| 31 | #include "FlowLayout.h" | 31 | #include "FlowLayout.h" |
| 32 | #include "JSConsole.h" | 32 | #include "JSConsole.h" |
| 33 | #include "PathUtils.h" | ||
| 33 | 34 | ||
| 34 | ScriptEditorWindow::ScriptEditorWindow(QWidget* parent) : | 35 | ScriptEditorWindow::ScriptEditorWindow(QWidget* parent) : |
| 35 | QWidget(parent), | 36 | QWidget(parent), |
| @@ -40,6 +41,7 @@ ScriptEditorWindow::ScriptEditorWindow(QWidget* parent) : · 4 unmodified lines | |||
| 40 | setAttribute(Qt::WA_DeleteOnClose); | 41 | setAttribute(Qt::WA_DeleteOnClose); |
| 41 | 42 | ||
| 42 | _ScriptEditorWindowUI->setupUi(this); | 43 | _ScriptEditorWindowUI->setupUi(this); |
| 44 | |||
| 43 | this->setWindowFlags(Qt::Tool); | 45 | this->setWindowFlags(Qt::Tool); |
| 44 | addScriptEditorWidget("New script"); | 46 | addScriptEditorWidget("New script"); |
| 45 | connect(_loadMenu, &QMenu::aboutToShow, this, &ScriptEditorWindow::loadMenuAboutToShow); | 47 | connect(_loadMenu, &QMenu::aboutToShow, this, &ScriptEditorWindow::loadMenuAboutToShow); |
| @@ -54,6 +56,11 @@ ScriptEditorWindow::ScriptEditorWindow(QWidget* parent) : · 8 unmodified lines | |||
| 54 | connect(new QShortcut(QKeySequence("Ctrl+O"), this), &QShortcut::activated, this, &ScriptEditorWindow::loadScriptClicked); | 56 | connect(new QShortcut(QKeySequence("Ctrl+O"), this), &QShortcut::activated, this, &ScriptEditorWindow::loadScriptClicked); |
| 55 | connect(new QShortcut(QKeySequence("F5"), this), &QShortcut::activated, this, &ScriptEditorWindow::toggleRunScriptClicked); | 57 | connect(new QShortcut(QKeySequence("F5"), this), &QShortcut::activated, this, &ScriptEditorWindow::toggleRunScriptClicked); |
| 56 | 58 | ||
| 59 | _ScriptEditorWindowUI->loadButton->setIcon(QIcon(QPixmap(PathUtils::resourcesPath() + "icons/load-script.svg"))); | ||
| 60 | _ScriptEditorWindowUI->newButton->setIcon(QIcon(QPixmap(PathUtils::resourcesPath() + "icons/new-script.svg"))); | ||
| 61 | _ScriptEditorWindowUI->saveButton->setIcon(QIcon(QPixmap(PathUtils::resourcesPath() + "icons/save-script.svg"))); | ||
| 62 | _ScriptEditorWindowUI->toggleRunButton->setIcon(QIcon(QPixmap(PathUtils::resourcesPath() + "icons/start-script.svg"))); | ||
| 63 | |||
| 57 | QWidget* console = new JSConsole(this); | 64 | QWidget* console = new JSConsole(this); |
| 58 | console->setFixedHeight(CONSOLE_HEIGHT); | 65 | console->setFixedHeight(CONSOLE_HEIGHT); |
| 59 | this->layout()->addWidget(console); | 66 | this->layout()->addWidget(console); |