Added help button to register inspection window
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <QTableWidget>
|
#include <QTableWidget>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
#include "../../UiLoader.hpp"
|
#include "../../UiLoader.hpp"
|
||||||
|
|
||||||
@@ -78,9 +79,10 @@ registerValue(registerValue.value_or(Targets::TargetMemoryBuffer(registerDescrip
|
|||||||
this->registerValueContainer = this->container->findChild<QWidget*>("register-value-container");
|
this->registerValueContainer = this->container->findChild<QWidget*>("register-value-container");
|
||||||
this->registerValueTextInput = this->container->findChild<QLineEdit*>("register-value-text-input");
|
this->registerValueTextInput = this->container->findChild<QLineEdit*>("register-value-text-input");
|
||||||
this->registerValueBitsetWidgetContainer = this->container->findChild<QWidget*>("register-value-bitset-widget-container");
|
this->registerValueBitsetWidgetContainer = this->container->findChild<QWidget*>("register-value-bitset-widget-container");
|
||||||
this->closeButton = this->container->findChild<QPushButton*>("close-btn");
|
|
||||||
this->refreshValueButton = this->container->findChild<QPushButton*>("refresh-value-btn");
|
this->refreshValueButton = this->container->findChild<QPushButton*>("refresh-value-btn");
|
||||||
this->applyButton = this->container->findChild<QPushButton*>("apply-btn");
|
this->applyButton = this->container->findChild<QPushButton*>("apply-btn");
|
||||||
|
this->helpButton = this->container->findChild<QPushButton*>("help-btn");
|
||||||
|
this->closeButton = this->container->findChild<QPushButton*>("close-btn");
|
||||||
|
|
||||||
this->registerNameLabel->setText(registerName);
|
this->registerNameLabel->setText(registerName);
|
||||||
|
|
||||||
@@ -163,6 +165,7 @@ registerValue(registerValue.value_or(Targets::TargetMemoryBuffer(registerDescrip
|
|||||||
|
|
||||||
this->registerHistoryWidget->setFixedHeight(this->contentContainer->sizeHint().height());
|
this->registerHistoryWidget->setFixedHeight(this->contentContainer->sizeHint().height());
|
||||||
|
|
||||||
|
this->connect(this->helpButton, &QPushButton::clicked, this, &TargetRegisterInspectorWindow::openHelpPage);
|
||||||
this->connect(this->closeButton, &QPushButton::clicked, this, &QWidget::close);
|
this->connect(this->closeButton, &QPushButton::clicked, this, &QWidget::close);
|
||||||
this->connect(
|
this->connect(
|
||||||
this->refreshValueButton,
|
this->refreshValueButton,
|
||||||
@@ -307,7 +310,7 @@ void TargetRegisterInspectorWindow::refreshRegisterValue() {
|
|||||||
readTargetRegisterTask,
|
readTargetRegisterTask,
|
||||||
&InsightWorkerTask::failed,
|
&InsightWorkerTask::failed,
|
||||||
this,
|
this,
|
||||||
[this] () {
|
[this] {
|
||||||
this->registerValueContainer->setDisabled(false);
|
this->registerValueContainer->setDisabled(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -337,3 +340,8 @@ void TargetRegisterInspectorWindow::applyChanges() {
|
|||||||
|
|
||||||
this->insightWorker.queueTask(writeRegisterTask);
|
this->insightWorker.queueTask(writeRegisterTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TargetRegisterInspectorWindow::openHelpPage() {
|
||||||
|
// QDesktopServices::openUrl(QUrl("https://bloom.oscillate.io/docs/register-inspection"));
|
||||||
|
QDesktopServices::openUrl(QUrl("http://bloom.local/docs/register-inspection"));
|
||||||
|
}
|
||||||
|
|||||||
@@ -40,9 +40,10 @@ namespace Bloom::Widgets
|
|||||||
QWidget* registerValueBitsetWidgetContainer = nullptr;
|
QWidget* registerValueBitsetWidgetContainer = nullptr;
|
||||||
std::vector<BitsetWidget*> bitsetWidgets;
|
std::vector<BitsetWidget*> bitsetWidgets;
|
||||||
|
|
||||||
QPushButton* closeButton = nullptr;
|
|
||||||
QPushButton* refreshValueButton = nullptr;
|
QPushButton* refreshValueButton = nullptr;
|
||||||
QPushButton* applyButton = nullptr;
|
QPushButton* applyButton = nullptr;
|
||||||
|
QPushButton* helpButton = nullptr;
|
||||||
|
QPushButton* closeButton = nullptr;
|
||||||
|
|
||||||
Targets::TargetState targetState = Targets::TargetState::UNKNOWN;
|
Targets::TargetState targetState = Targets::TargetState::UNKNOWN;
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ namespace Bloom::Widgets
|
|||||||
void updateValue();
|
void updateValue();
|
||||||
void refreshRegisterValue();
|
void refreshRegisterValue();
|
||||||
void applyChanges();
|
void applyChanges();
|
||||||
|
void openHelpPage();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TargetRegisterInspectorWindow(
|
TargetRegisterInspectorWindow(
|
||||||
|
|||||||
@@ -207,6 +207,13 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>15</number>
|
<number>15</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item alignment="Qt::AlignRight">
|
||||||
|
<widget class="QPushButton" name="help-btn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Help</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item alignment="Qt::AlignLeft">
|
<item alignment="Qt::AlignLeft">
|
||||||
<spacer name="horizontal-spacer">
|
<spacer name="horizontal-spacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
Reference in New Issue
Block a user