MIRA
Public Member Functions | Protected Member Functions | List of all members
CollapsibleTreeHeader Class Reference

Header for tree widgets with additional collapse/expand button in the first column. More...

#include <widgets/CollapsibleTreeHeader.h>

Inheritance diagram for CollapsibleTreeHeader:
Inheritance graph
[legend]

Public Member Functions

 CollapsibleTreeHeader (Qt::Orientation orientation, QTreeView *parent=0)
 

Protected Member Functions

void paintSection (QPainter *painter, QRect const &rect, int logicalIndex) const
 Paint section of header. More...
 
void mousePressEvent (QMouseEvent *event)
 Mouse press event. More...
 
void mouseReleaseEvent (QMouseEvent *event)
 Mouse release event. More...
 
void foldTree ()
 Call collapseAll or expandAll on associated tree widget. More...
 

Detailed Description

Header for tree widgets with additional collapse/expand button in the first column.

Constructor & Destructor Documentation

◆ CollapsibleTreeHeader()

CollapsibleTreeHeader ( Qt::Orientation  orientation,
QTreeView *  parent = 0 
)

Member Function Documentation

◆ paintSection()

void paintSection ( QPainter *  painter,
QRect const &  rect,
int  logicalIndex 
) const
protected

Paint section of header.

Calls regular paint section for all sections but section 0. Draws additional button (using primitives) on first section.

◆ mousePressEvent()

void mousePressEvent ( QMouseEvent *  event)
protected

Mouse press event.

Set state of button to pressed if button is under mouse. Anyhow, the event is directed to the base class.

◆ mouseReleaseEvent()

void mouseReleaseEvent ( QMouseEvent *  event)
protected

Mouse release event.

Set state of button back to normal. Calls foldTree() if mouse is release over button. Anyhow, the event is directed to the base class.

◆ foldTree()

void foldTree ( )
protected

Call collapseAll or expandAll on associated tree widget.


The documentation for this class was generated from the following file: