1#ifndef TreeViewContent_H
2#define TreeViewContent_H
13#include <QAbstractScrollArea>
18template<
typename T >
class QList;
25 class AbstractTreeItem;
26 class AbstractTreeModel;
77 void paintItemText(QPainter *,
int, QPoint, QPoint);
78 void drawCollapsedArrow(QPainter *, QRect);
79 void drawExpandedArrow(QPainter *, QRect);
84 void scrollTo(QList< AbstractTreeItem * >);
86 void setAlternatingRowColors(
bool);
87 void updateItemList();
93 QList< AbstractTreeItem * > * m_items;
96 QPair< AbstractTreeItem *, bool > * m_pressedItem;
99 QPair< AbstractTreeItem *, bool > * m_hoveredItem;
102 QList<AbstractTreeItem *> * m_lastShiftSelection;
104 QPoint *m_mousePressPos;
107 bool m_alternatingRowColors;
111 static const int ITEM_PADDING = 4;
112 static const int ITEM_INDENTATION = 23;
Base class for an item in the tree.
Definition AbstractTreeItem.h:39
Base class for tree models.
Definition AbstractTreeModel.h:48
Definition TreeViewContent.h:36
virtual ~TreeViewContent()
Definition TreeViewContent.cpp:62
void paintEvent(QPaintEvent *event)
Definition TreeViewContent.cpp:318
TreeViewContent(QWidget *parent)
Definition TreeViewContent.cpp:34
QSize minimumSizeHint() const
Definition TreeViewContent.cpp:80
void mousePressEvent(QMouseEvent *event)
Definition TreeViewContent.cpp:161
void resizeEvent(QResizeEvent *event)
Definition TreeViewContent.cpp:381
void mouseDoubleClickEvent(QMouseEvent *event)
Definition TreeViewContent.cpp:150
void treeSelectionChanged(QList< AbstractTreeItem * >)
void mouseMoveEvent(QMouseEvent *event)
Definition TreeViewContent.cpp:273
bool eventFilter(QObject *target, QEvent *event)
Definition TreeViewContent.cpp:145
void setModel(AbstractTreeModel *someModel)
Definition TreeViewContent.cpp:95
void scrollContentsBy(int dx, int dy)
Definition TreeViewContent.cpp:389
void treeSelectionChanged()
void keyPressEvent(QKeyEvent *event)
Definition TreeViewContent.cpp:305
AbstractTreeModel * getModel()
Definition TreeViewContent.cpp:90
void leaveEvent(QEvent *event)
Definition TreeViewContent.cpp:298
QSize sizeHint() const
Definition TreeViewContent.cpp:85
void mouseReleaseEvent(QMouseEvent *event)
Definition TreeViewContent.cpp:258
void refresh()
Definition TreeViewContent.cpp:126
This is free and unencumbered software released into the public domain.
Definition BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16