andre@3: #ifndef CONSTANTS_H andre@3: #define CONSTANTS_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 constants.h andre@3: * @brief Common definitions for this project. andre@3: * andre@3: * @details This file can be included to pull in common andre@3: * definitions in the application. */ andre@3: andre@3: /** andre@3: * @brief The version of the software package. andre@3: * andre@3: * Usually defined as Build parameter. andre@3: */ andre@3: #ifndef VERSION andre@3: #define VERSION "0.0.1" andre@3: #endif andre@3: andre@3: /** andre@3: * @brief The user visible application name. andre@3: * andre@3: * Usually defined as Build parameter. andre@3: **/ andre@3: #ifndef APPNAME andre@3: #define APPNAME "unknown" andre@3: #endif andre@3: andre@3: /** andre@3: * @brief Short command line description. */ andre@44: #define DESCRIPTION "Convert output of EduApp questionaires to different formats" andre@3: andre@3: /** andre@3: * @brief Short copyright notice to show users. */ andre@3: #define COPYRIGHT "Copyright (C) 2016 ETH Zürich \n\n" \ andre@3: "This file is Free Software under the GNU GPL (v>=2)\n" \ andre@3: "and comes with ABSOLUTELY NO WARRANTY!\n" andre@3: andre@3: /** andre@3: * @brief The number of columns the document uses. */ andre@3: #define COLUMN_CNT 3 andre@3: /** andre@3: * @brief The width of the columns in characters. */ andre@26: #define COLUMN_WIDTHS { 40, 18, 26 } andre@3: andre@3: /** andre@3: * @brief Regular expression to define a question. andre@3: * andre@3: * A new question is the first unquoted string after the position andre@3: * that is followed after a newline by the word "Answer" andre@3: */ andre@56: #define QUESTION_PATTERN "\n\n(.*)\n+(Answer.*$)", QRegularExpression::MultilineOption andre@56: andre@56: #define FIRST_QUESTION_PATTERN "(.*)\n+(Answer.*$)", QRegularExpression::MultilineOption andre@3: andre@3: /** andre@3: * @brief Identifiying line that shows a question is a choice question. */ andre@3: #define CHOICE_IDENTIFIER "Answer,Votes,Percent" andre@3: andre@3: /** andre@3: * @brief The pattern used to match a multiple choice answer. */ andre@55: #define CHOICE_PATTERN "\"(.*)\",(?\\d+)?,(?\\d{0,3}\\.{0,1}\\d*)?" andre@38: andre@38: /** andre@38: * @brief The pattern used to match an unfilled choice answer. */ andre@72: #define CHOICE_UNFILLED_PATTERN "\"([^\"]*)\"[,]{0,1}" andre@3: andre@3: /** andre@3: * @brief The pattern used to match a free text answer. */ andre@56: #define FREETXT_PATTERN "\"([^\"]*)\"?", QRegularExpression::MultilineOption andre@3: andre@3: #define TITLE_ROW_HEIGHT 30 andre@3: andre@3: #define CHOICE_ROW_HEIGHT 30 andre@3: andre@6: #define TEXT_ROW_HEIGHT 20 andre@6: andre@3: #define TEXT_IDENTIFIER "Answer" andre@3: andre@20: #define DEFAULT_TITLE QStringLiteral("Clicker-Fragen und Antworten") andre@20: andre@26: #define BAR_COLOR "#ff9933" andre@26: andre@38: #define IMAGE_WIDTH 200 andre@38: andre@38: #define HTML_COL1_PERCENT 35 andre@38: #define HTML_COL2_PERCENT 30 andre@38: #define HTML_COL3_PERCENT 35 andre@38: andre@50: /** andre@50: * @brief name of the default icon. Only used on Linux to load andre@50: * the file from the resource. */ andre@50: #define ICON_NAME ":/64_icon-pdf.png" andre@50: andre@50: andre@50: #define DEFAULT_DIR QStandardPaths::DownloadLocation andre@50: andre@50: #define MAX_FILENAME_COUNT 10000 andre@50: andre@53: #define PRETTY_NAME "EduExportConverter" andre@53: andre@76: #define CONFIG_FILE_NAME "replacements.ini" andre@76: andre@66: andre@3: #endif // CONSTANTS_H