File: Settings.h

package info (click to toggle)
basic256 2.0.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 15,076 kB
  • sloc: cpp: 16,791; yacc: 3,979; lex: 1,446; makefile: 25
file content (177 lines) | stat: -rwxr-xr-x 6,531 bytes parent folder | download
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/** Copyright (C) 2010, J.M.Reneau.
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License as published by
 **  the Free Software Foundation; either version 2 of the License, or
 **  (at your option) any later version.
 **
 **  This program is distributed in the hope that it will be useful,
 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 **  GNU General Public License for more details.
 **
 **  You should have received a copy of the GNU General Public License along
 **  with this program; if not, write to the Free Software Foundation, Inc.,
 **  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 **/



#include <QSettings>

#ifndef SETTINGSH
	#define SETTINGSH
	#define SETTINGSORG "BASIC-256 Consortium"
	#define SETTINGSAPP "BASIC-256 IDE"
	#define SETTINGSPORTABLEINI	"BASIC256_IDE.ini"

	// error reporting options
	#define SETTINGSERRORNONE 0
	#define SETTINGSERRORWARN 1
	#define SETTINGSERROR 2
	
	// ALLOW options
	#define SETTINGSALLOWNO 0
	#define SETTINGSALLOWASK 1
	#define SETTINGSALLOWYES 2
	
	// main window
    #define SETTINGSMAINGEOMETRY "Main/Geometry/"
    #define SETTINGSMAINSTATE "Main/State/"

    #define SETTINGSFONT "Main/Font/"
    #define SETTINGSTOOLBARVISIBLE "Main/ToolbarVisible/"
    #define SETTINGSTOOLBARVISIBLEDEFAULT true
    #define SETTINGSFONTDEFAULT "DejaVu Sans Mono,11,-1,5,50,0,0,0,0,0"

    
    #define SETTINGSEDITVISIBLE "Edit/Visible/"
    #define SETTINGSEDITVISIBLEDEFAULT true
    #define SETTINGSEDITWHITESPACE "Edit/Whitespace/"
    #define SETTINGSEDITWHITESPACEDEFAULT false

    #define SETTINGSOUTVISIBLE "Out/Visible/"
    #define SETTINGSOUTVISIBLEDEFAULT true
    #define SETTINGSOUTTOOLBARVISIBLE "Out/ToolbarVisible/"
    #define SETTINGSOUTTOOLBARVISIBLEDEFAULT true

    #define SETTINGSGRAPHVISIBLE "Graph/Visible/"
    #define SETTINGSGRAPHVISIBLEDEFAULT true
    #define SETTINGSGRAPHTOOLBARVISIBLE "Graph/ToolbarVisible/"
    #define SETTINGSGRAPHTOOLBARVISIBLEDEFAULT true
    #define SETTINGSGRAPHGRIDLINES "Graph/GridLines/"
    #define SETTINGSGRAPHGRIDLINESDEFAUT false
    
    #define SETTINGSVARVISIBLE "Var/Visible/"
    #define SETTINGSVARVISIBLEDEFAULT false
    
	// other IDE preferences
	#define SETTINGSIDESAVEONRUN "IDE/SaveOnRun"
	#define SETTINGSIDESAVEONRUNDEFAULT false

    // startup
    #define SETTINGSWINDOWSRESTORE "Startup/Restore"
    #define SETTINGSWINDOWSRESTOREDEFAULT true
    #define SETTINGSCHECKFORUPDATE "Startup/CheckForUpdate"
    #define SETTINGSCHECKFORUPDATEDEFAULT true

	// documentation window
	#define SETTINGSDOCSIZE "Doc/Size"
	#define SETTINGSDOCPOS "Doc/Pos"
	
	// preferences window
	#define SETTINGSPREFPOS "Pref/Pos"
	#define SETTINGSPREFPASSWORD "Pref/Password"

	// Replace window
	#define SETTINGSREPLACEPOS "Replace/Pos"

    // permissions (SYSTEM and PORTIN/PORTOUT)
	#define SETTINGSALLOWSYSTEM "Allow/System"
    #define SETTINGSALLOWSYSTEMDEFAULT SETTINGSALLOWNO
	#define SETTINGSALLOWPORT "Allow/Port"
    #define SETTINGSALLOWPORTDEFAULT SETTINGSALLOWNO
    //permissions (setsetting/getsetting)
    #define SETTINGSSETTINGSACCESS "Settings/AccesLevel"
    #define SETTINGSSETTINGSACCESSDEFAULT 0
    #define SETTINGSSETTINGSMAX "Settings/MaxKeys"
    #define SETTINGSSETTINGSMAXDEFAULT 100
    #define SETTINGSALLOWSETTING "Settings/Allow"
    #define SETTINGSALLOWSETTINGDEFAULT true
    // store user settings (setsetting/getsetting) in seperate group
    #define SETTINGSGROUPUSER "UserSettings"

	// user settings
	#define SETTINGSTYPECONV "Runtime/TypeConv"
	#define SETTINGSTYPECONVDEFAULT SETTINGSERRORNONE
	#define SETTINGSVARNOTASSIGNED "Runtime/VNA"
	#define SETTINGSVARNOTASSIGNEDDEFAULT SETTINGSERROR
	#define SETTINGSDEBUGSPEED "Runtime/DebugSpeed"
	#define SETTINGSDEBUGSPEEDDEFAULT 10
	#define SETTINGSDEBUGSPEEDMIN 1
	#define SETTINGSDEBUGSPEEDMAX 2000
	#define SETTINGSDECDIGS "Runtime/DecDigs"
	#define SETTINGSDECDIGSDEFAULT 12
    #define SETTINGSDECDIGSMIN 10
    #define SETTINGSDECDIGSMAX 16
	#define SETTINGSFLOATTAIL "Runtime/FloatTail"
	#define SETTINGSFLOATTAILDEFAULT true
    #define SETTINGSFLOATLOCALE "Runtime/FloatLocale"
    #define SETTINGSFLOATLOCALEDEFAULT false

    // sound settings
    #define SETTINGSSOUNDVOLUME "Sound/Volume"
    #define SETTINGSSOUNDVOLUMEDEFAULT 5
    #define SETTINGSSOUNDVOLUMEMIN 0
    #define SETTINGSSOUNDVOLUMEMAX 10
    #define SETTINGSSOUNDNORMALIZE "Sound/Normalize"
    #define SETTINGSSOUNDNORMALIZEDEFAULT 1000
    #define SETTINGSSOUNDNORMALIZEMIN 200
    #define SETTINGSSOUNDNORMALIZEMAX 2000
    #define SETTINGSSOUNDVOLUMERESTORE "Sound/VolumeRestore"
    #define SETTINGSSOUNDVOLUMERESTOREDEFAULT 1000
    #define SETTINGSSOUNDVOLUMERESTOREMIN 100
    #define SETTINGSSOUNDVOLUMERESTOREMAX 2000
    #define SETTINGSSOUNDSAMPLERATE "Sound/SampleRate"
    #define SETTINGSSOUNDSAMPLERATEDEFAULT 22050

	
	// espeak - library
	#define SETTINGSESPEAKVOICE "eSpeak/Voice"
	#define SETTINGSESPEAKVOICEDEFAULT "default"
	
	// espeak - statement
	#define SETTINGSESPEAKSTATEMENT "eSpeak/Statement"
	#define SETTINGSESPEAKSTATEMENTDEFAULT "espeak \"WORD\""
	
	// printersettings
	#define SETTINGSPRINTERPRINTER "Printer/Printer"
	#define SETTINGSPRINTERPDFFILE "Printer/PDFFile"
	#define SETTINGSPRINTERPAPER "Printer/Paper"
	#define SETTINGSPRINTERPAPERDEFAULT 2
	#define SETTINGSPRINTERRESOLUTION "Printer/Resolution"
	#define SETTINGSPRINTERRESOLUTIONDEFAULT 0
	#define SETTINGSPRINTERORIENT "Printer/Orient"
	#define SETTINGSPRINTERORIENTDEFAULT 0

	// store history of files as SaveHistory/0 ... SaveHistory/8 
	#define SETTINGSGROUPHIST "SaveHistory"
    #define SETTINGSGROUPHISTN 10

    // Graphics window zoom
    #define SETTINGSZOOM "View/Zoom"
    #define SETTINGSZOOMDEFAULT 1.0



    // You need an SETTINGS; statement when you are using settings in a function
    // this defines a QSettings variable named "setings" for your use
    #ifdef WIN32PORTABLE
		#include <QCoreApplication>
        #define SETTINGS QSettings settings( QCoreApplication::applicationDirPath() + "/../../Data/settings/"  + SETTINGSPORTABLEINI, QSettings::IniFormat );
    #else
        #define SETTINGS QSettings settings(SETTINGSORG, SETTINGSAPP);
    #endif


#endif