HP Views Designer Assistant: D:/Documentos/ViewDesignerAssistant/Services/parser.h Source File

| HP Views Designer Assistant 1.0.0 TFG - Alberto Gutierrez Perez - Universidad de Valladolid |

parser.h
1 #ifndef PARSER_H
2 #define PARSER_H
3 #include <Model/interfaz.h>
4 #include <Model/menu.h>
5 #include <Model/information.h>
6 #include <Model/ink.h>
7 #include <QString>
8
9 #define ROOT_WIDTH "ROOT_WIDTH"
10 #define ROOT_HEIGHT "ROOT_HEIGHT"
11 #define BACKGROUND "BACKGROUND"
12 #define COLOR "BACKGROUND_COLOR"
13 #define IMAGE "IMAGE"
14 #define NUMBER_ROWS "NUMBER_ROWS"
15 #define NUMBER_COLS "NUMBER_COLS"
16 #define LIST_ELEMENT "ELEMENTS"
17 #define ORIENTATION "ORIENTATION"
18 #define VERTICAL "Qt.Vertical"
19 #define HORIZONTAL "Qt.Horizontal"
20
21 #define ICON_NAME "ICON_NAME"
22 #define CARD_ICON "CARD_ICON"
23 #define CARD_ICON_VIEW "ICONS_VIEW"
24 #define CARD_INDEX "CARD_INDEX"
25 #define CARD_TITLE "CARD_TITLE"
26 #define CARD_PROPERTY "CARD_PROPERTY"
27 #define CARD_VIEW_PROPERTY "CARD_VIEW_PROPERTY"
28 #define PROPERTY_INDEX "PROPERTY_INDEX"
29 #define PROPERTY_RECT "PROPERTY_RECT"
30 #define PROPERTY_NAME "PROPERTY_NAME"
31 #define VALUE_INDEX "VALUE_INDEX"
32 #define PROPERTY_VALUE "PROPERTY_VALUE"
33 #define PROPERTY_VIEW_INDEX "PROPERTY_VIEW_INDEX"
34 #define VALUE_VIEW_INDEX "VALUE_VIEW_INDEX"
35 #define TOP_POSITION "TOP_POSITION"
36 #define LEFT_POSITION "LEFT_POSITION"
37 #define RELATIVE_POSITION "RELATIVE_POSITION"
38 #define FONT_SIZE "FONT_SIZE"
39
40 #define SEPARATOR "separator"
41 #define PARENT "parent"
42 #define IMAGE_ID "icon"
43
44
45 #define CUSTOMIZE_SIZE "CUSTOMIZE_SIZE"
46 #define CUSTOMIZE_SIZE_VIEW "CUSTOMIZE_SIZE_VIEW"
47 #define HEADER_MARGIN "TOP_MARGIN"
48 #define BOTTOM_MARGIN "BOTTOM_MARGIN"
49 #define LEFT_MARGIN "LEFT_MARGIN"
50 #define RIGHT_MARGIN "RIGHT_MARGIN"
51
55 class Parser
56 {
57 private:
58
65 QString setSizeProperties(QString source, Interfaz *interfaz);
66
73 QString setBackGroundProperties(QString source, Interfaz *interfaz);
74
80 QString getTemplateSource(QString path);
81
87 void saveResult(QString result, QString pathToSave);
88
95 QString formProperty(int propertyIndex, QStringList property);
96
102 QString formInformationElement(Card *card);
103
109 QString formInformationViewElement(Information *interfaz);
110
117 QString inkTextOption(QString source, InkTextOption textOption);
118
119 public:
120
124 Parser();
125
131 void parse(Menu *interfaz, QString path);
132
138 void parse(Information *interfaz, QString path);
139
145 void parse(Ink *interfaz, QString path);
146
147 };
148
149 #endif // PARSER_H
Parser::formInformationViewElement
QString formInformationViewElement(Information *interfaz)
formInformationViewElement Creates QML information screen view option.
Definition: parser.cpp:79
Parser::inkTextOption
QString inkTextOption(QString source, InkTextOption textOption)
inkTextOption Creates QML ink screen text view option.
Definition: parser.cpp:203
Parser
The Parser class. Creates QML files by app inteface models.
Definition: parser.h:55
Parser::setSizeProperties
QString setSizeProperties(QString source, Interfaz *interfaz)
setSizeProperties Speficies QML size properties.
Definition: parser.cpp:303
Information
The Information class. Represents Information screens.
Definition: information.h:10
Parser::getTemplateSource
QString getTemplateSource(QString path)
getTemplateSource Obtains the partial QML templates.
Definition: parser.cpp:347
Parser::formInformationElement
QString formInformationElement(Card *card)
formInformationElement Creates QML information screen option.
Definition: parser.cpp:64
Interfaz
The Interfaz class. Represents generic screen.
Definition: interfaz.h:10
Parser::setBackGroundProperties
QString setBackGroundProperties(QString source, Interfaz *interfaz)
setBackGroundProperties Specifies QML background properties.
Definition: parser.cpp:313
Parser::formProperty
QString formProperty(int propertyIndex, QStringList property)
formProperty Creates QML information screen property.
Definition: parser.cpp:230
Parser::Parser
Parser()
Parser constructor.
Definition: parser.cpp:7
Parser::saveResult
void saveResult(QString result, QString pathToSave)
saveResult Saves the QML file into the speficied system path.
Definition: parser.cpp:333
Ink
The Ink class. Represents Ink screens.
Definition: ink.h:11
Card
The card class. Represents the elements in information screens.
Definition: card.h:8
Parser::parse
void parse(Menu *interfaz, QString path)
parse Create QML file by menu model interface.
Definition: parser.cpp:247