-
Notifications
You must be signed in to change notification settings - Fork 0
/
respeqtsettings.h
executable file
·228 lines (163 loc) · 5.65 KB
/
respeqtsettings.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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#ifndef RESPEQTSETTINGS_H
#define RESPEQTSETTINGS_H
#include <QSettings>
class RespeqtSettings
{
public:
class ImageSettings {
public:
QString fileName;
bool isWriteProtected;
};
RespeqtSettings();
~RespeqtSettings();
bool isFirstTime();
QString serialPortName();
void setSerialPortName(const QString &name);
int serialPortHandshakingMethod();
void setSerialPortHandshakingMethod(int method);
int serialPortMaximumSpeed();
void setSerialPortMaximumSpeed(int speed);
bool serialPortUsePokeyDivisors();
void setSerialPortUsePokeyDivisors(bool use);
int serialPortPokeyDivisor();
void setSerialPortPokeyDivisor(int divisor);
bool useHighSpeedExeLoader();
void setUseHighSpeedExeLoader(bool use);
QString atariSioDriverName();
void setAtariSioDriverName(const QString &name);
int atariSioHandshakingMethod();
void setAtariSioHandshakingMethod(int method);
int backend();
void setBackend(int backend);
bool useCustomCasBaud();
void setUseCustomCasBaud(bool use);
int customCasBaud();
void setCustomCasBaud(int baud);
ImageSettings getImageSettingsFromName(const QString &fileName);
ImageSettings mountedImageSetting(int no);
void setMountedImageSetting(int no, const QString &fileName, bool prot);
ImageSettings recentImageSetting(int no);
void mountImage(int no, const QString &fileName, bool prot);
void unmountImage(int no);
void swapImages(int no1, int no2);
QString lastDiskImageDir();
void setLastDiskImageDir(const QString &dir);
QString lastFolderImageDir();
void setLastFolderImageDir(const QString &dir);
QString lastSessionDir();
void setLastSessionDir(const QString &dir);
QString lastExeDir();
void setLastExeDir(const QString &dir);
QString lastExtractDir();
void setLastExtractDir(const QString &dir);
QString lastPrinterTextDir();
void setLastPrinterTextDir(const QString &dir);
QString lastCasDir();
void setLastCasDir(const QString &dir);
// Set and restore last mainwindow position and size //
int lastVerticalPos();
void setLastVerticalPos(int lastVpos);
int lastHorizontalPos();
void setLastHorizontalPos(int lastHpos);
int lastWidth();
void setLastWidth(int lastW);
int lastHeight();
void setLastHeight(int lastH);
// Set and restore last mini-window position //
int lastMiniVerticalPos();
void setLastMiniVerticalPos(int lastMVpos);
int lastMiniHorizontalPos();
void setLastMiniHorizontalPos(int lastMHpos);
// Set and restore last printwindow position and size //
int lastPrtVerticalPos();
void setLastPrtVerticalPos(int lastVpos);
int lastPrtHorizontalPos();
void setLastPrtHorizontalPos(int lastHpos);
int lastPrtWidth();
void setLastPrtWidth(int lastW);
int lastPrtHeight();
void setLastPrtHeight(int lastH);
QString i18nLanguage();
void setI18nLanguage(const QString &$lang);
bool minimizeToTray();
void setMinimizeToTray(bool tray);
// Save window positions and sizes option //
bool saveWindowsPos();
void setsaveWindowsPos(bool saveMwp);
// Save drive visibility option //
bool saveDiskVis();
void setsaveDiskVis(bool saveDvis);
// To pass session file name/path //
void setSessionFile(const QString &g_sessionFile, const QString &g_sessionFilePath);
// To manipulate session files //
void saveSessionToFile(const QString &fileName);
void loadSessionFromFile(const QString &fileName);
// To manipulate Main Window Title for Session file names //
void setMainWindowTitle(const QString &g_mainWindowTitle);
// Hide/Show drives D9-DO //
bool D9DOVisible();
void setD9DOVisible(bool dVis);
// Filter special characters from file names in Folder Images
bool filterUnderscore();
void setfilterUnderscore(bool filter);
// Enable Shade Mode //
bool enableShade();
void setEnableShade(bool shade);
// Use Large Font //
bool useLargeFont();
void setUseLargeFont(bool largeFont);
// Explorer Window On Top
bool explorerOnTop();
void setExplorerOnTop(bool expOnTop);
private:
QSettings *mSettings;
void writeRecentImageSettings();
bool mIsFirstTime;
// To pass values from Mainwindow //
int mMainX;
int mMainY;
int mMainW;
int mMainH;
int mMiniX;
int mMiniY;
int mPrtX;
int mPrtY;
int mPrtW;
int mPrtH;
bool msaveWindowsPos;
bool msaveDiskVis;
bool mdVis;
QString mSessionFileName;
QString mSessionFilePath;
QString mMainWindowTitle;
//
QString mSerialPortName;
int mSerialPortHandshakingMethod;
int mSerialPortMaximumSpeed;
bool mSerialPortUsePokeyDivisors;
int mSerialPortPokeyDivisor;
bool mUseHighSpeedExeLoader;
QString mAtariSioDriverName;
int mAtariSioHandshakingMethod;
int mBackend;
bool mUseCustomCasBaud;
int mCustomCasBaud;
ImageSettings mMountedImageSettings[16]; //
ImageSettings mRecentImageSettings[10];
QString mLastDiskImageDir;
QString mLastFolderImageDir;
QString mLastSessionDir;
QString mLastExeDir;
QString mLastExtractDir;
QString mLastPrinterTextDir;
QString mLastCasDir;
QString mI18nLanguage;
bool mMinimizeToTray;
bool mFilterUnderscore;
bool mUseLargeFont;
bool mExplorerOnTop;
bool mEnableShade;
};
extern RespeqtSettings *respeqtSettings;
#endif // RESPEQTSETTINGS_H