mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-11-07 04:52:15 +00:00
chore: configure pyside6-project
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,9 @@
|
|||||||
__debug*
|
__debug*
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
|
# QML type cache
|
||||||
|
internal/
|
||||||
|
|
||||||
arcaea_offline.db
|
arcaea_offline.db
|
||||||
arcaea_offline.ini
|
arcaea_offline.ini
|
||||||
/data
|
/data
|
||||||
|
|||||||
@ -56,3 +56,15 @@ ignore = [
|
|||||||
|
|
||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
ignore = ["**/__debug*.*"]
|
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
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
@ -31,6 +32,7 @@ RowLayout {
|
|||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
|
id: navListItem
|
||||||
required property int index
|
required property int index
|
||||||
required property string label
|
required property string label
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -39,7 +41,7 @@ RowLayout {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: () => {
|
onClicked: () => {
|
||||||
navListView.currentIndex = index;
|
navListView.currentIndex = navListItem.index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,14 +6,11 @@ import internal.ui.vm 1.0
|
|||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: root
|
id: root
|
||||||
property var b30: vm.b30
|
|
||||||
|
property alias b30: vm.b30
|
||||||
|
|
||||||
OverviewViewModel {
|
OverviewViewModel {
|
||||||
id: vm
|
id: vm
|
||||||
|
|
||||||
onB30Changed: {
|
|
||||||
root.b30 = vm.b30;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
component Display: RowLayout {
|
component Display: RowLayout {
|
||||||
|
|||||||
@ -3,9 +3,7 @@ from PySide6.QtQml import QmlElement
|
|||||||
|
|
||||||
from core.database import Database
|
from core.database import Database
|
||||||
|
|
||||||
from .common import VM_QML_IMPORT_NAME
|
QML_IMPORT_NAME = "internal.ui.vm"
|
||||||
|
|
||||||
QML_IMPORT_NAME = VM_QML_IMPORT_NAME
|
|
||||||
QML_IMPORT_MAJOR_VERSION = 1
|
QML_IMPORT_MAJOR_VERSION = 1
|
||||||
QML_IMPORT_MINOR_VERSION = 0
|
QML_IMPORT_MINOR_VERSION = 0
|
||||||
|
|
||||||
@ -28,7 +26,6 @@ class OverviewViewModel(QObject):
|
|||||||
self._b30 = b30 if b30 is not None else -1.0
|
self._b30 = b30 if b30 is not None else -1.0
|
||||||
self.b30Changed.emit()
|
self.b30Changed.emit()
|
||||||
|
|
||||||
def getB30(self):
|
@Property(float, fset=None)
|
||||||
|
def b30(self):
|
||||||
return self._b30
|
return self._b30
|
||||||
|
|
||||||
b30 = Property(float, getB30, None, notify=b30Changed)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user