File indexing completed on 2024-04-14 04:29:51
0001 /* 0002 * This file is part of KDevelop Krazy2 Plugin. 0003 * 0004 * Copyright 2012 Daniel Calviño Sánchez <danxuliu@gmail.com> 0005 * 0006 * This program is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU General Public License 0008 * as published by the Free Software Foundation; either version 2 0009 * of the License, or (at your option) any later version. 0010 * 0011 * This program is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 * GNU General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU General Public License 0017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef CHECKER_H 0021 #define CHECKER_H 0022 0023 #include <QString> 0024 #include <QList> 0025 0026 /** 0027 * A checker run by Krazy2. 0028 */ 0029 class Checker { 0030 public: 0031 0032 Checker(); 0033 0034 QString name() const; 0035 void setName(const QString& name); 0036 0037 QString description() const; 0038 void setDescription(const QString& description); 0039 0040 QString explanation() const; 0041 void setExplanation(const QString& explanation); 0042 0043 QString fileType() const; 0044 void setFileType(const QString& fileType); 0045 0046 bool isExtra() const; 0047 void setExtra(bool extra); 0048 0049 private: 0050 0051 QString m_name; 0052 QString m_description; 0053 QString m_explanation; 0054 QString m_fileType; 0055 bool m_extra; 0056 0057 }; 0058 0059 // Find the checker tool in the list, by name and file type. E.g.: "C++;endswithnewline" 0060 const Checker* findChecker(const QList<const Checker*> &list, const QString &s); 0061 0062 #endif