From 48f6310734b503e3d4b462bdfd1720b95672d0ef Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 19 Jan 2026 11:26:34 +0400 Subject: [PATCH] Add debug widget --- src/DebugWidget.cpp | 24 ++++++++++++++++++++++++ src/DebugWidget.h | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/DebugWidget.cpp create mode 100644 src/DebugWidget.h diff --git a/src/DebugWidget.cpp b/src/DebugWidget.cpp new file mode 100644 index 0000000..ecc5487 --- /dev/null +++ b/src/DebugWidget.cpp @@ -0,0 +1,24 @@ +#include "DebugWidget.h" +#include + +// Static pointer to the active StorageWidget for callbacks +static StorageWidget* activeWidget = nullptr; + +StorageWidget::StorageWidget(QWidget* parent) : QWidget(parent) { + + // Set as the active widget + activeWidget = this; + + // m_logosAPI = new LogosAPI("core", this); + // logos = new LogosModules(m_logosAPI); + + // Main vertical layout + mainLayout = new QVBoxLayout(this); +} + +StorageWidget::~StorageWidget() { + // Reset the active widget if it's this instance + if (activeWidget == this) { + activeWidget = nullptr; + } +} diff --git a/src/DebugWidget.h b/src/DebugWidget.h new file mode 100644 index 0000000..ce547d2 --- /dev/null +++ b/src/DebugWidget.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include + +class DebugWidget : public QWidget { + Q_OBJECT + + public: + explicit DebugWidget(QWidget* parent = nullptr); + ~DebugWidget(); + + // private slots: + // void onSendButtonClicked(); + // void onStartButtonClicked(); + // void onDebugButtonClicked(); + + private: + // UI elements + QVBoxLayout* mainLayout; +};