The pqCustomFilterManagerModel class stores the list of registered pipeline custom filter definitions.
More...
#include <pqCustomFilterManagerModel.h>
Inherits QAbstractListModel.
The pqCustomFilterManagerModel class stores the list of registered pipeline custom filter definitions.
The list is modified using the addCustomFilter
and removeCustomFilter
methods. When a new custom filter is added to the model a signal is emitted. This signal can be used to highlight the new custom filter.
Definition at line 30 of file pqCustomFilterManagerModel.h.
◆ pqCustomFilterManagerModel()
pqCustomFilterManagerModel::pqCustomFilterManagerModel |
( |
QObject * |
parent = nullptr | ) |
|
◆ ~pqCustomFilterManagerModel()
pqCustomFilterManagerModel::~pqCustomFilterManagerModel |
( |
| ) |
|
|
override |
◆ rowCount()
int pqCustomFilterManagerModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Gets the number of rows for a given index.
- Parameters
-
- Returns
- The number of rows for the given index.
◆ index()
QModelIndex pqCustomFilterManagerModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
Gets a model index for a given location.
- Parameters
-
row | The row number. |
column | The column number. |
parent | The parent index. |
- Returns
- A model index for the given location.
◆ data()
QVariant pqCustomFilterManagerModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
Gets the data for a given model index.
- Parameters
-
index | The model index. |
role | The role to get data for. |
- Returns
- The data for the given model index.
◆ flags()
Qt::ItemFlags pqCustomFilterManagerModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Gets the flags for a given model index.
The flags for an item indicate if it is enabled, editable, etc.
- Parameters
-
- Returns
- The flags for the given model index.
◆ getCustomFilterName()
QString pqCustomFilterManagerModel::getCustomFilterName |
( |
const QModelIndex & |
index | ) |
const |
Gets the custom filter name for the given model index.
- Parameters
-
index | The model index to look up. |
- Returns
- The custom filter definition name or an empty string.
◆ getIndexFor()
QModelIndex pqCustomFilterManagerModel::getIndexFor |
( |
const QString & |
filter | ) |
const |
Gets the model index for the given custom filter name.
- Parameters
-
filter | The custom filter definition name to look up. |
- Returns
- The model index for the given name.
◆ addCustomFilter
void pqCustomFilterManagerModel::addCustomFilter |
( |
QString |
name | ) |
|
|
slot |
Adds a new custom filter definition to the model.
- Parameters
-
name | The name of the new custom filter definition. |
◆ removeCustomFilter
void pqCustomFilterManagerModel::removeCustomFilter |
( |
QString |
name | ) |
|
|
slot |
Removes a custom filter definition from the model.
- Parameters
-
name | The name of the custom filter definition. |
◆ importCustomFiltersFromSettings
void pqCustomFilterManagerModel::importCustomFiltersFromSettings |
( |
| ) |
|
|
slot |
◆ exportCustomFiltersToSettings
void pqCustomFilterManagerModel::exportCustomFiltersToSettings |
( |
| ) |
|
|
slot |
◆ customFilterAdded
void pqCustomFilterManagerModel::customFilterAdded |
( |
const QString & |
name | ) |
|
|
signal |
Emitted when a new custom filter definition is added to the model.
- Parameters
-
name | The name of the new custom filter definition. |
The documentation for this class was generated from the following file: