source: src/app/appsettings.cpp @ b0a3bc7

qt5
Last change on this file since b0a3bc7 was 47bfffb, checked in by pavelpa <pavelpa@…>, 12 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
3const QString PROXY_ADDRESS_SETTING ("proxyAddress");
4const QString PROXY_PORT_SETTING ("proxyPort");
5const QString PROXY_ISDIRECT_SETTING ("proxyIsDirectConnection");
6
7QSettings AppSettings::mSettings("Ixonos", "FOSDEM");
8
9QString AppSettings::proxyAddress()
10{
11    return mSettings.value(PROXY_ADDRESS_SETTING).toString();
12}
13
14quint16 AppSettings::proxyPort()
15{
16    return mSettings.value(PROXY_PORT_SETTING).toUInt();
17}
18
19bool AppSettings::isDirectConnection()
20{
21    return mSettings.value(PROXY_ISDIRECT_SETTING).toBool();
22}
23
24void AppSettings::setProxyAddress(const QString &aAddress)
25{
26    mSettings.setValue(PROXY_ADDRESS_SETTING, aAddress);
27}
28
29void AppSettings::setProxyPort(const quint16 aPort)
30{
31    mSettings.setValue(PROXY_PORT_SETTING, aPort);
32}
33
34void AppSettings::setDirectConnection(bool aDirectConnection)
35{
36    mSettings.setValue(PROXY_ISDIRECT_SETTING, aDirectConnection);
37}
38
39bool AppSettings::contains(const QString &aKey)
40{
41    return mSettings.contains(aKey);
42}
43
Note: See TracBrowser for help on using the repository browser.