-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsettings.h
More file actions
146 lines (131 loc) · 3.54 KB
/
settings.h
File metadata and controls
146 lines (131 loc) · 3.54 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/**
* Settings - helper code for using QSettings
* Christopher Bero <bigbero@gmail.com>
*/
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QCoreApplication>
#include <QtCore>
void init_localplot_settings();
/**
* Settings Identifiers
*/
#define ORGANIZATION_NAME ("Makers Local 256")
#define ORGANIZATION_DOMAIN ("256.makerslocal.org")
#define APPLICATION_NAME ("localplot")
/**
* URLs
*/
#define URL_SOURCE_CODE ("https://github.com/makerslocal/localplot")
#define URL_REPORT_BUG ("https://github.com/makerslocal/localplot/issues")
#define URL_WIKI ("https://github.com/makerslocal/localplot/wiki")
// Data type of device width setting
// http://stackoverflow.com/a/9150607/1349825
enum deviceWidth_t {
INCH = 0,
CM,
SIZE_OF_ENUM
};
static const char* deviceWidth_names[] = {"inch", "cm"};
// statically check that the size of ColorNames fits the number of Colors
static_assert(sizeof(deviceWidth_names)/sizeof(char*) == deviceWidth_t::SIZE_OF_ENUM
, "Settings device width sizes dont match");
/**
* Settings Defaults
*/
#define SETDEF_PEN_DOWN_SIZE (3)
#define SETDEF_PEN_DOWN_RED (200)
#define SETDEF_PEN_DOWN_GREEN (40)
#define SETDEF_PEN_DOWN_BLUE (200)
#define SETDEF_PEN_UP_SIZE (1)
#define SETDEF_PEN_UP_RED (250)
#define SETDEF_PEN_UP_GREEN (150)
#define SETDEF_PEN_UP_BLUE (150)
#define SETDEF_DEVICE_INCREMENTAL (true)
#define SETDEF_DEVICE_SPEED_CUT (80)
#define SETDEF_DEVICE_SPEED_TRAVEL (150)
#define SETDEF_DEVICE_WIDTH (36)
#define SETDEF_DEVICE_WDITH_TYPE (deviceWidth_t::INCH)
#define SETDEF_DEVICE_CUTOUTBOXES (false)
#define SETDEF_DEVICE_CUTOUTBOXES_PADDING (0.25)
#define SETDEF_MAINWINDOW_FILEPATH ("")
#define SETDEF_MAINWINDOW_GRID (true)
#define SETDEF_MAINWINDOW_GRID_SIZE (1)
#define SETDEF_DIALLOGSETTINGS_INDEX (1)
#define SETDEF_HOOK_FINISHED (false)
#define SETDEF_HOOK_FINISHED_PATH ("")
#define SETDEF_IMPORT_INKSCAPE (false)
#define SETDEF_IMPORT_INKSCAPE_PATH ("inkscape")
#define SETDEF_IMPORT_PYTHON (false)
#define SETDEF_IMPORT_PYTHON_PATH ("python2")
#define SETDEF_IMPORT_SVG (false)
#define SETDEF_IMPORT_SVG_PATH ("/usr/share/inkscape/extensions/hpgl_output.py")
#define SETDEF_IMPORT_DXF (false)
#define SETDEF_IMPORT_DXF_PATH ("/usr/share/inkscape/extensions/dxf_input.py")
#define SETDEF_SERIAL_PORT ("")
#define SETDEF_SERIAL_BAUD (9600)
#define SETDEF_SERIAL_BYTESIZE (8)
#define SETDEF_SERIAL_PARITY ("none")
#define SETDEF_SERIAL_STOPBITS (1)
#define SETDEF_SERIAL_XONOFF (false)
#define SETDEF_SERIAL_RTSCTS (false)
/**
* Current Settings Paths:
*
* pen
* - down
* - - size, red, green, blue (int)
* - up
* - - size, red, green, blue (int)
*
* serial
* - port (string)
* - parity (string)
* - baud (int)
* - bytesize (int)
* - stopbits (int)
* - xonxoff (bool)
* - rtscts (bool)
*
* device
* - incremental (bool)
* - speed
* - - cut (int)
* - - travel (int)
* - width (int)
* - - type (enum)
* - cutoutboxes (bool)
* - - padding (double)
*
* mainwindow
* - filePath (string)
* - windowState (bytearray)
* - geometry (bytearray)
* - splitter
* - - state (bytearray)
* - - geometry (bytearray)
* - grid (bool)
* - - size (int)
*
* hook
* - finished (bool)
* - - path (string)
*
* import
* - inkscape (bool)
* - - path (string)
* - python (bool)
* - - path (string)
* - svg (bool)
* - - path (string)
* - dxf (bool)
* - - path (string)
*
* dialogsettings
* - index (int)
* - geometry (bytearray)
*
* dialogabout
* - geometry (bytearray)
*/
#endif // SETTINGS_H