2023-11-16 14:13:49 +01:00
|
|
|
#ifndef COMMAND_LINE_PARSER_H_INCLUDED
|
|
|
|
#define COMMAND_LINE_PARSER_H_INCLUDED
|
|
|
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QCommandLineParser>
|
|
|
|
#include <QCommandLineOption>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class CommandLineParser : public QCommandLineParser {
|
|
|
|
QString m_repositoryUrl;
|
|
|
|
QString m_plugInDir;
|
|
|
|
QString m_plugInName;
|
|
|
|
QString m_workingDir;
|
2024-05-14 12:40:32 +02:00
|
|
|
QString m_psaConfigDir;
|
|
|
|
QString m_psaTariffDir;
|
2023-11-16 14:13:49 +01:00
|
|
|
QString m_dryRun;
|
|
|
|
QString m_noUpdatePsaHardware;
|
|
|
|
QString m_showYoctoVersion;
|
|
|
|
QString m_showYoctoInstallStatus;
|
|
|
|
QString m_showExtendedVersion;
|
|
|
|
QString m_iniFileName;
|
2023-11-21 09:48:23 +01:00
|
|
|
QString m_alwaysDownloadConfig;
|
|
|
|
QString m_alwaysDownloadDC;
|
2023-11-16 14:13:49 +01:00
|
|
|
|
|
|
|
QCommandLineOption m_repositoryUrlOption;
|
|
|
|
QCommandLineOption m_iniFileDirectoryOption;
|
|
|
|
QCommandLineOption m_iniFileNameOption;
|
|
|
|
QCommandLineOption m_pluginDirectoryOption;
|
|
|
|
QCommandLineOption m_pluginNameOption;
|
|
|
|
QCommandLineOption m_noDownloadOption;
|
2023-11-21 09:48:23 +01:00
|
|
|
QCommandLineOption m_alwaysDownloadConfigOption;
|
|
|
|
QCommandLineOption m_alwaysDownloadDCOption;
|
2023-11-16 14:13:49 +01:00
|
|
|
QCommandLineOption m_workingDirectoryOption;
|
2024-05-14 12:40:32 +02:00
|
|
|
QCommandLineOption m_psaConfigDirectoryOption;
|
|
|
|
QCommandLineOption m_psaTariffDirectoryOption;
|
2023-11-16 14:13:49 +01:00
|
|
|
QCommandLineOption m_dryRunOption;
|
|
|
|
QCommandLineOption m_extendedVersionOption;
|
|
|
|
QCommandLineOption m_yoctoVersionOption;
|
|
|
|
QCommandLineOption m_yoctoInstallStatusOption;
|
|
|
|
|
|
|
|
QCommandLineParser m_parser;
|
|
|
|
|
|
|
|
void configure();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit CommandLineParser();
|
|
|
|
~CommandLineParser() = default;
|
|
|
|
|
|
|
|
QCommandLineParser &parser() { return m_parser; }
|
|
|
|
QCommandLineParser const &parser() const { return m_parser; }
|
|
|
|
void process(const QCoreApplication &app) { m_parser.process(app); }
|
|
|
|
QString const &iniFileName() const { return m_iniFileName; }
|
|
|
|
void readSettings();
|
|
|
|
QString repositoryUrl();
|
|
|
|
QString plugInDir();
|
|
|
|
QString plugInName();
|
|
|
|
QString workingDir();
|
2024-05-14 12:40:32 +02:00
|
|
|
QString psaConfigDir();
|
|
|
|
QString psaTariffDir();
|
2023-11-16 14:13:49 +01:00
|
|
|
bool dryRun();
|
|
|
|
bool noUpdatePsaHardware();
|
|
|
|
bool yoctoVersion();
|
|
|
|
bool yoctoInstallStatus();
|
|
|
|
bool extendedVersion();
|
2023-11-21 09:48:23 +01:00
|
|
|
bool alwaysDownloadConfig();
|
|
|
|
bool alwaysDownloadDC();
|
2023-11-16 14:13:49 +01:00
|
|
|
};
|
|
|
|
#endif // COMMAND_LINE_PARSER_H_INCLUDED
|