1 /***************************************************************************
2 * Copyright (C) 2005-2013 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 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #include "networkconfig.h"
23 INIT_SYNCABLE_OBJECT(NetworkConfig)
24 NetworkConfig::NetworkConfig(const QString &objectName, QObject *parent)
25 : SyncableObject(objectName, parent),
26 _pingTimeoutEnabled(true),
29 _autoWhoEnabled(true),
31 _autoWhoNickLimit(200),
37 void NetworkConfig::setPingTimeoutEnabled(bool enabled)
39 if (_pingTimeoutEnabled == enabled)
42 _pingTimeoutEnabled = enabled;
44 emit pingTimeoutEnabledSet(enabled);
48 void NetworkConfig::setPingInterval(int interval)
50 if (_pingInterval == interval)
53 _pingInterval = interval;
55 emit pingIntervalSet(interval);
59 void NetworkConfig::setMaxPingCount(int count)
61 if (_maxPingCount == count)
64 _maxPingCount = count;
69 void NetworkConfig::setAutoWhoEnabled(bool enabled)
71 if (_autoWhoEnabled == enabled)
74 _autoWhoEnabled = enabled;
76 emit autoWhoEnabledSet(enabled);
80 void NetworkConfig::setAutoWhoInterval(int interval)
82 if (_autoWhoInterval == interval)
85 _autoWhoInterval = interval;
87 emit autoWhoIntervalSet(interval);
91 void NetworkConfig::setAutoWhoNickLimit(int nickLimit)
93 if (_autoWhoNickLimit == nickLimit)
96 _autoWhoNickLimit = nickLimit;
101 void NetworkConfig::setAutoWhoDelay(int delay)
103 if (_autoWhoDelay == delay)
106 _autoWhoDelay = delay;
108 emit autoWhoDelaySet(delay);