Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/atcoreinstancewidget.cpp
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 67 | for(auto homes : std::map<QString, int>{{"X", AtCore::X}, {"Y", AtCore::Y}, {"Z", AtCore::Z}}) { | |||
---|---|---|---|---|---|
68 | auto home = new QAction(homes.first); | 68 | auto home = new QAction(homes.first); | ||
69 | connect(home, &QAction::triggered, [this, homes] { | 69 | connect(home, &QAction::triggered, [this, homes] { | ||
70 | m_core.home(homes.second); | 70 | m_core.home(homes.second); | ||
71 | }); | 71 | }); | ||
72 | m_toolBar->addAction(home); | 72 | m_toolBar->addAction(home); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | m_toolBar->addSeparator(); | 75 | m_toolBar->addSeparator(); | ||
76 | | ||||
77 | auto *axis = new QAction("Axis"); | | |||
78 | axis->setCheckable(true); | | |||
79 | axis->setChecked(true); | | |||
80 | connect(axis, &QAction::toggled, ui->axisViewWidget, &AxisControl::setVisible); | | |||
81 | | ||||
82 | auto controls = new QAction("Controls"); | | |||
83 | controls->setCheckable(true); | | |||
84 | controls->setChecked(true); | | |||
85 | connect(controls, &QAction::toggled, ui->bedExtWidget, &BedExtruderWidget::setVisible); | | |||
86 | | ||||
87 | auto plot = new QAction("Temperature Plot"); | | |||
88 | plot->setCheckable(true); | | |||
89 | plot->setChecked(true); | | |||
90 | connect(plot, &QAction::toggled, ui->plotWidget, &PlotWidget::setVisible); | | |||
91 | | ||||
92 | m_toolBar->addAction(axis); | | |||
93 | m_toolBar->addAction(controls); | | |||
94 | m_toolBar->addAction(plot); | | |||
95 | ui->toolBarLayout->addWidget(m_toolBar); | 76 | ui->toolBarLayout->addWidget(m_toolBar); | ||
96 | ui->toolBarLayout->addStretch(); | 77 | ui->toolBarLayout->addStretch(); | ||
97 | } | 78 | } | ||
98 | 79 | | |||
99 | void AtCoreInstanceWidget::buildMainToolbar(){ | 80 | void AtCoreInstanceWidget::buildMainToolbar(){ | ||
100 | m_mainToolBar = new QToolBar(); | 81 | m_mainToolBar = new QToolBar(); | ||
101 | m_mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); | 82 | m_mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); | ||
102 | 83 | | |||
▲ Show 20 Lines • Show All 362 Lines • Show Last 20 Lines |