Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/plotwidget.cpp
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 78 | { | |||
---|---|---|---|---|---|
79 | _chart->chart()->axisX()->setRange(QDateTime::currentDateTime().addSecs(-120), QDateTime::currentDateTime()); | 79 | _chart->chart()->axisX()->setRange(QDateTime::currentDateTime().addSecs(-120), QDateTime::currentDateTime()); | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | QStringList PlotWidget::plots() | 82 | QStringList PlotWidget::plots() | ||
83 | { | 83 | { | ||
84 | return _plots.keys(); | 84 | return _plots.keys(); | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | void PlotWidget::setMaximumPoints(const uint newMax) | 87 | void PlotWidget::setMaximumPoints(const int newMax) | ||
88 | { | 88 | { | ||
89 | m_maximumPoints = newMax; | 89 | m_maximumPoints = std::max(newMax, 0); | ||
patrickelectric: what are you trying to accomplish here ? | |||||
This warning is what I'm trying to remove.
I think I have a better solution here with my next update. rizzitello: This warning is what I'm trying to remove.
>plotwidget.cpp:89: warning: implicit conversion… | |||||
90 | } | 90 | } | ||
91 | 91 | | |||
92 | void PlotWidget::setMaximumTemperature(const uint maxTemp) | 92 | void PlotWidget::setMaximumTemperature(const uint maxTemp) | ||
93 | { | 93 | { | ||
94 | _chart->chart()->axisY()->setRange(0, maxTemp); | 94 | _chart->chart()->axisY()->setRange(0, maxTemp); | ||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | PlotWidget::~PlotWidget() | 97 | PlotWidget::~PlotWidget() | ||
98 | { | 98 | { | ||
99 | } | 99 | } |
what are you trying to accomplish here ?