Public Slots | Public Member Functions | Protected Member Functions | Properties | Private Slots | Private Member Functions

ctkCheckableHeaderView Class Reference

#include <Libs/Widgets/ctkCheckableHeaderView.h>

List of all members.

Public Slots

void setCheckState (int section, Qt::CheckState checkState)
void toggleCheckState (int section)

Public Member Functions

Qt::CheckState checkState (int section) const
bool checkState (int section, Qt::CheckState &checkState) const
 ctkCheckableHeaderView (Qt::Orientation orient, QWidget *parent=0)
virtual bool eventFilter (QObject *object, QEvent *e)
bool isCheckable (int section) const
bool propagateToItems () const
virtual void setModel (QAbstractItemModel *model)
void setPropagateToItems (bool propagate)
virtual void setRootIndex (const QModelIndex &index)
virtual ~ctkCheckableHeaderView ()

Protected Member Functions

virtual void initStyleSectionOption (QStyleOptionHeader *option, int section, QRect rect) const
bool isPointInCheckBox (int section, QPoint pos) const
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void updateHeaders (int first, int last)


bool propagateToItems

Private Slots

void insertHeaderSection (const QModelIndex &parent, int first, int last)
void updateHeaderData (Qt::Orientation orient, int first, int last)
void updateHeaders ()
void updateHeadersFromItems (const QModelIndex &topLeft, const QModelIndex &bottomRight)

Private Member Functions

 CTK_DECLARE_PRIVATE (ctkCheckableHeaderView)

Detailed Description

Definition at line 65 of file ctkCheckableHeaderView.h.

Constructor & Destructor Documentation

ctkCheckableHeaderView::ctkCheckableHeaderView ( Qt::Orientation  orient,
QWidget *  parent = 0 

Definition at line 111 of file ctkCheckableHeaderView.cpp.

ctkCheckableHeaderView::~ctkCheckableHeaderView (  )  [virtual]

Definition at line 125 of file ctkCheckableHeaderView.cpp.

Member Function Documentation

Qt::CheckState ctkCheckableHeaderView::checkState ( int  section  )  const

Utility function that returns the checkState of the section. One can access the same value through the model: model->headerData(orientation, section, Qt::CheckStateRole)

Definition at line 423 of file ctkCheckableHeaderView.cpp.

bool ctkCheckableHeaderView::checkState ( int  section,
Qt::CheckState &  checkState 
) const

Utility function that returns the checkState of the section. One can access the same value through the model: model->headerData(orientation, section, Qt::CheckStateRole)

Definition at line 430 of file ctkCheckableHeaderView.cpp.

ctkCheckableHeaderView::CTK_DECLARE_PRIVATE ( ctkCheckableHeaderView   )  [private]
bool ctkCheckableHeaderView::eventFilter ( QObject *  object,
QEvent *  e 
) [virtual]

Used to listen for focus in/out events.

object The object receiving the event.
e Event specific data.
True if the event should be filtered out.

Definition at line 130 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::initStyleSectionOption ( QStyleOptionHeader *  option,
int  section,
QRect  rect 
) const [protected, virtual]

Definition at line 511 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::insertHeaderSection ( const QModelIndex &  parent,
int  first,
int  last 
) [private, slot]

Definition at line 406 of file ctkCheckableHeaderView.cpp.

bool ctkCheckableHeaderView::isCheckable ( int  section  )  const

A section is checkable if its CheckStateRole data is non null. One can access the same value through the model: model->headerData(orientation, section, Qt::CheckStateRole).isEmpty()

Definition at line 417 of file ctkCheckableHeaderView.cpp.

bool ctkCheckableHeaderView::isPointInCheckBox ( int  section,
QPoint  pos 
) const [protected]

Definition at line 485 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::mousePressEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 439 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::mouseReleaseEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 462 of file ctkCheckableHeaderView.cpp.

bool ctkCheckableHeaderView::propagateToItems (  )  const
void ctkCheckableHeaderView::setCheckState ( int  section,
Qt::CheckState  checkState 
) [slot]

Warning, setting the check state automatically set the header section checkable

Definition at line 253 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::setModel ( QAbstractItemModel *  model  )  [virtual]

Definition at line 142 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::setPropagateToItems ( bool  propagate  ) 

Definition at line 210 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::setRootIndex ( const QModelIndex &  index  )  [virtual]

Definition at line 203 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::toggleCheckState ( int  section  )  [slot]

if the check state is PartiallyChecked, the section becomes Checked

Definition at line 240 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::updateHeaderData ( Qt::Orientation  orient,
int  first,
int  last 
) [private, slot]

Definition at line 268 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::updateHeaders (  )  [inline, private, slot]

Definition at line 132 of file ctkCheckableHeaderView.h.

void ctkCheckableHeaderView::updateHeaders ( int  first,
int  last 
) [protected, virtual]

Definition at line 279 of file ctkCheckableHeaderView.cpp.

void ctkCheckableHeaderView::updateHeadersFromItems ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
) [private, slot]

Definition at line 328 of file ctkCheckableHeaderView.cpp.

Property Documentation

bool ctkCheckableHeaderView::propagateToItems [read, write]

Definition at line 67 of file ctkCheckableHeaderView.h.

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines