Mantid
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MantidQt::MantidWidgets::CheckboxHeader Class Reference

This class subclasses and overwrites QHeaderView methods to enable checkboxes to exist in the table header. More...

#include <CheckboxHeader.h>

Inheritance diagram for MantidQt::MantidWidgets::CheckboxHeader:

Signals

void toggled (bool checked)
 

Public Member Functions

 CheckboxHeader (Qt::Orientation orientation, QWidget *parent=nullptr)
 Override QHeaderView constructor.
 
void setChecked (bool checked)
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event) override
 Set the checkbox to checked when it is clicked.
 
void paintSection (QPainter *painter, const QRect &rect, int logicalIndex) const override
 Overrides QHeaderView allowing checkbox functionality in the first column of the table.
 

Private Member Functions

QRect checkBoxRect (const QRect &sourceRect) const
 The area around the checkbox.
 

Private Attributes

bool m_checked
 The state of the checkbox in the column header.
 

Detailed Description

This class subclasses and overwrites QHeaderView methods to enable checkboxes to exist in the table header.

Author
Jay Rainey
Date
15/10/2013

Definition at line 25 of file CheckboxHeader.h.

Constructor & Destructor Documentation

◆ CheckboxHeader()

MantidQt::MantidWidgets::CheckboxHeader::CheckboxHeader ( Qt::Orientation  orientation,
QWidget *  parent = nullptr 
)
explicit

Override QHeaderView constructor.

Member Function Documentation

◆ checkBoxRect()

QRect MantidQt::MantidWidgets::CheckboxHeader::checkBoxRect ( const QRect &  sourceRect) const
private

The area around the checkbox.

◆ mousePressEvent()

void MantidQt::MantidWidgets::CheckboxHeader::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Set the checkbox to checked when it is clicked.

◆ paintSection()

void MantidQt::MantidWidgets::CheckboxHeader::paintSection ( QPainter *  painter,
const QRect &  rect,
int  logicalIndex 
) const
overrideprotected

Overrides QHeaderView allowing checkbox functionality in the first column of the table.

◆ setChecked()

void MantidQt::MantidWidgets::CheckboxHeader::setChecked ( bool  checked)

◆ toggled

void MantidQt::MantidWidgets::CheckboxHeader::toggled ( bool  checked)
signal

Member Data Documentation

◆ m_checked

bool MantidQt::MantidWidgets::CheckboxHeader::m_checked
private

The state of the checkbox in the column header.

Definition at line 47 of file CheckboxHeader.h.


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