20 #include <QProgressBar>
21 #include <QVBoxLayout>
26 : QToolBar(parent), m_liveCheckbox(new QCheckBox), m_progressBar(new QProgressBar)
30 setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
47 addWidget(
new QLabel(
" "));
49 addWidget(
new QLabel(
" "));
57 const QString live_tooltip =
"Automatically run simulation and update plot\n"
58 "on any multilayer change.";
62 auto on_check_state = [
this](
int state) {
realTimeRequest(state == Qt::Checked); };
65 auto label =
new QLabel(
"Live");
66 label->setToolTip(live_tooltip);
70 auto run_action =
new QAction(
"Run",
this);
71 run_action->setIcon(QIcon(
":/icons/play-circle-outline.svg"));
72 run_action->setToolTip(
"Run simulation for current multilayer state");
74 addAction(run_action);
82 auto cancel_action =
new QAction(
"Cancel",
this);
83 cancel_action->setIcon(QIcon(
":/icons/close-circle-outline.svg"));
84 cancel_action->setToolTip(
"Cancel running simulation");
86 addAction(cancel_action);
93 auto reset_view =
new QAction(
"Replot",
this);
94 reset_view->setToolTip(
"Set plot axes to default range");
95 reset_view->setIcon(QIcon(
":/icons/aspect-ratio.svg"));
97 addAction(reset_view);
const int toolbar_icon_size
const bool live_simulation_default_on
Initial state of some widgets.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.