diff options
author | ConfuSomu | 2023-06-10 18:53:35 -0400 |
---|---|---|
committer | ConfuSomu | 2023-06-10 18:59:30 -0400 |
commit | 7e4c7905c9e74d76de2e03413af0dc9e4cb84683 (patch) | |
tree | ca0de8ab135ecc9af006664b5f505c0e2415de5a /src/main.cpp | |
parent | d3d14e07c202f9350f817802777720ded85e4248 (diff) | |
download | ActorViewer-7e4c7905c9e74d76de2e03413af0dc9e4cb84683.tar ActorViewer-7e4c7905c9e74d76de2e03413af0dc9e4cb84683.tar.gz ActorViewer-7e4c7905c9e74d76de2e03413af0dc9e4cb84683.zip |
Implement command line options
Implementing a command line argument specifying the data export to open
allows iterating faster as the file to open can be specified without
navigating through a GUI.
In the future, more command line options could be specified to specify
the view filters for instance.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index fd3e533..81f3024 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,11 +1,18 @@ #include "mainwindow.h" +#include "command_line.h" #include <QApplication> int main(int argc, char *argv[]) { - QApplication a(argc, argv); - MainWindow w; + QApplication app(argc, argv); + + QCommandLineParser parser; + CommandLineParsedOptions result = parse_command_line(parser, app); + + MainWindow w(nullptr); w.show(); - return a.exec(); + w.act_command_line(result, parser); + + return app.exec(); } |