Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HEV - High Energy Ventilator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
HEV - High Energy Ventilator
Commits
0da6d9e6
Commit
0da6d9e6
authored
May 20, 2021
by
Benjamin Mummery
💻
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ui_dev' into feature/ui_localisation
parents
87a1249c
e9592490
Pipeline
#1568
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
NativeUI.py
NativeUI/NativeUI.py
+15
-4
No files found.
NativeUI/NativeUI.py
View file @
0da6d9e6
...
...
@@ -99,7 +99,7 @@ class NativeUI(HEVClient, QMainWindow):
q_send_personal (Slot) - send personal information to the MCU.
"""
def
__init__
(
self
,
resolution
:
list
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
resolution
:
list
,
*
args
,
skip_startup
=
False
,
**
kwargs
):
super
()
.
__init__
(
*
args
,
**
kwargs
)
# Set the resolution of the display window
...
...
@@ -204,7 +204,10 @@ class NativeUI(HEVClient, QMainWindow):
self
.
__define_connections
()
# Update page buttons to match the shown view
self
.
display_stack
.
setCurrentWidget
(
self
.
startupWidget
)
if
skip_startup
:
self
.
display_stack
.
setCurrentWidget
(
self
.
main_display
)
else
:
self
.
display_stack
.
setCurrentWidget
(
self
.
startupWidget
)
self
.
widgets
.
page_buttons
.
buttons
[
0
]
.
on_press
()
def
__find_localisation_files
(
self
,
config_path
:
str
)
->
list
:
...
...
@@ -663,6 +666,12 @@ def parse_command_line_arguments() -> argparse.Namespace:
parser
.
add_argument
(
"-r"
,
"--resolution"
,
action
=
"store"
,
dest
=
"resolution"
,
type
=
str
)
parser
.
add_argument
(
"--no-startup"
,
action
=
"store_true"
,
default
=
False
,
help
=
"Run the UI without the startup sequence"
,
)
return
parser
.
parse_args
()
...
...
@@ -735,12 +744,14 @@ def set_window_size(window, resolution: str = None, windowed: bool = False) -> i
if
__name__
==
"__main__"
:
# parse args and setup logging
command_line_args
=
parse_command_line_arguments
()
print
(
command_line_args
)
set_logging_level
(
command_line_args
.
debug
)
# setup pyqtplot widget
app
=
QApplication
(
sys
.
argv
)
dep
=
NativeUI
(
interpret_resolution
(
command_line_args
.
resolution
))
dep
=
NativeUI
(
interpret_resolution
(
command_line_args
.
resolution
),
skip_startup
=
command_line_args
.
no_startup
,
)
set_window_size
(
dep
,
resolution
=
command_line_args
.
resolution
,
...
...
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