summaryrefslogtreecommitdiffstats
path: root/src/kile/configcheckerdlg.h
blob: 74e8bf06171b019900ef57d7c24b09050c64c24d (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
/***************************************************************************
    begin                : Fri Jun 4 2004
    copyright            : (C) 2004 by Jeroen Wijnout
    email                : Jeroen.Wijnhout@kdemail.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KILEDIALOG_CONFIGCHECKER_H
#define KILEDIALOG_CONFIGCHECKER_H

#include <qsimplerichtext.h>

#include <kdialogbase.h>

#include "configtester.h"

class QLabel;
class QPainter;

class KProgress;
class KListBox;

class ConfigCheckerWidget;

namespace KileDialog
{
	class ResultItem : public QListBoxItem
	{
	public:
		ResultItem(KListBox *lb, const QString &tool, int status, const QValueList<ConfigTest> &tests);
		int width(const QListBox *) const { return m_richText->widthUsed(); }
		int height(const QListBox *) const { return m_richText->height(); }

	protected:
		void paint(QPainter *);

	private:
		QSimpleRichText	*m_richText;
	};

	class ConfigChecker : public KDialogBase
	{
		Q_OBJECT

	public:
		ConfigChecker(QWidget* parent = 0);
		~ConfigChecker();

	public slots:
		void run();
		void started();
		void finished(bool);
		void setPercentageDone(int);
		void saveResults();
		void slotCancel();

	private:
		KProgress* progressBar();
		QLabel* label();
		KListBox* listBox();

	private:
		ConfigCheckerWidget	*m_widget;
		Tester				*m_tester;
	};
}
#endif