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

#include <QtStandardItemTreeAdapter.h>

Public Member Functions

QModelIndexForMainModel appendChildRow (QModelIndexForMainModel const &parent, std::vector< Cell > const &cells)
 
QModelIndexForMainModel appendEmptyChildRow (QModelIndexForMainModel const &parent)
 
QModelIndexForMainModel appendEmptySiblingRow (QModelIndexForMainModel const &index)
 
QModelIndexForMainModel appendSiblingRow (QModelIndexForMainModel const &index, std::vector< Cell > const &cells)
 
Cell cellFromCellIndex (QModelIndexForMainModel const &index) const
 
std::vector< CellcellsAtRow (QModelIndexForMainModel const &firstCellIndex) const
 
std::vector< CellemptyRow (int columnCount) const
 
template<typename Action >
void enumerateCellsInRow (QModelIndexForMainModel const &startIndex, int columns, Action const &action) const
 Enumerates the first columnCount number of cells to the right of startAtCell, moving left to right. More...
 
QModelIndexForMainModel insertChildRow (QModelIndexForMainModel const &parent, int row, std::vector< Cell > const &cells)
 
QModelIndexForMainModel insertEmptyChildRow (QModelIndexForMainModel const &parent, int column)
 
 QtStandardItemTreeModelAdapter (QStandardItemModel &model, Cell emptyCellStyle)
 
void removeRowFrom (QModelIndexForMainModel const &index)
 
QModelIndexForMainModel rootIndex () const
 
void setCellAtCellIndex (QModelIndexForMainModel const &index, Cell const &newCellProperties)
 
void setCellsAtRow (QModelIndexForMainModel const &rowIndex, std::vector< Cell > const &cells)
 

Private Member Functions

QList< QStandardItem * > rowItemsFromCells (std::vector< Cell > const &cells)
 

Private Attributes

Cell m_emptyCellStyle
 
QStandardItemModel & m_model
 

Detailed Description

Definition at line 23 of file QtStandardItemTreeAdapter.h.

Constructor & Destructor Documentation

◆ QtStandardItemTreeModelAdapter()

MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::QtStandardItemTreeModelAdapter ( QStandardItemModel &  model,
Cell  emptyCellStyle 
)

Definition at line 17 of file QtStandardItemTreeAdapter.cpp.

Member Function Documentation

◆ appendChildRow()

QModelIndexForMainModel MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::appendChildRow ( QModelIndexForMainModel const &  parent,
std::vector< Cell > const &  cells 
)

◆ appendEmptyChildRow()

QModelIndexForMainModel MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::appendEmptyChildRow ( QModelIndexForMainModel const &  parent)

◆ appendEmptySiblingRow()

QModelIndexForMainModel MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::appendEmptySiblingRow ( QModelIndexForMainModel const &  index)

◆ appendSiblingRow()

QModelIndexForMainModel MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::appendSiblingRow ( QModelIndexForMainModel const &  index,
std::vector< Cell > const &  cells 
)

Definition at line 35 of file QtStandardItemTreeAdapter.cpp.

References appendChildRow(), and index.

◆ cellFromCellIndex()

Cell MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::cellFromCellIndex ( QModelIndexForMainModel const &  index) const

◆ cellsAtRow()

std::vector< Cell > MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::cellsAtRow ( QModelIndexForMainModel const &  firstCellIndex) const

◆ emptyRow()

std::vector< Cell > MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::emptyRow ( int  columnCount) const

Definition at line 65 of file QtStandardItemTreeAdapter.cpp.

References m_emptyCellStyle.

Referenced by appendEmptyChildRow(), and insertEmptyChildRow().

◆ enumerateCellsInRow()

template<typename Action >
void MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::enumerateCellsInRow ( QModelIndexForMainModel const &  startIndex,
int  columns,
Action const &  action 
) const

◆ insertChildRow()

QModelIndexForMainModel MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::insertChildRow ( QModelIndexForMainModel const &  parent,
int  row,
std::vector< Cell > const &  cells 
)

◆ insertEmptyChildRow()

QModelIndexForMainModel MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::insertEmptyChildRow ( QModelIndexForMainModel const &  parent,
int  column 
)

◆ removeRowFrom()

void MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::removeRowFrom ( QModelIndexForMainModel const &  index)

◆ rootIndex()

QModelIndexForMainModel MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::rootIndex ( ) const

Definition at line 20 of file QtStandardItemTreeAdapter.cpp.

◆ rowItemsFromCells()

QList< QStandardItem * > MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::rowItemsFromCells ( std::vector< Cell > const &  cells)
private

◆ setCellAtCellIndex()

void MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::setCellAtCellIndex ( QModelIndexForMainModel const &  index,
Cell const &  newCellProperties 
)

◆ setCellsAtRow()

void MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::setCellsAtRow ( QModelIndexForMainModel const &  rowIndex,
std::vector< Cell > const &  cells 
)

Member Data Documentation

◆ m_emptyCellStyle

Cell MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::m_emptyCellStyle
private

Definition at line 55 of file QtStandardItemTreeAdapter.h.

Referenced by emptyRow().

◆ m_model

QStandardItemModel& MantidQt::MantidWidgets::Batch::QtStandardItemTreeModelAdapter::m_model
private

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