aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangtools/filterdialog.h
blob: 8ac12ab88d97051ab4e5b585bd6fae9d39e4c62c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include <QDialog>

namespace ClangTools {
namespace Internal {

namespace Ui { class FilterDialog; }

class FilterChecksModel;

class Check {
public:
    QString name;
    QString displayName;
    int count = 0;
    bool isShown = false;
    bool hasFixit = false;
};
using Checks = QList<Check>;

class FilterDialog : public QDialog
{
    Q_OBJECT

public:
    explicit FilterDialog(const Checks &selectedChecks, QWidget *parent = nullptr);
    ~FilterDialog();

    QSet<QString> selectedChecks() const;

private:
    Ui::FilterDialog *m_ui;
    FilterChecksModel *m_model;
};

} // namespace Internal
} // namespace ClangTools