pqFileDialogFilter.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 
5 #ifndef pqFileDialogFilter_h
6 #define pqFileDialogFilter_h
7 
8 #include "pqCoreModule.h"
9 #include <QRegularExpression>
10 #include <QSortFilterProxyModel>
11 
12 class pqFileDialogModel;
13 
14 class PQCORE_EXPORT pqFileDialogFilter : public QSortFilterProxyModel
15 {
16  Q_OBJECT
17 
18 public:
19  pqFileDialogFilter(pqFileDialogModel* sourceModel, QObject* Parent = nullptr);
20  ~pqFileDialogFilter() override;
21 
22 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
23  void setFilter(const QString& filter);
24  void setShowHidden(const bool& hidden);
25  bool getShowHidden() { return showHidden; };
26  QRegularExpression const& getWildcards() const { return Wildcards; }
27 
28 protected:
29  bool filterAcceptsRow(int row_source, const QModelIndex& source_parent) const override;
30  bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
31 
33  QRegularExpression Wildcards;
34  bool showHidden;
35 };
36 
37 #endif // !pqFileDialogFilter_h
QRegularExpression Wildcards
pqFileDialogModel * Model
QRegularExpression const & getWildcards() const
pqFileDialogModel allows remote browsing of a connected ParaView server&#39;s filesystem, as well as browsing of the local file system.