summaryrefslogtreecommitdiffstats
path: root/src/loggingoptions.cpp
blob: 7a8d410ae705cece489db720dce3a68a90a83ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
/***************************************************************************
 *                                                                         *
 *   Copyright (C) 2005, 2006 by Kevin Gilbert                             *
 *   [email protected]                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 *                                                                         *
 ***************************************************************************/

#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qpushbutton.h>

#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <kmessagebox.h>

#include "knmap.h"
#include "loggingoptions.h"
#include "whatsthis.h"

//	constructor
//	===========

LoggingOptions::LoggingOptions( QWidget* parent, const char* name )
: QWidget( parent, name )
{	createLayout( );
}

//	createLayout
//	============

void LoggingOptions::createLayout( )
{	QGridLayout* gridLayout      = new QGridLayout( this );
	KIconLoader* iconLoader      = KGlobal::iconLoader( );
	QIconSet     fileOpenIconSet = iconLoader->loadIconSet( "fileopen",   KIcon::Small );

	m_baseFileNameButton   = new QPushButton( fileOpenIconSet, NULL, this, "base file name button" );
	m_grepableLogButton    = new QPushButton( fileOpenIconSet, NULL, this, "grepable log button"   );
	m_normalLogButton      = new QPushButton( fileOpenIconSet, NULL, this, "normal log button"     );
	m_resumeButton         = new QPushButton( fileOpenIconSet, NULL, this, "resume button"         );
	m_scriptKiddieButton   = new QPushButton( fileOpenIconSet, NULL, this, "script kiddie button"  );
	m_stylesheetButton     = new QPushButton( fileOpenIconSet, NULL, this, "stylesheet button"     );
	m_xmlLogButton         = new QPushButton( fileOpenIconSet, NULL, this, "xml log button"        );

	m_appendOutputCheckBox = new QCheckBox( i18n( "Append output (--append_output)"       ), this, "append output checkbox" );
	m_baseFileNameCheckBox = new QCheckBox( i18n( "Base file name (-oA <name>) "          ), this, "base name checkbox"     );
	m_grepableLogCheckBox  = new QCheckBox( i18n( "grep'able log file (-oG <file>) "      ), this, "grepable log checkbox"  );
	m_normalLogCheckBox    = new QCheckBox( i18n( "Normal log file (-oN <file>) "         ), this, "normal log checkbox"    );
	m_noStylesheetCheckBox = new QCheckBox( i18n( "No XSL stylesheet (--no_stylesheet)"   ), this, "no stylesheet checkbox" );
	m_resumeCheckBox       = new QCheckBox( i18n( "Resume file (--resume <file>) "        ), this, "resume checkbox"        );
	m_scriptKiddieCheckBox = new QCheckBox( i18n( "Script kiddie log file (-oS <file>) "  ), this, "script kiddie checkbox" );
	m_stylesheetCheckBox   = new QCheckBox( i18n( "XSL stylesheet (--stylesheet <file>) " ), this, "stylesheet checkbox"    );
	m_xmlLogCheckBox       = new QCheckBox( i18n( "XML log file (-oX <file>) "            ), this, "xml log checkbox"       );

	m_baseFileNameLineEdit = new QLineEdit( this, "base file name line edit" );
	m_grepableLogLineEdit  = new QLineEdit( this, "grepable log line edit"   );
	m_normalLogLineEdit    = new QLineEdit( this, "normal log line edit"     );
	m_resumeLineEdit       = new QLineEdit( this, "resume line edit"         );
	m_scriptKiddieLineEdit = new QLineEdit( this, "script kiddie line edit"  );
	m_stylesheetLineEdit   = new QLineEdit( this, "stylesheet line edit"     );
	m_xmlLogLineEdit       = new QLineEdit( this, "xml log line edit"        );

	byte row = 1;
	gridLayout->addWidget( m_appendOutputCheckBox, row++, 1 );
	gridLayout->addWidget( m_noStylesheetCheckBox, row++, 1 );
	byte rowBlock1 = row;

	row = 1;
	gridLayout->addWidget( m_baseFileNameCheckBox, row,   3 );
	gridLayout->addWidget( m_baseFileNameLineEdit, row,   4 );
	gridLayout->addWidget( m_baseFileNameButton,   row++, 5 );

	gridLayout->addWidget( m_grepableLogCheckBox,  row,   3 );
	gridLayout->addWidget( m_grepableLogLineEdit,  row,   4 );
	gridLayout->addWidget( m_grepableLogButton,    row++, 5 );

	gridLayout->addWidget( m_normalLogCheckBox,    row,   3 );
	gridLayout->addWidget( m_normalLogLineEdit,    row,   4 );
	gridLayout->addWidget( m_normalLogButton,      row++, 5 );

	gridLayout->addWidget( m_resumeCheckBox,       row,   3 );
	gridLayout->addWidget( m_resumeLineEdit,       row,   4 );
	gridLayout->addWidget( m_resumeButton,         row++, 5 );

	gridLayout->addWidget( m_scriptKiddieCheckBox, row,   3 );
	gridLayout->addWidget( m_scriptKiddieLineEdit, row,   4 );
	gridLayout->addWidget( m_scriptKiddieButton,   row++, 5 );

	gridLayout->addWidget( m_xmlLogCheckBox,       row,   3 );
	gridLayout->addWidget( m_xmlLogLineEdit,       row,   4 );
	gridLayout->addWidget( m_xmlLogButton,         row++, 5 );

	gridLayout->addWidget( m_stylesheetCheckBox,   row,   3 );
	gridLayout->addWidget( m_stylesheetLineEdit,   row,   4 );
	gridLayout->addWidget( m_stylesheetButton,     row++, 5 );
	byte rowBlock2 = row;

	gridLayout->setColStretch( 0,  5 );
	gridLayout->setColStretch( 2,  5 );
	gridLayout->setColStretch( 4, 10 );
	gridLayout->setColStretch( 6,  5 );

	gridLayout->setRowStretch( 0, 10 );
	gridLayout->setRowStretch( _max_( rowBlock1, rowBlock2 ), 10 );
}

//	finaliseInitialisation
//	======================

void LoggingOptions::finaliseInitialisation( )
{	WhatsThis* whatsThis = new WhatsThis( this );

	connect( m_baseFileNameButton,   SIGNAL( clicked( )), SLOT( slotBaseFileNameButtonClicked( )));
	connect( m_baseFileNameCheckBox, SIGNAL( clicked( )), SLOT( slotBaseFileNameCheckBoxClicked( )));
	connect( m_grepableLogButton,    SIGNAL( clicked( )), SLOT( slotGrepableLogButtonClicked( )));
	connect( m_grepableLogCheckBox,  SIGNAL( clicked( )), SLOT( slotGrepableLogCheckBoxClicked( )));
	connect( m_normalLogButton,      SIGNAL( clicked( )), SLOT( slotNormalLogButtonClicked( )));
	connect( m_normalLogCheckBox,    SIGNAL( clicked( )), SLOT( slotNormalLogCheckBoxClicked( )));
	connect( m_noStylesheetCheckBox, SIGNAL( clicked( )), SLOT( slotNoStylesheetCheckBoxClicked( )));
	connect( m_resumeButton,         SIGNAL( clicked( )), SLOT( slotResumeButtonClicked( )));
	connect( m_resumeCheckBox,       SIGNAL( clicked( )), SLOT( slotResumeCheckBoxClicked( )));
	connect( m_scriptKiddieButton,   SIGNAL( clicked( )), SLOT( slotScriptKiddieButtonClicked( )));
	connect( m_scriptKiddieCheckBox, SIGNAL( clicked( )), SLOT( slotScriptKiddieCheckBoxClicked( )));
	connect( m_stylesheetButton,     SIGNAL( clicked( )), SLOT( slotStylesheetButtonClicked( )));
	connect( m_stylesheetCheckBox,   SIGNAL( clicked( )), SLOT( slotStylesheetCheckBoxClicked( )));
	connect( whatsThis,              SIGNAL( clicked( )), SLOT( slotWhatsThisClicked( )));
	connect( m_xmlLogButton,         SIGNAL( clicked( )), SLOT( slotXMLLogButtonClicked( )));
	connect( m_xmlLogCheckBox,       SIGNAL( clicked( )), SLOT( slotXMLLogCheckBoxClicked( )));

	connect( m_appendOutputCheckBox, SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_baseFileNameCheckBox, SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_baseFileNameLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
	connect( m_grepableLogCheckBox,  SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_grepableLogLineEdit,  SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
	connect( m_normalLogCheckBox,    SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_normalLogLineEdit,    SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
	connect( m_resumeCheckBox,       SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_resumeLineEdit,       SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
	connect( m_scriptKiddieCheckBox, SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_scriptKiddieLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
	connect( m_stylesheetCheckBox,   SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_stylesheetLineEdit,   SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
	connect( m_xmlLogCheckBox,       SIGNAL( clicked( )),                    SIGNAL( optionsDirty( )));
	connect( m_xmlLogLineEdit,       SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
}

//	getOptions
//	==========

bool LoggingOptions::getOptions( )
{	bool    baseFileNameState   = m_baseFileNameCheckBox->isChecked( );
	QString baseFileNameValue   = m_baseFileNameLineEdit->text( );
	bool    grepableLogState    = m_grepableLogCheckBox->isChecked( );
	QString grepableLogValue    = m_grepableLogLineEdit->text( );
	bool    normalLogState      = m_normalLogCheckBox->isChecked( );
	QString normalLogValue      = m_normalLogLineEdit->text( );
	bool    resumeState         = m_resumeCheckBox->isChecked( );
	QString resumeValue         = m_resumeLineEdit->text( );
	bool    scriptKiddieState   = m_scriptKiddieCheckBox->isChecked( );
	QString scriptKiddieValue   = m_scriptKiddieLineEdit->text( );
	bool    stylesheetState     = m_stylesheetCheckBox->isChecked( );
	QString stylesheetValue     = m_stylesheetLineEdit->text( );
	bool    xmlLogState         = m_xmlLogCheckBox->isChecked( );
	QString xmlLogValue         = m_xmlLogLineEdit->text( );

	if( baseFileNameState && baseFileNameValue.isEmpty( ))
	{	KMessageBox::error( this, i18n( QString( "Base file name not specified" )), i18n( "Base file name error" ));
		return false;
	}

	if( grepableLogState && grepableLogValue.isEmpty( ))
	{	KMessageBox::error( this, i18n( QString( "grep'able log file name not specified" )), i18n( "grep'able log file name error" ));
		return false;
	}

	if( normalLogState && normalLogValue.isEmpty( ))
	{	KMessageBox::error( this, i18n( QString( "Normal log file name not specified" )), i18n( "Normal log file name error" ));
		return false;
	}

	if( resumeState && scriptKiddieValue.isEmpty( ))
	{	KMessageBox::error( this, i18n( QString( "Resume file name not specified" )), i18n( "Resume file name error" ));
		return false;
	}

	if( scriptKiddieState && scriptKiddieValue.isEmpty( ))
	{	KMessageBox::error( this, i18n( QString( "Script kiddie log file name not specified" )), i18n( "Script kiddie log file name error" ));
		return false;
	}

	if( stylesheetState && stylesheetValue.isEmpty( ))
	{	KMessageBox::error( this, i18n( QString( "XSL stylesheet file name not specified" )), i18n( "XSL stylesheet file name error" ));
		return false;
	}

	if( xmlLogState && xmlLogValue.isEmpty( ))
	{	KMessageBox::error( this, i18n( QString( "XML log file name not specified" )), i18n( "XML log file name error" ));
		return false;
	}

	m_appendOutputState = m_appendOutputCheckBox->isChecked( );
	m_baseFileNameState = baseFileNameState;
	m_baseFileNameValue = baseFileNameValue;
	m_grepableLogState  = grepableLogState;
	m_grepableLogValue  = grepableLogValue;
	m_normalLogState    = normalLogState;
	m_normalLogValue    = normalLogValue;
	m_noStylesheetState = m_noStylesheetCheckBox->isChecked( );
	m_resumeValue       = resumeValue;
	m_scriptKiddieState = scriptKiddieState;
	m_scriptKiddieValue = scriptKiddieValue;
	m_stylesheetState   = stylesheetState;
	m_stylesheetValue   = stylesheetValue;
	m_xmlLogState       = xmlLogState;
	m_xmlLogValue       = xmlLogValue;

	return true;
}

//	readProfile
//	===========

void LoggingOptions::readProfile( KConfig* config )
{	m_appendOutputState = config->readBoolEntry( "appendOutputState"   );
	m_baseFileNameState = config->readBoolEntry( "baseFileNameState"   );
	m_baseFileNameValue = config->readEntry(     "baseFileNameValue"   );
	m_grepableLogState  = config->readBoolEntry( "grepableLogState"    );
	m_grepableLogValue  = config->readEntry(     "grepableLogValue"    );
	m_normalLogState    = config->readBoolEntry( "normalLogState"      );
	m_normalLogValue    = config->readEntry(     "normalLogValue"      );
	m_noStylesheetState = config->readBoolEntry( "noStylesheetState"   );
	m_resumeState       = config->readBoolEntry( "resumeState"         );
	m_resumeValue       = config->readEntry(     "resumeValue"         );
	m_scriptKiddieState = config->readBoolEntry( "scriptKiddieState"   );
	m_scriptKiddieValue = config->readEntry(     "scriptKiddieValue"   );
	m_stylesheetState   = config->readBoolEntry( "stylesheetState"     );
	m_stylesheetValue   = config->readEntry(     "stylesheetValue"     );
	m_xmlLogState       = config->readBoolEntry( "xmlLogState"         );
	m_xmlLogValue       = config->readEntry(     "xmlLogValue"         );
}

//	saveProfile
//	===========

void LoggingOptions::saveProfile( KConfig* config )
{	config->writeEntry( "appendOutputState", m_appendOutputState );
	config->writeEntry( "baseFileNameState", m_baseFileNameState );
	config->writeEntry( "baseFileNameValue", m_baseFileNameValue );
	config->writeEntry( "grepableLogState",  m_grepableLogState  );
	config->writeEntry( "grepableLogValue",  m_grepableLogValue  );
	config->writeEntry( "normalLogState",    m_normalLogState    );
	config->writeEntry( "normalLogValue",    m_normalLogValue    );
	config->writeEntry( "noStylesheetState", m_noStylesheetState );
	config->writeEntry( "resumeState",       m_resumeState       );
	config->writeEntry( "resumeValue",       m_resumeValue       );
	config->writeEntry( "scriptKiddieState", m_scriptKiddieState );
	config->writeEntry( "scriptKiddieValue", m_scriptKiddieValue );
	config->writeEntry( "stylesheetState",   m_stylesheetState   );
	config->writeEntry( "stylesheetValue",   m_stylesheetValue   );
	config->writeEntry( "xmlLogState",       m_xmlLogState       );
	config->writeEntry( "xmlLogValue",       m_xmlLogValue       );
}

//	setInitialValues
//	================

void LoggingOptions::setInitialValues( )
{	m_appendOutputCheckBox->setChecked( m_appendOutputState );
	m_baseFileNameCheckBox->setChecked( m_baseFileNameState );
	m_baseFileNameLineEdit->setText( m_baseFileNameValue );
	m_grepableLogCheckBox->setChecked( m_grepableLogState );
	m_grepableLogLineEdit->setText( m_grepableLogValue );
	m_normalLogCheckBox->setChecked( m_normalLogState );
	m_normalLogLineEdit->setText( m_normalLogValue );
	m_noStylesheetCheckBox->setChecked( m_noStylesheetState );
	m_resumeCheckBox->setChecked( m_resumeState );
	m_resumeLineEdit->setText( m_resumeValue );
	m_scriptKiddieCheckBox->setChecked( m_scriptKiddieState );
	m_scriptKiddieLineEdit->setText( m_scriptKiddieValue );
	m_stylesheetCheckBox->setChecked( m_stylesheetState );
	m_stylesheetLineEdit->setText( m_stylesheetValue );
	m_xmlLogCheckBox->setChecked( m_xmlLogState );
	m_xmlLogLineEdit->setText( m_xmlLogValue );

	slotBaseFileNameCheckBoxClicked( );
	slotGrepableLogCheckBoxClicked( );
	slotNormalLogCheckBoxClicked( );
	slotResumeCheckBoxClicked( );
	slotScriptKiddieCheckBoxClicked( );
	slotStylesheetCheckBoxClicked( );
	slotXMLLogCheckBoxClicked( );
}

//	slotBaseFileNameButtonClicked
//	=============================

void LoggingOptions::slotBaseFileNameButtonClicked( )
{	Knmap::getFilePath( "Base file name", m_baseFileNameValue, m_baseFileNameLineEdit, false );
}

//	slotBaseFileNameCheckBoxClicked
//	===============================

void LoggingOptions::slotBaseFileNameCheckBoxClicked( )
{	m_baseFileNameButton->setEnabled( m_baseFileNameCheckBox->isChecked( ));
	m_baseFileNameLineEdit->setEnabled( m_baseFileNameCheckBox->isChecked( ));
}

//	slotGrepableLogButtonClicked
//	============================

void LoggingOptions::slotGrepableLogButtonClicked( )
{	Knmap::getFilePath( "grep'able log file", m_grepableLogValue, m_grepableLogLineEdit, true );
}

//	slotGrepableLogCheckBoxClicked
//	==============================

void LoggingOptions::slotGrepableLogCheckBoxClicked( )
{	m_grepableLogButton->setEnabled( m_grepableLogCheckBox->isChecked( ));
	m_grepableLogLineEdit->setEnabled( m_grepableLogCheckBox->isChecked( ));
}

//	slotNormalLogButtonClicked
//	==========================

void LoggingOptions::slotNormalLogButtonClicked( )
{	Knmap::getFilePath( "Normal log file", m_normalLogValue, m_normalLogLineEdit, true );
}

//	slotNormalLogCheckBoxClicked
//	============================

void LoggingOptions::slotNormalLogCheckBoxClicked( )
{	m_normalLogButton->setEnabled( m_normalLogCheckBox->isChecked( ));
	m_normalLogLineEdit->setEnabled( m_normalLogCheckBox->isChecked( ));
}

//	slotNoStylesheetCheckBoxClicked
//	===============================

void LoggingOptions::slotNoStylesheetCheckBoxClicked( )
{	if( m_noStylesheetCheckBox->isChecked( ))
	{	m_stylesheetCheckBox->setChecked( false );
		slotStylesheetCheckBoxClicked( );
	}
}

//	slotResumeButtonClicked
//	=======================

void LoggingOptions::slotResumeButtonClicked( )
{	Knmap::getFilePath( "Resume file", m_resumeValue, m_resumeLineEdit, false );
}

//	slotResumeCheckBoxClicked
//	=========================

void LoggingOptions::slotResumeCheckBoxClicked( )
{	m_resumeButton->setEnabled( m_resumeCheckBox->isChecked( ));
	m_resumeLineEdit->setEnabled( m_resumeCheckBox->isChecked( ));
}

//	slotScriptKiddieButtonClicked
//	=============================

void LoggingOptions::slotScriptKiddieButtonClicked( )
{	Knmap::getFilePath( "Script kiddie log file", m_scriptKiddieValue, m_scriptKiddieLineEdit, true );
}

//	slotScriptKiddieCheckBoxClicked
//	===============================

void LoggingOptions::slotScriptKiddieCheckBoxClicked( )
{	m_scriptKiddieButton->setEnabled( m_scriptKiddieCheckBox->isChecked( ));
	m_scriptKiddieLineEdit->setEnabled( m_scriptKiddieCheckBox->isChecked( ));
}

//	slotStylesheetButtonClicked
//	===========================

void LoggingOptions::slotStylesheetButtonClicked( )
{	Knmap::getFilePath( "Stylesheet file", m_stylesheetValue, m_stylesheetLineEdit, false );
}

//	slotStylesheetCheckBoxClicked
//	=============================

void LoggingOptions::slotStylesheetCheckBoxClicked( )
{	m_stylesheetButton->setEnabled( m_stylesheetCheckBox->isChecked( ));
	m_stylesheetLineEdit->setEnabled( m_stylesheetCheckBox->isChecked( ));

	if( m_stylesheetCheckBox->isChecked( ))
		m_noStylesheetCheckBox->setChecked( false );
}

//	slotWhatsThisClicked
//	====================

void LoggingOptions::slotWhatsThisClicked( )
{		 if( m_appendOutputCheckBox->hasMouse( )) emit( displayHelp( "--append_output" ));
	else if( m_baseFileNameButton->hasMouse( ))   emit( displayHelp( "-oA"             ));
	else if( m_baseFileNameCheckBox->hasMouse( )) emit( displayHelp( "-oA"             ));
	else if( m_baseFileNameLineEdit->hasMouse( )) emit( displayHelp( "-oA"             ));
	else if( m_grepableLogButton->hasMouse( ))    emit( displayHelp( "-oG"             ));
	else if( m_grepableLogCheckBox->hasMouse( ))  emit( displayHelp( "-oG"             ));
	else if( m_grepableLogLineEdit->hasMouse( ))  emit( displayHelp( "-oG"             ));
	else if( m_normalLogButton->hasMouse( ))      emit( displayHelp( "-oN"             ));
	else if( m_normalLogCheckBox->hasMouse( ))    emit( displayHelp( "-oN"             ));
	else if( m_normalLogLineEdit->hasMouse( ))    emit( displayHelp( "-oN"             ));
	else if( m_noStylesheetCheckBox->hasMouse( )) emit( displayHelp( "--no_stylesheet" ));
	else if( m_resumeButton->hasMouse( ))         emit( displayHelp( "--resume"        ));
	else if( m_resumeCheckBox->hasMouse( ))       emit( displayHelp( "--resume"        ));
	else if( m_resumeLineEdit->hasMouse( ))       emit( displayHelp( "--resume"        ));
	else if( m_scriptKiddieButton->hasMouse( ))   emit( displayHelp( "-oS"             ));
	else if( m_scriptKiddieCheckBox->hasMouse( )) emit( displayHelp( "-oS"             ));
	else if( m_scriptKiddieLineEdit->hasMouse( )) emit( displayHelp( "-oS"             ));
	else if( m_stylesheetButton->hasMouse( ))     emit( displayHelp( "--stylesheet"    ));
	else if( m_stylesheetCheckBox->hasMouse( ))   emit( displayHelp( "--stylesheet"    ));
	else if( m_stylesheetLineEdit->hasMouse( ))   emit( displayHelp( "--stylesheet"    ));
	else if( m_xmlLogButton->hasMouse( ))         emit( displayHelp( "-oX"             ));
	else if( m_xmlLogCheckBox->hasMouse( ))       emit( displayHelp( "-oX"             ));
	else if( m_xmlLogLineEdit->hasMouse( ))       emit( displayHelp( "-oX"             ));
	else emit( displayUnknown( ));
}

//	slotXMLLogButtonClicked
//	=======================

void LoggingOptions::slotXMLLogButtonClicked( )
{	Knmap::getFilePath( "XML log file", m_xmlLogValue, m_xmlLogLineEdit, true );
}

//	slotXMLLogCheckBoxClicked
//	=========================

void LoggingOptions::slotXMLLogCheckBoxClicked( )
{	m_xmlLogButton->setEnabled( m_xmlLogCheckBox->isChecked( ));
	m_xmlLogLineEdit->setEnabled( m_xmlLogCheckBox->isChecked( ));
}