Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
46331049
Commit
46331049
authored
9 years ago
by
Veith Röthlingshöfer
Browse files
Options
Downloads
Patches
Plain Diff
Scaling makes sense, values are shown
parent
3fbfded7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Barchart add-on for plotter gui-plugin
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/ArmarXPlotter/ArmarXPlotter.cpp
+12
-26
12 additions, 26 deletions
.../SensorActorWidgetsPlugin/ArmarXPlotter/ArmarXPlotter.cpp
with
12 additions
and
26 deletions
source/RobotAPI/gui-plugins/SensorActorWidgetsPlugin/ArmarXPlotter/ArmarXPlotter.cpp
+
12
−
26
View file @
46331049
...
...
@@ -251,16 +251,18 @@ namespace armarx
if
(
graphStyle
!=
idx
)
{
graphStyle
=
idx
;
stackedLayout
->
setCurrentIndex
(
graphStyle
);
switch
(
idx
)
{
case
0
:
//curves
stackedLayout
->
setCurrentIndex
(
graphStyle
);
//to test
case
0
:
//curves can have various scalings
ui
.
BTNAutoScale
->
setDisabled
(
false
);
break
;
case
1
:
//bar chart
case
1
:
//bar chart
only autoscale possible
stackedLayout
->
setCurrentIndex
(
graphStyle
);
//to test
ui
.
BTNAutoScale
->
setDisabled
(
true
);
break
;
default:
...
...
@@ -381,36 +383,18 @@ namespace armarx
QwtSeriesData
<
QPointF
>*
pointSeries
=
new
QwtPointSeriesData
(
pointList
);
if
(
curves
.
find
(
it
->
first
)
!=
curves
.
end
())
if
(
curves
.
find
(
it
->
first
)
!=
curves
.
end
()
&&
bars
.
find
(
it
->
first
)
!=
bars
.
end
()
)
{
QwtPlotCurve
*
curve
=
curves
[
it
->
first
];
curve
->
setData
(
pointSeries
);
}
if
(
bars
.
find
(
it
->
first
)
!=
bars
.
end
())
{
QwtThermo
*
bar
=
bars
[
it
->
first
];
double
value
=
(
double
)
pointSeries
->
sample
(
pointSeries
->
size
()
-
1
).
y
();
bar
->
setValue
(
value
);
/* if (ui.BTNAutoScale->isChecked())
{
bar->setAutoScale();
}*/
/*if (value < 0)
{
bar->setRange(value, 0);
}
else
{
bar->setRange(0, value);
}*/
bar
->
setRange
(
0
,
value
);
bar
->
setValue
(
pointList
.
first
().
y
());
bar
->
setRange
(
1.25
*
(
curve
->
minYValue
()),
1.25
*
(
curve
->
maxYValue
()));
}
}
...
...
@@ -517,6 +501,8 @@ namespace armarx
QwtThermo
*
ArmarXPlotter
::
createBar
(
const
QString
&
label
)
{
//creates a widget containing a bar chart and a label
//with the fill color same as in curve
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
getWidget
());
QwtThermo
*
t
=
new
QwtThermo
(
getWidget
());
t
->
setAccessibleName
(
label
);
...
...
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
register
or
sign in
to comment