61c526face309312bafe48b7f9289dab588edc11
[toast/confclerk.git] / src / app / appsettings.cpp
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