2
0
forked from Ivasoft/DSView

rename toolbar signals name

This commit is contained in:
dreamsourcelabTAI
2021-10-29 11:07:14 +08:00
parent 7e8eb38777
commit aa3722b242
13 changed files with 157 additions and 126 deletions

View File

@@ -45,6 +45,7 @@ public:
string m_value;
};
struct AppOptions
{
bool quickScroll;

View File

@@ -473,8 +473,9 @@ const uint8_t *LogicSnapshot::get_samples(uint64_t start_sample, uint64_t &end_s
int sig_index)
{
//assert(data);
assert(start_sample < get_sample_count());
assert(end_sample <= get_sample_count());
uint64_t sample_count = get_sample_count();
assert(start_sample < sample_count);
assert(end_sample <= sample_count);
assert(start_sample <= end_sample);
int order = get_ch_order(sig_index);

View File

@@ -259,47 +259,55 @@ void MainWindow::setup_ui()
connect(&_session, SIGNAL(capture_state_changed(int)), this, SLOT(capture_state_changed(int)));
connect(&_session, SIGNAL(device_attach()), this, SLOT(device_attach()), Qt::QueuedConnection);
connect(&_session, SIGNAL(device_detach()), this, SLOT(device_detach()), Qt::QueuedConnection);
connect(&_session, SIGNAL(session_error()), this, SLOT(show_error()), Qt::QueuedConnection);
connect(&_session, SIGNAL(session_error()), this, SLOT(on_show_error()), Qt::QueuedConnection);
connect(&_session, SIGNAL(session_save()), this, SLOT(session_save()));
connect(&_session, SIGNAL(data_updated()), _measure_widget, SLOT(reCalc()));
connect(&_session, SIGNAL(repeat_resume()), this, SLOT(repeat_resume()));
connect(&_session, SIGNAL(update_capture()), _view, SLOT(update_hori_res()), Qt::DirectConnection);
connect(&_session, SIGNAL(cur_snap_samplerate_changed()), _measure_widget, SLOT(cursor_update()));
//view
connect(_view, SIGNAL(cursor_update()), _measure_widget, SLOT(cursor_update()));
connect(_view, SIGNAL(cursor_moving()), _measure_widget, SLOT(cursor_moving()));
connect(_view, SIGNAL(cursor_moved()), _measure_widget, SLOT(reCalc()));
connect(_view, SIGNAL(prgRate(int)), this, SIGNAL(prgRate(int)));
connect(_view, SIGNAL(device_changed(bool)), this, SLOT(device_changed(bool)), Qt::DirectConnection);
connect(_view, SIGNAL(auto_trig(int)), _dso_trigger_widget, SLOT(auto_trig(int)));
//tool bar event
connect(_trig_bar, SIGNAL(on_protocol(bool)), this, SLOT(on_protocol(bool)));
connect(_trig_bar, SIGNAL(on_trigger(bool)), this, SLOT(on_trigger(bool)));
connect(_trig_bar, SIGNAL(on_measure(bool)), this, SLOT(on_measure(bool)));
connect(_trig_bar, SIGNAL(on_search(bool)), this, SLOT(on_search(bool)));
connect(_trig_bar, SIGNAL(setTheme(QString)), this, SLOT(switchTheme(QString)));
connect(_file_bar, SIGNAL(load_file(QString)), this, SLOT(load_file(QString)));
connect(_file_bar, SIGNAL(on_save()), this, SLOT(on_save()));
connect(_file_bar, SIGNAL(on_export()), this, SLOT(on_export()));
connect(_file_bar, SIGNAL(on_screenShot()), this, SLOT(on_screenShot()), Qt::QueuedConnection);
connect(_file_bar, SIGNAL(load_session(QString)), this, SLOT(load_session(QString)));
connect(_file_bar, SIGNAL(store_session(QString)), this, SLOT(store_session(QString)));
connect(_logo_bar, SIGNAL(setLanguage(int)), this, SLOT(switchLanguage(int)));
connect(_logo_bar, SIGNAL(openDoc()), this, SLOT(openDoc()));
//trig_bar
connect(_trig_bar, SIGNAL(sig_protocol(bool)), this, SLOT(on_protocol(bool)));
connect(_trig_bar, SIGNAL(sig_trigger(bool)), this, SLOT(on_trigger(bool)));
connect(_trig_bar, SIGNAL(sig_measure(bool)), this, SLOT(on_measure(bool)));
connect(_trig_bar, SIGNAL(sig_search(bool)), this, SLOT(on_search(bool)));
connect(_trig_bar, SIGNAL(sig_setTheme(QString)), this, SLOT(switchTheme(QString)));
connect(_trig_bar, SIGNAL(sig_show_lissajous(bool)), _view, SLOT(show_lissajous(bool)));
//file toolbar
connect(_file_bar, SIGNAL(sig_load_file(QString)), this, SLOT(on_load_file(QString)));
connect(_file_bar, SIGNAL(sig_save()), this, SLOT(on_save()));
connect(_file_bar, SIGNAL(sig_export()), this, SLOT(on_export()));
connect(_file_bar, SIGNAL(sig_screenShot()), this, SLOT(on_screenShot()), Qt::QueuedConnection);
connect(_file_bar, SIGNAL(sig_load_session(QString)), this, SLOT(on_load_session(QString)));
connect(_file_bar, SIGNAL(sig_store_session(QString)), this, SLOT(on_store_session(QString)));
//logobar
connect(_logo_bar, SIGNAL(sig_setLanguage(int)), this, SLOT(on_setLanguage(int)));
connect(_logo_bar, SIGNAL(sig_open_doc()), this, SLOT(on_open_doc()));
connect(_protocol_widget, SIGNAL(protocol_updated()), _view, SLOT(signals_changed()));
//SamplingBar
connect(_sampling_bar, SIGNAL(sig_device_selected()), this, SLOT(on_device_selected()));
connect(_sampling_bar, SIGNAL(sig_device_updated()), this, SLOT(on_device_updated_reload()));
connect(_sampling_bar, SIGNAL(sig_run_stop()), this, SLOT(on_run_stop()));
connect(_sampling_bar, SIGNAL(sig_instant_stop()), this, SLOT(on_instant_stop()));
connect(_sampling_bar, SIGNAL(sig_duration_changed()), _trigger_widget, SLOT(device_updated()));
connect(_sampling_bar, SIGNAL(sig_duration_changed()), _view, SLOT(timebase_changed()));
connect(_sampling_bar, SIGNAL(sig_show_calibration()), _view, SLOT(show_calibration()));
connect(_sampling_bar, SIGNAL(device_selected()), this, SLOT(update_device_list()));
connect(_sampling_bar, SIGNAL(device_updated()), this, SLOT(reload()));
connect(_sampling_bar, SIGNAL(run_stop()), this, SLOT(run_stop()));
connect(_sampling_bar, SIGNAL(instant_stop()), this, SLOT(instant_stop()));
connect(_sampling_bar, SIGNAL(duration_changed()), _trigger_widget, SLOT(device_updated()));
connect(_sampling_bar, SIGNAL(duration_changed()), _view, SLOT(timebase_changed()));
connect(_sampling_bar, SIGNAL(show_calibration()), _view, SLOT(show_calibration()));
connect(_trig_bar, SIGNAL(show_lissajous(bool)), _view, SLOT(show_lissajous(bool)));
connect(_dso_trigger_widget, SIGNAL(set_trig_pos(int)), _view, SLOT(set_trig_pos(int)));
connect(_view, SIGNAL(auto_trig(int)), _dso_trigger_widget, SLOT(auto_trig(int)));
}
@@ -320,6 +328,11 @@ void MainWindow::session_error(
Q_ARG(QString, info_text));
}
void MainWindow::on_device_selected()
{
update_device_list();
}
void MainWindow::update_device_list()
{
assert(_sampling_bar);
@@ -391,7 +404,7 @@ void MainWindow::update_device_list()
selected_device->name() +
QString::number(selected_device->dev_inst()->mode) +
lang_name + ".dsc";
load_session(ses_name);
on_load_session(ses_name);
}
} else {
_file_bar->set_settings_en(false);
@@ -409,7 +422,7 @@ void MainWindow::update_device_list()
QString::number(selected_device->dev_inst()->mode) +
".dsc";
if (QFileInfo(ses_name).exists())
load_session(ses_name);
on_load_session(ses_name);
}
}
_sampling_bar->reload();
@@ -442,14 +455,14 @@ void MainWindow::update_device_list()
}
void MainWindow::reload()
void MainWindow::on_device_updated_reload()
{
_trigger_widget->device_updated();
_session.reload();
_measure_widget->reload();
}
void MainWindow::load_file(QString file_name)
void MainWindow::on_load_file(QString file_name)
{
try {
if (strncmp(_session.get_device()->name().toUtf8(), "virtual", 7))
@@ -568,7 +581,7 @@ void MainWindow::device_changed(bool close)
update_device_list();
}
void MainWindow::run_stop()
void MainWindow::on_run_stop()
{
switch(_session.get_capture_state()) {
case SigSession::Init:
@@ -586,7 +599,7 @@ void MainWindow::run_stop()
}
}
void MainWindow::instant_stop()
void MainWindow::on_instant_stop()
{
switch(_session.get_capture_state()) {
case SigSession::Init:
@@ -608,10 +621,10 @@ void MainWindow::repeat_resume()
{
while(_view->session().get_capture_state() == SigSession::Running)
QCoreApplication::processEvents();
run_stop();
on_run_stop();
}
void MainWindow::show_error()
void MainWindow::on_show_error()
{
QString title;
QString details;
@@ -725,7 +738,7 @@ void MainWindow::session_save()
lang_name + ".dsc";
if (strncmp(driver_name.toUtf8(), "virtual", 7) &&
!file_name.isEmpty()) {
store_session(file_name);
on_store_session(file_name);
}
}
@@ -875,7 +888,7 @@ void MainWindow::on_save()
dir.cd(path);
session_file = dir.absolutePath() + "/DSView-session-XXXXXX";
store_session(session_file);
on_store_session(session_file);
}
StoreProgress *dlg = new StoreProgress(_session, this);
@@ -891,7 +904,7 @@ void MainWindow::on_export()
dlg->export_run();
}
bool MainWindow::load_session(QString name)
bool MainWindow::on_load_session(QString name)
{
QFile sessionFile(name);
if (!sessionFile.open(QIODevice::ReadOnly)) {
@@ -1101,7 +1114,7 @@ bool MainWindow::load_session_json(QJsonDocument json, bool file_dev)
}
bool MainWindow::store_session(QString name)
bool MainWindow::on_store_session(QString name)
{
QFile sessionFile(name);
if (!sessionFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -1249,10 +1262,10 @@ bool MainWindow::eventFilter(QObject *object, QEvent *event)
QKeyEvent *ke = (QKeyEvent *) event;
switch(ke->key()) {
case Qt::Key_S:
run_stop();
on_run_stop();
break;
case Qt::Key_I:
instant_stop();
on_instant_stop();
break;
case Qt::Key_T:
if (_session.get_device()->dev_inst()->mode == DSO)
@@ -1346,6 +1359,11 @@ bool MainWindow::eventFilter(QObject *object, QEvent *event)
}
return false;
}
void MainWindow::on_setLanguage(int language)
{
switchLanguage(language);
}
void MainWindow::switchLanguage(int language)
{
@@ -1393,6 +1411,10 @@ void MainWindow::switchTheme(QString style)
_session.data_updated();
}
void MainWindow::on_open_doc(){
openDoc();
}
void MainWindow::openDoc()
{
#ifndef Q_OS_LINUX

View File

@@ -80,24 +80,32 @@ public:
protected:
void closeEvent(QCloseEvent *event);
public:
void openDoc();
void switchLanguage(int language);
private:
void setup_ui();
void retranslateUi();
void session_error(const QString text, const QString info_text);
bool eventFilter(QObject *object, QEvent *event);
public slots:
void session_save();
void openDoc();
bool load_session_json(QJsonDocument json, bool file_dev);
void switchLanguage(int language);
void update_device_list();
public slots:
void session_save();
void switchTheme(QString style);
void restore_dock();
private slots:
void load_file(QString file_name);
void on_load_file(QString file_name);
void on_open_doc();
/**
* Updates the device list in the sampling bar, and updates the
@@ -105,16 +113,15 @@ private slots:
* @param selected_device The device to select, or NULL if the
* first device in the device list should be selected.
*/
void update_device_list();
void reload();
void on_device_updated_reload();
void show_session_error(
const QString text, const QString info_text);
void show_session_error(const QString text, const QString info_text);
void run_stop();
void on_run_stop();
void instant_stop();
void on_instant_stop();
void capture_state_changed(int state);
@@ -134,9 +141,9 @@ private slots:
void on_export();
bool load_session(QString name);
bool load_session_json(QJsonDocument json, bool file_dev);
bool store_session(QString name);
bool on_load_session(QString name);
bool on_store_session(QString name);
/*
* repeat
@@ -150,12 +157,15 @@ private slots:
void device_detach();
void device_detach_post();
void device_changed(bool close);
void on_device_selected();
/*
* errors
*/
void show_error();
void on_show_error();
void on_setLanguage(int language);
signals:
void prgRate(int progress);

View File

@@ -91,8 +91,8 @@ FileBar::FileBar(SigSession &session, QWidget *parent) :
connect(_action_store, SIGNAL(triggered()), this, SLOT(on_actionStore_triggered()));
connect(_action_default, SIGNAL(triggered()), this, SLOT(on_actionDefault_triggered()));
connect(_action_open, SIGNAL(triggered()), this, SLOT(on_actionOpen_triggered()));
connect(_action_save, SIGNAL(triggered()), this, SIGNAL(on_save()));
connect(_action_export, SIGNAL(triggered()), this, SIGNAL(on_export()));
connect(_action_save, SIGNAL(triggered()), this, SIGNAL(sig_save()));
connect(_action_export, SIGNAL(triggered()), this, SIGNAL(sig_export()));
connect(_action_capture, SIGNAL(triggered()), this, SLOT(on_actionCapture_triggered()));
}
@@ -152,7 +152,7 @@ void FileBar::on_actionOpen_triggered()
app.SaveHistory();
}
load_file(file_name);
sig_load_file(file_name);
}
}
@@ -188,7 +188,7 @@ void FileBar::on_actionLoad_triggered()
app.SaveHistory();
}
load_session(file_name);
sig_load_session(file_name);
}
}
@@ -216,7 +216,7 @@ void FileBar::on_actionDefault_triggered()
QString file_name = dir.absolutePath() + "/" + driver_name + mode_name +
".def"+QString::number(language)+".dsc";
if (!file_name.isEmpty())
load_session(file_name);
sig_load_session(file_name);
}
void FileBar::on_actionStore_triggered()
@@ -242,7 +242,7 @@ void FileBar::on_actionStore_triggered()
app.SaveHistory();
}
store_session(file_name);
sig_store_session(file_name);
}
}
@@ -250,7 +250,7 @@ void FileBar::on_actionCapture_triggered()
{
_file_button.close();
QCoreApplication::sendPostedEvents();
QTimer::singleShot(100, this, SIGNAL(on_screenShot()));
QTimer::singleShot(100, this, SIGNAL(sig_screenShot()));
}
void FileBar::enable_toggle(bool enable)

View File

@@ -57,12 +57,12 @@ private:
const QString text, const QString info_text);
signals:
void load_file(QString);
void on_save();
void on_export();
void on_screenShot(); //post screen capture event message
void load_session(QString); //post load session event message
void store_session(QString); //post store session event message
void sig_load_file(QString);
void sig_save();
void sig_export();
void sig_screenShot(); //post screen capture event message
void sig_load_session(QString); //post load session event message
void sig_store_session(QString); //post store session event message
private slots:
void on_actionLoad_triggered();

View File

@@ -69,7 +69,7 @@ LogoBar::LogoBar(SigSession &session, QWidget *parent) :
_manual = new QAction(this);
_manual->setObjectName(QString::fromUtf8("actionManual"));
_logo_button.addAction(_manual);
connect(_manual, SIGNAL(triggered()), this, SIGNAL(openDoc()));
connect(_manual, SIGNAL(triggered()), this, SIGNAL(sig_open_doc()));
_issue = new QAction(this);
_issue->setObjectName(QString::fromUtf8("actionManual"));
@@ -169,14 +169,14 @@ void LogoBar::on_actionEn_triggered()
{
_language->setIcon(QIcon::fromTheme("file",
QIcon(":/icons/English.svg")));
setLanguage(QLocale::English);
sig_setLanguage(QLocale::English);
}
void LogoBar::on_actionCn_triggered()
{
_language->setIcon(QIcon::fromTheme("file",
QIcon(":/icons/Chinese.svg")));
setLanguage(QLocale::Chinese);
sig_setLanguage(QLocale::Chinese);
}
void LogoBar::on_actionAbout_triggered()

View File

@@ -61,10 +61,10 @@ private:
signals:
//post event message to set language, MainWindow class receive it
void setLanguage(int language);
void sig_setLanguage(int language);
//post event message to open user help document, MainWindow class receive it
void openDoc();
void sig_open_doc();
private slots:
void on_actionEn_triggered();

View File

@@ -74,32 +74,17 @@ SamplingBar::SamplingBar(SigSession &session, QWidget *parent) :
setContentsMargins(0,0,0,0);
layout()->setMargin(0);
layout()->setSpacing(0);
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(&_instant_button, SIGNAL(clicked()),
this, SLOT(on_instant_stop()));
_mode_button.setPopupMode(QToolButton::InstantPopup);
_device_selector.setSizeAdjustPolicy(QComboBox::AdjustToContents);
_sample_rate.setSizeAdjustPolicy(QComboBox::AdjustToContents);
_sample_count.setSizeAdjustPolicy(QComboBox::AdjustToContents);
_device_selector.setMaximumWidth(ComboBoxMaxWidth);
connect(&_sample_count, SIGNAL(currentIndexChanged(int)),
this, SLOT(on_samplecount_sel(int)));
//_run_stop_button.setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
_run_stop_button.setObjectName(tr("run_stop_button"));
connect(&_sample_rate, SIGNAL(currentIndexChanged(int)),
this, SLOT(on_samplerate_sel(int)));
QWidget *leftMargin = new QWidget(this);
leftMargin->setFixedWidth(4);
addWidget(leftMargin);
@@ -115,10 +100,8 @@ SamplingBar::SamplingBar(SigSession &session, QWidget *parent) :
addWidget(&_sample_rate);
_action_single = new QAction(this);
connect(_action_single, SIGNAL(triggered()), this, SLOT(on_mode()));
_action_repeat = new QAction(this);
connect(_action_repeat, SIGNAL(triggered()), this, SLOT(on_mode()));
_mode_menu = new QMenu(this);
_mode_menu->addAction(_action_single);
@@ -135,6 +118,15 @@ SamplingBar::SamplingBar(SigSession &session, QWidget *parent) :
set_sampling(false);
//retranslateUi();
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(&_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_mode()));
connect(_action_repeat, SIGNAL(triggered()), this, SLOT(on_mode()));
connect(&_sample_rate, SIGNAL(currentIndexChanged(int)), this, SLOT(on_samplerate_sel(int)));
}
void SamplingBar::changeEvent(QEvent *event)
@@ -286,7 +278,7 @@ boost::shared_ptr<pv::device::DevInst> SamplingBar::get_selected_device() const
void SamplingBar::on_configure()
{
hide_calibration();
sig_hide_calibration();
int ret;
boost::shared_ptr<pv::device::DevInst> dev_inst = get_selected_device();
@@ -295,7 +287,7 @@ void SamplingBar::on_configure()
pv::dialogs::DeviceOptions dlg(this, dev_inst);
ret = dlg.exec();
if (ret == QDialog::Accepted) {
device_updated();
sig_device_updated();
update_sample_rate_selector();
GVariant* gvar;
@@ -315,7 +307,7 @@ void SamplingBar::on_configure()
bool cali = g_variant_get_boolean(gvar);
g_variant_unref(gvar);
if (cali) {
show_calibration();
sig_show_calibration();
return;
}
}
@@ -353,7 +345,7 @@ void SamplingBar::zero_adj()
_sample_count.setCurrentIndex(i);
commit_hori_res();
run_stop();
sig_run_stop();
pv::dialogs::WaitingDialog wait(this, _session, SR_CONF_ZERO);
if (wait.start() == QDialog::Rejected) {
@@ -717,7 +709,7 @@ void SamplingBar::on_samplecount_sel(int index)
const boost::shared_ptr<device::DevInst> dev_inst = get_selected_device();
if (dev_inst->dev_inst()->mode == DSO)
commit_hori_res();
duration_changed();
sig_duration_changed();
}
double SamplingBar::get_hori_res()
@@ -857,7 +849,8 @@ void SamplingBar::on_run_stop()
}
}
}
run_stop();
sig_run_stop();
}
}
@@ -882,9 +875,12 @@ void SamplingBar::on_instant_stop()
enable_instant(false);
commit_settings();
_instant = true;
const boost::shared_ptr<device::DevInst> dev_inst = get_selected_device();
if (!dev_inst)
return;
if (dev_inst->dev_inst()->mode == DSO) {
GVariant* gvar = dev_inst->get_config(NULL, NULL, SR_CONF_ZERO);
if (gvar != NULL) {
@@ -909,7 +905,8 @@ void SamplingBar::on_instant_stop()
}
}
}
instant_stop();
sig_instant_stop();
}
}
@@ -930,7 +927,7 @@ void SamplingBar::on_device_selected()
} catch(QString e) {
show_session_error(tr("Failed to select ") + dev_inst->dev_inst()->model, e);
}
device_selected();
sig_device_selected();
}
void SamplingBar::enable_toggle(bool enable)

View File

@@ -99,13 +99,13 @@ namespace pv
void set_sample_rate(uint64_t sample_rate);
signals:
void run_stop();
void instant_stop();
void device_selected();
void device_updated();
void duration_changed();
void show_calibration();
void hide_calibration();
void sig_run_stop();
void sig_instant_stop();
void sig_device_selected();
void sig_device_updated();
void sig_duration_changed();
void sig_show_calibration();
void sig_hide_calibration();
private:
void changeEvent(QEvent *event);

View File

@@ -69,7 +69,7 @@ TitleBar::TitleBar(bool top, QWidget *parent, bool hasClose) :
_lay->addWidget(_minimizeButton);
_lay->addWidget(_maximizeButton);
connect(this, SIGNAL( normalShow() ), parent, SLOT(showNormal() ) );
connect(this, SIGNAL(normalShow() ), parent, SLOT(showNormal() ) );
connect(this, SIGNAL( maximizedShow() ), parent, SLOT(showMaximized() ) );
connect(_minimizeButton, SIGNAL( clicked() ), parent, SLOT(showMinimized() ) );
connect(_maximizeButton, SIGNAL( clicked() ), this, SLOT(showMaxRestore() ) );

View File

@@ -185,12 +185,12 @@ void TrigBar::reStyle()
void TrigBar::protocol_clicked()
{
on_protocol(_protocol_button.isChecked());
sig_protocol(_protocol_button.isChecked());
}
void TrigBar::trigger_clicked()
{
on_trigger(_trig_button.isChecked());
sig_trigger(_trig_button.isChecked());
}
void TrigBar::update_trig_btn(bool checked)
@@ -215,12 +215,12 @@ void TrigBar::update_search_btn(bool checked)
void TrigBar::measure_clicked()
{
on_measure(_measure_button.isChecked());
sig_measure(_measure_button.isChecked());
}
void TrigBar::search_clicked()
{
on_search(_search_button.isChecked());
sig_search(_search_button.isChecked());
}
void TrigBar::enable_toggle(bool enable)
@@ -242,19 +242,19 @@ void TrigBar::close_all()
{
if (_trig_button.isChecked()) {
_trig_button.setChecked(false);
on_trigger(false);
sig_trigger(false);
}
if (_protocol_button.isChecked()) {
_protocol_button.setChecked(false);
on_protocol(false);
sig_protocol(false);
}
if (_measure_button.isChecked()) {
_measure_button.setChecked(false);
on_measure(false);
sig_measure(false);
}
if(_search_button.isChecked()) {
_search_button.setChecked(false);
on_search(false);
sig_search(false);
}
}
@@ -301,13 +301,13 @@ void TrigBar::on_actionMath_triggered()
void TrigBar::on_actionDark_triggered()
{
setTheme(DARK_STYLE);
sig_setTheme(DARK_STYLE);
_themes->setIcon(QIcon(":/icons/"+DARK_STYLE+"/"+DARK_STYLE+".svg"));
}
void TrigBar::on_actionLight_triggered()
{
setTheme(LIGHT_STYLE);
sig_setTheme(LIGHT_STYLE);
_themes->setIcon(QIcon(":/icons/"+LIGHT_STYLE+"/"+LIGHT_STYLE+".svg"));
}

View File

@@ -58,12 +58,12 @@ private:
void reStyle();
signals:
void setTheme(QString style);
void on_protocol(bool visible); //post decode button click event,to show or hide protocol property panel
void on_trigger(bool visible); //post decode button click event,to show or hide trigger property panel
void on_measure(bool visible);//post decode button click event,to show or hide measure property panel
void on_search(bool visible);
void show_lissajous(bool visible);
void sig_setTheme(QString style);
void sig_protocol(bool visible); //post decode button click event,to show or hide protocol property panel
void sig_trigger(bool visible); //post decode button click event,to show or hide trigger property panel
void sig_measure(bool visible);//post decode button click event,to show or hide measure property panel
void sig_search(bool visible);
void sig_show_lissajous(bool visible);
private slots:
void on_actionDark_triggered();