1
//=============================================================================
3
// File : OptionsWidget_logging.cpp
4
// Creation date : Mon Oct 29 15:37:16 2001 GMT by Szymon Stefanek
6
// This file is part of the KVIrc irc client distribution
7
// Copyright (C) 2001-2010 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 "OptionsWidget_logging.h"
27
#include "KviOptions.h"
28
#include "KviLocale.h"
33
OptionsWidget_logging::OptionsWidget_logging(QWidget * parent)
34
: KviOptionsWidget(parent)
36
setObjectName("logging_options_widget");
40
KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Automatically Log","options"));
41
addBoolSelector(g,__tr2qs_ctx("Query windows","options"),KviOption_boolAutoLogQueries);
42
addBoolSelector(g,__tr2qs_ctx("Channel windows","options"),KviOption_boolAutoLogChannels);
43
addBoolSelector(g,__tr2qs_ctx("DCC Chat windows","options"),KviOption_boolAutoLogDccChat);
44
addBoolSelector(g,__tr2qs_ctx("Console windows","options"),KviOption_boolAutoLogConsole);
46
QWidget * w = addDirectorySelector(0,1,0,1,__tr2qs_ctx("Save logs to folder:","options"),KviOption_stringLogsPath);
47
mergeTip(w, __tr2qs_ctx("<center>This is the base log directory:<br>" \
48
"all the log files will be saved inside this directory</center>","options"));
50
w = addStringSelector(0,2,0,2,__tr2qs_ctx("Dynamic subfolder:","options"),KviOption_stringLogsDynamicPath);
51
mergeTip(w, __tr2qs_ctx("<center>You can specify a subdirectory where log files will be saved:" \
52
"use kvs code to create dynamic subfolders.</center>","options"));
54
addBoolSelector(0,3,0,3,__tr2qs_ctx("Strip message type numbers in logs","options"),KviOption_boolStripMsgTypeInLogs);
55
addBoolSelector(0,4,0,4,__tr2qs_ctx("Strip colors in logs","options"),KviOption_boolStripControlCodesInLogs);
56
KviUIntSelector* us = addUIntSelector(0,5,0,5,__tr2qs_ctx("Auto flush logs every","options"),KviOption_uintAutoFlushLogs,0,99999,0);
57
us->setSuffix(__tr2qs_ctx(" min","options"));
59
__tr2qs_ctx("<center>Save logs with the current interval<br>" \
60
"Set to 0 to disable this feature</center>","options"));
62
#ifdef COMPILE_ZLIB_SUPPORT
63
addBoolSelector(0,6,0,6,__tr2qs_ctx("Gzip logs","options"),KviOption_boolGzipLogs);
66
addRowSpacer(0,7,0,7);
69
OptionsWidget_logging::~OptionsWidget_logging()
75
#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES
76
#include "m_OptionsWidget_logging.moc"
77
#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES