annotate src/cconvert_options.h @ 12:21f11f988115

Make sure strings don't start with = and duplicate text instead of formula
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 22 Mar 2016 17:21:33 +0100
parents afb1ecf0f1db
children 0b66b10a287d
rev   line source
3
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 #ifndef CCONVERT_OPTIONS_H
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
2 #define CCONVERT_OPTIONS_H
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3 /* Copyright (C) 2016 by ETH Zürich
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4 * Software engineering by Intevation GmbH
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
5 *
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6 * This file is Free Software under the GNU GPL (v>=2)
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY!
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
8 * See LICENSE.txt for details.
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
9 */
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
10
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11 /** @file Commandline options for clickerconvert */
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
13 #include <QCommandLineParser>
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14 #include <QObject>
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
15
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
16 static void cconvert_options(QCommandLineParser &parser)
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 {
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 QList<QCommandLineOption> options;
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19
7
afb1ecf0f1db Comment out unimplmented pdf option
Andre Heinecke <andre.heinecke@intevation.de>
parents: 3
diff changeset
20 options /*<< QCommandLineOption(QStringList() << QStringLiteral("pdf")
3
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
21 << QStringLiteral("p"),
7
afb1ecf0f1db Comment out unimplmented pdf option
Andre Heinecke <andre.heinecke@intevation.de>
parents: 3
diff changeset
22 QObject::tr("Output as pdf (default xlsx)")) */
3
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23 << QCommandLineOption(QStringList() << QStringLiteral("output")
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24 << QStringLiteral("o"),
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 QObject::tr("write output to file (default stdout)"),
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 QObject::tr("[file]"))
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27 << QCommandLineOption(QStringList() << QStringLiteral("title")
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28 << QStringLiteral("t"),
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 QObject::tr("Set the title of the document."),
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30 QObject::tr("\"The Title\""))
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31 << QCommandLineOption(QStringList() << QStringLiteral("debug"),
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 QObject::tr("Print debug output."));
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 Q_FOREACH (const QCommandLineOption &opt, options)
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 parser.addOption(opt);
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
36 parser.addVersionOption();
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
37 parser.addHelpOption();
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
38
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
39 parser.addPositionalArgument(QStringLiteral("file"),
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
40 QObject::tr("File to process (default stdin)"),
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
41 QObject::tr("[file]"));
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
42 }
8b4c49c92451 Add initial implementation that handles choices
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
43 #endif // CCONVERT_OPTIONS_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)