From fd7d880196db79f4cba69aa36438aa9213ddd918 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 4 Mar 2026 06:57:39 +0100 Subject: feat: example/algos: implementing qt example. Signed-off-by: Amlal El Mahrouss --- example/text_processor_example/qt_widget.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/text_processor_example/qt_widget.hpp b/example/text_processor_example/qt_widget.hpp index 60777e6..6a89ef9 100644 --- a/example/text_processor_example/qt_widget.hpp +++ b/example/text_processor_example/qt_widget.hpp @@ -27,6 +27,10 @@ using namespace boost; #endif +class TTextEditorWidget; +class TTextEditorWindow; +class TTextEditorDelegate; + class TTextEditorWidget : public QWidget { Q_OBJECT @@ -36,8 +40,10 @@ public: using size_type = rope_type::size_type; using string_view = std::string_view; - TTextEditorWidget(string_view text = {}) - : buffer_(text) + TTextEditorWidget() = delete; + + TTextEditorWidget(string_view text, TTextEditorDelegate* del) + : buffer_(text), delegate_(del) { } @@ -45,6 +51,7 @@ public: private: rope_type buffer_; + std::weak_ptr delegate_: }; #endif -- cgit v1.2.3