From de27ab391f5c56db9532e7cbc32145d21e5df97c Mon Sep 17 00:00:00 2001 From: Tannin Date: Thu, 4 Apr 2013 21:49:44 +0200 Subject: - creating mods from overwrite - moving files from overwrite to mods - offline mode - several fixes to the grouping system - fix to "duplicate translation" errors --- src/qtgroupingproxy.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/qtgroupingproxy.h') 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 m_expandedItems; unsigned int m_flags; int m_groupedRole; + + int m_aggregateRole; }; #endif //GROUPINGPROXY_H -- cgit v1.3.1