Mercurial > clickerconvert
comparison src/constants.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 | 5acd601356ba |
children | aa47b8e4f807 |
comparison
equal
deleted
inserted
replaced
37:b574990e90a5 | 38:5354cbda7188 |
---|---|
61 * @brief Identifiying line that shows a question is a choice question. */ | 61 * @brief Identifiying line that shows a question is a choice question. */ |
62 #define CHOICE_IDENTIFIER "Answer,Votes,Percent" | 62 #define CHOICE_IDENTIFIER "Answer,Votes,Percent" |
63 | 63 |
64 /** | 64 /** |
65 * @brief The pattern used to match a multiple choice answer. */ | 65 * @brief The pattern used to match a multiple choice answer. */ |
66 #define CHOICE_PATTERN "\"(.*)\",(\\d+),(\\d+\\.\\d+)" | 66 #define CHOICE_PATTERN "\"(.*)\",(?<num>\\d+)?,(?<percent>\\d+\\.?\\d+)?" |
67 | |
68 /** | |
69 * @brief The pattern used to match an unfilled choice answer. */ | |
70 #define CHOICE_UNFILLED_PATTERN "\"([^\"]*)\"," | |
67 | 71 |
68 /** | 72 /** |
69 * @brief The pattern used to match a free text answer. */ | 73 * @brief The pattern used to match a free text answer. */ |
70 #define FREETXT_PATTERN "\"([^\"]*)\"", QRegularExpression::MultilineOption | 74 #define FREETXT_PATTERN "\"([^\"]*)\"", QRegularExpression::MultilineOption |
71 | 75 |
77 | 81 |
78 #define TEXT_IDENTIFIER "Answer" | 82 #define TEXT_IDENTIFIER "Answer" |
79 | 83 |
80 #define DEFAULT_TITLE QStringLiteral("Clicker-Fragen und Antworten") | 84 #define DEFAULT_TITLE QStringLiteral("Clicker-Fragen und Antworten") |
81 | 85 |
82 #define HTML_WIDTH 960 | |
83 | |
84 #define BAR_COLOR "#ff9933" | 86 #define BAR_COLOR "#ff9933" |
85 | 87 |
88 #define IMAGE_WIDTH 200 | |
89 | |
90 #define HTML_COL1_PERCENT 35 | |
91 #define HTML_COL2_PERCENT 30 | |
92 #define HTML_COL3_PERCENT 35 | |
93 | |
86 #endif // CONSTANTS_H | 94 #endif // CONSTANTS_H |