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 #ifndef NETWORKCONFIG_H_
22 #define NETWORKCONFIG_H_
24 #include "syncableobject.h"
26 class NetworkConfig : public SyncableObject {
28 Q_PROPERTY(bool pingTimeoutEnabled READ pingTimeoutEnabled WRITE setPingTimeoutEnabled)
29 Q_PROPERTY(int pingInterval READ pingInterval WRITE setPingInterval)
30 Q_PROPERTY(int maxPingCount READ maxPingCount WRITE setMaxPingCount)
31 Q_PROPERTY(bool autoWhoEnabled READ autoWhoEnabled WRITE setAutoWhoEnabled)
32 Q_PROPERTY(int autoWhoInterval READ autoWhoInterval WRITE setAutoWhoInterval)
33 Q_PROPERTY(int autoWhoNickLimit READ autoWhoNickLimit WRITE setAutoWhoNickLimit)
34 Q_PROPERTY(int autoWhoDelay READ autoWhoDelay WRITE setAutoWhoDelay)
37 NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0);
39 inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; }
42 inline bool pingTimeoutEnabled() const { return _pingTimeoutEnabled; }
43 void setPingTimeoutEnabled(bool);
44 virtual inline void requestSetPingTimeoutEnabled(bool b) { emit setPingTimeoutEnabledRequested(b); }
46 inline int pingInterval() const { return _pingInterval; }
47 void setPingInterval(int);
48 virtual inline void requestSetPingInterval(int i) { emit setPingIntervalRequested(i); }
50 inline int maxPingCount() const { return _maxPingCount; }
51 void setMaxPingCount(int);
52 virtual inline void requestSetMaxPingCount(int i) { emit setMaxPingCountRequested(i); }
54 inline bool autoWhoEnabled() const { return _autoWhoEnabled; }
55 void setAutoWhoEnabled(bool);
56 virtual inline void requestSetAutoWhoEnabled(bool b) { emit setAutoWhoEnabledRequested(b); }
58 inline int autoWhoInterval() const { return _autoWhoInterval; }
59 void setAutoWhoInterval(int);
60 virtual inline void requestSetAutoWhoInterval(int i) { emit setAutoWhoIntervalRequested(i); }
62 inline int autoWhoNickLimit() const { return _autoWhoNickLimit; }
63 void setAutoWhoNickLimit(int);
64 virtual inline void requestSetAutoWhoNickLimit(int i) { emit setAutoWhoNickLimitRequested(i); }
66 inline int autoWhoDelay() const { return _autoWhoDelay; }
67 void setAutoWhoDelay(int);
68 virtual inline void requestSetAutoWhoDelay(int i) { emit setAutoWhoDelayRequested(i); }
71 void pingTimeoutEnabledSet(bool);
72 void pingIntervalSet(int);
73 void maxPingCountSet(int);
74 void autoWhoEnabledSet(bool);
75 void autoWhoIntervalSet(int);
76 void autoWhoNickLimitSet(int);
77 void autoWhoDelaySet(int);
79 void setPingTimeoutEnabledRequested(bool);
80 void setPingIntervalRequested(int);
81 void setMaxPingCountRequested(int);
82 void setAutoWhoEnabledRequested(bool);
83 void setAutoWhoIntervalRequested(int);
84 void setAutoWhoNickLimitRequested(int);
85 void setAutoWhoDelayRequested(int);
88 bool _pingTimeoutEnabled;
94 int _autoWhoNickLimit;