Spinning refresh button, when refresh is in progress, in memory inspection pane
This commit is contained in:
@@ -44,7 +44,7 @@ HexViewerWidget::HexViewerWidget(
|
|||||||
this->toolBar = this->container->findChild<QWidget*>("tool-bar");
|
this->toolBar = this->container->findChild<QWidget*>("tool-bar");
|
||||||
this->bottomBar = this->container->findChild<QWidget*>("bottom-bar");
|
this->bottomBar = this->container->findChild<QWidget*>("bottom-bar");
|
||||||
|
|
||||||
this->refreshButton = this->toolBar->findChild<QToolButton*>("refresh-memory-btn");
|
this->refreshButton = this->toolBar->findChild<SvgToolButton*>("refresh-memory-btn");
|
||||||
this->highlightStackMemoryButton = this->toolBar->findChild<SvgToolButton*>("highlight-stack-memory-btn");
|
this->highlightStackMemoryButton = this->toolBar->findChild<SvgToolButton*>("highlight-stack-memory-btn");
|
||||||
this->highlightHoveredRowAndColumnButton = this->toolBar->findChild<SvgToolButton*>(
|
this->highlightHoveredRowAndColumnButton = this->toolBar->findChild<SvgToolButton*>(
|
||||||
"highlight-hovered-rows-columns-btn"
|
"highlight-hovered-rows-columns-btn"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace Bloom::Widgets
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QToolButton* refreshButton = nullptr;
|
SvgToolButton* refreshButton = nullptr;
|
||||||
|
|
||||||
HexViewerWidget(
|
HexViewerWidget(
|
||||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ TargetMemoryInspectionPane::TargetMemoryInspectionPane(
|
|||||||
|
|
||||||
void TargetMemoryInspectionPane::refreshMemoryValues(std::optional<std::function<void(void)>> callback) {
|
void TargetMemoryInspectionPane::refreshMemoryValues(std::optional<std::function<void(void)>> callback) {
|
||||||
this->hexViewerWidget->refreshButton->setDisabled(true);
|
this->hexViewerWidget->refreshButton->setDisabled(true);
|
||||||
|
this->hexViewerWidget->refreshButton->startSpin();
|
||||||
|
|
||||||
auto* readMemoryTask = new ReadTargetMemory(
|
auto* readMemoryTask = new ReadTargetMemory(
|
||||||
this->targetMemoryDescriptor.type,
|
this->targetMemoryDescriptor.type,
|
||||||
@@ -107,6 +108,7 @@ void TargetMemoryInspectionPane::refreshMemoryValues(std::optional<std::function
|
|||||||
&InsightWorkerTask::completed,
|
&InsightWorkerTask::completed,
|
||||||
this,
|
this,
|
||||||
[this] {
|
[this] {
|
||||||
|
this->hexViewerWidget->refreshButton->stopSpin();
|
||||||
this->hexViewerWidget->refreshButton->setDisabled(false);
|
this->hexViewerWidget->refreshButton->setDisabled(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user