mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
Better to control the device collect status
This commit is contained in:
parent
0c14565f6d
commit
fbf66b4a63
@ -132,13 +132,16 @@ namespace pv
|
||||
|
||||
connect(&_device_selector, SIGNAL(currentIndexChanged(int)), this, SLOT(on_device_selected()));
|
||||
connect(&_configure_button, SIGNAL(clicked()), this, SLOT(on_configure()));
|
||||
connect(&_run_stop_button, SIGNAL(clicked()), this, SLOT(on_run_stop()), Qt::DirectConnection);
|
||||
connect(&_run_stop_button, SIGNAL(clicked()), this, SLOT(on_run_stop()));
|
||||
connect(&_instant_button, SIGNAL(clicked()), this, SLOT(on_instant_stop()));
|
||||
connect(&_sample_count, SIGNAL(currentIndexChanged(int)), this, SLOT(on_samplecount_sel(int)));
|
||||
connect(_action_single, SIGNAL(triggered()), this, SLOT(on_collect_mode()));
|
||||
connect(_action_repeat, SIGNAL(triggered()), this, SLOT(on_collect_mode()));
|
||||
connect(_action_loop, SIGNAL(triggered()), this, SLOT(on_collect_mode()));
|
||||
connect(&_sample_rate, SIGNAL(currentIndexChanged(int)), this, SLOT(on_samplerate_sel(int)));
|
||||
|
||||
connect(this, SIGNAL(sig_run_stop_action()), this, SLOT(on_run_stop_action()));
|
||||
connect(this, SIGNAL(sig_instant_stop_action()), this, SLOT(on_instant_stop_action()));
|
||||
}
|
||||
|
||||
void SamplingBar::changeEvent(QEvent *event)
|
||||
@ -802,12 +805,16 @@ namespace pv
|
||||
void SamplingBar::on_run_stop()
|
||||
{
|
||||
_run_stop_button.setEnabled(false);
|
||||
sig_run_stop_action();
|
||||
}
|
||||
|
||||
void SamplingBar::on_run_stop_action()
|
||||
{
|
||||
if (action_run_stop() == false){
|
||||
_run_stop_button.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// start or stop capture
|
||||
bool SamplingBar::action_run_stop()
|
||||
{
|
||||
@ -868,9 +875,12 @@ namespace pv
|
||||
if (_instant_action->isVisible() == false){
|
||||
return;
|
||||
}
|
||||
|
||||
_instant_button.setEnabled(false);
|
||||
|
||||
sig_instant_stop_action();
|
||||
}
|
||||
|
||||
void SamplingBar::on_instant_stop_action()
|
||||
{
|
||||
if (action_instant_stop() == false){
|
||||
_instant_button.setEnabled(true);
|
||||
}
|
||||
|
@ -103,6 +103,8 @@ namespace pv
|
||||
|
||||
signals:
|
||||
void sig_store_session_data();
|
||||
void sig_run_stop_action();
|
||||
void sig_instant_stop_action();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent *event);
|
||||
@ -135,7 +137,8 @@ namespace pv
|
||||
void on_samplecount_sel(int index);
|
||||
void on_configure();
|
||||
void zero_adj();
|
||||
|
||||
void on_run_stop_action();
|
||||
void on_instant_stop_action();
|
||||
|
||||
private:
|
||||
SigSession *_session;
|
||||
|
Loading…
x
Reference in New Issue
Block a user