diff 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
line wrap: on
line diff
--- a/src/constants.h	Fri Apr 15 15:15:44 2016 +0200
+++ b/src/constants.h	Fri Apr 15 15:19:04 2016 +0200
@@ -63,7 +63,11 @@
 
 /**
  * @brief The pattern used to match a multiple choice answer. */
-#define CHOICE_PATTERN "\"(.*)\",(\\d+),(\\d+\\.\\d+)"
+#define CHOICE_PATTERN "\"(.*)\",(?<num>\\d+)?,(?<percent>\\d+\\.?\\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. */
@@ -79,8 +83,12 @@
 
 #define DEFAULT_TITLE QStringLiteral("Clicker-Fragen und Antworten")
 
-#define HTML_WIDTH 960
-
 #define BAR_COLOR "#ff9933"
 
+#define IMAGE_WIDTH 200
+
+#define HTML_COL1_PERCENT 35
+#define HTML_COL2_PERCENT 30
+#define HTML_COL3_PERCENT 35
+
 #endif // CONSTANTS_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)