Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ingame
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
ingame
Commits
48fbf1aa
Commit
48fbf1aa
authored
Aug 08, 2024
by
Georgiy Yankovskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fullscreen CLI option
parent
3d2434b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
main.py
ingame/main.py
+20
-6
No files found.
ingame/main.py
View file @
48fbf1aa
import
argparse
import
sys
from
pathlib
import
Path
from
PySide6.QtGui
import
QGuiApplication
from
typing
import
cast
from
PySide6.QtGui
import
QGuiApplication
,
QWindow
from
PySide6.QtQml
import
QQmlApplicationEngine
from
ingame.models.App
import
App
from
ingame.models.GamesModel
import
GamesModel
# TODO: add VirtualKeyboard
def
main
():
def
main
(
fullscreen
:
bool
=
False
):
app
=
QGuiApplication
(
sys
.
argv
)
app_model
=
App
()
app
.
aboutToQuit
.
connect
(
app_model
.
close_event
)
qml_file
=
Path
(
__file__
)
.
resolve
()
.
parent
/
"../qml/qml.qml"
engine
=
QQmlApplicationEngine
()
...
...
@@ -24,8 +25,21 @@ def main():
if
not
engine
.
rootObjects
():
sys
.
exit
(
-
1
)
window
:
QWindow
=
cast
(
QWindow
,
engine
.
rootObjects
()[
0
])
window
.
setVisibility
(
fullscreen
and
window
.
Visibility
.
FullScreen
or
window
.
Visibility
.
Windowed
)
sys
.
exit
(
app
.
exec
())
if
__name__
==
"__main__"
:
main
()
parser
=
argparse
.
ArgumentParser
(
description
=
"Game listing and launcher application"
)
parser
.
add_argument
(
"--fullscreen"
,
type
=
bool
,
help
=
"whether to force use fullscreen mode for application or not"
,
required
=
False
,
action
=
argparse
.
BooleanOptionalAction
)
args
=
parser
.
parse_args
()
main
(
fullscreen
=
args
.
fullscreen
or
False
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment