16 #include "src/ldrawalgorithm.h" |
16 #include "src/ldrawalgorithm.h" |
17 #include "src/messagelog.h" |
17 #include "src/messagelog.h" |
18 #include "src/settings.h" |
18 #include "src/settings.h" |
19 #include "src/settingseditor/settingseditor.h" |
19 #include "src/settingseditor/settingseditor.h" |
20 #include "src/ui/circletooloptionswidget.h" |
20 #include "src/ui/circletooloptionswidget.h" |
21 #include "src/ui/objecteditor.h" |
|
22 #include "src/version.h" |
21 #include "src/version.h" |
23 #include "src/widgets/colorselectdialog.h" |
22 #include "src/widgets/colorselectdialog.h" |
24 #include "src/parser.h" |
23 #include "src/parser.h" |
25 #include <GL/glew.h> |
24 #include <GL/glew.h> |
26 |
25 |
296 } editingModesInfo[] = { |
294 } editingModesInfo[] = { |
297 { |
295 { |
298 .name = QObject::tr("Select"), |
296 .name = QObject::tr("Select"), |
299 .tooltip = QObject::tr("Select elements from the model."), |
297 .tooltip = QObject::tr("Select elements from the model."), |
300 .icon = {":/icons/navigate-outline.png"}, |
298 .icon = {":/icons/navigate-outline.png"}, |
301 .widget = toolWidgets->objectEditor, |
299 .widget = nullptr, |
302 }, |
300 }, |
303 { |
301 { |
304 .name = QObject::tr("Draw"), |
302 .name = QObject::tr("Draw"), |
305 .tooltip = QObject::tr("Draw new elements into the model."), |
303 .tooltip = QObject::tr("Draw new elements into the model."), |
306 .icon = {":/icons/pencil-outline.png"}, |
304 .icon = {":/icons/pencil-outline.png"}, |
438 MessageLog messageLog; |
436 MessageLog messageLog; |
439 Signal settingsChanged; |
437 Signal settingsChanged; |
440 ui.setupUi(&mainWindow); |
438 ui.setupUi(&mainWindow); |
441 ToolWidgets toolWidgets{ |
439 ToolWidgets toolWidgets{ |
442 .circleToolOptions = new CircleToolOptionsWidget{&mainWindow}, |
440 .circleToolOptions = new CircleToolOptionsWidget{&mainWindow}, |
443 .objectEditor = new ObjectEditor{&mainWindow}, |
|
444 }; |
441 }; |
445 const auto updateTitle = [&ui, &mainWindow]{ |
442 const auto updateTitle = [&ui, &mainWindow]{ |
446 mainWindow.setWindowTitle(title(&ui)); |
443 mainWindow.setWindowTitle(title(&ui)); |
447 }; |
444 }; |
448 const uiutilities::KeySequenceMap defaultKeyboardShortcuts = |
445 const uiutilities::KeySequenceMap defaultKeyboardShortcuts = |