CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
19 #include "../UI/FxUIObject.h"
21 #include "../UI/FxUISignal.h"
28 : m_beginInsertRows( parent ),
29 m_beginRemoveRows( parent ),
30 m_endInsertRows( parent ),
31 m_endRemoveRows( parent ),
32 m_dataChanged( parent ),
33 m_layoutChanged( parent ),
34 m_beginResetModel( parent ),
35 m_endResetModel( parent )
51 if( row < 0 || column < 0 )
53 return row < rowCount( parent ) && column < columnCount( parent );
58 if( role == CFxUIModelIndex::UIDataRole::DisplayRole )
65 if( !
index.isValid() )
69 CFxUIModelIndex::UIItemFlags::ItemIsEnabled );
73 inline CFxUIModelIndex createIndex(
int row,
int column, quintptr
id )
const;
77 return m_beginInsertRows;
82 return m_beginRemoveRows;
87 return m_endInsertRows;
92 return m_endRemoveRows;
102 return m_layoutChanged;
107 return m_beginResetModel;
112 return m_endResetModel;
117 m_beginInsertRows.Emit( parent, first, last );
122 m_beginRemoveRows.Emit( parent, first, last );
127 m_endInsertRows.Emit();
132 m_endRemoveRows.Emit();
137 m_dataChanged.Emit( topLeft, bottomRight );
142 m_layoutChanged.Emit();
147 m_beginResetModel.Emit();
152 m_endResetModel.Emit();
virtual CFxUIModelIndex index(int row, int column, const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
virtual CFxUIModelIndex::UIItemFlags flags(const CFxUIModelIndex &index) const
virtual int rowCount(const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
virtual void onEndResetModel()
virtual void onLayoutChanged()
bool hasIndex(int row, int column, const CFxUIModelIndex &parent=CFxUIModelIndex()) const
CFxUISignal< void()> & endRemoveRows()
CFxUISignal< void()> & endInsertRows()
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> m_beginInsertRows
CFxUISignal< void(void)> & layoutChanged()
virtual CFxUIModelIndex parent(const CFxUIModelIndex &child) const =0
CFxUISignal< void(void)> & endResetModel()
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> & beginRemoveRows()
virtual void onEndInsertRows()
virtual int columnCount(const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
virtual void onEndRemoveRows()
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
CFxUISignal< void(void)> m_beginResetModel
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> m_beginRemoveRows
virtual bool setData(const CFxUIModelIndex &index, const CFxUIVariant &value, int role=CFxUIModelIndex::UIDataRole::EditRole)
CFxUISignal< void(const CFxUIModelIndex &topLeft, const CFxUIModelIndex &bottomRight)> & dataChanged()
virtual void onBeginInsertRows(const CFxUIModelIndex &parent, int first, int last)
CFxUISignal< void(void)> m_endResetModel
virtual void onDataChanged(const CFxUIModelIndex &topLeft, const CFxUIModelIndex &bottomRight)
virtual void onBeginRemoveRows(const CFxUIModelIndex &parent, int first, int last)
CFxUIModelIndex createIndex(int row, int column, void *data=nullptr) const
CFxUIModelIndex parent() const
CFxUIAbstractItemModel(CFxUIObject *parent=nullptr)
CFxUISignal< void(void)> & beginResetModel()
virtual CFxUIVariant data(const CFxUIModelIndex &index, int role=CFxUIModelIndex::UIDataRole::DisplayRole) const =0
UIItemFlags flags() const
CFxUISignal< void()> m_endRemoveRows
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> & beginInsertRows()
CFxUIVariant data(int role=UIDataRole::DisplayRole) const
GLsizei const GLfloat * value
virtual CFxUIVariant headerData(int section, CFxUIModelIndex::UIOrientation orientation, int role=CFxUIModelIndex::UIDataRole::DisplayRole) const
CFxUISignal< void(const CFxUIModelIndex &topLeft, const CFxUIModelIndex &bottomRight)> m_dataChanged
virtual ~CFxUIAbstractItemModel()
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
CFxUISignal< void()> m_endInsertRows
virtual void onBeginResetModel()
CFxUISignal< void(void)> m_layoutChanged