Mercurial > clickerconvert > clickerconvert
diff src/converter.h @ 38:5354cbda7188
Fix HTML Layout. Support multiple formats at once. More handling.
This commit is a bad mix of multiple changes. It addresses:
- HTML Width is now relative and should fix some pdf creation problems.
- Format is now taken from the extension of the file names provided.
- Multiple file names are accepted at once.
- Parser now handles missing values in Multiple choice answers
- Parser now handles unfilled multiple choice values
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 15 Apr 2016 15:19:04 +0200 |
parents | e5c5ebfa4205 |
children |
line wrap: on
line diff
--- a/src/converter.h Fri Apr 15 15:15:44 2016 +0200 +++ b/src/converter.h Fri Apr 15 15:19:04 2016 +0200 @@ -13,25 +13,13 @@ #include <QStringList> #include <QTextStream> #include <QFile> +#include <QList> #include "xlsxformat.h" /** @file Declaration of the Converter class. */ -/** - * @enum ConvertFormat - * @brief Possible output format values. - */ -enum ConvertFormat { - /*! XLSX (default). */ - Format_XLSX, - /*! PDF */ - Format_PDF, - /*! HTML */ - Format_HTML, -}; - /** @brief Base class of Convert operations. * * Set up an instance of this using the ctor and according setters and @@ -48,11 +36,9 @@ * is empty stdout is used. * * @param input input filename. - * @param output output filename. - * @param format the format of this. + * @param outputs the files to create. */ - Converter(const QString &input, const QString &output, - ConvertFormat fmt = Format_XLSX, + Converter(const QString &input, const QStringList &outputs, const QString &title = QString()); /** Check for errors @@ -61,11 +47,11 @@ const QStringList & errors() {return mErrors;} protected: - void convertToXSLX(QTextStream &instream, QFile &output); + void convertToXSLX(QTextStream &instream, QList<QFile*> outputs); void run(); - QString mInput, mOutput; - ConvertFormat mFmt; + QString mInput; + QStringList mOutputs; QStringList mErrors; QString mTitle;