-
Notifications
You must be signed in to change notification settings - Fork 11
/
data.h
77 lines (66 loc) · 2.07 KB
/
data.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
// (c) 2015 David Vyvlečka, AGPLv3
#ifndef DATA_H
#define DATA_H
#include <admesh/stl.h>
#include <stlsplit.h>
#include <QVector3D>
#include <libintl.h>
#include <locale.h>
#include <QString>
/**
This part until the END TAG was taken from OpenSCAD source code. Last entry 16. 3. 2015.
Original source code accessible on:
https://github.com/openscad/openscad/blob/master/src/qtgettext.h
https://github.com/openscad/openscad/blob/master/src/printutils.h#L10
*/
#define N_(String) String
inline char * _( const char * msgid ) { return gettext( msgid ); }
inline QString _( const char *msgid, int category )
{
Q_UNUSED( category );
return QString::fromUtf8( _( msgid ) );
}
inline QString _( const char *msgid, const char *disambiguation )
{
Q_UNUSED(disambiguation);
return QString::fromUtf8(_(msgid));
}
/** END TAG */
#define DEFAULT_RES_X 960
#define DEFAULT_RES_Y 725
#define AXIS_SIZE 500000.0f
#define GRID_SIZE 10.0f
#define MIN_ZOOM 0.01f
#define MAX_ZOOM 50000.0f
#define ZOOM_SPEED 10.0f
#define PERSPECTIVE 50.0f
#define MIN_VIEW_DISTANCE 0.1f
#define MAX_VIEW_DISTANCE 500000.0f
#define ITEMS_LIMIT 16646655 // 255 + 255*255 + 255*255*255
#define GREEN QVector3D(0.0,1.0,0.0)
#define RED QVector3D(1.0,0.0,0.0)
#define BLUE QVector3D(0.0,0.0,1.0)
#define BLACK QVector3D(0.0,0.0,0.0)
#define GREY QVector3D(0.7,0.7,0.7)
#define SOLID_SHORTCUT 'S'
#define WIREFRAME_SHORTCUT 'W'
#define EDGES_SHORTCUT 'E'
#define AXES_SHORTCUT 'A'
#define GRID_SHORTCUT 'G'
#define INFO_SHORTCUT 'I'
#define RESET_SHORTCUT 'R'
#ifdef Q_OS_MAC
#define CLOSE_SHORTCUT Qt::Key_Backspace
#else
#define CLOSE_SHORTCUT Qt::Key_Delete
#endif
#define PROPERTIES_SHORTCUT Qt::CTRL + Qt::Key_Comma
#define EXPORT_SHORTCUT Qt::CTRL + Qt::Key_E
#define FRONT_SHORTCUT Qt::Key_5 + Qt::KeypadModifier
#define BACK_SHORTCUT Qt::Key_0 + Qt::KeypadModifier
#define LEFT_SHORTCUT Qt::Key_4 + Qt::KeypadModifier
#define RIGHT_SHORTCUT Qt::Key_6 + Qt::KeypadModifier
#define TOP_SHORTCUT Qt::Key_8 + Qt::KeypadModifier
#define BOTTOM_SHORTCUT Qt::Key_2 + Qt::KeypadModifier
#define HISTORY_LIMIT 100
#endif // DATA_H