Mantid
Loading...
Searching...
No Matches
FilteredTreeModel.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
11#pragma once
16#include <QSortFilterProxyModel>
17#include <memory>
18namespace MantidQt {
19namespace MantidWidgets {
20namespace Batch {
21
22class EXPORT_OPT_MANTIDQT_COMMON FilteredTreeModel : public QSortFilterProxyModel {
23public:
24 FilteredTreeModel(RowLocationAdapter rowLocation, QObject *parent = nullptr);
25 void setPredicate(std::unique_ptr<RowPredicate> predicate);
26 void resetPredicate();
27 bool isReset() const;
28 RowLocation rowLocationAt(QModelIndex const &index) const;
29
30protected:
31 bool filterAcceptsRow(int row, const QModelIndex &parent) const override;
32
33private:
34 std::unique_ptr<RowPredicate> m_predicate;
36};
37} // namespace Batch
38} // namespace MantidWidgets
39} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...