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

View File

@ -99,3 +99,9 @@ class ArgSpec:
action="store_false", action="store_false",
info="Don't show the intro message", 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.app.setApplicationName(Config.program)
Window.window = QMainWindow() 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) Window.window.resize(Config.width, Config.height)
central_widget = QWidget() central_widget = QWidget()