Mercurial > clickerconvert
comparison src/constants.h @ 3:8b4c49c92451
Add initial implementation that handles choices
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 22 Mar 2016 10:39:19 +0100 |
parents | |
children | 2559010c1202 |
comparison
equal
deleted
inserted
replaced
2:4926d626fe15 | 3:8b4c49c92451 |
---|---|
1 #ifndef CONSTANTS_H | |
2 #define CONSTANTS_H | |
3 /* Copyright (C) 2016 by ETH Zürich | |
4 * Software engineering by Intevation GmbH | |
5 * | |
6 * This file is Free Software under the GNU GPL (v>=2) | |
7 * and comes with ABSOLUTELY NO WARRANTY! | |
8 * See LICENSE.txt for details. | |
9 */ | |
10 | |
11 /** @file constants.h | |
12 * @brief Common definitions for this project. | |
13 * | |
14 * @details This file can be included to pull in common | |
15 * definitions in the application. */ | |
16 | |
17 /** | |
18 * @brief The version of the software package. | |
19 * | |
20 * Usually defined as Build parameter. | |
21 */ | |
22 #ifndef VERSION | |
23 #define VERSION "0.0.1" | |
24 #endif | |
25 | |
26 /** | |
27 * @brief The user visible application name. | |
28 * | |
29 * Usually defined as Build parameter. | |
30 **/ | |
31 #ifndef APPNAME | |
32 #define APPNAME "unknown" | |
33 #endif | |
34 | |
35 /** | |
36 * @brief Short command line description. */ | |
37 #define DESCRIPTION "Convert output of clicker questionaires to different formats" | |
38 | |
39 /** | |
40 * @brief Short copyright notice to show users. */ | |
41 #define COPYRIGHT "Copyright (C) 2016 ETH Zürich \n\n" \ | |
42 "This file is Free Software under the GNU GPL (v>=2)\n" \ | |
43 "and comes with ABSOLUTELY NO WARRANTY!\n" | |
44 | |
45 /** | |
46 * @brief The number of columns the document uses. */ | |
47 #define COLUMN_CNT 3 | |
48 /** | |
49 * @brief The width of the columns in characters. */ | |
50 #define COLUMN_WIDTHS { 45, 30, 30 } | |
51 | |
52 /** | |
53 * @brief Regular expression to define a question. | |
54 * | |
55 * A new question is the first unquoted string after the position | |
56 * that is followed after a newline by the word "Answer" | |
57 */ | |
58 #define QUESTION_PATTERN "([^\"]+)^(Answer.*$)", QRegularExpression::MultilineOption | |
59 | |
60 /** | |
61 * @brief Identifiying line that shows a question is a choice question. */ | |
62 #define CHOICE_IDENTIFIER "Answer,Votes,Percent" | |
63 | |
64 /** | |
65 * @brief The pattern used to match a multiple choice answer. */ | |
66 #define CHOICE_PATTERN "\"(.*)\",(\\d+),(\\d+\\.\\d+)" | |
67 | |
68 /** | |
69 * @brief The pattern used to match a free text answer. */ | |
70 #define FREETXT_PATTERN "\"([^\"]*)\"", QRegularExpression::MultilineOption | |
71 | |
72 #define TITLE_ROW_HEIGHT 30 | |
73 | |
74 #define CHOICE_ROW_HEIGHT 30 | |
75 | |
76 #define TEXT_IDENTIFIER "Answer" | |
77 | |
78 #endif // CONSTANTS_H |