20#ifndef CURVECREATOR_TREEVIEW_H
21#define CURVECREATOR_TREEVIEW_H
24#include <QAbstractItemModel>
33 virtual int rowCount(
const QModelIndex &
parent = QModelIndex())
const;
34 virtual QVariant
data(
const QModelIndex &
index,
int role = Qt::DisplayRole)
const;
35 virtual QModelIndex
index(
int row,
int column,
const QModelIndex &
parent = QModelIndex())
const;
36 virtual QModelIndex
parent(
const QModelIndex & theIndex)
const;
41 QModelIndex
pointIndex(
int theSection,
int thePoint )
const;
43 bool isSection(
const QModelIndex& theIndx )
const;
44 int getSection(
const QModelIndex& theIndx )
const;
45 int getPoint(
const QModelIndex& theIndx )
const;
67 void pointsAdded(
int theSection,
int thePoint,
int thePointsCnt=1 );
69 void pointsRemoved(
int theSection,
int thePoint,
int thePointsCnt=1 );
89 void setIndexState(
const QModelIndex& theIndx,
bool& isExpanded,
bool& isSelected,
bool& isCurrent );
90 void swapIndexes(
const QModelIndex& theFirst,
const QModelIndex& theSecond );
91 void getIndexInfo(
const QModelIndex& theIndx,
bool& isExpanded,
bool& isSelected,
bool& isCurrent );
The CurveCreator_ICurve object is represented as one or more sets of connected points; thus CurveCrea...
Definition: CurveCreator_ICurve.hxx:73
Definition: CurveCreator_TreeView.h:29
QModelIndex sectionIndex(int theSection) const
Definition: CurveCreator_TreeView.cxx:186
QMap< IconType, QPixmap > myCachedIcons
Definition: CurveCreator_TreeView.h:54
bool isSection(const QModelIndex &theIndx) const
Definition: CurveCreator_TreeView.cxx:201
virtual QModelIndex parent(const QModelIndex &theIndex) const
Definition: CurveCreator_TreeView.cxx:157
QModelIndex nbPointsIndex(int theSection) const
Definition: CurveCreator_TreeView.cxx:191
CurveCreator_ICurve * myCurve
Definition: CurveCreator_TreeView.h:52
bool myDrawColorIcon
Definition: CurveCreator_TreeView.h:53
CurveCreator_TreeViewModel(CurveCreator_ICurve *theCurve, QObject *parent, bool toDrawColorIcon)
Definition: CurveCreator_TreeView.cxx:33
int getSection(const QModelIndex &theIndx) const
Definition: CurveCreator_TreeView.cxx:208
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: CurveCreator_TreeView.cxx:145
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: CurveCreator_TreeView.cxx:68
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: CurveCreator_TreeView.cxx:168
int getPoint(const QModelIndex &theIndx) const
Definition: CurveCreator_TreeView.cxx:215
void setCurve(CurveCreator_ICurve *theCurve)
Definition: CurveCreator_TreeView.cxx:222
IconType
Definition: CurveCreator_TreeView.h:50
@ ICON_CLOSED_POLYLINE
Definition: CurveCreator_TreeView.h:50
@ ICON_CLOSED_SPLINE
Definition: CurveCreator_TreeView.h:50
@ ICON_POLYLINE
Definition: CurveCreator_TreeView.h:50
@ ICON_POINT
Definition: CurveCreator_TreeView.h:50
@ ICON_SPLINE
Definition: CurveCreator_TreeView.h:50
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: CurveCreator_TreeView.cxx:76
QModelIndex pointIndex(int theSection, int thePoint) const
Definition: CurveCreator_TreeView.cxx:196
Definition: CurveCreator_TreeView.h:58
void pointsRemoved(int theSection, int thePoint, int thePointsCnt=1)
Definition: CurveCreator_TreeView.cxx:285
void sectionAdded(int theSection)
Definition: CurveCreator_TreeView.cxx:298
QList< int > getSelectedSections() const
Definition: CurveCreator_TreeView.cxx:249
CurveCreator_TreeView(CurveCreator_ICurve *theCurve, QWidget *parent=0, bool toDrawColorIcon=true)
Definition: CurveCreator_TreeView.cxx:230
void onActivated(QModelIndex theIndx)
Definition: CurveCreator_TreeView.cxx:437
void getIndexInfo(const QModelIndex &theIndx, bool &isExpanded, bool &isSelected, bool &isCurrent)
Definition: CurveCreator_TreeView.cxx:342
SelectionType
Definition: CurveCreator_TreeView.h:61
@ ST_POINTS
Definition: CurveCreator_TreeView.h:61
@ ST_POINTS_ONE_SECTION
Definition: CurveCreator_TreeView.h:61
@ ST_NOSEL
Definition: CurveCreator_TreeView.h:61
@ ST_SECTIONS
Definition: CurveCreator_TreeView.h:61
@ ST_MIXED
Definition: CurveCreator_TreeView.h:61
void reset()
Definition: CurveCreator_TreeView.cxx:456
void sectionsSwapped(int theSection, int theOffset)
Definition: CurveCreator_TreeView.cxx:367
void pointsAdded(int theSection, int thePoint, int thePointsCnt=1)
Definition: CurveCreator_TreeView.cxx:265
void sectionsRemoved(int theSection, int theSectionCnt=1)
Definition: CurveCreator_TreeView.cxx:320
void pointDataChanged(int theSection, int thePoint)
Definition: CurveCreator_TreeView.cxx:276
void setIndexState(const QModelIndex &theIndx, bool &isExpanded, bool &isSelected, bool &isCurrent)
Definition: CurveCreator_TreeView.cxx:332
void setSelectedSections(const QList< int > &theList)
Definition: CurveCreator_TreeView.cxx:377
SelectionType getSelectionType() const
Definition: CurveCreator_TreeView.cxx:398
void sectionChanged(int theSection, int aSectCnt=1)
Definition: CurveCreator_TreeView.cxx:310
void swapIndexes(const QModelIndex &theFirst, const QModelIndex &theSecond)
Definition: CurveCreator_TreeView.cxx:349
void setCurve(CurveCreator_ICurve *theCurve)
Definition: CurveCreator_TreeView.cxx:448