polling testing some further mainscreen tinkering
This commit is contained in:
parent
4694f3838f
commit
74701e9431
11 changed files with 233 additions and 40 deletions
16
qml/Application/Assets.qml
Normal file
16
qml/Application/Assets.qml
Normal file
|
@ -0,0 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Item {
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: "This is Assets screen"
|
||||
font {
|
||||
pixelSize: 24
|
||||
bold: true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,6 +10,10 @@ qt_add_qml_module(magpieApplication
|
|||
NO_PLUGIN
|
||||
QML_FILES
|
||||
Root.qml
|
||||
Main.qml
|
||||
Home.qml
|
||||
Assets.qml
|
||||
Records.qml
|
||||
)
|
||||
|
||||
target_link_libraries(magpie PRIVATE magpieApplication)
|
||||
|
|
16
qml/Application/Home.qml
Normal file
16
qml/Application/Home.qml
Normal file
|
@ -0,0 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Item {
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: "This is a Home screen"
|
||||
font {
|
||||
pixelSize: 24
|
||||
bold: true
|
||||
}
|
||||
}
|
||||
}
|
81
qml/Application/Main.qml
Normal file
81
qml/Application/Main.qml
Normal file
|
@ -0,0 +1,81 @@
|
|||
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
property string currentPage: "home"
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Column {
|
||||
id: menu
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 50
|
||||
Layout.preferredWidth: 100
|
||||
Layout.maximumWidth: 100
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
MenuItem {
|
||||
width: parent.width
|
||||
text: qsTr("Home")
|
||||
icon.name: "home"
|
||||
highlighted: currentPage === "home"
|
||||
onTriggered: {
|
||||
if (!this.highlighted)
|
||||
content.replace(home)
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
width: parent.width
|
||||
text: qsTr("Assets")
|
||||
icon.name: "document-properties"
|
||||
highlighted: currentPage === "assets"
|
||||
onTriggered: {
|
||||
if (!this.highlighted)
|
||||
content.replace(assets)
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
width: parent.width
|
||||
text: qsTr("Records")
|
||||
icon.name: "system-search"
|
||||
highlighted: currentPage === "records"
|
||||
onTriggered: {
|
||||
if (!this.highlighted)
|
||||
content.replace(records)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StackView {
|
||||
id: content
|
||||
initialItem: home
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Component {
|
||||
id: home
|
||||
Home {
|
||||
StackView.onActivating: currentPage = "home"
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: assets
|
||||
Assets {
|
||||
StackView.onActivating: currentPage = "assets"
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: records
|
||||
Records {
|
||||
StackView.onActivating: currentPage = "records"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
qml/Application/Records.qml
Normal file
16
qml/Application/Records.qml
Normal file
|
@ -0,0 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Item {
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: "This is Records screen"
|
||||
font {
|
||||
pixelSize: 24
|
||||
bold: true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,13 +4,17 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Page {
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: "Here we go!"
|
||||
font {
|
||||
pixelSize: 24
|
||||
bold: true
|
||||
Item {
|
||||
StackView {
|
||||
id: stack
|
||||
initialItem: main
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Component {
|
||||
id: main
|
||||
Main {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue