mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-11-06 12:32:14 +00:00
chore: configure pyside6-project
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,9 @@
|
||||
__debug*
|
||||
.vscode/
|
||||
|
||||
# QML type cache
|
||||
internal/
|
||||
|
||||
arcaea_offline.db
|
||||
arcaea_offline.ini
|
||||
/data
|
||||
|
||||
@ -56,3 +56,15 @@ ignore = [
|
||||
|
||||
[tool.pyright]
|
||||
ignore = ["**/__debug*.*"]
|
||||
|
||||
[tool.pyside6-project]
|
||||
files = [
|
||||
"app.py",
|
||||
"ui/qmls/App.qml",
|
||||
"ui/qmls/AppMain.qml",
|
||||
|
||||
"ui/viewmodels/overview.py",
|
||||
"ui/qmls/Overview.qml",
|
||||
|
||||
"ui/qmls/404.qml",
|
||||
]
|
||||
|
||||
22
ui/qmls/404.qml
Normal file
22
ui/qmls/404.qml
Normal file
@ -0,0 +1,22 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Page {
|
||||
Column {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
text: '?'
|
||||
font.pointSize: 50
|
||||
horizontalAlignment: Qt.AlignCenter
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
text: 'Placeholder page'
|
||||
horizontalAlignment: Qt.AlignCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
@ -31,6 +32,7 @@ RowLayout {
|
||||
focus: true
|
||||
|
||||
delegate: Item {
|
||||
id: navListItem
|
||||
required property int index
|
||||
required property string label
|
||||
width: parent.width
|
||||
@ -39,7 +41,7 @@ RowLayout {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: () => {
|
||||
navListView.currentIndex = index;
|
||||
navListView.currentIndex = navListItem.index;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,14 +6,11 @@ import internal.ui.vm 1.0
|
||||
|
||||
Page {
|
||||
id: root
|
||||
property var b30: vm.b30
|
||||
|
||||
property alias b30: vm.b30
|
||||
|
||||
OverviewViewModel {
|
||||
id: vm
|
||||
|
||||
onB30Changed: {
|
||||
root.b30 = vm.b30;
|
||||
}
|
||||
}
|
||||
|
||||
component Display: RowLayout {
|
||||
|
||||
@ -3,9 +3,7 @@ from PySide6.QtQml import QmlElement
|
||||
|
||||
from core.database import Database
|
||||
|
||||
from .common import VM_QML_IMPORT_NAME
|
||||
|
||||
QML_IMPORT_NAME = VM_QML_IMPORT_NAME
|
||||
QML_IMPORT_NAME = "internal.ui.vm"
|
||||
QML_IMPORT_MAJOR_VERSION = 1
|
||||
QML_IMPORT_MINOR_VERSION = 0
|
||||
|
||||
@ -28,7 +26,6 @@ class OverviewViewModel(QObject):
|
||||
self._b30 = b30 if b30 is not None else -1.0
|
||||
self.b30Changed.emit()
|
||||
|
||||
def getB30(self):
|
||||
@Property(float, fset=None)
|
||||
def b30(self):
|
||||
return self._b30
|
||||
|
||||
b30 = Property(float, getB30, None, notify=b30Changed)
|
||||
|
||||
Reference in New Issue
Block a user