1 | /* |
2 | * Copyright 2007-2009 Parker Coates <coates@kde.org> |
3 | * |
4 | * This file is part of Killbots. |
5 | * |
6 | * Killbots is free software: you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by |
8 | * the Free Software Foundation, either version 2 of the License, or |
9 | * (at your option) any later version. |
10 | * |
11 | * Killbots is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. |
15 | * |
16 | * You should have received a copy of the GNU General Public License |
17 | * along with Killbots. If not, see <http://www.gnu.org/licenses/>. |
18 | */ |
19 | |
20 | #ifndef KILLBOTS_RULESETSELECTOR_H |
21 | #define KILLBOTS_RULESETSELECTOR_H |
22 | |
23 | class KLineEdit; |
24 | |
25 | #include <QtCore/QMap> |
26 | class QLabel; |
27 | class QListWidget; |
28 | #include <QtGui/QWidget> |
29 | |
30 | namespace Killbots |
31 | { |
32 | class Ruleset; |
33 | class RulesetDetailsDialog; |
34 | |
35 | class RulesetSelector : public QWidget |
36 | { |
37 | Q_OBJECT |
38 | |
39 | public: // functions |
40 | explicit RulesetSelector( QWidget * parent = 0 ); |
41 | virtual ~RulesetSelector(); |
42 | |
43 | public: // data members |
44 | KLineEdit * kcfg_Ruleset; |
45 | |
46 | private: // functions |
47 | void findRulesets(); |
48 | |
49 | private slots: |
50 | void selectionChanged( QString rulesetName ); |
51 | void showDetailsDialog(); |
52 | |
53 | private: // data members |
54 | QListWidget * m_listWidget; |
55 | QLabel * m_author; |
56 | QLabel * m_authorContact; |
57 | QLabel * m_description; |
58 | QMap< QString, const Ruleset * > m_rulesetMap; |
59 | RulesetDetailsDialog * m_detailsDialog; |
60 | }; |
61 | } |
62 | |
63 | #endif |
64 | |