Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
0af3b281
Commit
0af3b281
authored
May 17, 2011
by
Tobias Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
MeasureTool: add button to clear all measurements
parent
b92e0452
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/gui/src/CMakeLists.txt
+1
-0
1 addition, 0 deletions
modules/gui/src/CMakeLists.txt
modules/gui/src/tools/measure_tool.cc
+7
-0
7 additions, 0 deletions
modules/gui/src/tools/measure_tool.cc
modules/gui/src/tools/measure_tool.hh
+6
-0
6 additions, 0 deletions
modules/gui/src/tools/measure_tool.hh
with
14 additions
and
0 deletions
modules/gui/src/CMakeLists.txt
+
1
−
0
View file @
0af3b281
...
...
@@ -389,6 +389,7 @@ tools/tool_bar.hh
tools/tool_option.hh
tools/tool_manager.hh
tools/tool_options_widget.hh
tools/measure_tool.hh
tools/tool_options_win.hh
)
if
(
ENABLE_IMG
)
...
...
...
...
This diff is collapsed.
Click to expand it.
modules/gui/src/tools/measure_tool.cc
+
7
−
0
View file @
0af3b281
...
...
@@ -56,6 +56,8 @@ MeasureTool::MeasureTool()
opts
->
AddOption
(
col_blue
);
ToolOptionFloat
*
line_width
(
new
ToolOptionFloat
(
"line_width"
,
"Line Width"
,
4
,
0.1
,
10.0
));
opts
->
AddOption
(
line_width
);
ToolOptionButton
*
clear_button
(
new
ToolOptionButton
(
"clear_button"
,
"Clear"
,
this
,
SLOT
(
ClearMeasurements
())));
opts
->
AddOption
(
clear_button
);
mode_
=
meas_mode
->
GetValue
();
}
...
...
@@ -108,6 +110,11 @@ void MeasureTool::Click(const MouseEvent& event)
scene
.
RequestRedraw
();
}
void
MeasureTool
::
ClearMeasurements
()
{
ml_
.
clear
();
}
void
MeasureTool
::
RenderGL
()
{
glDisable
(
GL_LIGHTING
);
...
...
...
...
This diff is collapsed.
Click to expand it.
modules/gui/src/tools/measure_tool.hh
+
6
−
0
View file @
0af3b281
...
...
@@ -28,6 +28,7 @@
#include
<ost/gfx/color.hh>
#include
<QList>
#include
<QWidget>
namespace
ost
{
namespace
gui
{
class
DLLEXPORT_OST_GUI
Measurement
{
...
...
@@ -62,8 +63,10 @@ typedef std::vector<Measurement> MeasurementList;
class
DLLEXPORT_OST_GUI
MeasureTool
:
public
Tool
{
Q_OBJECT
public:
MeasureTool
();
virtual
~
MeasureTool
()
{};
int
GetMeasureMode
();
virtual
void
Click
(
const
MouseEvent
&
event
);
...
...
@@ -75,6 +78,9 @@ public:
void
RenderGL
();
public
slots
:
void
ClearMeasurements
();
private
:
int
num_clicks_
;
int
mode_
;
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment