19#include "../UI/FxUIObject.h"
21#include "../UI/FxUISignal.h"
28 m_beginInsertRows( this ),
29 m_beginRemoveRows( this ),
30 m_endInsertRows( this ),
31 m_endRemoveRows( this ),
32 m_dataChanged( this ),
33 m_layoutChanged( this ),
34 m_beginResetModel( this ),
35 m_endResetModel( this )
52 if( row < 0 || column < 0 )
54 return row < rowCount( parent ) && column < columnCount( parent );
66 if( !
index.isValid() )
74 inline CFxUIModelIndex createIndex(
int row,
int column, quintptr
id )
const;
78 return m_beginInsertRows;
83 return m_beginRemoveRows;
88 return m_endInsertRows;
93 return m_endRemoveRows;
103 return m_layoutChanged;
108 return m_beginResetModel;
113 return m_endResetModel;
118 m_beginInsertRows.Emit( parent, first, last );
123 m_beginRemoveRows.Emit( parent, first, last );
128 m_endInsertRows.Emit();
133 m_endRemoveRows.Emit();
138 m_dataChanged.Emit( topLeft, bottomRight );
143 m_layoutChanged.Emit();
148 m_beginResetModel.Emit();
153 m_endResetModel.Emit();
virtual bool setData(const CFxUIModelIndex &index, const CFxUIVariant &value, int role=CFxUIModelIndex::UIDataRole::EditRole)
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> & beginInsertRows()
CFxUISignal< void(const CFxUIModelIndex &topLeft, const CFxUIModelIndex &bottomRight)> & dataChanged()
CFxUISignal< void()> & endRemoveRows()
virtual CFxUIVariant data(const CFxUIModelIndex &index, int role=CFxUIModelIndex::UIDataRole::DisplayRole) const =0
bool hasIndex(int row, int column, const CFxUIModelIndex &parent=CFxUIModelIndex()) const
virtual void onBeginRemoveRows(const CFxUIModelIndex &parent, int first, int last)
virtual void onEndRemoveRows()
CFxUISignal< void(void)> & beginResetModel()
CFxUIModelIndex createIndex(int row, int column, void *data=nullptr) const
CFxUISignal< void()> m_endRemoveRows
CFxUISignal< void()> m_endInsertRows
virtual void onBeginResetModel()
CFxUISignal< void(void)> m_beginResetModel
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> & beginRemoveRows()
virtual CFxUIVariant headerData(int section, CFxUIModelIndex::UIOrientation orientation, int role=CFxUIModelIndex::UIDataRole::DisplayRole) const
virtual CFxUIModelIndex index(int row, int column, const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
virtual void onEndResetModel()
virtual void onBeginInsertRows(const CFxUIModelIndex &parent, int first, int last)
CFxUIAbstractItemModel(CFxUIObject *parent=nullptr)
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> m_beginInsertRows
CFxUISignal< void(const CFxUIModelIndex &parent, int first, int last)> m_beginRemoveRows
virtual void onDataChanged(const CFxUIModelIndex &topLeft, const CFxUIModelIndex &bottomRight)
CFxUISignal< void(void)> m_endResetModel
virtual void onLayoutChanged()
virtual ~CFxUIAbstractItemModel()
virtual CFxUIModelIndex parent(const CFxUIModelIndex &child) const =0
CFxUISignal< void()> & endInsertRows()
virtual int columnCount(const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
virtual CFxUIModelIndex::UIItemFlags flags(const CFxUIModelIndex &index) const
CFxUISignal< void(void)> & layoutChanged()
virtual void onEndInsertRows()
CFxUISignal< void(const CFxUIModelIndex &topLeft, const CFxUIModelIndex &bottomRight)> m_dataChanged
virtual int rowCount(const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
CFxUISignal< void(void)> m_layoutChanged
CFxUISignal< void(void)> & endResetModel()
UIItemFlags flags() const
CFxUIModelIndex parent() const
CFxUIVariant data(int role=UIDataRole::DisplayRole) const
void setParent(CFxUIObject *parent)
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
GLsizei const GLfloat * value