From 7e4c7905c9e74d76de2e03413af0dc9e4cb84683 Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Sat, 10 Jun 2023 18:53:35 -0400 Subject: 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. --- src/command_line.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/command_line.h (limited to 'src/command_line.h') diff --git a/src/command_line.h b/src/command_line.h new file mode 100644 index 0000000..18d4b9f --- /dev/null +++ b/src/command_line.h @@ -0,0 +1,20 @@ +#pragma once + +#include +#include +#include + +enum CommandLineParseResult { + CommandLineOk, + CommandLineError, + CommandLineVersionRequested, + CommandLineHelpRequested +}; + +struct CommandLineParsedOptions { + CommandLineParseResult result; + QString error_message; + QString outbox_filename; +}; + +CommandLineParsedOptions parse_command_line(QCommandLineParser &parser, QApplication &app); -- cgit v1.2.3-54-g00ecf