diff --git a/native/.gitignore b/native/.gitignore index b7a394a..6f46744 100644 --- a/native/.gitignore +++ b/native/.gitignore @@ -1,4 +1 @@ - - -**/build -**/imports \ No newline at end of file +**/build \ No newline at end of file diff --git a/native/QTprojeckt/NativGuiAlisa/NativGuiAlisa.qmlproject.qtds b/native/QTprojeckt/NativGuiAlisa/NativGuiAlisa.qmlproject.qtds new file mode 100644 index 0000000..ff2343e --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/NativGuiAlisa.qmlproject.qtds @@ -0,0 +1,115 @@ + + + + + + EnvironmentId + {e57dfb78-a8dc-42e2-a4cd-6398ab5441f9} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + 0 + false + true + false + 2 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop Qt 6.7.1 + Desktop Qt 6.7.1 + {63f87550-2541-4163-9631-08b7fea781da} + -1 + 0 + 0 + 0 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + 0 + + false + QML Runtime + QmlProjectManager.QmlRunConfiguration.Qml + + false + en + CurrentFile + true + true + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/native/QTprojeckt/NativGuiAlisa/content/Screen01.ui.qml.autosave b/native/QTprojeckt/NativGuiAlisa/content/Screen01.ui.qml.autosave new file mode 100644 index 0000000..aa00896 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/content/Screen01.ui.qml.autosave @@ -0,0 +1,88 @@ +/* +This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only. +It is supposed to be strictly declarative and only uses a subset of QML. If you edit +this file manually, you might introduce QML code that is not supported by Qt Design Studio. +Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files. +*/ + +import QtQuick 6.2 +import QtQuick.Controls 6.2 +import NativGuiAlisa + +Rectangle { + id: rectangle + width: Constants.width + height: Constants.height + + color: Constants.backgroundColor + + Button { + id: button + text: qsTr("Press me") + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: 12 + anchors.horizontalCenterOffset: 1 + checkable: true + anchors.horizontalCenter: parent.horizontalCenter + + Connections { + target: button + onClicked: animation.start() + } + } + + Text { + id: label + text: qsTr("Hello NativGuiAlisa") + anchors.top: button.bottom + font.family: Constants.font.family + anchors.topMargin: 45 + anchors.horizontalCenter: parent.horizontalCenter + + SequentialAnimation { + id: animation + + ColorAnimation { + id: colorAnimation1 + target: rectangle + property: "color" + to: "#2294c6" + from: Constants.backgroundColor + } + + ColorAnimation { + id: colorAnimation2 + target: rectangle + property: "color" + to: Constants.backgroundColor + from: "#2294c6" + } + } + } + + DelayButton { + id: delayButton + x: 912 + y: 422 + text: qsTr("Delay Button") + } + + Pane { + id: pane + x: 113 + y: 52 + width: 1693 + height: 56 + } + states: [ + State { + name: "clicked" + when: button.checked + + PropertyChanges { + target: label + text: qsTr("Button Checked") + } + } + ] +} diff --git a/native/QTprojeckt/NativGuiAlisa/imports/CMakeLists.txt b/native/QTprojeckt/NativGuiAlisa/imports/CMakeLists.txt new file mode 100644 index 0000000..12db0c6 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/CMakeLists.txt @@ -0,0 +1,4 @@ +### This file is automatically generated by Qt Design Studio. +### Do not change + +add_subdirectory(NativGuiAlisa) diff --git a/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/CMakeLists.txt b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/CMakeLists.txt new file mode 100644 index 0000000..46f5831 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/CMakeLists.txt @@ -0,0 +1,19 @@ +### This file is automatically generated by Qt Design Studio. +### Do not change + +qt_add_library(NativGuiAlisa STATIC) +set_source_files_properties(Constants.qml + PROPERTIES + QT_QML_SINGLETON_TYPE true + ) + +qt6_add_qml_module(NativGuiAlisa + URI "NativGuiAlisa" + VERSION 1.0 + RESOURCE_PREFIX "/qt/qml" + QML_FILES + Constants.qml + DirectoryFontLoader.qml + EventListModel.qml + EventListSimulator.qml +) diff --git a/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/Constants.qml b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/Constants.qml new file mode 100644 index 0000000..8710bcb --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/Constants.qml @@ -0,0 +1,27 @@ +pragma Singleton +import QtQuick 6.2 +import QtQuick.Studio.Application + +QtObject { + readonly property int width: 1920 + readonly property int height: 1080 + + property string relativeFontDirectory: "fonts" + + /* Edit this comment to add your custom font */ + readonly property font font: Qt.font({ + family: Qt.application.font.family, + pixelSize: Qt.application.font.pixelSize + }) + readonly property font largeFont: Qt.font({ + family: Qt.application.font.family, + pixelSize: Qt.application.font.pixelSize * 1.6 + }) + + readonly property color backgroundColor: "#EAEAEA" + + + property StudioApplication application: StudioApplication { + fontPath: Qt.resolvedUrl("../../content/" + relativeFontDirectory) + } +} diff --git a/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/DirectoryFontLoader.qml b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/DirectoryFontLoader.qml new file mode 100644 index 0000000..aa22eac --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/DirectoryFontLoader.qml @@ -0,0 +1,34 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick 6.2 +import Qt.labs.folderlistmodel 6.2 + +QtObject { + id: loader + + property url fontDirectory: Qt.resolvedUrl("../../content/" + relativeFontDirectory) + property string relativeFontDirectory: "fonts" + + function loadFont(url) { + var fontLoader = Qt.createQmlObject('import QtQuick 2.15; FontLoader { source: "' + url + '"; }', + loader, + "dynamicFontLoader"); + } + + property FolderListModel folderModel: FolderListModel { + id: folderModel + folder: loader.fontDirectory + nameFilters: [ "*.ttf", "*.otf" ] + showDirs: false + + onStatusChanged: { + if (folderModel.status == FolderListModel.Ready) { + var i + for (i = 0; i < count; i++) { + loadFont(folderModel.get(i, "fileURL")) + } + } + } + } +} diff --git a/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/EventListModel.qml b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/EventListModel.qml new file mode 100644 index 0000000..bd5e5c3 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/EventListModel.qml @@ -0,0 +1,15 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick 6.2 + +ListModel { + id: eventListModel + + ListElement { + eventId: "enterPressed" + eventDescription: "Emitted when pressing the enter button" + shortcut: "Return" + parameters: "Enter" + } +} diff --git a/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/EventListSimulator.qml b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/EventListSimulator.qml new file mode 100644 index 0000000..b7724cb --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/EventListSimulator.qml @@ -0,0 +1,25 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick 6.2 +import QtQuick.Studio.EventSimulator 1.0 +import QtQuick.Studio.EventSystem 1.0 + +QtObject { + id: simulator + property bool active: true + + property Timer __timer: Timer { + id: timer + interval: 100 + onTriggered: { + EventSimulator.show() + } + } + + Component.onCompleted: { + EventSystem.init(Qt.resolvedUrl("EventListModel.qml")) + if (simulator.active) + timer.start() + } +} diff --git a/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/designer/plugin.metainfo b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/designer/plugin.metainfo new file mode 100644 index 0000000..cbd30d3 --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/designer/plugin.metainfo @@ -0,0 +1,13 @@ +MetaInfo { + Type { + name: "NativGuiAlisa.EventListSimulator" + icon: ":/qtquickplugin/images/item-icon16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + } +} diff --git a/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/qmldir b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/qmldir new file mode 100644 index 0000000..70885de --- /dev/null +++ b/native/QTprojeckt/NativGuiAlisa/imports/NativGuiAlisa/qmldir @@ -0,0 +1,5 @@ +Module NativGuiAlisa +singleton Constants 1.0 Constants.qml +EventListSimulator 1.0 EventListSimulator.qml +EventListModel 1.0 EventListModel.qml +DirectoryFontLoader 1.0 DirectoryFontLoader.qml