Changeset View
Changeset View
Standalone View
Standalone View
src/mainwindow.cpp
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Line(s) | 261 | connect(m_instances, &QTabWidget::currentChanged, this, [this](int index) { | |||
---|---|---|---|---|---|
263 | auto tempWidget = qobject_cast<AtCoreInstanceWidget *>(m_instances->widget(index)); | 263 | auto tempWidget = qobject_cast<AtCoreInstanceWidget *>(m_instances->widget(index)); | ||
264 | updateBedSize(tempWidget->bedSize()); | 264 | updateBedSize(tempWidget->bedSize()); | ||
265 | }); | 265 | }); | ||
266 | 266 | | |||
267 | connect(m_gcodeEditor, &GCodeEditorWidget::currentFileChanged, this, [viewer3D](const QUrl & url) { | 267 | connect(m_gcodeEditor, &GCodeEditorWidget::currentFileChanged, this, [viewer3D](const QUrl & url) { | ||
268 | viewer3D->drawModel(url.toLocalFile()); | 268 | viewer3D->drawModel(url.toLocalFile()); | ||
269 | }); | 269 | }); | ||
270 | 270 | | |||
271 | setupButton("welcome", i18n("&Welcome"), QIcon::fromTheme("go-home", QIcon(QString(":/%1/home").arg(m_theme))), new WelcomeWidget(this)); | 271 | setupButton("welcome", i18n("Welcome"), QIcon::fromTheme("go-home", QIcon(QString(":/%1/home").arg(m_theme))), new WelcomeWidget(this)); | ||
272 | setupButton("3d", i18n("&3D"), QIcon::fromTheme("draw-cuboid", QIcon(QString(":/%1/3d").arg(m_theme))), viewer3D); | 272 | setupButton("3d", i18n("3D"), QIcon::fromTheme("draw-cuboid", QIcon(QString(":/%1/3d").arg(m_theme))), viewer3D); | ||
273 | setupButton("gcode", i18n("&GCode"), QIcon::fromTheme("accessories-text-editor", QIcon(":/icon/edit")), m_gcodeEditor); | 273 | setupButton("gcode", i18n("GCode"), QIcon::fromTheme("accessories-text-editor", QIcon(":/icon/edit")), m_gcodeEditor); | ||
274 | setupButton("video", i18n("&Video"), QIcon::fromTheme("camera-web", QIcon(":/icon/video")), new VideoMonitorWidget(this)); | 274 | setupButton("video", i18n("Video"), QIcon::fromTheme("camera-web", QIcon(":/icon/video")), new VideoMonitorWidget(this)); | ||
275 | buttonLayout->addStretch(); | 275 | buttonLayout->addStretch(); | ||
276 | m_lateral.m_toolBar->setLayout(buttonLayout); | 276 | m_lateral.m_toolBar->setLayout(buttonLayout); | ||
277 | } | 277 | } | ||
278 | 278 | | |||
279 | void MainWindow::setupActions() | 279 | void MainWindow::setupActions() | ||
280 | { | 280 | { | ||
281 | // Actions for the Toolbar | 281 | // Actions for the Toolbar | ||
282 | QAction *action; | 282 | QAction *action; | ||
▲ Show 20 Lines • Show All 211 Lines • Show Last 20 Lines |