Version: 9.12.0
CurveCreator_TreeViewModel Class Reference

#include <CurveCreator_TreeView.h>

Inheritance diagram for CurveCreator_TreeViewModel:
Inheritance graph

Public Member Functions

 CurveCreator_TreeViewModel (CurveCreator_ICurve *theCurve, QObject *parent, bool toDrawColorIcon)
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual QModelIndex parent (const QModelIndex &theIndex) const
 
QModelIndex sectionIndex (int theSection) const
 
QModelIndex nbPointsIndex (int theSection) const
 
QModelIndex pointIndex (int theSection, int thePoint) const
 
bool isSection (const QModelIndex &theIndx) const
 
int getSection (const QModelIndex &theIndx) const
 
int getPoint (const QModelIndex &theIndx) const
 
void setCurve (CurveCreator_ICurve *theCurve)
 

Private Types

enum  IconType {
  ICON_POLYLINE , ICON_SPLINE , ICON_CLOSED_SPLINE , ICON_CLOSED_POLYLINE ,
  ICON_POINT
}
 

Private Attributes

CurveCreator_ICurvemyCurve
 
bool myDrawColorIcon
 
QMap< IconType, QPixmap > myCachedIcons
 

Member Enumeration Documentation

◆ IconType

Enumerator
ICON_POLYLINE 
ICON_SPLINE 
ICON_CLOSED_SPLINE 
ICON_CLOSED_POLYLINE 
ICON_POINT 

Constructor & Destructor Documentation

◆ CurveCreator_TreeViewModel()

CurveCreator_TreeViewModel::CurveCreator_TreeViewModel ( CurveCreator_ICurve theCurve,
QObject parent,
bool  toDrawColorIcon 
)

Member Function Documentation

◆ columnCount()

int CurveCreator_TreeViewModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

References myDrawColorIcon.

◆ data()

◆ getPoint()

int CurveCreator_TreeViewModel::getPoint ( const QModelIndex &  theIndx) const

References ID_SECTION.

◆ getSection()

int CurveCreator_TreeViewModel::getSection ( const QModelIndex &  theIndx) const

References ID_SECTION.

◆ index()

QModelIndex CurveCreator_TreeViewModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual

References ID_SECTION, and parent().

◆ isSection()

bool CurveCreator_TreeViewModel::isSection ( const QModelIndex &  theIndx) const

References ID_SECTION.

◆ nbPointsIndex()

QModelIndex CurveCreator_TreeViewModel::nbPointsIndex ( int  theSection) const

References ID_SECTION.

◆ parent()

QModelIndex CurveCreator_TreeViewModel::parent ( const QModelIndex &  theIndex) const
virtual

References ID_SECTION.

◆ pointIndex()

QModelIndex CurveCreator_TreeViewModel::pointIndex ( int  theSection,
int  thePoint 
) const

◆ rowCount()

int CurveCreator_TreeViewModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

◆ sectionIndex()

QModelIndex CurveCreator_TreeViewModel::sectionIndex ( int  theSection) const

References ID_SECTION.

◆ setCurve()

void CurveCreator_TreeViewModel::setCurve ( CurveCreator_ICurve theCurve)

References myCurve.

Member Data Documentation

◆ myCachedIcons

QMap<IconType, QPixmap> CurveCreator_TreeViewModel::myCachedIcons
private

◆ myCurve

CurveCreator_ICurve* CurveCreator_TreeViewModel::myCurve
private

◆ myDrawColorIcon

bool CurveCreator_TreeViewModel::myDrawColorIcon
private

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