-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.h
More file actions
131 lines (72 loc) · 2.88 KB
/
config.h
File metadata and controls
131 lines (72 loc) · 2.88 KB
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
124
125
126
127
128
129
130
131
#ifndef CONFIG_H
#define CONFIG_H
#include <string>
#include <QColor>
// file formats
const std::string SURFACE_FILE_FORMAT = ".csv";
const std::string FIGURE_FILE_FORMAT = ".xml";
// exception messages
const std::string UNKNOWN_FORMAT_MESSAGE = "unknown file format";
const std::string EMPTY_MATRIX_MESSAGE = "matrix is empty";
const std::string EMPTY_VECTOR_MESSAGE = "vector is empty";
const std::string INVALID_MATRIX_MESSAGE = "matrix is invalid";
const std::string INVALID_SYSTEM_MESSAGE = "system is invalid";
const std::string UNKNOWN_TAG_MESSAGE = "unknown tag";
const std::string INVALID_VECTOR_MESSAGE = "vector is invalid";
const std::string OUT_OF_RANGE_MESSAGE = "out of range";
const std::string NOT_BASIS_MESSAGE = "vectors cannot form basis";
const std::string VERTEX_NOT_FOUND_MESSAGE = "vertex not found";
// surface
const std::string CSV_VALUE_SEPARATOR = ",";
const std::string CSV_LINE_SEPARATOR = "\n";
const std::string DEFAULT_SURFACE_TAG = "surface_";
const double DEFAULT_MAX_NEIGHBOUR_ANGLE = 83; // degrees (0; 90)
// figure
const std::string DEFAULT_FIGURE_TAG = "figure_";
const std::string DEFAULT_VERTEX_TAG = "vertex_";
// dialogs
// surface configuration dialog
const double MIN_SPBX_STEP_X = 0;
const double MAX_SPBX_STEP_X = 1000000;
const double MIN_SPBX_STEP_Y = 0;
const double MAX_SPBX_STEP_Y = 1000000;
const double MIN_SPBX_RANGE_MIN = -1000000;
const double MAX_SPBX_RANGE_MIN = 1000000;
const double MIN_SPBX_RANGE_MAX = -1000000;
const double MAX_SPBX_RANGE_MAX = 1000000;
// figure configuration dialog
const double MIN_COORD_VALUE = -1000000;
const double MAX_COORD_VALUE = 1000000;
// controls dialog
const double MIN_ROTATION_VALUE = 0;
const double MAX_ROTATION_VALUE = 360;
const double MIN_VALUE = -1000000;
const double MAX_VALUE = 1000000;
const double MOVE_VALUE_BEGIN = -100;
const double MOVE_VALUE_END = 100;
const double SCALE_VALUE_BEGIN = 0.01;
const double SCALE_VALUE_END = 2;
// export dialog
const std::string DEFAULT_FIGURES_DIR = "../3DSurfaceVisualizer/examples/";
// drawing
const QColor BACKGROUND_COLOR = Qt::white;
const QColor PEN_COLOR = Qt::black;
const int CANVAS_MARGIN = 10;
const size_t DEFAULT_DOT_RADIUS = 2; // pixels
// XML figure representation
const std::string XML_TAG_FIGURE = "Figure";
const std::string XML_TAG_VERTICES = "Vertices";
const std::string XML_TAG_VERTEX = "Vertex";
const std::string XML_TAG_POINT = "Point";//
const std::string XML_ATTRIBUTE_ID = "id";
const std::string XML_TAG_POSITION = "Position";
const std::string XML_ATTRIBUTE_X = "x";
const std::string XML_ATTRIBUTE_Y = "y";
const std::string XML_ATTRIBUTE_Z = "z";
const std::string XML_TAG_EDGES = "Edges";
const std::string XML_TAG_EDGE = "Edge";
const std::string XML_ATTRIBUTE_BEGIN = "begin";
const std::string XML_ATTRIBUTE_END = "end";
// context menus
const std::string MENU_ACTION_DELETE = "Delete";
#endif // CONFIG_H