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