diff --git a/plugins/dac/src/dacinstrument.cpp b/plugins/dac/src/dacinstrument.cpp index e1ae5d4fe5..4c96c05e45 100644 --- a/plugins/dac/src/dacinstrument.cpp +++ b/plugins/dac/src/dacinstrument.cpp @@ -69,11 +69,10 @@ DacInstrument::DacInstrument(const Connection *conn, QWidget *parent) rightMenuBtnGrp->addButton(settingsBtn); rightMenuBtnGrp->addButton(devicesBtn->button()); - connect(infoBtn, &InfoBtn::clicked, this, [=]() { + connect(infoBtn, &InfoBtn::clicked, this, [this]() { infoBtn->generateInfoPopup(this); - connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); }); - + connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &DacInstrument::startTutorial); connect(infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() { QDesktopServices::openUrl( QUrl("https://analogdevicesinc.github.io/scopy/plugins/dac/dac.html")); diff --git a/plugins/dac/src/dacinstrument.h b/plugins/dac/src/dacinstrument.h index 9ee604382d..1090e3f1e9 100644 --- a/plugins/dac/src/dacinstrument.h +++ b/plugins/dac/src/dacinstrument.h @@ -49,9 +49,13 @@ public Q_SLOTS: void startTutorial(); void runToggled(bool toggled); void dacRunning(bool toggled); + Q_SIGNALS: void running(bool toggled); +private Q_SLOTS: + void startDdsTutorial(); + private: void setupDacDataManagers(); MenuControlButton *addDevice(DacDataManager *dev, QWidget *parent); @@ -59,7 +63,6 @@ public Q_SLOTS: void setupDacDataDeviceButtons(); void startBufferTutorial(); void startBufferNonCyclicTutorial(); - void startDdsTutorial(); void abortTutorial(); const Connection *m_conn; diff --git a/plugins/datalogger/include/datalogger/datamonitortool.h b/plugins/datalogger/include/datalogger/datamonitortool.h index 8d4661cc52..eadaf60129 100644 --- a/plugins/datalogger/include/datalogger/datamonitortool.h +++ b/plugins/datalogger/include/datalogger/datamonitortool.h @@ -62,6 +62,9 @@ class SCOPY_DATALOGGER_EXPORT DatamonitorTool : public QWidget void settingsTitleChanged(QString newTitle); void requestDeleteTool(); +private Q_SLOTS: + void startTutorial(); + private: MenuControlButton *monitorsButton; DataAcquisitionManager *m_dataAcquisitionManager; @@ -92,7 +95,6 @@ class SCOPY_DATALOGGER_EXPORT DatamonitorTool : public QWidget MonitorSelectionMenu *m_monitorSelectionMenu; void initTutorialProperties(); - void startTutorial(); }; } // namespace scopy::datamonitor #endif // DATAMONITORTOOL_H diff --git a/plugins/datalogger/src/datamonitortool.cpp b/plugins/datalogger/src/datamonitortool.cpp index 137c9e7982..e4618dcbef 100644 --- a/plugins/datalogger/src/datamonitortool.cpp +++ b/plugins/datalogger/src/datamonitortool.cpp @@ -71,11 +71,10 @@ DatamonitorTool::DatamonitorTool(DataAcquisitionManager *dataAcquisitionManager, infoBtn = new InfoBtn(this, true); - connect(infoBtn, &InfoBtn::clicked, this, [=]() { + connect(infoBtn, &InfoBtn::clicked, this, [this]() { infoBtn->generateInfoPopup(this); - connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); }); - + connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &DatamonitorTool::startTutorial); connect(infoBtn->getDocumentationButton(), &QPushButton::clicked, this, [=]() { QDesktopServices::openUrl( QUrl("https://analogdevicesinc.github.io/scopy/plugins/datalogger/datalogger.html")); diff --git a/plugins/swiot/src/ad74413r/ad74413r.cpp b/plugins/swiot/src/ad74413r/ad74413r.cpp index ed50e32807..49f169ec31 100644 --- a/plugins/swiot/src/ad74413r/ad74413r.cpp +++ b/plugins/swiot/src/ad74413r/ad74413r.cpp @@ -609,9 +609,9 @@ void Ad74413r::setupToolTemplate() m_singleBtn->setChecked(false); m_configBtn = createConfigBtn(); - connect(m_infoBtn, &InfoBtn::clicked, this, [=]() { + connect(m_infoBtn, &InfoBtn::clicked, this, [this]() { m_infoBtn->generateInfoPopup(this); - connect(m_infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); }); + connect(m_infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Ad74413r::startTutorial); connect(m_infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() { QDesktopServices::openUrl( QUrl("https://analogdevicesinc.github.io/scopy/plugins/swiot1l/ad74413r.html")); diff --git a/plugins/swiot/src/faults/faults.cpp b/plugins/swiot/src/faults/faults.cpp index 8859c1a104..6e00ad41cc 100644 --- a/plugins/swiot/src/faults/faults.cpp +++ b/plugins/swiot/src/faults/faults.cpp @@ -56,9 +56,9 @@ Faults::Faults(QString uri, ToolMenuEntry *tme, QWidget *parent) InfoBtn *infoBtn = new InfoBtn(this, true); m_tool->addWidgetToTopContainerHelper(infoBtn, TTA_LEFT); - connect(infoBtn, &InfoBtn::clicked, this, [=]() { + connect(infoBtn, &InfoBtn::clicked, this, [this, infoBtn]() { infoBtn->generateInfoPopup(this); - connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); }); + connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Faults::startTutorial); connect(infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() { QDesktopServices::openUrl( QUrl("https://analogdevicesinc.github.io/scopy/plugins/swiot1l/faults.html")); diff --git a/plugins/swiot/src/max14906/max14906.cpp b/plugins/swiot/src/max14906/max14906.cpp index 57ca5bbea5..c34604686c 100644 --- a/plugins/swiot/src/max14906/max14906.cpp +++ b/plugins/swiot/src/max14906/max14906.cpp @@ -60,9 +60,9 @@ Max14906::Max14906(QString uri, ToolMenuEntry *tme, QWidget *parent) InfoBtn *infoBtn = new InfoBtn(this, true); m_tool->addWidgetToTopContainerHelper(infoBtn, TTA_LEFT); - connect(infoBtn, &InfoBtn::clicked, this, [=]() { + connect(infoBtn, &InfoBtn::clicked, this, [this, infoBtn]() { infoBtn->generateInfoPopup(this); - connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); }); + connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Max14906::startTutorial); connect(infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() { QDesktopServices::openUrl(