38int main(
int argc,
char *argv[]) {
44 QCoreApplication app(argc, argv);
46 QCommandLineParser parser;
47 parser.setApplicationDescription(
48 QStringLiteral(
"gvedit - simple graph editor and viewer"));
49 parser.addPositionalArgument(
50 QStringLiteral(
"files"),
51 QCoreApplication::translate(
"main",
"files to open."),
52 QStringLiteral(
"[files...]"));
54 const QCommandLineOption helpOption(
58 QStringLiteral(
"help"),
60 QCoreApplication::translate(
"main",
61 "Displays help on commandline options."));
62 parser.addOption(helpOption);
64 const QCommandLineOption scaleInputBy72Option(
67 QStringLiteral(
"scale-input-by-72"),
69 QCoreApplication::translate(
"main",
"Scale input by 72"));
70 parser.addOption(scaleInputBy72Option);
72 const QCommandLineOption verboseOption(
75 QStringLiteral(
"verbose"),
77 QCoreApplication::translate(
"main",
"Verbose mode"));
78 parser.addOption(verboseOption);
80 if (!parser.parse(app.arguments())) {
84 if (parser.isSet(helpOption)) {
88 if (parser.isSet(scaleInputBy72Option)) {
92 if (parser.isSet(verboseOption)) {
96 files = parser.positionalArguments();
99 QApplication app(argc, argv);
103 const int ret = app.exec();