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
aa14800f
Commit
aa14800f
authored
Feb 11, 2014
by
Don Gagne
Browse files
Fix a virtual function override
parent
62f3f672
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ui/linechart/LinechartPlot.cc
View file @
aa14800f
...
...
@@ -412,7 +412,7 @@ void LinechartPlot::setScaling(int scaling)
* @param id The string id of the curve
* @param visible The visibility: True to make it visible
**/
void
LinechartPlot
::
setVisible
(
QString
id
,
bool
visible
)
void
LinechartPlot
::
setVisible
ById
(
QString
id
,
bool
visible
)
{
if
(
curves
.
contains
(
id
))
{
curves
.
value
(
id
)
->
setVisible
(
visible
);
...
...
@@ -437,7 +437,7 @@ void LinechartPlot::setVisible(QString id, bool visible)
**/
void
LinechartPlot
::
hideCurve
(
QString
id
)
{
setVisible
(
id
,
false
);
setVisible
ById
(
id
,
false
);
}
/**
...
...
@@ -450,7 +450,7 @@ void LinechartPlot::hideCurve(QString id)
**/
void
LinechartPlot
::
showCurve
(
QString
id
)
{
setVisible
(
id
,
true
);
setVisible
ById
(
id
,
true
);
}
//void LinechartPlot::showCurve(QString id, int position)
...
...
src/ui/linechart/LinechartPlot.h
View file @
aa14800f
...
...
@@ -213,7 +213,7 @@ public slots:
void
setActive
(
bool
active
);
// Functions referring to the currently active plot
void
setVisible
(
QString
id
,
bool
visible
);
void
setVisible
ById
(
QString
id
,
bool
visible
);
/**
* @brief Set the color of a curve and its symbols.
...
...
src/ui/linechart/LinechartWidget.cc
View file @
aa14800f
...
...
@@ -171,7 +171,7 @@ void LinechartWidget::selectAllCurves(bool all)
{
QMap
<
QString
,
QLabel
*>::
iterator
i
;
for
(
i
=
curveLabels
->
begin
();
i
!=
curveLabels
->
end
();
++
i
)
{
activePlot
->
setVisible
(
i
.
key
(),
all
);
activePlot
->
setVisible
ById
(
i
.
key
(),
all
);
}
}
...
...
@@ -647,7 +647,7 @@ void LinechartWidget::addCurve(const QString& curve, const QString& unit)
// Set UI components to initial state
checkBox
->
setChecked
(
false
);
plot
->
setVisible
(
curve
+
unit
,
false
);
plot
->
setVisible
ById
(
curve
+
unit
,
false
);
}
/**
...
...
@@ -952,7 +952,7 @@ void LinechartWidget::takeButtonClick(bool checked)
if
(
button
!=
NULL
)
{
activePlot
->
setVisible
(
button
->
objectName
(),
checked
);
activePlot
->
setVisible
ById
(
button
->
objectName
(),
checked
);
QWidget
*
colorIcon
=
colorIcons
.
value
(
button
->
objectName
(),
0
);
if
(
colorIcon
)
{
...
...
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