diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-07 20:25:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-07 20:25:08 +0100 |
| commit | e6d4517817a1e59a63932109e39b888257fb72a1 (patch) | |
| tree | 46d290640fff74773a9d79191ff9221631324e77 | |
| parent | b30b55c48fd9eb64f3555f19820279792f69703c (diff) | |
| parent | 5a7fe8a6eacd5f4caac4f3c3d625ba82e393f7e6 (diff) | |
Merge pull request #3 from ocl-foss-org/text-editor-example
[CHORE] Text Editor example (Part 1)
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | example/text_editor_example/Jamfile.v2 (renamed from example/text_processor_example/Jamfile.v2) | 0 | ||||
| -rw-r--r-- | example/text_editor_example/example.cpp (renamed from example/text_processor_example/example.cpp) | 9 | ||||
| -rw-r--r-- | example/text_editor_example/texteditor.hpp (renamed from example/text_processor_example/qt_widget.hpp) | 21 | ||||
| -rw-r--r-- | include/ocl/tproc/algos/bfs.hpp | 2 |
5 files changed, 18 insertions, 18 deletions
@@ -3,7 +3,9 @@ [](LICENSE)  -Text Processing set of containers from the OCL. +Like the project? Star us! + +Text Processing containers and algorithms from the OCL. ## Requirements: diff --git a/example/text_processor_example/Jamfile.v2 b/example/text_editor_example/Jamfile.v2 index 4bfc827..4bfc827 100644 --- a/example/text_processor_example/Jamfile.v2 +++ b/example/text_editor_example/Jamfile.v2 diff --git a/example/text_processor_example/example.cpp b/example/text_editor_example/example.cpp index 19f0ecf..d61f91f 100644 --- a/example/text_processor_example/example.cpp +++ b/example/text_editor_example/example.cpp @@ -5,11 +5,14 @@ * Copyright 2026, Amlal El Mahrouss, licensed under the Boost Software License. */ -#include "qt_widget.hpp" +#include "texteditor.hpp" int main(int argc, char** argv) { - QApplication app(argc, argv); + QApplication app(argc, argv); + TTextEditor win; - return app.exec(); + win.show(); + + return app.exec(); } diff --git a/example/text_processor_example/qt_widget.hpp b/example/text_editor_example/texteditor.hpp index 6a89ef9..e83cf85 100644 --- a/example/text_processor_example/qt_widget.hpp +++ b/example/text_editor_example/texteditor.hpp @@ -13,7 +13,7 @@ #include <iostream> #include <string> #include <string_view> -#include <QWidget> +#include <QtWidgets> #include <QApplication> #ifndef STANDALONE @@ -27,31 +27,28 @@ using namespace boost; #endif -class TTextEditorWidget; -class TTextEditorWindow; -class TTextEditorDelegate; +class TTextEditor; -class TTextEditorWidget : public QWidget +class TTextEditor : public QMainWindow { - Q_OBJECT + Q_OBJECT public: - using rope_type = tproc::crope; - using size_type = rope_type::size_type; + using rope_type = tproc::crope; + using size_type = rope_type::size_type; using string_view = std::string_view; - TTextEditorWidget() = delete; + TTextEditorWidget() = delete; - TTextEditorWidget(string_view text, TTextEditorDelegate* del) + TTextEditor(string_view text, TTextEditorDelegate* del) : buffer_(text), delegate_(del) { } - virtual ~TTextEditorWidget() = default; + virtual ~TTextEditor() = default; private: rope_type buffer_; - std::weak_ptr<TTextEditorDelegate> delegate_: }; #endif diff --git a/include/ocl/tproc/algos/bfs.hpp b/include/ocl/tproc/algos/bfs.hpp index a27dfcb..0382b72 100644 --- a/include/ocl/tproc/algos/bfs.hpp +++ b/include/ocl/tproc/algos/bfs.hpp @@ -11,8 +11,6 @@ namespace ocl::tproc { - - } #include "bfs.inl" |
