Changeset View
Changeset View
Standalone View
Standalone View
src/mainwindow.cpp
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Line(s) | 152 | } else { | |||
---|---|---|---|---|---|
153 | m_lateral.m_stack->setHidden(false); | 153 | m_lateral.m_stack->setHidden(false); | ||
154 | m_lateral.m_stack->setCurrentWidget(w); | 154 | m_lateral.m_stack->setCurrentWidget(w); | ||
155 | } | 155 | } | ||
156 | }); | 156 | }); | ||
157 | }; | 157 | }; | ||
158 | 158 | | |||
159 | auto *gcodeEditor = new GCodeEditorWidget(this); | 159 | auto *gcodeEditor = new GCodeEditorWidget(this); | ||
160 | connect(gcodeEditor, &GCodeEditorWidget::updateClientFactory, this, [this](KTextEditor::View* view){ | 160 | connect(gcodeEditor, &GCodeEditorWidget::updateClientFactory, this, [this](KTextEditor::View* view){ | ||
161 | guiFactory()->removeClient(m_currEditorView); | | |||
162 | guiFactory()->addClient(view); | 161 | guiFactory()->addClient(view); | ||
163 | m_currEditorView = view; | | |||
164 | }); | 162 | }); | ||
163 | | ||||
165 | setupButton("3d", i18n("&3D"), QIcon::fromTheme("draw-cuboid", QIcon(QString(":/%1/3d").arg(m_theme))), new Viewer3D(this)); | 164 | setupButton("3d", i18n("&3D"), QIcon::fromTheme("draw-cuboid", QIcon(QString(":/%1/3d").arg(m_theme))), new Viewer3D(this)); | ||
166 | setupButton("gcode", i18n("&GCode"), QIcon::fromTheme("accessories-text-editor", QIcon(":/icon/edit")), gcodeEditor); | 165 | setupButton("gcode", i18n("&GCode"), QIcon::fromTheme("accessories-text-editor", QIcon(":/icon/edit")), gcodeEditor); | ||
167 | setupButton("video", i18n("&Video"), QIcon::fromTheme("camera-web", QIcon(":/icon/video")), new VideoMonitorWidget(this)); | 166 | setupButton("video", i18n("&Video"), QIcon::fromTheme("camera-web", QIcon(":/icon/video")), new VideoMonitorWidget(this)); | ||
168 | buttonLayout->addStretch(); | 167 | buttonLayout->addStretch(); | ||
169 | m_lateral.m_toolBar->setLayout(buttonLayout); | 168 | m_lateral.m_toolBar->setLayout(buttonLayout); | ||
170 | } | 169 | } | ||
171 | 170 | | |||
172 | void MainWindow::setupActions() | 171 | void MainWindow::setupActions() | ||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |