File indexing completed on 2024-05-19 07:51:58

0001 /*
0002     This file is part of Killbots.
0003 
0004     SPDX-FileCopyrightText: 2007-2009 Parker Coates <coates@kde.org>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef KILLBOTS_RULESETSELECTOR_H
0010 #define KILLBOTS_RULESETSELECTOR_H
0011 
0012 class KLineEdit;
0013 
0014 #include <QMap>
0015 class QLabel;
0016 class QListWidget;
0017 #include <QWidget>
0018 
0019 namespace Killbots
0020 {
0021 class Ruleset;
0022 class RulesetDetailsDialog;
0023 
0024 class RulesetSelector : public QWidget
0025 {
0026     Q_OBJECT
0027 
0028 public: // functions
0029     explicit RulesetSelector(QWidget *parent = nullptr);
0030     ~RulesetSelector() override;
0031 
0032 public: // data members
0033     KLineEdit *kcfg_Ruleset;
0034 
0035 private: // functions
0036     void findRulesets();
0037 
0038 private Q_SLOTS:
0039     void selectionChanged(const QString &rulesetName);
0040     void showDetailsDialog();
0041 
0042 private: // data members
0043     QListWidget *m_listWidget;
0044     QLabel *m_author;
0045     QLabel *m_authorContact;
0046     QLabel *m_description;
0047     QMap< QString, const Ruleset * > m_rulesetMap;
0048     RulesetDetailsDialog *m_detailsDialog;
0049 };
0050 }
0051 
0052 #endif