Commit b0d4abac authored by John Tapsell's avatar John Tapsell

Change QString function parameters to const QString &

parent 96ab4dc8
......@@ -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();
}
......
......@@ -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();
......
......@@ -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)) {
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment