Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
d736bbfa
Commit
d736bbfa
authored
Mar 13, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove zoom support
Bugs causing it to not be able to un-zoom.
parent
dcd55081
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
26 deletions
+2
-26
ChartPlot.cc
src/ui/linechart/ChartPlot.cc
+1
-14
ChartPlot.h
src/ui/linechart/ChartPlot.h
+0
-2
IncrementalPlot.cc
src/ui/linechart/IncrementalPlot.cc
+0
-1
LinechartPlot.cc
src/ui/linechart/LinechartPlot.cc
+1
-9
No files found.
src/ui/linechart/ChartPlot.cc
View file @
d736bbfa
...
...
@@ -29,8 +29,7 @@ ChartPlot::ChartPlot(QWidget *parent):
nextColorIndex
(
0
),
symbolWidth
(
2.0
f
),
curveWidth
(
2.0
f
),
gridWidth
(
0.8
f
),
zoomerWidth
(
2.0
f
)
gridWidth
(
0.8
f
)
{
// Initialize the list of curves.
curves
=
QMap
<
QString
,
QwtPlotCurve
*>
();
...
...
@@ -40,10 +39,6 @@ ChartPlot::ChartPlot(QWidget *parent):
grid
->
enableXMin
(
true
);
grid
->
attach
(
this
);
// Enable zooming
QwtPlotCanvas
*
c
=
static_cast
<
QwtPlotCanvas
*>
(
canvas
());
zoomer
=
new
ScrollZoomer
(
c
);
colors
=
QList
<
QColor
>
();
///> Color map for plots, includes 20 colors
...
...
@@ -100,10 +95,6 @@ void ChartPlot::styleChanged(bool styleIsDark)
// Configure the rest of the UI colors based on the current theme.
if
(
styleIsDark
)
{
// Set the coloring of the area selector for zooming.
zoomer
->
setRubberBandPen
(
QPen
(
QColor
(
0xB8
,
0xD3
,
0xE6
),
zoomerWidth
,
Qt
::
DotLine
));
zoomer
->
setTrackerPen
(
QPen
(
QColor
(
0xB8
,
0xD3
,
0xE6
)));
// Set canvas background
setCanvasBackground
(
QColor
(
0
,
0
,
0
));
...
...
@@ -113,10 +104,6 @@ void ChartPlot::styleChanged(bool styleIsDark)
}
else
{
// Set the coloring of the area selector for zooming.
zoomer
->
setRubberBandPen
(
QPen
(
QColor
(
0x37
,
0x9A
,
0xC3
),
zoomerWidth
,
Qt
::
DotLine
));
zoomer
->
setTrackerPen
(
QPen
(
QColor
(
0x37
,
0x9A
,
0xC3
)));
// Set canvas background
setCanvasBackground
(
QColor
(
0xFF
,
0xFF
,
0xFF
));
...
...
src/ui/linechart/ChartPlot.h
View file @
d736bbfa
...
...
@@ -34,13 +34,11 @@ protected:
QList
<
QColor
>
colors
;
///< Colormap for curves
int
nextColorIndex
;
///< Next index in color map
QMap
<
QString
,
QwtPlotCurve
*
>
curves
;
///< Plot curves
ScrollZoomer
*
zoomer
;
///< Zoomer class for widget
QwtPlotGrid
*
grid
;
///< Plot grid
float
symbolWidth
;
///< Width of curve symbols in pixels
float
curveWidth
;
///< Width of curve lines in pixels
float
gridWidth
;
///< Width of gridlines in pixels
float
zoomerWidth
;
///< Width of zoomer selection box
};
#endif // CHARTPLOT_H
src/ui/linechart/IncrementalPlot.cc
View file @
d736bbfa
...
...
@@ -254,7 +254,6 @@ void IncrementalPlot::updateScale()
}
setAxisScale
(
xBottom
,
xMinRange
,
xMaxRange
);
setAxisScale
(
yLeft
,
yMinRange
,
yMaxRange
);
zoomer
->
setZoomBase
(
true
);
}
void
IncrementalPlot
::
appendData
(
const
QString
&
key
,
double
x
,
double
y
)
...
...
src/ui/linechart/LinechartPlot.cc
View file @
d736bbfa
...
...
@@ -679,15 +679,7 @@ void LinechartPlot::paintRealtime()
windowLock
.
unlock
();
// Only set current view as zoombase if zoomer is not active
// else we could not zoom out any more
if
(
zoomer
->
zoomStack
().
size
()
<
2
)
{
zoomer
->
setZoomBase
(
true
);
}
else
{
replot
();
}
replot
();
/*
QMap<QString, QwtPlotCurve*>::iterator i;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment