-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathConstants.h
123 lines (95 loc) · 3.11 KB
/
Constants.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include <QBrush>
#include <QPen>
#include <QPoint>
#include <QSize>
#include <QString>
namespace q2d {
namespace constants {
// TODO move to settings and make changeable
extern QSize ICON_SIZE;
// File extensions for saving and loading
extern QString EXTENSION_DOCFILE;
extern QString EXTENSION_LIBFILE;
/**
* @brief FILE_COMPONENT_TREE is the file name,
* that will be given to files containing the component hierarchy upon saving
* a project.
* It needs to be prefixed with the path of the project folder it refers to.
*/
extern QString FILE_COMPONENT_TREE;
/**
* @brief HIERARCHY_PATH_SEPERATOR is used when fetching the hierarchy names
* of ComponentDescriptors to split th seperate levels of the hierarchy.
* It also is applied when seperating the ids of port instances
* from their component parents.
*/
extern QString HIERARCHY_SEPERATOR;
// JSON keywords
// FIXME revisit naming
// Descriptor file entries
extern QString JSON_CONFIG_BIT_GROUP;
// Im-/Export of Document entries
extern QString JSON_DOCENTRY;
extern QString JSON_DOCENTRY_ID;
extern QString JSON_DOCENTRY_MODEL_ELEMENT;
extern QString JSON_DOCENTRY_PARENT;
extern QString JSON_DOCENTRY_SCHEMATIC_ELEMENT;
extern QString JSON_DOCENTRY_TYPE;
extern QString JSON_FUNCTIONS;
// generally used json names
extern QString JSON_GENERAL_NAME;
extern QString JSON_GENERAL_POSITION;
extern QString JSON_GENERAL_POSITION_X;
extern QString JSON_GENERAL_POSITION_Y;
extern QString JSON_GENERAL_SIZE;
extern QString JSON_PORTS;
extern QString JSON_PORT_DIRECTION;
extern QString JSON_PORT_NAME;
// Im-/Export of SchematicsSceneChild enrties
extern QString JSON_DOCENTRY_TYPE;
extern QString JSON_HIERARCHY_CATEGORY_NAME;
extern QString JSON_HIERARCHY_CHILD;
extern QString JSON_HIERARCHY_SOURCE;
extern QString JSON_HIERARCHY_TYPE;
extern QString JSON_HIERARCHY_TYPE_CATEGORY;
extern QString JSON_HIERARCHY_TYPE_COMPONENT;
extern QString JSON_SCHEMATIC_SUB_TYPE;
extern QString JSON_SCHEMATIC_ADDITIONAL;
extern QString JSON_SCHEMATIC_POSITION;
extern QString JSON_SYMBOL_PATH;
extern QString JSON_WIRE_START;
extern QString JSON_WIRE_END;
// Keys for QSettings (application wide)
extern QString KEY_DIR_COMPONENTS;
extern QString KEY_DIR_PROJECTS;
extern QString KEY_DIR_LIBRARIES;
extern QString KEY_FILE_BIT_GROUP;
extern QString KEY_FILE_PORT_IN;
extern QString KEY_FILE_PORT_INOUT;
extern QString KEY_FILE_PORT_OUT;
extern QString KEY_FILE_OPORT_IN;
extern QString KEY_FILE_OPORT_OUT;
// custom MIME types
extern QString MIME_COMPONENT_TYPE;
extern QString MIME_PORT_PLACEMENT;
extern QString MIME_WIRE_START_POS;
extern QString NO_SYMBOL_FILE;
// tooltip keys
extern QString TOOLTIP_DIRECTION;
extern QString TOOLTIP_DRIVEN;
extern QString TOOLTIP_DRIVER;
extern QString TOOLTIP_FULL_ID;
extern QString TOOLTIP_NONE;
extern QString TOOLTIP_TYPE;
// --- gui constants ---
extern unsigned int PORT_DIAMETER;
extern unsigned int PORT_RADIUS;
extern QPoint PORT_CENTER_OFFSET;
extern QBrush PORT_DECAL_BRUSH;
extern QBrush PORT_BACKGROUND_BRUSH;
extern QPen PORT_BACKGROUND_PEN;
} // namespace constants
} // namespace q2d
#endif // CONSTANTS_H