From 1b54532cf38ffa184af4f70b3cdb25eb44cfbfe1 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Thu, 25 Jul 2024 20:28:26 -0600 Subject: [PATCH] Mods --- cromulant/args.py | 12 ++++++++++-- cromulant/argspec.py | 6 ++++++ cromulant/window.py | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/cromulant/args.py b/cromulant/args.py index 77b7257..721724d 100644 --- a/cromulant/args.py +++ b/cromulant/args.py @@ -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: diff --git a/cromulant/argspec.py b/cromulant/argspec.py index af51284..696a720 100644 --- a/cromulant/argspec.py +++ b/cromulant/argspec.py @@ -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", + ) diff --git a/cromulant/window.py b/cromulant/window.py index 1e05200..4bb4c8e 100644 --- a/cromulant/window.py +++ b/cromulant/window.py @@ -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()