Cppcheck
newsuppressiondialog.h
Go to the documentation of this file.
1 /*
2  * Cppcheck - A tool for static C/C++ code analysis
3  * Copyright (C) 2007-2024 Cppcheck team.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef NEWSUPPRESSIONDIALOG_H
20 #define NEWSUPPRESSIONDIALOG_H
21 
22 #include "suppressions.h"
23 
24 #include <QDialog>
25 #include <QObject>
26 #include <QString>
27 
28 class QWidget;
29 namespace Ui {
31 }
32 
33 class NewSuppressionDialog : public QDialog {
34  Q_OBJECT
35 
36 public:
37  explicit NewSuppressionDialog(QWidget *parent = nullptr);
39  ~NewSuppressionDialog() override;
41 
42  /**
43  * @brief Translate the user input in the GUI into a suppression
44  * @return Cppcheck suppression
45  */
47 
48  /**
49  * @brief Update the GUI so it corresponds with the given
50  * Cppcheck suppression
51  * @param suppression Cppcheck suppression
52  */
53  void setSuppression(const SuppressionList::Suppression &suppression);
54 
55 private:
56  Ui::NewSuppressionDialog *mUI;
57 };
58 
59 #endif // NEWSUPPRESSIONDIALOG_H
SuppressionList::Suppression getSuppression() const
Translate the user input in the GUI into a suppression.
void setSuppression(const SuppressionList::Suppression &suppression)
Update the GUI so it corresponds with the given Cppcheck suppression.
NewSuppressionDialog & operator=(const NewSuppressionDialog &)=delete
NewSuppressionDialog(const NewSuppressionDialog &)=delete
Ui::NewSuppressionDialog * mUI
NewSuppressionDialog(QWidget *parent=nullptr)
Definition: aboutdialog.h:27