andre@3: #ifndef CCONVERT_OPTIONS_H andre@3: #define CCONVERT_OPTIONS_H andre@3: /* Copyright (C) 2016 by ETH Zürich andre@3: * Software engineering by Intevation GmbH andre@3: * andre@3: * This file is Free Software under the GNU GPL (v>=2) andre@3: * and comes with ABSOLUTELY NO WARRANTY! andre@3: * See LICENSE.txt for details. andre@3: */ andre@3: andre@3: /** @file Commandline options for clickerconvert */ andre@3: andre@3: #include andre@3: #include andre@3: andre@3: static void cconvert_options(QCommandLineParser &parser) andre@3: { andre@3: QList options; andre@3: andre@38: options << QCommandLineOption(QStringList() << QStringLiteral("output") andre@3: << QStringLiteral("o"), andre@38: QObject::tr("write output to file (default stdout)") + "\n" + andre@38: QObject::tr("The file type is determined by the extension\nEither: .pdf .html or .xlsx (default)"), andre@21: QObject::tr("file")) andre@3: << QCommandLineOption(QStringList() << QStringLiteral("title") andre@3: << QStringLiteral("t"), andre@3: QObject::tr("Set the title of the document."), andre@3: QObject::tr("\"The Title\"")) andre@3: << QCommandLineOption(QStringList() << QStringLiteral("debug"), andre@3: QObject::tr("Print debug output.")); andre@3: andre@3: Q_FOREACH (const QCommandLineOption &opt, options) andre@3: parser.addOption(opt); andre@3: parser.addVersionOption(); andre@3: parser.addHelpOption(); andre@3: andre@3: parser.addPositionalArgument(QStringLiteral("file"), andre@3: QObject::tr("File to process (default stdin)"), andre@3: QObject::tr("[file]")); andre@3: } andre@3: #endif // CCONVERT_OPTIONS_H