Commit 42966ac4 authored by librebob's avatar librebob

Add support for settings view.

parent 8b62fa5b
......@@ -79,6 +79,7 @@ Page {
MenuItem {
text: "Settings"
onTriggered: stackView.push(settingsView)
}
MenuItem {
text: "Update All"
......
......@@ -8,14 +8,14 @@ from peewee import SqliteDatabase
from game import Game
from library import Library
from models import GameRecord, db
from models import GameRecord, SettingsRecord, db
def main():
signal.signal(signal.SIGINT, signal.SIG_DFL)
print('Press Ctrl+C to quit.')
db.connect()
db.create_tables([GameRecord], safe=True)
db.create_tables([GameRecord, SettingsRecord], safe=True)
app = QGuiApplication(argv)
app.setApplicationDisplayName('Athenaeum')
......
......@@ -21,6 +21,7 @@ ApplicationWindow {
// property Component gameView: GameView{}
property Component libraryView: LibraryView{}
property Component settingsView: SettingsView{}
StackView {
id: stackView
......
......@@ -12,3 +12,7 @@ class GameRecord(BaseModel):
installed = BooleanField(default=False)
created_date = DateTimeField(default=datetime.datetime.now)
modified_date = DateTimeField()
class SettingsRecord(BaseModel):
key = CharField(unique=True)
value = TextField()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment