16 #include "Base/Util/Assert.h"
19 #include <QButtonGroup>
21 #include <QRadioButton>
23 #include <QToolButton>
28 , m_editorActions(editorActions)
29 , m_activityButtonGroup(new QButtonGroup(this))
30 , m_maskValueGroup(new QButtonGroup(this))
33 setProperty(
"_q_custom_style_disabled", QVariant(
true));
41 #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
48 static_cast<void (QButtonGroup::*)(
int)
>(&QButtonGroup::buttonClicked),
this,
51 static_cast<void (QButtonGroup::*)(
int)
>(&QButtonGroup::buttonClicked),
this,
95 auto* panButton =
new QToolButton(
this);
96 panButton->setIcon(QIcon(
":/images/hand-right.svg"));
97 panButton->setToolTip(
"Pan/zoom mode (space)");
98 panButton->setCheckable(
true);
99 panButton->setChecked(
true);
100 addWidget(panButton);
102 auto* resetViewButton =
new QToolButton(
this);
103 resetViewButton->setIcon(QIcon(
":/images/camera-metering-center.svg"));
104 resetViewButton->setToolTip(
"Reset pan/zoom to initial state");
105 addWidget(resetViewButton);
111 auto* selectionButton =
new QToolButton(
this);
112 selectionButton->setIcon(QIcon(
":/Mask/images/maskeditor_arrow.svg"));
113 selectionButton->setToolTip(
"Select/modify mask");
114 selectionButton->setCheckable(
true);
115 addWidget(selectionButton);
123 addWidget(
new QLabel(
" "));
125 auto* maskTrueButton =
new QRadioButton(
this);
126 maskTrueButton->setText(
"masked");
127 maskTrueButton->setToolTip(
"Set mask to True (area is excluded from the simulation)");
128 maskTrueButton->setCheckable(
true);
129 maskTrueButton->setChecked(
true);
130 addWidget(maskTrueButton);
132 addWidget(
new QLabel(
" "));
134 auto* maskFalseButton =
new QRadioButton(
this);
135 maskFalseButton->setToolTip(
"Set mask to False (area stays in the simulation)");
136 maskFalseButton->setCheckable(
true);
137 maskFalseButton->setText(
"active");
138 addWidget(maskFalseButton);
146 auto* roiButton =
new QToolButton(
this);
147 roiButton->setIcon(QIcon(
":/Mask/images/maskeditor_roi.svg"));
148 roiButton->setToolTip(
"Create region of interest");
149 roiButton->setCheckable(
true);
150 addWidget(roiButton);
152 auto* rectangleButton =
new QToolButton(
this);
153 rectangleButton->setIcon(QIcon(
":/Mask/images/maskeditor_rectangle.svg"));
154 rectangleButton->setToolTip(
"Create rectangle mask");
155 rectangleButton->setCheckable(
true);
156 addWidget(rectangleButton);
158 auto* polygonButton =
new QToolButton(
this);
159 polygonButton->setIcon(QIcon(
":/Mask/images/maskeditor_polygon.svg"));
160 polygonButton->setToolTip(
"Create polygon mask");
161 polygonButton->setCheckable(
true);
162 addWidget(polygonButton);
164 auto* verticalLineButton =
new QToolButton(
this);
165 verticalLineButton->setIcon(QIcon(
":/Mask/images/maskeditor_verticalline.svg"));
166 verticalLineButton->setToolTip(
"Create vertical line mask");
167 verticalLineButton->setCheckable(
true);
168 addWidget(verticalLineButton);
170 auto* horizontalLineButton =
new QToolButton(
this);
171 horizontalLineButton->setIcon(QIcon(
":/Mask/images/maskeditor_horizontalline.svg"));
172 horizontalLineButton->setToolTip(
"Create horizontal line mask");
173 horizontalLineButton->setCheckable(
true);
174 addWidget(horizontalLineButton);
176 auto* ellipseButton =
new QToolButton(
this);
177 ellipseButton->setIcon(QIcon(
":/Mask/images/maskeditor_ellipse.svg"));
178 ellipseButton->setToolTip(
"Create ellipse mask");
179 ellipseButton->setCheckable(
true);
180 addWidget(ellipseButton);
210 auto* presentationButton =
new QToolButton(
this);
211 presentationButton->setIcon(QIcon(
":/Mask/images/maskeditor_lightbulb.svg"));
212 presentationButton->setToolTip(
"Press and hold to see mask results.");
213 addWidget(presentationButton);
215 connect(presentationButton, &QToolButton::pressed,
this,
217 connect(presentationButton, &QToolButton::released,
this,
220 auto* propertyPanelButton =
new QToolButton(
this);
221 propertyPanelButton->setIcon(QIcon(
":/Mask/images/maskeditor_toolpanel.svg"));
222 propertyPanelButton->setToolTip(
"Open panel with additional properties");
223 addWidget(propertyPanelButton);
232 addWidget(
new QLabel(
" "));
234 addWidget(
new QLabel(
" "));
Defines class MaskEditorActions.
Defines actions for MaskEditor which are related to selected MaskItem (toggle mask value,...
void propertyPanelRequest()
QAction * bringToFrontAction()
QAction * sendToBackAction()
Defines namespace GUI::Constants.
const int toolbar_icon_size