1
//=============================================================================
3
// File : optw_notify.cpp
4
// Creation date : Sun Oct 28 15:11:29 2001 GMT by Szymon Stefanek
6
// This file is part of the KVirc irc client distribution
7
// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net)
9
// This program is FREE software. You can redistribute it and/or
10
// modify it under the terms of the GNU General Public License
11
// as published by the Free Software Foundation; either version 2
12
// of the License, or (at your opinion) any later version.
14
// This program is distributed in the HOPE that it will be USEFUL,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
// See the GNU General Public License for more details.
19
// You should have received a copy of the GNU General Public License
20
// along with this program. If not, write to the Free Software Foundation,
21
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
//=============================================================================
25
#include "optw_notify.h"
27
#include "kvi_settings.h"
28
#include "kvi_options.h"
29
#include "kvi_locale.h"
33
KviNotifyOptionsWidget::KviNotifyOptionsWidget(QWidget * parent)
34
: KviOptionsWidget(parent)
36
setObjectName("notify_options_widget");
40
KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Use online notify list","options"),KviOption_boolUseNotifyList);
41
KviTalGroupBox *g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options"));
42
connect(b,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool)));
45
SIGNAL(toggled(bool)),
46
addBoolSelector(g,__tr2qs_ctx("Show notifications in active window","options"),
47
KviOption_boolNotifyListChangesToActiveWindow,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
48
SLOT(setEnabled(bool)));
50
SIGNAL(toggled(bool)),
51
addBoolSelector(g,__tr2qs_ctx("Flash window when users are going online","options"),
52
KviOption_boolFlashWindowOnNotifyOnLine,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
53
SLOT(setEnabled(bool)));
55
SIGNAL(toggled(bool)),
56
addBoolSelector(g,__tr2qs_ctx("Popup notifier when users are going online","options"),
57
KviOption_boolPopupNotifierOnNotifyOnLine,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
58
SLOT(setEnabled(bool)));
60
g = addGroupBox(0,2,0,2,Qt::Horizontal,__tr2qs_ctx("Advanced configuration","options"));
61
connect(b,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool)));
64
SIGNAL(toggled(bool)),
65
addBoolSelector(g,__tr2qs_ctx("Check USERHOST for online users","options"),
66
KviOption_boolNotifyListSendUserhostForOnlineUsers,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
67
SLOT(setEnabled(bool)));
69
SIGNAL(toggled(bool)),
70
addBoolSelector(g,__tr2qs_ctx("Use \"smart\" notify list manager","options"),
71
KviOption_boolUseIntelligentNotifyListManager,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
72
SLOT(setEnabled(bool)));
74
SIGNAL(toggled(bool)),
75
addBoolSelector(g,__tr2qs_ctx("Use the WATCH method if available","options"),
76
KviOption_boolUseWatchListIfAvailable,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
77
SLOT(setEnabled(bool)));
79
SIGNAL(toggled(bool)),
80
addUIntSelector(g,__tr2qs_ctx("Check interval (in seconds)","options"),
81
KviOption_uintNotifyListCheckTimeInSecs,
82
5,3600,180,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
83
SLOT(setEnabled(bool)));
85
SIGNAL(toggled(bool)),
86
addUIntSelector(g,__tr2qs_ctx("ISON delay (in seconds)","options"),
87
KviOption_uintNotifyListIsOnDelayTimeInSecs,
88
5,180,6,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
89
SLOT(setEnabled(bool)));
91
SIGNAL(toggled(bool)),
92
addUIntSelector(g,__tr2qs_ctx("USERHOST delay (in seconds)","options"),
93
KviOption_uintNotifyListUserhostDelayTimeInSecs,
94
5,180,6,KVI_OPTION_BOOL(KviOption_boolUseNotifyList)),
95
SLOT(setEnabled(bool)));
97
addLabel(0,3,0,3,__tr2qs_ctx("<p><b>Note:</b><br>The notify list is managed using the \"Registered Users\" settings.</p>","options"));
98
addRowSpacer(0,4,0,4);
101
KviNotifyOptionsWidget::~KviNotifyOptionsWidget()
105
#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES
106
#include "m_optw_notify.moc"
107
#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES