1 /***************************************************************************
2 * Copyright (C) 2005-09 by the Quassel Project *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #include "networkconfig.h"
23 NetworkConfig::NetworkConfig(const QString &objectName, QObject *parent)
24 : SyncableObject(objectName, parent),
25 _pingTimeoutEnabled(true),
28 _autoWhoEnabled(true),
30 _autoWhoNickLimit(200),
36 void NetworkConfig::setPingTimeoutEnabled(bool enabled) {
37 if(_pingTimeoutEnabled == enabled)
40 _pingTimeoutEnabled = enabled;
41 emit pingTimeoutEnabledSet(enabled);
44 void NetworkConfig::setPingInterval(int interval) {
45 if(_pingInterval == interval)
48 _pingInterval = interval;
49 emit pingIntervalSet(interval);
52 void NetworkConfig::setMaxPingCount(int count) {
53 if(_maxPingCount == count)
56 _maxPingCount = count;
57 emit maxPingCountSet(count);
60 void NetworkConfig::setAutoWhoEnabled(bool enabled) {
61 if(_autoWhoEnabled == enabled)
64 _autoWhoEnabled = enabled;
65 emit autoWhoEnabledSet(enabled);
68 void NetworkConfig::setAutoWhoInterval(int interval) {
69 if(_autoWhoInterval == interval)
72 _autoWhoInterval = interval;
73 emit autoWhoIntervalSet(interval);
76 void NetworkConfig::setAutoWhoNickLimit(int nickLimit) {
77 if(_autoWhoNickLimit == nickLimit)
80 _autoWhoNickLimit = nickLimit;
81 emit autoWhoNickLimitSet(nickLimit);
84 void NetworkConfig::setAutoWhoDelay(int delay) {
85 if(_autoWhoDelay == delay)
88 _autoWhoDelay = delay;
89 emit autoWhoDelaySet(delay);