mirror of https://github.com/EspoTek/Labrador.git
Added option to hide graphs when paused
This commit is contained in:
parent
1a3fd72041
commit
7a2f8cf35a
|
@ -1516,3 +1516,12 @@ void isoDriver::setSerialType(unsigned char type)
|
|||
}
|
||||
}
|
||||
|
||||
void isoDriver::hideCH1(bool enable)
|
||||
{
|
||||
axes->graph(0)->setVisible(!enable);
|
||||
}
|
||||
|
||||
void isoDriver::hideCH2(bool enable)
|
||||
{
|
||||
axes->graph(1)->setVisible(!enable);
|
||||
}
|
||||
|
|
|
@ -215,6 +215,8 @@ public slots:
|
|||
void fileTimerTick();
|
||||
void enableFileMode();
|
||||
void disableFileMode();
|
||||
void hideCH1(bool enable);
|
||||
void hideCH2(bool enable);
|
||||
};
|
||||
|
||||
#endif // ISODRIVER_H
|
||||
|
|
|
@ -157,6 +157,19 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
connect(ui->controller_iso, SIGNAL(showRealtimeButton(bool)), ui->realTimeButton, SLOT(setVisible(bool)));
|
||||
connect(ui->realTimeButton, SIGNAL(pressed()), ui->controller_iso, SLOT(disableFileMode()));
|
||||
|
||||
|
||||
|
||||
connect(ui->pausedLabeL_CH1, SIGNAL(toggled(bool)), this, SLOT(paused(bool)));
|
||||
connect(ui->pausedLabel_CH2, SIGNAL(toggled(bool)), this, SLOT(paused(bool)));
|
||||
connect(ui->pause_LA, SIGNAL(toggled(bool)), this, SLOT(paused(bool)));
|
||||
connect(ui->multimeterPauseCheckBox, SIGNAL(toggled(bool)), this, SLOT(paused(bool)));
|
||||
|
||||
connect(ui->hideCH1Box, SIGNAL(toggled(bool)), ui->controller_iso, SLOT(hideCH1(bool)));
|
||||
connect(ui->hideCH2Box, SIGNAL(toggled(bool)), ui->controller_iso, SLOT(hideCH2(bool)));
|
||||
|
||||
ui->hideCH1Box->setVisible(false);
|
||||
ui->hideCH2Box->setVisible(false);
|
||||
|
||||
ui->realTimeButton->setVisible(false);
|
||||
|
||||
if ((QApplication::desktop()->availableGeometry().width() < 1440) || (QApplication::desktop()->availableGeometry().height() < 900))
|
||||
|
@ -2227,3 +2240,16 @@ void MainWindow::on_actionShow_Range_Dialog_on_Main_Page_triggered(bool checked)
|
|||
scopeRangeSwitch = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::paused(bool enabled)
|
||||
{
|
||||
qDebug() << "MainWindow::paused(" << enabled << ")";
|
||||
ui->hideCH1Box->setVisible(enabled);
|
||||
ui->hideCH2Box->setVisible(enabled);
|
||||
|
||||
if (! enabled)
|
||||
{
|
||||
ui->hideCH1Box->setChecked(false);
|
||||
ui->hideCH2Box->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,6 +195,8 @@ private slots:
|
|||
|
||||
void on_actionShow_Range_Dialog_on_Main_Page_triggered(bool checked);
|
||||
|
||||
void paused(bool enabled);
|
||||
|
||||
private:
|
||||
//Generic Vars
|
||||
Ui::MainWindow *ui;
|
||||
|
|
|
@ -560,6 +560,20 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="hideCH1Box">
|
||||
<property name="text">
|
||||
<string>Hide CH1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="hideCH2Box">
|
||||
<property name="text">
|
||||
<string>Hide CH2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="multimeterGroup">
|
||||
<property name="enabled">
|
||||
|
|
Loading…
Reference in New Issue