qt5
Last change
on this file since b0a3bc7 was
47bfffb,
checked in by pavelpa <pavelpa@…>, 13 years ago
|
if the application is run for first time, network connection is set to Direct connection
|
-
Property mode set to
100644
|
File size:
1009 bytes
|
Line | |
---|
1 | #include "appsettings.h" |
---|
2 | |
---|
3 | const QString PROXY_ADDRESS_SETTING ("proxyAddress"); |
---|
4 | const QString PROXY_PORT_SETTING ("proxyPort"); |
---|
5 | const QString PROXY_ISDIRECT_SETTING ("proxyIsDirectConnection"); |
---|
6 | |
---|
7 | QSettings AppSettings::mSettings("Ixonos", "FOSDEM"); |
---|
8 | |
---|
9 | QString AppSettings::proxyAddress() |
---|
10 | { |
---|
11 | return mSettings.value(PROXY_ADDRESS_SETTING).toString(); |
---|
12 | } |
---|
13 | |
---|
14 | quint16 AppSettings::proxyPort() |
---|
15 | { |
---|
16 | return mSettings.value(PROXY_PORT_SETTING).toUInt(); |
---|
17 | } |
---|
18 | |
---|
19 | bool AppSettings::isDirectConnection() |
---|
20 | { |
---|
21 | return mSettings.value(PROXY_ISDIRECT_SETTING).toBool(); |
---|
22 | } |
---|
23 | |
---|
24 | void AppSettings::setProxyAddress(const QString &aAddress) |
---|
25 | { |
---|
26 | mSettings.setValue(PROXY_ADDRESS_SETTING, aAddress); |
---|
27 | } |
---|
28 | |
---|
29 | void AppSettings::setProxyPort(const quint16 aPort) |
---|
30 | { |
---|
31 | mSettings.setValue(PROXY_PORT_SETTING, aPort); |
---|
32 | } |
---|
33 | |
---|
34 | void AppSettings::setDirectConnection(bool aDirectConnection) |
---|
35 | { |
---|
36 | mSettings.setValue(PROXY_ISDIRECT_SETTING, aDirectConnection); |
---|
37 | } |
---|
38 | |
---|
39 | bool AppSettings::contains(const QString &aKey) |
---|
40 | { |
---|
41 | return mSettings.contains(aKey); |
---|
42 | } |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.