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

This class is used for formating the type of data allowed in each of the tables columns. More...

#include <FitScriptGeneratorDataTable.h>

Inheritance diagram for MantidQt::MantidWidgets::CustomItemDelegate:

Public Member Functions

 CustomItemDelegate (FitScriptGeneratorDataTable *parent, ColumnIndex const &index)
 CustomItemDelegate class methods. More...
 

Private Slots

void handleItemEntered (QTableWidgetItem *item)
 
void handleItemExited (int newRowIndex)
 

Private Member Functions

QWidget * createEditor (QWidget *parent, QStyleOptionViewItem const &option, QModelIndex const &index) const override
 
void paint (QPainter *painter, QStyleOptionViewItem const &option, QModelIndex const &index) const override
 

Private Attributes

ColumnIndex m_columnIndex
 
int m_hoveredIndex
 
FitScriptGeneratorDataTablem_tableWidget
 

Detailed Description

This class is used for formating the type of data allowed in each of the tables columns.

It is also used for setting various column properties, and will paint a row when it is hovered over.

Definition at line 100 of file FitScriptGeneratorDataTable.h.

Constructor & Destructor Documentation

◆ CustomItemDelegate()

MantidQt::MantidWidgets::CustomItemDelegate::CustomItemDelegate ( FitScriptGeneratorDataTable parent,
ColumnIndex const &  index 
)

CustomItemDelegate class methods.

Definition at line 303 of file FitScriptGeneratorDataTable.cpp.

References handleItemEntered(), handleItemExited(), and m_tableWidget.

Member Function Documentation

◆ createEditor()

QWidget * MantidQt::MantidWidgets::CustomItemDelegate::createEditor ( QWidget *  parent,
QStyleOptionViewItem const &  option,
QModelIndex const &  index 
) const
overrideprivate

Definition at line 319 of file FitScriptGeneratorDataTable.cpp.

References index, and m_columnIndex.

◆ handleItemEntered

void MantidQt::MantidWidgets::CustomItemDelegate::handleItemEntered ( QTableWidgetItem *  item)
privateslot

Definition at line 312 of file FitScriptGeneratorDataTable.cpp.

References m_hoveredIndex, and m_tableWidget.

Referenced by CustomItemDelegate().

◆ handleItemExited

void MantidQt::MantidWidgets::CustomItemDelegate::handleItemExited ( int  newRowIndex)
privateslot

Definition at line 317 of file FitScriptGeneratorDataTable.cpp.

References m_hoveredIndex.

Referenced by CustomItemDelegate().

◆ paint()

void MantidQt::MantidWidgets::CustomItemDelegate::paint ( QPainter *  painter,
QStyleOptionViewItem const &  option,
QModelIndex const &  index 
) const
overrideprivate

Definition at line 342 of file FitScriptGeneratorDataTable.cpp.

References index, and m_hoveredIndex.

Member Data Documentation

◆ m_columnIndex

ColumnIndex MantidQt::MantidWidgets::CustomItemDelegate::m_columnIndex
private

Definition at line 115 of file FitScriptGeneratorDataTable.h.

Referenced by createEditor().

◆ m_hoveredIndex

int MantidQt::MantidWidgets::CustomItemDelegate::m_hoveredIndex
private

Definition at line 116 of file FitScriptGeneratorDataTable.h.

Referenced by handleItemEntered(), handleItemExited(), and paint().

◆ m_tableWidget

FitScriptGeneratorDataTable* MantidQt::MantidWidgets::CustomItemDelegate::m_tableWidget
private

Definition at line 114 of file FitScriptGeneratorDataTable.h.

Referenced by CustomItemDelegate(), and handleItemEntered().


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