From 51729a55aa24b950ec41bb406b8ce1729c1217b7 Mon Sep 17 00:00:00 2001 From: Blue Fox Date: Sat, 14 Oct 2023 17:09:10 +0200 Subject: [PATCH] Restructured & Ordered everything; unused files got deleted --- CMakeLists.txt | 9 +++++++-- Main.qml | 12 +++++++++--- NotesPage.qml | 31 +++++++++++++++++++++++++++++++ SiteInConstruction.qml | 4 ++-- 4 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 NotesPage.qml diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ccd23f..be38ac9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ project(Scorganizr VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.4 REQUIRED COMPONENTS Quick) +find_package(Qt6 COMPONENTS Core Gui Quick Qml Multimedia LinguistTools Svg REQUIRED) qt_standard_project_setup() @@ -15,7 +16,11 @@ qt_add_executable(appScorganizr qt_add_qml_module(appScorganizr URI Scorganizr VERSION 1.0 - QML_FILES Main.qml SiteInConstruction.qml Icon.qml + QML_FILES + "Main.qml" + "NotesPage.qml" + "SiteInConstruction.qml" + "Icon.qml" ) set_target_properties(appScorganizr PROPERTIES @@ -27,7 +32,7 @@ set_target_properties(appScorganizr PROPERTIES ) target_link_libraries(appScorganizr - PRIVATE Qt6::Quick + PRIVATE Qt6::Core Qt6::Gui Qt6::Quick Qt6::Qml Qt6::Multimedia Qt6::Svg ) install(TARGETS appScorganizr diff --git a/Main.qml b/Main.qml index cf27bff..973e3c1 100644 --- a/Main.qml +++ b/Main.qml @@ -1,16 +1,20 @@ import QtQuick import QtQuick.Window -import QtQuick.Controls import QtQuick.Controls.Material +import "." as App + + ApplicationWindow { width: Screen.width/2 height: Screen.height/2 + minimumHeight: 400 + minimumWidth: 400 visible: true title: "Scorganizr" Material.theme: Material.System - Material.accent: Material.Pink + Material.accent: Material.Blue Page { id: window @@ -30,8 +34,10 @@ ApplicationWindow { anchors.fill: parent currentIndex: tabBar.currentIndex + NotesPage {} + Repeater { - model: 5 + model: 4 Pane { width: SwipeView.view.width diff --git a/NotesPage.qml b/NotesPage.qml new file mode 100644 index 0000000..488b440 --- /dev/null +++ b/NotesPage.qml @@ -0,0 +1,31 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Controls.Material + +Page { + id: notesPage + + width: SwipeView.view.width + height: SwipeView.view.height + + header: ToolBar { + background: Rectangle { color: Material.background } + RowLayout { + anchors.fill: parent + + ToolButton { + id: sortButton + icon.source: `data:image/svg+xml;utf8,` + icon.color: Material.foreground + icon.height: 10 + icon.width: 10 + Layout.alignment: Qt.AlignRight + ToolTip.visible: pressed + ToolTip.text: "Work in progress" + } + } + } + + SiteInConstruction {} +} diff --git a/SiteInConstruction.qml b/SiteInConstruction.qml index c7381a4..75ae7ab 100644 --- a/SiteInConstruction.qml +++ b/SiteInConstruction.qml @@ -12,7 +12,7 @@ Item { // workaround to prevent the error "Point size [...] must be greater than 0" function getFontSize(s) { - return s === 0 ? 1 : s; + return s <= 0 ? 1 : s; } children: [ @@ -23,7 +23,7 @@ Item { path: parent.inDevIconDataURI width: parent.width/5 height: width - color: "white" + color: Material.foreground }, Text { id: inDevText