Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
670eb375
Commit
670eb375
authored
Mar 13, 2016
by
Don Gagne
Browse files
Merge pull request #3022 from DonLakeFlyer/PullZoom
Remove zoom support
parents
8422a24e
d736bbfa
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/ui/linechart/ChartPlot.cc
View file @
670eb375
...
...
@@ -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 @
670eb375
...
...
@@ -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 @
670eb375
...
...
@@ -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 @
670eb375
...
...
@@ -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
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment