This commit is contained in:
Auric Vente 2024-07-25 20:28:26 -06:00
parent d55889ff5c
commit 1b54532cf3
3 changed files with 18 additions and 3 deletions

View File

@ -14,6 +14,7 @@ class Args:
header: bool = True
footer: bool = True
intro: bool = True
title: str = ""
@staticmethod
def prepare() -> None:
@ -33,12 +34,19 @@ class Args:
for r_item in other_name:
ArgParser.get_value(*r_item)
normals = [
"title",
]
for n_item in normals:
ArgParser.get_value(n_item)
paths = [
"names",
]
for n_item in paths:
ArgParser.get_value(n_item, path=True)
for p_item in paths:
ArgParser.get_value(p_item, path=True)
class ArgParser:

View File

@ -99,3 +99,9 @@ class ArgSpec:
action="store_false",
info="Don't show the intro message",
)
ArgSpec.add_argument(
"title",
type=str,
info="Custom title for the window",
)

View File

@ -136,7 +136,8 @@ class Window:
Window.app.setApplicationName(Config.program)
Window.window = QMainWindow()
Window.window.setWindowTitle(Config.title)
title = Args.title or Config.title
Window.window.setWindowTitle(title)
Window.window.resize(Config.width, Config.height)
central_widget = QWidget()