18 #include <QButtonGroup>
20 #include <QToolButton>
23 const QString pan_zoom_tooltip =
"Pan/zoom mode (space)\n"
24 "Drag axes with the mouse, use mouse wheel to zoom in/out";
26 const QString reset_view_tooltip =
"Reset view\nx,y,z axes range will be set to default";
28 const QString selection_mode_tooltip =
29 "Selection mode\nYou can select existing projections and move them around";
31 const QString horizontal_mode_tooltip =
32 "Horizontal projections mode\nCreate projection along x-axis by clicking on color map";
34 const QString vertical_mode_tooltip =
35 "Vertical projections mode\nCreate projection along y-axis by clicking on color map";
41 , m_editorActions(editorActions)
42 , m_activityButtonGroup(new QButtonGroup(this))
45 setProperty(
"_q_custom_style_disabled", QVariant(
true));
51 #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
56 static_cast<void (QButtonGroup::*)(
int)
>(&QButtonGroup::buttonClicked),
this,
90 auto panButton =
new QToolButton(
this);
91 panButton->setIcon(QIcon(
":/images/hand-right.svg"));
92 panButton->setToolTip(pan_zoom_tooltip);
93 panButton->setCheckable(
true);
94 panButton->setChecked(
true);
97 auto resetViewButton =
new QToolButton(
this);
98 resetViewButton->setIcon(QIcon(
":/images/camera-metering-center.svg"));
99 resetViewButton->setToolTip(reset_view_tooltip);
100 addWidget(resetViewButton);
106 QToolButton* selectionButton =
new QToolButton(
this);
107 selectionButton->setIcon(QIcon(
":/MaskWidgets/images/maskeditor_arrow.svg"));
108 selectionButton->setToolTip(selection_mode_tooltip);
109 selectionButton->setCheckable(
true);
110 addWidget(selectionButton);
118 auto horizontalLineButton =
new QToolButton(
this);
119 horizontalLineButton->setIcon(QIcon(
":/MaskWidgets/images/maskeditor_horizontalline.svg"));
120 horizontalLineButton->setToolTip(horizontal_mode_tooltip);
121 horizontalLineButton->setCheckable(
true);
122 addWidget(horizontalLineButton);
124 auto verticalLineButton =
new QToolButton(
this);
125 verticalLineButton->setIcon(QIcon(
":/MaskWidgets/images/maskeditor_verticalline.svg"));
126 verticalLineButton->setToolTip(vertical_mode_tooltip);
127 verticalLineButton->setCheckable(
true);
128 addWidget(verticalLineButton);
138 auto saveButton =
new QToolButton(
this);
139 saveButton->setIcon(QIcon(
":/MaskWidgets/images/maskeditor_save.svg"));
140 saveButton->setToolTip(
"Save created projections in multi-column ASCII file.");
141 addWidget(saveButton);
148 addWidget(
new QLabel(
" "));
150 addWidget(
new QLabel(
" "));
160 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 Constants.
const int toolbar_icon_size