~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/modules/options/optw_lag.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//=============================================================================
2
 
//
3
 
//   File : optw_lag.cpp
4
 
//   Creation date : Wed Cct 16 10:45:54 CEST 2002 by Juanjo Álvarez (juanjux@yahoo.es)
5
 
//
6
 
//   This file is part of the KVirc irc client distribution
7
 
//   Copyright (C) 2002 Juanjo Álvarez
8
 
//   Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net)
9
 
//
10
 
//   This program is FREE software. You can redistribute it and/or
11
 
//   modify it under the terms of the GNU General Public License
12
 
//   as published by the Free Software Foundation; either version 2
13
 
//   of the License, or (at your opinion) any later version.
14
 
//
15
 
//   This program is distributed in the HOPE that it will be USEFUL,
16
 
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
 
//   See the GNU General Public License for more details.
19
 
//
20
 
//   You should have received a copy of the GNU General Public License
21
 
//   along with this program. If not, write to the Free Software Foundation,
22
 
//   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
 
//
24
 
//=============================================================================
25
 
 
26
 
#include "optw_lag.h"
27
 
 
28
 
#include "kvi_options.h"
29
 
#include "kvi_locale.h"
30
 
#include "kvi_tal_tooltip.h"
31
 
 
32
 
#include <QLayout>
33
 
 
34
 
 
35
 
KviLagOptionsWidget::KviLagOptionsWidget(QWidget * parent)
36
 
: KviOptionsWidget(parent)
37
 
{
38
 
        setObjectName("lag_options_widget");
39
 
        createLayout();
40
 
 
41
 
        KviBoolSelector * pUse = addBoolSelector(0,0,0,0, __tr2qs_ctx("Enable lag meter","options"), KviOption_boolUseLagMeterEngine);
42
 
        mergeTip(pUse,__tr2qs_ctx("<center>This enables the lag meter engine, which checks at regular intervals how much lag (latency) the server has.</center>","options"));
43
 
        KviTalGroupBox *g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
44
 
        KviUIntSelector * pInterval = addUIntSelector(g, __tr2qs_ctx("Lag meter heartbeat:","options"),KviOption_uintLagMeterHeartbeat,2000,10000,5000,KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
45
 
        pInterval->setSuffix(__tr2qs_ctx(" msec","options"));
46
 
        mergeTip(pInterval,
47
 
                __tr2qs_ctx("<center>This option allows you to set the lag meter heartbeat interval.<br>" \
48
 
                        "The lower the heartbeat interval the higher will be the accuracy of the lag check " \
49
 
                        "but also higher cpu usage and data traffic to the server.<br>" \
50
 
                        "Please note that this is NOT the interval between pings sent to the server: " \
51
 
                        "the pings (if any) will be sent really less often. " \
52
 
                        "5000 is a reasonable value.</center>","options"));
53
 
        connect(pUse,SIGNAL(toggled(bool)),pInterval,SLOT(setEnabled(bool)));
54
 
 
55
 
        KviUIntSelector * pAlarm = addUIntSelector(g, __tr2qs_ctx("Trigger event if lag exceeds:","options"), KviOption_uintLagAlarmTime,5000,1000000,30000, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
56
 
        pAlarm->setSuffix(__tr2qs_ctx(" msec","options"));
57
 
        mergeTip(pAlarm,__tr2qs_ctx("<center>This option controls the threshold for the " \
58
 
                        "OnLagAlarmTimeUp and OnLagAlarmTimeDown events. When the lag goes above " \
59
 
                        "the threshold OnLagAlarmTimeUp will be triggered and when the lag falls " \
60
 
                        "back below the threshold then OnLagAlarmTimeDown will be triggered</center>","options"));
61
 
        connect(pUse,SIGNAL(toggled(bool)),pAlarm,SLOT(setEnabled(bool)));
62
 
 
63
 
        KviBoolSelector * pShow = addBoolSelector(g, __tr2qs_ctx("Show lag in IRC context display","options"), KviOption_boolShowLagOnContextDisplay, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine));
64
 
        mergeTip(pShow,__tr2qs_ctx("<center>This makes the IRC context display applet show the current lag after the user's nickname (in seconds)</center>","options"));
65
 
 
66
 
        connect(pUse,SIGNAL(toggled(bool)),pShow,SLOT(setEnabled(bool)));
67
 
        connect(pUse,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool)));
68
 
 
69
 
        addRowSpacer(0,2,0,2);
70
 
 
71
 
}
72
 
 
73
 
KviLagOptionsWidget::~KviLagOptionsWidget()
74
 
{
75
 
}
76
 
 
77
 
 
78
 
#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES
79
 
#include "m_optw_lag.moc"
80
 
#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES