summaryrefslogtreecommitdiff
path: root/src/qtgroupingproxy.h
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-05-10 11:00:09 +0200
committerTannin <devnull@localhost>2013-05-10 11:00:09 +0200
commitfc3753dcc5b7d55bf99674e7d17962f477053921 (patch)
tree54fef6cd5b57533fd84f04cc58259c242600efed /src/qtgroupingproxy.h
parent4fbfc9aa54ed4499f54eb7b3cd942337f6b49e58 (diff)
parent9bc123e8e2dbd17508a68e4afc2eb881873601bd (diff)
Merge
Diffstat (limited to 'src/qtgroupingproxy.h')
-rw-r--r--src/qtgroupingproxy.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/qtgroupingproxy.h b/src/qtgroupingproxy.h
index 6ec34481..e09ae7b4 100644
--- a/src/qtgroupingproxy.h
+++ b/src/qtgroupingproxy.h
@@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************************/
+// Modifications 2013-03-27 to 2013-03-28 by Sebastian Herbord
+
#ifndef GROUPINGPROXY_H
#define GROUPINGPROXY_H
@@ -30,9 +32,25 @@ typedef QMap<int, ItemData> RowData;
class QtGroupingProxy : public QAbstractProxyModel
{
Q_OBJECT
+
+public:
+
+ static const unsigned int FLAG_NOSINGLE = 1;
+ 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 );
+ int groupedColumn = -1, int groupedRole = Qt::DisplayRole,
+ unsigned int flags = 0,
+ int aggregateRole = Qt::DisplayRole);
~QtGroupingProxy();
void setGroupedColumn( int groupedColumn );
@@ -139,6 +157,10 @@ protected:
private:
QSet<QString> m_expandedItems;
+ unsigned int m_flags;
+ int m_groupedRole;
+
+ int m_aggregateRole;
};
#endif //GROUPINGPROXY_H