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
b0d4abac
Commit
b0d4abac
authored
Oct 10, 2013
by
John Tapsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change QString function parameters to const QString &
parent
96ab4dc8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
ChartPlot.cc
src/ui/linechart/ChartPlot.cc
+1
-1
ChartPlot.h
src/ui/linechart/ChartPlot.h
+1
-1
IncrementalPlot.cc
src/ui/linechart/IncrementalPlot.cc
+4
-4
IncrementalPlot.h
src/ui/linechart/IncrementalPlot.h
+4
-4
No files found.
src/ui/linechart/ChartPlot.cc
View file @
b0d4abac
...
...
@@ -70,7 +70,7 @@ QColor ChartPlot::getNextColor()
return
colors
[
nextColorIndex
++
];
}
QColor
ChartPlot
::
getColorForCurve
(
QString
id
)
QColor
ChartPlot
::
getColorForCurve
(
const
QString
&
id
)
{
return
curves
.
value
(
id
)
->
pen
().
color
();
}
...
...
src/ui/linechart/ChartPlot.h
View file @
b0d4abac
...
...
@@ -17,7 +17,7 @@ public:
QColor
getNextColor
();
/** @brief Get color for curve id */
QColor
getColorForCurve
(
QString
id
);
QColor
getColorForCurve
(
const
QString
&
id
);
/** @brief Reset color map */
void
shuffleColors
();
...
...
src/ui/linechart/IncrementalPlot.cc
View file @
b0d4abac
...
...
@@ -155,7 +155,7 @@ void IncrementalPlot::showLegend(bool show)
*
* @param style Formatting string for line/data point style
*/
void
IncrementalPlot
::
setStyleText
(
QString
style
)
void
IncrementalPlot
::
setStyleText
(
const
QString
&
style
)
{
foreach
(
QwtPlotCurve
*
curve
,
curves
)
{
// Style of datapoints
...
...
@@ -250,12 +250,12 @@ void IncrementalPlot::updateScale()
zoomer
->
setZoomBase
(
true
);
}
void
IncrementalPlot
::
appendData
(
QString
key
,
double
x
,
double
y
)
void
IncrementalPlot
::
appendData
(
const
QString
&
key
,
double
x
,
double
y
)
{
appendData
(
key
,
&
x
,
&
y
,
1
);
}
void
IncrementalPlot
::
appendData
(
QString
key
,
double
*
x
,
double
*
y
,
int
size
)
void
IncrementalPlot
::
appendData
(
const
QString
&
key
,
double
*
x
,
double
*
y
,
int
size
)
{
CurveData
*
data
;
QwtPlotCurve
*
curve
;
...
...
@@ -349,7 +349,7 @@ void IncrementalPlot::appendData(QString key, double *x, double *y, int size)
/**
* @return Number of copied data points, 0 on failure
*/
int
IncrementalPlot
::
data
(
QString
key
,
double
*
r_x
,
double
*
r_y
,
int
maxSize
)
int
IncrementalPlot
::
data
(
const
QString
&
key
,
double
*
r_x
,
double
*
r_y
,
int
maxSize
)
{
int
result
=
0
;
if
(
d_data
.
contains
(
key
))
{
...
...
src/ui/linechart/IncrementalPlot.h
View file @
b0d4abac
...
...
@@ -84,14 +84,14 @@ public:
bool
gridEnabled
();
/** @brief Read out data from a curve */
int
data
(
QString
key
,
double
*
r_x
,
double
*
r_y
,
int
maxSize
);
int
data
(
const
QString
&
key
,
double
*
r_x
,
double
*
r_y
,
int
maxSize
);
public
slots
:
/** @brief Append one data point */
void
appendData
(
QString
key
,
double
x
,
double
y
);
void
appendData
(
const
QString
&
key
,
double
x
,
double
y
);
/** @brief Append multiple data points */
void
appendData
(
QString
key
,
double
*
x
,
double
*
y
,
int
size
);
void
appendData
(
const
QString
&
key
,
double
*
x
,
double
*
y
,
int
size
);
/** @brief Reset the plot scaling to the default value */
void
resetScaling
();
...
...
@@ -109,7 +109,7 @@ public slots:
void
showGrid
(
bool
show
);
/** @brief Set new plot style */
void
setStyleText
(
QString
style
);
void
setStyleText
(
const
QString
&
style
);
/** @brief Set symmetric axis scaling mode */
void
setSymmetric
(
bool
symmetric
);
...
...
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