|
|
@ -107,7 +107,9 @@ updateTimer(new QTimer()) |
|
|
|
|
|
|
|
|
|
|
|
int labelRow = curvesWidgetLayout->rowCount(); |
|
|
|
int labelRow = curvesWidgetLayout->rowCount(); |
|
|
|
|
|
|
|
|
|
|
|
curvesWidgetLayout->addWidget(new QLabel(tr("On")), labelRow, 0, 1, 2); |
|
|
|
selectAllCheckBox = new QCheckBox("", this); |
|
|
|
|
|
|
|
connect(selectAllCheckBox, SIGNAL(clicked(bool)), this, SLOT(selectAllCurves(bool))); |
|
|
|
|
|
|
|
curvesWidgetLayout->addWidget(selectAllCheckBox, labelRow, 0, 1, 2); |
|
|
|
|
|
|
|
|
|
|
|
label = new QLabel(this); |
|
|
|
label = new QLabel(this); |
|
|
|
label->setText("Name"); |
|
|
|
label->setText("Name"); |
|
|
@ -153,6 +155,15 @@ LinechartWidget::~LinechartWidget() |
|
|
|
listedCurves = NULL; |
|
|
|
listedCurves = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void LinechartWidget::selectAllCurves(bool all) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QMap<QString, QLabel*>::iterator i; |
|
|
|
|
|
|
|
for (i = curveLabels->begin(); i != curveLabels->end(); ++i) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
activePlot->setVisible(i.key(), all); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void LinechartWidget::writeSettings() |
|
|
|
void LinechartWidget::writeSettings() |
|
|
|
{ |
|
|
|
{ |
|
|
|
QSettings settings; |
|
|
|
QSettings settings; |
|
|
@ -299,7 +310,7 @@ void LinechartWidget::appendData(int uasId, QString curve, double value, quint64 |
|
|
|
// Log data
|
|
|
|
// Log data
|
|
|
|
if (logging) |
|
|
|
if (logging) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (activePlot->isVisible(curve)) |
|
|
|
if (activePlot->isVisible(curve+unit)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (logStartTime == 0) logStartTime = usec; |
|
|
|
if (logStartTime == 0) logStartTime = usec; |
|
|
|
qint64 time = usec - logStartTime; |
|
|
|
qint64 time = usec - logStartTime; |
|
|
@ -660,6 +671,7 @@ void LinechartWidget::addCurve(const QString& curve, const QString& unit) |
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
|
|
|
|
// Connect actions
|
|
|
|
// Connect actions
|
|
|
|
|
|
|
|
connect(selectAllCheckBox, SIGNAL(clicked(bool)), checkBox, SLOT(setChecked(bool))); |
|
|
|
QObject::connect(checkBox, SIGNAL(clicked(bool)), this, SLOT(takeButtonClick(bool))); |
|
|
|
QObject::connect(checkBox, SIGNAL(clicked(bool)), this, SLOT(takeButtonClick(bool))); |
|
|
|
QObject::connect(this, SIGNAL(curveVisible(QString, bool)), plot, SLOT(setVisible(QString, bool))); |
|
|
|
QObject::connect(this, SIGNAL(curveVisible(QString, bool)), plot, SLOT(setVisible(QString, bool))); |
|
|
|
|
|
|
|
|
|
|
|