Tianchi
v0.0.2 build 20130701
C++ library for Qt with VC & mingW
首页
命名空间
类
文件
文件列表
文件成员
include
tianchi
core
tcfunctionalsortfilterproxymodel.h
浏览该文件的文档.
1
// **************************************************************************
2
// Tianchi C++ library for Qt (open source)
3
// 天池共享源码库
4
// 版权所有 (C) 天池共享源码库开发组
5
// 授权协议:请阅读天池共享源码库附带的授权协议
6
// **************************************************************************
7
// 文档说明:依所设过滤参数(QVariantMap)来使用已设滤函数进行过滤的模型
8
// ==========================================================================
9
// 开发日志:
10
// 日期 人员 说明
11
// --------------------------------------------------------------------------
12
// 2013.06.07 XChinux 建立
13
//
14
// ==========================================================================
16
// ==========================================================================
17
18
#ifndef TIANCHI_TCFUNCTIONALSORTFILTERPROXYMODEL_H
19
#define TIANCHI_TCFUNCTIONALSORTFILTERPROXYMODEL_H
20
21
#include <tianchi/tcglobal.h>
22
23
//#include <functional> // TODO C++11
24
#include <QVariantMap>
25
#include <QSortFilterProxyModel>
26
29
typedef
bool (*
TcFunctionalSortFilterProxyModelFilterFunction
)( \
30
const QVariantMap &,
const
QModelIndex &);
31
32
class
TcFunctionalSortFilterProxyModelPrivate;
33
87
class
TIANCHI_API
TcFunctionalSortFilterProxyModel
:
88
public
QSortFilterProxyModel
89
{
90
Q_OBJECT
91
public
:
92
TcFunctionalSortFilterProxyModel
(QObject * parent = 0);
93
~
TcFunctionalSortFilterProxyModel
();
95
void
setFilterFunction(
96
TcFunctionalSortFilterProxyModelFilterFunction
func);
97
//std::function<bool(const QVariantMap &, const QModelIndex &)> func); // TODO C++11
98
public
Q_SLOTS:
100
void
setFilterParam(
const
QVariantMap ¶m);
101
protected
:
102
virtual
bool
filterAcceptsRow(
int
source_row,
103
const
QModelIndex &source_parent)
const
;
104
private
:
105
Q_DISABLE_COPY(
TcFunctionalSortFilterProxyModel
)
106
Q_DECLARE_PRIVATE(
TcFunctionalSortFilterProxyModel
)
107
TcFunctionalSortFilterProxyModelPrivate*
const
d_ptr;
108
};
109
110
#endif // TIANCHI_TCFUNCTIONALSORTFILTERPROXYMODEL_H
生成于 2013年 七月 1日 星期一 16:50:31 , 为 Tianchi使用
1.8.3.1