summaryrefslogtreecommitdiff
path: root/src/qtgroupingproxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qtgroupingproxy.h')
-rw-r--r--src/qtgroupingproxy.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/qtgroupingproxy.h b/src/qtgroupingproxy.h
index a7f151ce..e09ae7b4 100644
--- a/src/qtgroupingproxy.h
+++ b/src/qtgroupingproxy.h
@@ -36,12 +36,21 @@ class QtGroupingProxy : public QAbstractProxyModel
public:
static const unsigned int FLAG_NOSINGLE = 1;
- static const unsigned int FLAG_NAMETOPITEM = 2;
+ static const unsigned int FLAG_NOGROUPNAME = 2;
+
+ enum EAggregateFunction {
+ AGGR_NONE, // no aggregation, return child elements as list
+ AGGR_EMPTY, // display nothing
+ AGGR_FIRST, // return value of the topmost item
+ AGGR_MAX, // return maximum value
+ AGGR_MIN // return minimum value
+ };
public:
explicit QtGroupingProxy( QAbstractItemModel *model, QModelIndex rootNode = QModelIndex(),
- int groupedColumn = -1, Qt::ItemDataRole groupedRole = Qt::DisplayRole,
- unsigned int flags = 0);
+ int groupedColumn = -1, int groupedRole = Qt::DisplayRole,
+ unsigned int flags = 0,
+ int aggregateRole = Qt::DisplayRole);
~QtGroupingProxy();
void setGroupedColumn( int groupedColumn );
@@ -150,6 +159,8 @@ private:
QSet<QString> m_expandedItems;
unsigned int m_flags;
int m_groupedRole;
+
+ int m_aggregateRole;
};
#endif //GROUPINGPROXY_H