filterabletreemodelsortfilterproxymodel.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5
*
6
* ArmarX is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*
10
* ArmarX is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* @package ArmarXCore::core
19
* @author Cedric Seehausen (usdnr at kit dot edu)
20
* @date 2016
21
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22
* GNU General Public License
23
*/
24
25
26
#pragma once
27
28
#include <memory>
29
30
#include <QModelIndex>
31
#include <QSortFilterProxyModel>
32
#include <qmetatype.h>
33
34
#include "
applicationdatabaseitem.h
"
35
#include "
openscenarioitem.h
"
36
#include "
scenarioitem.h
"
37
#include "
settingsitem.h
"
38
39
/**
40
* @class FilterableTreeModelSortFilterProxyModel
41
* @brief Model of the FilterableTreeView.
42
*/
43
class
FilterableTreeModelSortFilterProxyModel
:
public
QSortFilterProxyModel
44
{
45
Q_OBJECT
46
public
:
47
/**
48
* Constructor that registers the used meta-types.
49
*/
50
FilterableTreeModelSortFilterProxyModel
();
51
52
/**
53
* Returns the data stored at the specified location, based on the given role.
54
* @param proxy_index Model-Index of the item
55
* @param role describes what kind of data is requested
56
*/
57
QVariant
data
(
const
QModelIndex& proxy_index,
int
role)
const override
;
58
59
/**
60
* Returns whether the filter accepts a row.
61
* @param sourceRow index of the row
62
* @param sourceParent index of the parent
63
*/
64
bool
filterAcceptsRow
(
int
sourceRow,
const
QModelIndex& sourceParent)
const override
;
65
};
66
67
using
FilterableTreeModelSortFilterProxyModelPtr
=
68
std::shared_ptr<FilterableTreeModelSortFilterProxyModel>;
settingsitem.h
FilterableTreeModelSortFilterProxyModel::filterAcceptsRow
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
Returns whether the filter accepts a row.
Definition:
filterabletreemodelsortfilterproxymodel.cpp:77
scenarioitem.h
FilterableTreeModelSortFilterProxyModel::FilterableTreeModelSortFilterProxyModel
FilterableTreeModelSortFilterProxyModel()
Constructor that registers the used meta-types.
Definition:
filterabletreemodelsortfilterproxymodel.cpp:36
FilterableTreeModelSortFilterProxyModelPtr
std::shared_ptr< FilterableTreeModelSortFilterProxyModel > FilterableTreeModelSortFilterProxyModelPtr
Definition:
filterabletreemodelsortfilterproxymodel.h:68
FilterableTreeModelSortFilterProxyModel
Model of the FilterableTreeView.
Definition:
filterabletreemodelsortfilterproxymodel.h:43
openscenarioitem.h
FilterableTreeModelSortFilterProxyModel::data
QVariant data(const QModelIndex &proxy_index, int role) const override
Returns the data stored at the specified location, based on the given role.
Definition:
filterabletreemodelsortfilterproxymodel.cpp:46
applicationdatabaseitem.h
ArmarXGui
gui-plugins
ScenarioManager
gui
filterabletreemodelsortfilterproxymodel.h
Generated on Sat Apr 12 2025 09:13:29 for armarx_documentation by
1.8.17