pqCustomFilterManagerModel.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
10 #ifndef pqCustomFilterManagerModel_h
11 #define pqCustomFilterManagerModel_h
12 
13 #include "pqComponentsModule.h"
14 #include <QAbstractListModel>
15 
16 class pqCustomFilterManagerModelInternal;
17 class QString;
18 
30 class PQCOMPONENTS_EXPORT pqCustomFilterManagerModel : public QAbstractListModel
31 {
32  Q_OBJECT
33 
34 public:
35  pqCustomFilterManagerModel(QObject* parent = nullptr);
36  ~pqCustomFilterManagerModel() override;
37 
41 
49  int rowCount(const QModelIndex& parent = QModelIndex()) const override;
50 
60  QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
61 
70  QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
71 
82  Qt::ItemFlags flags(const QModelIndex& index) const override;
84 
88 
96  QString getCustomFilterName(const QModelIndex& index) const;
97 
105  QModelIndex getIndexFor(const QString& filter) const;
107 
108 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
114  void addCustomFilter(QString name);
115 
121  void removeCustomFilter(QString name);
122 
126  void importCustomFiltersFromSettings();
127  void exportCustomFiltersToSettings();
128 
129 Q_SIGNALS:
136  void customFilterAdded(const QString& name);
137 
138 private:
142  pqCustomFilterManagerModelInternal* Internal;
143 };
144 
145 #endif
data
#define PQCOMPONENTS_EXPORT
name
The pqCustomFilterManagerModel class stores the list of registered pipeline custom filter definitions...
index