2022-01-28 15:56:11 +01:00
|
|
|
/*
|
|
|
|
* Cppcheck - A tool for static C/C++ code analysis
|
2023-06-21 16:41:22 +02:00
|
|
|
* Copyright (C) 2007-2023 Cppcheck team.
|
2022-01-28 15:56:11 +01:00
|
|
|
*
|
|
|
|
* 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-04-09 06:43:48 +02:00
|
|
|
#ifndef NEWSUPPRESSIONDIALOG_H
|
|
|
|
#define NEWSUPPRESSIONDIALOG_H
|
|
|
|
|
|
|
|
#include "suppressions.h"
|
|
|
|
|
2022-02-02 16:17:28 +01:00
|
|
|
#include <QDialog>
|
2023-04-08 16:08:47 +02:00
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
2022-02-02 16:17:28 +01:00
|
|
|
|
2022-04-13 12:24:00 +02:00
|
|
|
class QWidget;
|
2018-04-09 06:43:48 +02:00
|
|
|
namespace Ui {
|
|
|
|
class NewSuppressionDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NewSuppressionDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-06-30 21:39:22 +02:00
|
|
|
explicit NewSuppressionDialog(QWidget *parent = nullptr);
|
2018-05-01 09:35:53 +02:00
|
|
|
NewSuppressionDialog(const NewSuppressionDialog &) = delete;
|
2022-03-13 20:07:58 +01:00
|
|
|
~NewSuppressionDialog() override;
|
2018-05-01 09:35:53 +02:00
|
|
|
NewSuppressionDialog &operator=(const NewSuppressionDialog &) = delete;
|
2018-04-09 06:43:48 +02:00
|
|
|
|
2018-08-09 06:50:35 +02:00
|
|
|
/**
|
|
|
|
* @brief Translate the user input in the GUI into a suppression
|
|
|
|
* @return Cppcheck suppression
|
|
|
|
*/
|
2018-04-09 06:43:48 +02:00
|
|
|
Suppressions::Suppression getSuppression() const;
|
|
|
|
|
2018-08-09 06:50:35 +02:00
|
|
|
/**
|
|
|
|
* @brief Update the GUI so it corresponds with the given
|
|
|
|
* Cppcheck suppression
|
|
|
|
* @param suppression Cppcheck suppression
|
|
|
|
*/
|
|
|
|
void setSuppression(const Suppressions::Suppression &suppression);
|
|
|
|
|
2018-04-09 06:43:48 +02:00
|
|
|
private:
|
|
|
|
Ui::NewSuppressionDialog *mUI;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NEWSUPPRESSIONDIALOG_H
|