18 #include <QButtonGroup>
20 #include <QToolButton>
24 const QString pan_zoom_tooltip =
"Pan/zoom mode (space)\n"
25 "Drag axes with the mouse, use mouse wheel to zoom in/out";
27 const QString reset_view_tooltip =
"Reset view\nx,y,z axes range will be set to default";
29 const QString selection_mode_tooltip =
30 "Selection mode\nYou can select existing projections and move them around";
32 const QString horizontal_mode_tooltip =
33 "Horizontal projections mode\nCreate projection along x-axis by clicking on color map";
35 const QString vertical_mode_tooltip =
36 "Vertical projections mode\nCreate projection along y-axis by clicking on color map";
42 , m_editorActions(editorActions)
43 , m_activityButtonGroup(new QButtonGroup(this))
46 setProperty(
"_q_custom_style_disabled", QVariant(
true));
52 #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
57 static_cast<void (QButtonGroup::*)(
int)
>(&QButtonGroup::buttonClicked),
this,
91 auto* panButton =
new QToolButton(
this);
92 panButton->setIcon(QIcon(
":/images/hand-right.svg"));
93 panButton->setToolTip(pan_zoom_tooltip);
94 panButton->setCheckable(
true);
95 panButton->setChecked(
true);
98 auto* resetViewButton =
new QToolButton(
this);
99 resetViewButton->setIcon(QIcon(
":/images/camera-metering-center.svg"));
100 resetViewButton->setToolTip(reset_view_tooltip);
101 addWidget(resetViewButton);
107 auto* selectionButton =
new QToolButton(
this);
108 selectionButton->setIcon(QIcon(
":/Mask/images/maskeditor_arrow.svg"));
109 selectionButton->setToolTip(selection_mode_tooltip);
110 selectionButton->setCheckable(
true);
111 addWidget(selectionButton);
119 auto* horizontalLineButton =
new QToolButton(
this);
120 horizontalLineButton->setIcon(QIcon(
":/Mask/images/maskeditor_horizontalline.svg"));
121 horizontalLineButton->setToolTip(horizontal_mode_tooltip);
122 horizontalLineButton->setCheckable(
true);
123 addWidget(horizontalLineButton);
125 auto* verticalLineButton =
new QToolButton(
this);
126 verticalLineButton->setIcon(QIcon(
":/Mask/images/maskeditor_verticalline.svg"));
127 verticalLineButton->setToolTip(vertical_mode_tooltip);
128 verticalLineButton->setCheckable(
true);
129 addWidget(verticalLineButton);
139 auto* saveButton =
new QToolButton(
this);
140 saveButton->setIcon(QIcon(
":/Mask/images/maskeditor_save.svg"));
141 saveButton->setToolTip(
"Save created projections in multi-column ASCII file.");
142 addWidget(saveButton);
149 addWidget(
new QLabel(
" "));
151 addWidget(
new QLabel(
" "));
161 int button_index =
static_cast<int>(value);
Defines class ProjectionsEditorActions.
Provides various actions for ProjectionsEditor.
void onSaveAction()
Performs saving of projections in ascii file.
Defines namespace GUI::Constants.
const int toolbar_icon_size