From 3fb7a0faf069fdc5a4f14a12dfd76c43819c3378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 31 Jan 2014 22:51:45 +0100 Subject: Reformat, Rename, Redo --- Group.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Group.h (limited to 'Group.h') diff --git a/Group.h b/Group.h new file mode 100644 index 00000000..6a8fadeb --- /dev/null +++ b/Group.h @@ -0,0 +1,36 @@ +#pragma once + +#include +#include +#include + +class GroupView; +class QPainter; +class QModelIndex; + +struct Group +{ + Group(const QString &text, GroupView *view); + Group(const Group *other); + GroupView *view; + QString text; + bool collapsed; + QRect iconRect; + QRect textRect; + QVector rowHeights; + int firstRow; + + void update(); + + void drawHeader(QPainter *painter, const int y); + int totalHeight() const; + int headerHeight() const; + int contentHeight() const; + int numRows() const; + int top() const; + + QList items() const; + int numItems() const; + QModelIndex firstItem() const; + QModelIndex lastItem() const; +}; -- cgit v1.2.3