Skip to content

Commit

Permalink
regmap: info button added options for tutorial and documentation
Browse files Browse the repository at this point in the history
Signed-off-by: IonutMuthi <[email protected]>
  • Loading branch information
IonutMuthi committed Nov 21, 2024
1 parent d7c9d79 commit bb76a23
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions plugins/regmap/src/registermaptool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,18 @@ RegisterMapTool::RegisterMapTool(QWidget *parent)
tool->centralContainer()->layout()->setSpacing(0);
lay->addWidget(tool);

InfoBtn *infoBtn = new InfoBtn(this);
InfoBtn *infoBtn = new InfoBtn(this, true);
tool->addWidgetToTopContainerHelper(infoBtn, TTA_LEFT);
connect(infoBtn, &QAbstractButton::clicked, this, [=]() {

connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() {
if(searchBarWidget->isVisible()) {
startTutorial();
} else {
startSimpleTutorial();
}
});

connect(infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=]() {
QDesktopServices::openUrl(
QUrl("https://analogdevicesinc.github.io/scopy/plugins/registermap/registermap.html"));
});
Expand Down

0 comments on commit bb76a23

Please sign in to comment.