From 3293bed51e785971a4f909fed8135c67645a5a99 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 11 Jul 2024 22:40:57 +0200 Subject: [PATCH] native: clean up --- native/CMakeLists.txt | 2 -- native/Data.qml | 22 --------------- native/LoginScreen.qml | 14 ---------- native/Test.qml | 63 ------------------------------------------ 4 files changed, 101 deletions(-) delete mode 100644 native/Data.qml delete mode 100644 native/Test.qml diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 533d9e4..1037eb8 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -16,8 +16,6 @@ qt_add_qml_module(alisa VERSION 1.0 QML_FILES Main.qml - Data.qml - Test.qml MainPage.qml LoginScreen.qml AddData.qml diff --git a/native/Data.qml b/native/Data.qml deleted file mode 100644 index a8a62de..0000000 --- a/native/Data.qml +++ /dev/null @@ -1,22 +0,0 @@ -import QtQuick -import Qt.labs.qmlmodels - -TableModel { - TableModelColumn { display: "name" } - TableModelColumn { display: "color" } - - rows: [ - { - "name": "cat", - "color": "black" - }, - { - "name": "dog", - "color": "brown" - }, - { - "name": "bird", - "color": "white" - } - ] -} diff --git a/native/LoginScreen.qml b/native/LoginScreen.qml index a954a31..d3c4e72 100644 --- a/native/LoginScreen.qml +++ b/native/LoginScreen.qml @@ -99,18 +99,4 @@ Rectangle { }); xhr.send(data); } - Button { - id: loginScreenB - anchors { - bottom: parent.bottom - left: parent.left - } - - text: qsTr("Test") - onClicked: { - var component = Qt.createComponent("Test.qml") - var window = component.createObject(root) - window.show() - } - } } diff --git a/native/Test.qml b/native/Test.qml deleted file mode 100644 index ef35281..0000000 --- a/native/Test.qml +++ /dev/null @@ -1,63 +0,0 @@ -import QtQuick 2.12 -import QtQuick.Window 2.12 -import Qt.labs.qmlmodels 1.0 - -Window { - width: 400 - height: 400 - visible: true - - TableView { - anchors.fill: parent - columnSpacing: 0 - rowSpacing: 1 - boundsBehavior: Flickable.StopAtBounds - - model: TableModel { - TableModelColumn { display: "checked" } - TableModelColumn { display: "amount" } - TableModelColumn { display: "fruitType" } - TableModelColumn { display: "fruitName" } - TableModelColumn { display: "fruitPrice" } - - // Each row is one type of fruit that can be ordered - rows: [ - { - // Each property is one cell/column. - checked: false, - amount: 1, - fruitType: "Apple", - fruitName: "Granny Smith", - fruitPrice: 1.50 - }, - { - checked: true, - amount: 4, - fruitType: "Orange", - fruitName: "Navel", - fruitPrice: 2.50 - }, - { - checked: false, - amount: 1, - fruitType: "Banana", - fruitName: "Cavendish", - fruitPrice: 3.50 - } - ] - } - delegate: TextInput { - text: model.display - padding: 12 - selectByMouse: true - - onAccepted: model.display = text - - Rectangle { - anchors.fill: parent - color: "#efefef" - z: -1 - } - } - } -}