diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-04 06:57:39 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-04 06:57:39 +0100 |
| commit | fd7d880196db79f4cba69aa36438aa9213ddd918 (patch) | |
| tree | 1b93694c5568c7d196f7f69b73addde7560c115a /example/text_processor_example | |
| parent | babce8591f6853c119071ac7fc05a1e78b71e756 (diff) | |
feat: example/algos: implementing qt example.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'example/text_processor_example')
| -rw-r--r-- | example/text_processor_example/qt_widget.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
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<TTextEditorDelegate> delegate_: }; #endif |
