view src/constants.h @ 60:82d38421fdf3 1.1

Fix file name defaults and xlsx extension
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 09 Aug 2016 10:39:19 +0200
parents 5410f9f279ea
children defd29b9f25a
line wrap: on
line source
#ifndef CONSTANTS_H
#define CONSTANTS_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 constants.h
 * @brief Common definitions for this project.
 *
 * @details This file can be included to pull in common
 * definitions in the application. */

/**
 * @brief The version of the software package.
 *
 * Usually defined as Build parameter.
 */
#ifndef VERSION
#define VERSION "0.0.1"
#endif

/**
* @brief The user visible application name.
 *
 * Usually defined as Build parameter.
 **/
#ifndef APPNAME
#define APPNAME "unknown"
#endif

/**
* @brief Short command line description. */
#define DESCRIPTION "Convert output of EduApp questionaires to different formats"

/**
* @brief Short copyright notice to show users. */
#define COPYRIGHT "Copyright (C) 2016 ETH Zürich \n\n" \
                  "This file is Free Software under the GNU GPL (v>=2)\n" \
                  "and comes with ABSOLUTELY NO WARRANTY!\n"

/**
 * @brief The number of columns the document uses. */
#define COLUMN_CNT 3
/**
 * @brief The width of the columns in characters. */
#define COLUMN_WIDTHS { 40, 18, 26 }

/**
 * @brief Regular expression to define a question.
 *
 * A new question is the first unquoted string after the position
 * that is followed after a newline by the word "Answer"
 */
#define QUESTION_PATTERN "\n\n(.*)\n+(Answer.*$)", QRegularExpression::MultilineOption

#define FIRST_QUESTION_PATTERN "(.*)\n+(Answer.*$)", QRegularExpression::MultilineOption

/**
 * @brief Identifiying line that shows a question is a choice question. */
#define CHOICE_IDENTIFIER "Answer,Votes,Percent"

/**
 * @brief The pattern used to match a multiple choice answer. */
#define CHOICE_PATTERN "\"(.*)\",(?<num>\\d+)?,(?<percent>\\d{0,3}\\.{0,1}\\d*)?"

/**
 * @brief The pattern used to match an unfilled choice answer. */
#define CHOICE_UNFILLED_PATTERN "\"([^\"]*)\","

/**
 * @brief The pattern used to match a free text answer. */
#define FREETXT_PATTERN "\"([^\"]*)\"?", QRegularExpression::MultilineOption

#define TITLE_ROW_HEIGHT 30

#define CHOICE_ROW_HEIGHT 30

#define TEXT_ROW_HEIGHT 20

#define TEXT_IDENTIFIER "Answer"

#define DEFAULT_TITLE QStringLiteral("Clicker-Fragen und Antworten")

#define BAR_COLOR "#ff9933"

#define IMAGE_WIDTH 200

#define HTML_COL1_PERCENT 35
#define HTML_COL2_PERCENT 30
#define HTML_COL3_PERCENT 35

/**
 * @brief name of the default icon. Only used on Linux to load
 * the file from the resource. */
#define ICON_NAME ":/64_icon-pdf.png"


#define DEFAULT_DIR QStandardPaths::DownloadLocation

#define MAX_FILENAME_COUNT 10000

#define PRETTY_NAME "EduExportConverter"

#endif // CONSTANTS_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)