blob: aeaaba98c3f56b7311165dd9e0daa2a29c78cd49 (
plain)
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
|
/***************************************************************************
* settings.h
* -------------------
*
* Revision : $Id$
* begin : Tue Jan 29 2002
* copyright : (C) 2002 by Patrick Charbonnier
* : Based On Caitoo v.0.7.3 (c) 1998 - 2000, Matej Koss
* email : pch@freeshell.org
*
****************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
#ifndef _SETTINGS_H
#define _SETTINGS_H
// common connection types
enum ConnectionType { PERMANENT = 0, ETHERNET, PLIP, SLIP, PPP, ISDN };
extern TQString ConnectionDevices[];
// Connection settings
#define DEF_ReconnectOnError true
#define DEF_ReconnectTime 1
#define DEF_ReconnectRetries 10
#define DEF_ReconnectOnBroken true
#define DEF_TimeoutData 5
#define DEF_TimeoutDataNoResume 15
#define DEF_ConnectionType PERMANENT
#define DEF_LinkNumber 0
#define DEF_OfflineMode false
// Automation settings
#define DEF_AutoSave true
#define DEF_AutoSaveInterval 10
#define DEF_AutoDisconnect false
#define DEF_DisconnectCommand "kppp -k"
#define DEF_TimedDisconnect false
#define DEF_AutoShutdown false
#define DEF_AutoPaste false
// Limits settings
#define DEF_MaxSimConnections 2
#define DEF_MinimumBandwidth 1000
#define DEF_MaximumBandwidth 10000
// Advanced settings
#define DEF_AddQueued true
#define DEF_ShowMain false
#define DEF_ShowIndividual false
#define DEF_IconifyIndividual false
#define DEF_AdvancedIndividual false
#define DEF_RemoveOnSuccess true
#define DEF_GetSizes true
#define DEF_ExpertMode false
// Search settings
#define DEF_SearchFastest false
#define DEF_SearchItems 20
#define DEF_TimeoutSearch 30
#define DEF_SwitchHosts false
// Directories settings
#define DEF_UseLastDir false
// System settings
#define DEF_UseAnimation true
#define DEF_WindowStyle NORMAL
#include <tqdatetime.h>
#include <kwin.h>
#include <tqvaluelist.h>
struct DirItem
{
TQString extRegexp;
TQString defaultDir;
};
typedef TQValueList < DirItem > DirList;
class Settings
{
public:
Settings()
{
}
~Settings()
{
}
void load();
void save();
// connection options
bool b_reconnectOnBroken;
bool b_reconnectOnError;
uint reconnectTime;
uint reconnectRetries;
uint timeoutData;
uint timeoutDataNoResume;
uint connectionType;
uint linkNumber;
bool b_offlineMode;// If we want to be offline
bool b_offline; // If we really are offline
// automation options
bool b_autoSave;
uint autoSaveInterval;
bool b_autoDisconnect;
TQString disconnectCommand;
bool b_timedDisconnect;
TQDate disconnectDate;
TQTime disconnectTime;
bool b_autoShutdown;
bool b_autoPaste;
// limits options
uint maxSimultaneousConnections;
uint minimumBandwidth;
uint maximumBandwidth;
// advanced options
bool b_addQueued;
bool b_showIndividual;
bool b_iconifyIndividual;
bool b_advancedIndividual;
bool b_removeOnSuccess;
bool b_getSizes;
bool b_expertMode;
bool b_KonquerorIntegration;
bool b_showMain;
// search options
bool b_searchFastest;
uint searchItems;
uint timeoutSearch;
bool b_switchHosts;
// directories options
bool b_useLastDir;
TQString lastDirectory;
DirList defaultDirList;
// system options
bool b_useAnimation;
TQFont listViewFont;
// tqgeometry settings
TQPoint mainPosition;
TQSize mainSize;
unsigned long int mainState;
TQPoint dropPosition;
unsigned long int dropState;
};
extern Settings ksettings;
#endif // _SETTINGS_H
|