vnote/src/commandlineoptions.h
Le Tan c506b3e1e7 add command line parser
Support open files via command line.
2021-03-17 22:04:29 +08:00

31 lines
466 B
C++

#ifndef COMMANDLINEOPTIONS_H
#define COMMANDLINEOPTIONS_H
#include <QStringList>
class CommandLineOptions
{
public:
enum ParseResult
{
Ok,
Error,
VersionRequested,
HelpRequested
};
CommandLineOptions() = default;
ParseResult parse(const QStringList &p_arguments);
QString m_errorMsg;
QString m_helpText;
QStringList m_pathsToOpen;
bool m_verbose = false;
};
#endif // COMMANDLINEOPTIONS_H