43 lines
1.1 KiB
C++
Executable File
43 lines
1.1 KiB
C++
Executable File
|
|
#pragma once
|
|
|
|
#include <QCommandLineParser>
|
|
#include <QString>
|
|
|
|
class CmdLineParser : public QObject, public QCommandLineParser
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
CmdLineParser();
|
|
~CmdLineParser();
|
|
bool init();
|
|
|
|
// Getters
|
|
int portCount() const { return m_portCount; }
|
|
bool showPort() const { return m_showPort; }
|
|
bool windowMode() const { return m_window; }
|
|
QString port() const { return m_port; }
|
|
QString mode() const { return m_mode; }
|
|
QString ini() const { return m_ini; }
|
|
QString imagePath() const { return m_imagePath; }
|
|
|
|
// Setters
|
|
void setWindow(bool state);
|
|
void setPort(const QString &port) { m_port = port; }
|
|
void setMode(const QString &mode);
|
|
void setIni(const QString &ini) { m_ini = ini; }
|
|
void setImagePath(const QString &path);
|
|
void setShowPort(bool port);
|
|
void setPortCount(int count);
|
|
|
|
private:
|
|
int m_portCount;
|
|
bool m_showPort;
|
|
bool m_window;
|
|
QString m_port;
|
|
QString m_mode;
|
|
QString m_ini;
|
|
QString m_imagePath;
|
|
};
|