summaryrefslogtreecommitdiffhomepage
path: root/example/text_processor_example/qt_widget.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-03-07 20:25:08 +0100
committerGitHub <noreply@github.com>2026-03-07 20:25:08 +0100
commite6d4517817a1e59a63932109e39b888257fb72a1 (patch)
tree46d290640fff74773a9d79191ff9221631324e77 /example/text_processor_example/qt_widget.hpp
parentb30b55c48fd9eb64f3555f19820279792f69703c (diff)
parent5a7fe8a6eacd5f4caac4f3c3d625ba82e393f7e6 (diff)
Merge pull request #3 from ocl-foss-org/text-editor-example
[CHORE] Text Editor example (Part 1)
Diffstat (limited to 'example/text_processor_example/qt_widget.hpp')
-rw-r--r--example/text_processor_example/qt_widget.hpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/example/text_processor_example/qt_widget.hpp b/example/text_processor_example/qt_widget.hpp
deleted file mode 100644
index 6a89ef9..0000000
--- a/example/text_processor_example/qt_widget.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * File: qt_widget.hpp
- * Purpose: Minimal text editor widget example using tproc rope.
- * Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2026, Amlal El Mahrouss, licensed under the Boost Software License.
- */
-
-#ifndef TPROC_EXAMPLE_QT_WIDGET_HPP
-#define TPROC_EXAMPLE_QT_WIDGET_HPP
-
-#include <ocl/tproc/rope.hpp>
-
-#include <iostream>
-#include <string>
-#include <string_view>
-#include <QWidget>
-#include <QApplication>
-
-#ifndef STANDALONE
-
-using namespace ocl;
-using namespace boost;
-
-#else
-
-using namespace boost;
-
-#endif
-
-class TTextEditorWidget;
-class TTextEditorWindow;
-class TTextEditorDelegate;
-
-class TTextEditorWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- using rope_type = tproc::crope;
- using size_type = rope_type::size_type;
- using string_view = std::string_view;
-
- TTextEditorWidget() = delete;
-
- TTextEditorWidget(string_view text, TTextEditorDelegate* del)
- : buffer_(text), delegate_(del)
- {
- }
-
- virtual ~TTextEditorWidget() = default;
-
-private:
- rope_type buffer_;
- std::weak_ptr<TTextEditorDelegate> delegate_:
-};
-
-#endif