mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-11-06 20:42:15 +00:00
wip: database checker
This commit is contained in:
68
ui/qmls/AppMain.qml
Normal file
68
ui/qmls/AppMain.qml
Normal file
@ -0,0 +1,68 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
RowLayout {
|
||||
id: layout
|
||||
spacing: 5
|
||||
|
||||
ListModel {
|
||||
id: navListModel
|
||||
|
||||
ListElement {
|
||||
_id: 'home'
|
||||
label: 'Overview'
|
||||
qmlSource: 'Overview.qml'
|
||||
}
|
||||
ListElement {
|
||||
_id: 'database'
|
||||
label: 'Database'
|
||||
qmlSource: '404.qml'
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: navListView
|
||||
|
||||
Layout.preferredWidth: 200
|
||||
Layout.fillHeight: true
|
||||
|
||||
model: navListModel
|
||||
focus: true
|
||||
|
||||
delegate: Item {
|
||||
required property int index
|
||||
required property string label
|
||||
width: parent.width
|
||||
height: 30
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: () => {
|
||||
navListView.currentIndex = index;
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.margins: 5
|
||||
anchors.fill: parent
|
||||
|
||||
text: parent.label
|
||||
}
|
||||
}
|
||||
|
||||
highlight: Rectangle {
|
||||
width: parent.width
|
||||
height: 30
|
||||
color: "#FFFF88"
|
||||
y: ListView.view.currentItem.y
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
Layout.preferredWidth: 500
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
source: navListView.currentIndex > -1 ? navListModel.get(navListView.currentIndex).qmlSource : '404.qml'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user