From 753c26d320e894069157bd401f7779ad07073d7c Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 27 Jun 2022 00:09:44 +0000 Subject: (From git) Initial Qt GUI setup git-svn-id: file:///home/arch/svn/epistmool/trunk@2 71f44415-077c-4ad7-a976-72ddbf76608f --- ui.qt/source/qml/Document.qml | 39 ++++++++++++++++++++++++++++++++++++++ ui.qt/source/qml/GoToKnowledge.qml | 4 ++++ ui.qt/source/qml/MainWindow.qml | 12 ++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 ui.qt/source/qml/Document.qml create mode 100644 ui.qt/source/qml/GoToKnowledge.qml create mode 100644 ui.qt/source/qml/MainWindow.qml (limited to 'ui.qt/source/qml') diff --git a/ui.qt/source/qml/Document.qml b/ui.qt/source/qml/Document.qml new file mode 100644 index 0000000..e62b731 --- /dev/null +++ b/ui.qt/source/qml/Document.qml @@ -0,0 +1,39 @@ +import QtCore +import QtQuick +import QtQuick.Controls + +import EpistmoolUI + +Item { + DocumentModel { + id: documentModel + } + + ScrollView { + id: scrollView + + ListView { + id: listView + model: documentModel + anchors.fill: parent + + delegate: Item { + required property DocumentBlock documentBlock + required property date modifyTime + + Component.onCompleted: { + documentBlock.textDocument = textArea.textDocument + } + + TextArea { + id: textArea + textFormat: Qt.RichText + wrapMode: TextArea.Wrap + focus: true + selectByMouse: true + persistentSelection: true + } + } + } + } +} diff --git a/ui.qt/source/qml/GoToKnowledge.qml b/ui.qt/source/qml/GoToKnowledge.qml new file mode 100644 index 0000000..f97cbcf --- /dev/null +++ b/ui.qt/source/qml/GoToKnowledge.qml @@ -0,0 +1,4 @@ +import QtQuick + +Item { +} diff --git a/ui.qt/source/qml/MainWindow.qml b/ui.qt/source/qml/MainWindow.qml new file mode 100644 index 0000000..905f0e8 --- /dev/null +++ b/ui.qt/source/qml/MainWindow.qml @@ -0,0 +1,12 @@ +import QtQuick + +Window { + width: 640 + height: 480 + visible: true + title: qsTr("Hello World") + + Document { + id: doc + } +} -- cgit v1.2.3-70-g09d2