view src/cconvert_options.h @ 58:c941a045147b

Added tag 1.1 for changeset e66918e24edd
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 09 Aug 2016 10:14:26 +0200
parents 5354cbda7188
children
line wrap: on
line source
#ifndef CCONVERT_OPTIONS_H
#define CCONVERT_OPTIONS_H
/* Copyright (C) 2016 by ETH Zürich
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU GPL (v>=2)
 * and comes with ABSOLUTELY NO WARRANTY!
 * See LICENSE.txt for details.
 */

/** @file Commandline options for clickerconvert */

#include <QCommandLineParser>
#include <QObject>

static void cconvert_options(QCommandLineParser &parser)
{
    QList<QCommandLineOption> options;

    options << QCommandLineOption(QStringList() << QStringLiteral("output")
                                  << QStringLiteral("o"),
                                  QObject::tr("write output to file (default stdout)") + "\n" +
                                  QObject::tr("The file type is determined by the extension\nEither: .pdf .html or .xlsx (default)"),
                                  QObject::tr("file"))
            << QCommandLineOption(QStringList() << QStringLiteral("title")
                                  << QStringLiteral("t"),
                                  QObject::tr("Set the title of the document."),
                                  QObject::tr("\"The Title\""))
            << QCommandLineOption(QStringList() << QStringLiteral("debug"),
                                  QObject::tr("Print debug output."));

    Q_FOREACH (const QCommandLineOption &opt, options)
        parser.addOption(opt);
    parser.addVersionOption();
    parser.addHelpOption();

    parser.addPositionalArgument(QStringLiteral("file"),
                                 QObject::tr("File to process (default stdin)"),
                                 QObject::tr("[file]"));
}
#endif // CCONVERT_OPTIONS_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)