TTreeModel Class
Header: | #include <TTreeModel> |
Inherits: | QAbstractItemModel |
Properties
- dragMode : int
- 1 property inherited from QObject
Public Functions
TTreeModel(QObject *parent = 0) | |
~TTreeModel() | |
bool | foreachItem(bool(* ) ( const QModelIndex & iModelIndex, TTreeModel * iTreeModelPtr, const QVariantList & iParVarLst, QVariantList * iVarLstPtr ) func, const QVariantList &iInputVarLst = QVariantList(), QVariantList *iOutputVarLstPtr = 0, TTreeItem *iRootTreeItemPtr = 0) |
int | horizontalHeaderLevel() const |
THeaderModel * | horizontalHeaderModel() const |
QModelIndex | index(TTreeItem *iTreeItemPtr) const |
QVariant | roleDataConvert(int iRoleInt, const QVariant &iValueVar) const |
void | setDataCallback(QVariant(* ) ( const QModelIndex & iModeIndex, int iRoleInt, const TTreeItem * ireeItemPtr ) callback) |
void | setSkipSortingBol(bool iSkipSortingBol) |
bool | skipSortingBol() |
Reimplemented Public Functions
virtual int | columnCount(const QModelIndex &iParentModelIndex = QModelIndex()) const |
virtual QVariant | data(const QModelIndex &iModelIndex, int iRoleInt) const |
virtual Qt::ItemFlags | flags(const QModelIndex &iModelIndex) const |
virtual QVariant | headerData(int iSectionInt, Qt::Orientation iOrientation, int iRoleInt = Qt::DisplayRole) const |
virtual QModelIndex | index(int iRowInt, int iColumnInt, const QModelIndex &iParentModelIndex = QModelIndex()) const |
virtual QModelIndex | parent(const QModelIndex &iChildModelIndex) const |
virtual int | rowCount(const QModelIndex &iParentModelIndex = QModelIndex()) const |
virtual bool | setData(const QModelIndex &iModelIndex, const QVariant &iValueVar, int iRoleInt) |
- 39 public functions inherited from QAbstractItemModel
- 31 public functions inherited from QObject
Public Slots
TTreeItem * | addRowAfter(const QVariant &iRowDataVar, const QModelIndex &iAfterModelIndex = QModelIndex()) |
TTreeItem * | addRowBefore(const QVariant &iRowDataVar, const QModelIndex &iBeforeModelIndex = QModelIndex()) |
QList<TTreeItem *> | addRowsAfter(const QVariantList &iRowDataVarLst, const QModelIndex &iAfterModelIndex = QModelIndex()) |
void | addRowsAfter(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iAfterModelIndex = QModelIndex()) |
QList<TTreeItem *> | addRowsBefore(const QVariantList &iRowDataVarLst, const QModelIndex &iBeforeModelIndex = QModelIndex()) |
void | addRowsBefore(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iBeforeModelIndex = QModelIndex()) |
QVariantList | allDataMap(const QString &iChildKeyStr = QString( "CHILDREN" ), const QString &iIndexKeyStr = QString( "" ), bool iIncludeHiddenBol = true, const QModelIndex &iParentModelIndex = QModelIndex()) |
int | allExpendedCount(const QModelIndex &iParentModelIndex = QModelIndex(), bool iIncludeHiddenBol = false) |
QModelIndexList | allIndexs(const QModelIndex &iParentModelIndex = QModelIndex(), bool iIncludeHiddenBol = true) |
TTreeItem * | appendRow(const QVariant &iRowDataVar, const QModelIndex &iParentModelIndex = QModelIndex()) |
QList<TTreeItem *> | appendRows(const QVariantList &iRowsDataVarLst, const QModelIndex &iParentModelIndex = QModelIndex()) |
void | appendRows(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iParentModelIndex = QModelIndex()) |
QVariantList | childDataMap(const QModelIndex &iParentModelIndex = QModelIndex(), const QString &iIndexKeyStr = QString( "" ), bool iIncludeHidden = true) |
QModelIndexList | childIndexs(const QModelIndex &iParentModelIndex = QModelIndex(), bool iIncludeHidden = true) |
void | clear() |
QString | columnName(int iNumInt) |
int | columnNumber(const QString &iColnameStr) |
QStringList | dataKeyList() |
int | dragMode() const |
QString | expandedKey() |
QModelIndex | findLastIndex(const QModelIndex &iParentModelIndex = QModelIndex()) |
QModelIndex | findRow(const QVariant &iValueVar, const QString &iColnameStr = QString( "" ), const QModelIndex &iParentModelIndex = QModelIndex()) |
QModelIndexList | findRows(const QVariant &iValueVar, const QString &iColnameStr = QString( "" ), int iFilterInt = 1, const QModelIndex &iParentModelIndex = QModelIndex()) |
QModelIndexList | findRows(const QVariantList &iValueVarLst, const QString &iColnameStr = QString( "" ), int iFilterInt = 1, const QModelIndex &iParentModelIndex = QModelIndex()) |
QModelIndexList | findRows(const QRegExp &iRegExp, const QStringList &iColnameStrLst = QStringList(), int iFilterInt = 1, const QModelIndex &iParentModelIndex = QModelIndex()) |
QVariantList | headerItem() |
QString | indexString(const QModelIndex &iModelIndex) const |
QList<TTreeItem *> | insertRows(int iRowInt, QVariantList iValueVarLst, const QModelIndex &iParentModelIndex) |
void | insertRows(int iRowInt, QList<TTreeItem *> iTreeItemLst, const QModelIndex &iParentModelIndex = QModelIndex()) |
TTreeItem * | item(const QModelIndex &iModelIndex) const |
TTreeItem * | itemFromVariant(const QVariant &iValueVar, const QString &iChildKeyStr = QString( "CHILDREN" )) |
QList<TTreeItem *> | itemsFromFlattenData(const QVariantList &iDataVarLst, const QString iIndexKeyStr) |
void | loadFlattenData(const QVariantList &iDataVarLst, const QString &iIndexKeyStr) |
void | loadTreeData(const QVariantList &iDataVarLst, const QString &iChildKeyStr = QString( "CHILDREN" )) |
void | moveRowsBottom(const QModelIndexList &iModelIndexLst) |
void | moveRowsDown(const QModelIndexList &iModelIndexLst) |
void | moveRowsTop(const QModelIndexList &iModelIndexLst) |
void | moveRowsUp(const QModelIndexList &iModelIndexLst) |
TTreeItem * | prependRow(const QVariant &iRowDataVar, const QModelIndex &iParentModelIndex = QModelIndex()) |
QList<TTreeItem *> | prependRows(const QVariantList &iRowsDataVarLst, const QModelIndex &iParentModelIndex = QModelIndex()) |
void | prependRows(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iParentModelIndex = QModelIndex()) |
QString | primaryKey() |
void | refreshRowExpanded(TTreeItem *iRootTreeItemPtr = 0) |
void | refreshRowVisible(TTreeItem *iRootTreeItemPtr = 0) |
bool | removeRow(const QModelIndex &iModelIndex) |
bool | removeRows(const QModelIndexList &iModelIndexLst) |
void | restoreRowsExpanded(const QVariantMap &iDataVarMap, const QModelIndex &iParentModelIndex = QModelIndex()) |
void | restoreRowsVisible(const QVariantMap &iDataVarMap, const QModelIndex &iParentModelIndex = QModelIndex()) |
TTreeItem * | rootItem() |
QVariantList | rowDataList(const QModelIndex &iModelIndex) const |
QVariantMap | rowDataMap(const QModelIndex &iModelIndex, const QString &iIndexKeyStr = QString( "" )) const |
QVariant | rowPrimaryKey(const QModelIndex &iModelIndex) |
void | setColumnVisible(const QString &iColnameStr, bool iVisibleBol) |
void | setColumnVisible(int iNumInt, bool iVisibleBol) |
void | setColumnsVisible(QMap<QString, bool> iVisibleMap) |
void | setDataKeyList(const QStringList &iKeyStrLst) |
void | setDragMode(int iDragModeInt) |
void | setExpandedKey(const QString &iKeyStr) |
void | setHeaderItem(const QVariantList &iHeaderItemVarLst) |
void | setOptionsData(int iCol, const QVariant &iData) |
void | setPrimaryKey(const QString &iKeyStr) |
void | setRootItem(TTreeItem *iRootTreeItemPtr) |
void | setRowAllParentExpanded(const QModelIndex &iModelIndex) |
void | setRowAllParentExpanded(TTreeItem *iTreeItemPtr) |
void | setRowAllParentVisible(const QModelIndex &iModelIndex) |
void | setRowAllParentVisible(TTreeItem *iTreeItemPtr) |
void | setRowData(const QModelIndex &iModelIndex, const QVariant &iRowDataVar, bool iResetBol = false) |
void | setRowExpanded(const QModelIndex &iModelIndex, bool iExpandBol) |
void | setRowExpanded(TTreeItem *iTreeItemPtr, bool iExpandBol) |
void | setRowKeyValue(const QModelIndex &iModelIndex, const QString &iKeyStr, const QVariant &iValueVar, bool iEmitChangeBol = true) |
void | setRowVisible(const QModelIndex &iModelIndex, bool iVisibleBol) |
void | setRowVisible(TTreeItem *iTreeItemPtr, bool iVisibleBol) |
void | setRowsExpanded(const QModelIndexList &iModelIndexLst, bool iExpandBol) |
void | setRowsVisible(const QModelIndexList &iModelIndexLst, bool iVisibleBol) |
void | setVisibleKey(const QString &iKeyStr) |
void | syncParentItemVisible(int iFilterModeInt = 1, TTreeItem *iTreeItemPtr = nullptr) |
QVariantList | variantToItemDataList(const QVariant &iValueVar, bool *iExpandedBol = 0, bool *iVisibleBol = 0) |
QString | visibleKey() |
- 2 public slots inherited from QAbstractItemModel
- 1 public slot inherited from QObject
Signals
void | columnStateChanged(int iNumInt, const QVariantMap &iState, bool iResetBol) |
void | rowCheckStateChanged(const QModelIndex &iModelIndex) |
void | rowExpandedChanged(const QModelIndex &iModelIndex, bool iVisibleBol) |
void | rowVisibleChanged(const QModelIndex &iModelIndex, bool iVisibleBol) |
- 18 signals inherited from QAbstractItemModel
- 2 signals inherited from QObject
Static Public Members
Qt::Alignment | str2alignment(const QString &iStr) |
- 10 static public members inherited from QObject
Reimplemented Protected Functions
virtual bool | dropMimeData(const QMimeData *iMimeDataPtr, Qt::DropAction iAction, int iRowInt, int iColumnInt, const QModelIndex &iParentModelIndex) |
virtual QMimeData * | mimeData(const QModelIndexList &iModelIndexLst) const |
virtual QStringList | mimeTypes() const |
virtual Qt::DropActions | supportedDropActions() const |
- 19 protected functions inherited from QAbstractItemModel
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 19 protected functions inherited from QAbstractItemModel
- 9 protected functions inherited from QObject
- 1 protected slot inherited from QAbstractItemModel
- 2 protected variables inherited from QObject
Detailed Description
Property Documentation
dragMode : int
Access functions:
int | dragMode() const |
void | setDragMode(int iDragModeInt) |
Member Function Documentation
TTreeModel::TTreeModel(QObject *parent = 0)
Default constructs an instance of TTreeModel.
TTreeModel::~TTreeModel()
Destroys the instance of TTreeModel.
[slot]
TTreeItem *TTreeModel::addRowAfter(const QVariant &iRowDataVar, const QModelIndex &iAfterModelIndex = QModelIndex())
在 after 后插入行
rowdata
after
[slot]
TTreeItem *TTreeModel::addRowBefore(const QVariant &iRowDataVar, const QModelIndex &iBeforeModelIndex = QModelIndex())
在 before 前插入行
rowdata
before
[slot]
QList<TTreeItem *> TTreeModel::addRowsAfter(const QVariantList &iRowDataVarLst, const QModelIndex &iAfterModelIndex = QModelIndex())
在 after 之后插入多行
rowsdata
after
[slot]
void TTreeModel::addRowsAfter(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iAfterModelIndex = QModelIndex())
[slot]
QList<TTreeItem *> TTreeModel::addRowsBefore(const QVariantList &iRowDataVarLst, const QModelIndex &iBeforeModelIndex = QModelIndex())
在 before 之前插入多行
rowsdata
before
[slot]
void TTreeModel::addRowsBefore(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iBeforeModelIndex = QModelIndex())
[slot]
QVariantList TTreeModel::allDataMap(const QString &iChildKeyStr = QString( "CHILDREN" ), const QString &iIndexKeyStr = QString( "" ), bool iIncludeHiddenBol = true, const QModelIndex &iParentModelIndex = QModelIndex())
获取所有行数据
childkey
indexkey
visiblekey
includehidden
expandedkey
parent
[slot]
int TTreeModel::allExpendedCount(const QModelIndex &iParentModelIndex = QModelIndex(), bool iIncludeHiddenBol = false)
[slot]
QModelIndexList TTreeModel::allIndexs(const QModelIndex &iParentModelIndex = QModelIndex(), bool iIncludeHiddenBol = true)
获取所有Index
parent
includehidden
[slot]
TTreeItem *TTreeModel::appendRow(const QVariant &iRowDataVar, const QModelIndex &iParentModelIndex = QModelIndex())
追加行
rowdata
parent
Returns
[slot]
QList<TTreeItem *> TTreeModel::appendRows(const QVariantList &iRowsDataVarLst, const QModelIndex &iParentModelIndex = QModelIndex())
追加多行
rowsdata
parent
Returns
[slot]
void TTreeModel::appendRows(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iParentModelIndex = QModelIndex())
[slot]
QVariantList TTreeModel::childDataMap(const QModelIndex &iParentModelIndex = QModelIndex(), const QString &iIndexKeyStr = QString( "" ), bool iIncludeHidden = true)
[slot]
QModelIndexList TTreeModel::childIndexs(const QModelIndex &iParentModelIndex = QModelIndex(), bool iIncludeHidden = true)
获取子节点Index
parent
includehidden
[slot]
void TTreeModel::clear()
[virtual]
int TTreeModel::columnCount(const QModelIndex &iParentModelIndex = QModelIndex()) const
[slot]
QString TTreeModel::columnName(int iNumInt)
[slot]
int TTreeModel::columnNumber(const QString &iColnameStr)
[signal]
void TTreeModel::columnStateChanged(int iNumInt, const QVariantMap &iState, bool iResetBol)
[virtual]
QVariant TTreeModel::data(const QModelIndex &iModelIndex, int iRoleInt) const
See also setData().
[slot]
QStringList TTreeModel::dataKeyList()
See also setDataKeyList().
[virtual protected]
bool TTreeModel::dropMimeData(const QMimeData *iMimeDataPtr, Qt::DropAction iAction, int iRowInt, int iColumnInt, const QModelIndex &iParentModelIndex)
[slot]
QString TTreeModel::expandedKey()
See also setExpandedKey().
[slot]
QModelIndex TTreeModel::findLastIndex(const QModelIndex &iParentModelIndex = QModelIndex())
[slot]
QModelIndex TTreeModel::findRow(const QVariant &iValueVar, const QString &iColnameStr = QString( "" ), const QModelIndex &iParentModelIndex = QModelIndex())
查找 colname 列的值为 value 的一行
value
colname
parent
[slot]
QModelIndexList TTreeModel::findRows(const QVariant &iValueVar, const QString &iColnameStr = QString( "" ), int iFilterInt = 1, const QModelIndex &iParentModelIndex = QModelIndex())
查找 colname 列的值为 value 的所有行
value
colname
parent
[slot]
QModelIndexList TTreeModel::findRows(const QVariantList &iValueVarLst, const QString &iColnameStr = QString( "" ), int iFilterInt = 1, const QModelIndex &iParentModelIndex = QModelIndex())
查找 colname 列的值包含在 values 的所有行
values
colname
parent
[slot]
QModelIndexList TTreeModel::findRows(const QRegExp &iRegExp, const QStringList &iColnameStrLst = QStringList(), int iFilterInt = 1, const QModelIndex &iParentModelIndex = QModelIndex())
查找 colnames 中的值匹配 re 的所有行
re
colnames
parent
[virtual]
Qt::ItemFlags TTreeModel::flags(const QModelIndex &iModelIndex) const
bool TTreeModel::foreachItem(bool(* ) ( const QModelIndex & iModelIndex, TTreeModel * iTreeModelPtr, const QVariantList & iParVarLst, QVariantList * iVarLstPtr ) func, const QVariantList &iInputVarLst = QVariantList(), QVariantList *iOutputVarLstPtr = 0, TTreeItem *iRootTreeItemPtr = 0)
[virtual]
QVariant TTreeModel::headerData(int iSectionInt, Qt::Orientation iOrientation, int iRoleInt = Qt::DisplayRole) const
[slot]
QVariantList TTreeModel::headerItem()
See also setHeaderItem().
int TTreeModel::horizontalHeaderLevel() const
THeaderModel *TTreeModel::horizontalHeaderModel() const
[virtual]
QModelIndex TTreeModel::index(int iRowInt, int iColumnInt, const QModelIndex &iParentModelIndex = QModelIndex()) const
QModelIndex TTreeModel::index(TTreeItem *iTreeItemPtr) const
[slot]
QString TTreeModel::indexString(const QModelIndex &iModelIndex) const
返回index的字符串形式
index
[slot]
QList<TTreeItem *> TTreeModel::insertRows(int iRowInt, QVariantList iValueVarLst, const QModelIndex &iParentModelIndex)
[slot]
void TTreeModel::insertRows(int iRowInt, QList<TTreeItem *> iTreeItemLst, const QModelIndex &iParentModelIndex = QModelIndex())
[slot]
TTreeItem *TTreeModel::item(const QModelIndex &iModelIndex) const
[slot]
TTreeItem *TTreeModel::itemFromVariant(const QVariant &iValueVar, const QString &iChildKeyStr = QString( "CHILDREN" ))
[slot]
QList<TTreeItem *> TTreeModel::itemsFromFlattenData(const QVariantList &iDataVarLst, const QString iIndexKeyStr)
[slot]
void TTreeModel::loadFlattenData(const QVariantList &iDataVarLst, const QString &iIndexKeyStr)
载入table类数据
data
indexkey
[slot]
void TTreeModel::loadTreeData(const QVariantList &iDataVarLst, const QString &iChildKeyStr = QString( "CHILDREN" ))
[virtual protected]
QMimeData *TTreeModel::mimeData(const QModelIndexList &iModelIndexLst) const
[virtual protected]
QStringList TTreeModel::mimeTypes() const
[slot]
void TTreeModel::moveRowsBottom(const QModelIndexList &iModelIndexLst)
[slot]
void TTreeModel::moveRowsDown(const QModelIndexList &iModelIndexLst)
[slot]
void TTreeModel::moveRowsTop(const QModelIndexList &iModelIndexLst)
[slot]
void TTreeModel::moveRowsUp(const QModelIndexList &iModelIndexLst)
[virtual]
QModelIndex TTreeModel::parent(const QModelIndex &iChildModelIndex) const
[slot]
TTreeItem *TTreeModel::prependRow(const QVariant &iRowDataVar, const QModelIndex &iParentModelIndex = QModelIndex())
最前插入行
rowdata
parent
Returns
[slot]
QList<TTreeItem *> TTreeModel::prependRows(const QVariantList &iRowsDataVarLst, const QModelIndex &iParentModelIndex = QModelIndex())
在最前插入多行
rowsdata
parent
Returns
[slot]
void TTreeModel::prependRows(QList<TTreeItem *> iTreeItemLst, const QModelIndex &iParentModelIndex = QModelIndex())
[slot]
QString TTreeModel::primaryKey()
See also setPrimaryKey().
[slot]
void TTreeModel::refreshRowExpanded(TTreeItem *iRootTreeItemPtr = 0)
[slot]
void TTreeModel::refreshRowVisible(TTreeItem *iRootTreeItemPtr = 0)
[slot]
bool TTreeModel::removeRow(const QModelIndex &iModelIndex)
移除行
index
[slot]
bool TTreeModel::removeRows(const QModelIndexList &iModelIndexLst)
移除多行
indexs
[slot]
void TTreeModel::restoreRowsExpanded(const QVariantMap &iDataVarMap, const QModelIndex &iParentModelIndex = QModelIndex())
[slot]
void TTreeModel::restoreRowsVisible(const QVariantMap &iDataVarMap, const QModelIndex &iParentModelIndex = QModelIndex())
QVariant TTreeModel::roleDataConvert(int iRoleInt, const QVariant &iValueVar) const
[slot]
TTreeItem *TTreeModel::rootItem()
See also setRootItem().
[signal]
void TTreeModel::rowCheckStateChanged(const QModelIndex &iModelIndex)
[virtual]
int TTreeModel::rowCount(const QModelIndex &iParentModelIndex = QModelIndex()) const
[slot]
QVariantList TTreeModel::rowDataList(const QModelIndex &iModelIndex) const
[slot]
QVariantMap TTreeModel::rowDataMap(const QModelIndex &iModelIndex, const QString &iIndexKeyStr = QString( "" )) const
返加行数据为Map格式
index
indexkey
visiblekey
expandedkey
[signal]
void TTreeModel::rowExpandedChanged(const QModelIndex &iModelIndex, bool iVisibleBol)
[slot]
QVariant TTreeModel::rowPrimaryKey(const QModelIndex &iModelIndex)
获取行的主键值
index
[signal]
void TTreeModel::rowVisibleChanged(const QModelIndex &iModelIndex, bool iVisibleBol)
[slot]
void TTreeModel::setColumnVisible(const QString &iColnameStr, bool iVisibleBol)
设置列是否显示
colname 列名
visible 是否显示
[slot]
void TTreeModel::setColumnVisible(int iNumInt, bool iVisibleBol)
[slot]
void TTreeModel::setColumnsVisible(QMap<QString, bool> iVisibleMap)
[virtual]
bool TTreeModel::setData(const QModelIndex &iModelIndex, const QVariant &iValueVar, int iRoleInt)
See also data().
void TTreeModel::setDataCallback(QVariant(* ) ( const QModelIndex & iModeIndex, int iRoleInt, const TTreeItem * ireeItemPtr ) callback)
[slot]
void TTreeModel::setDataKeyList(const QStringList &iKeyStrLst)
设置数据Key列表
keys
See also dataKeyList().
[slot]
void TTreeModel::setExpandedKey(const QString &iKeyStr)
See also expandedKey().
[slot]
void TTreeModel::setHeaderItem(const QVariantList &iHeaderItemVarLst)
为TTreeModel设置列标题信息,格式如下
[ { "name": "col1","display":"第一列","resizeMode":"ResizeToContents", "displayRole":"$colnm1" }, { "name": "col2","display":"第二列","resizeMode":"Fixed", "displayRole":"$colnm2" }, { "name": "col3","display":"第三列","resizeMode":"Stretch", "textAlignment":"HCenter|VCenter", "displayRole":"$colnm3","typeRole":"html" }, { "name": "col4","display":"第四列","resizeMode":"Interactive", "displayRole":"$colnm4","typeRole":"progress" }, { "name": "col5","display":"第五列", "displayRole":"$colnm5","typeRole":"button", "propertyRole": {"text":"设置"} } ]
See also headerItem().
[slot]
void TTreeModel::setOptionsData(int iCol, const QVariant &iData)
[slot]
void TTreeModel::setPrimaryKey(const QString &iKeyStr)
设置主键名称
key
See also primaryKey().
[slot]
void TTreeModel::setRootItem(TTreeItem *iRootTreeItemPtr)
See also rootItem().
[slot]
void TTreeModel::setRowAllParentExpanded(const QModelIndex &iModelIndex)
[slot]
void TTreeModel::setRowAllParentExpanded(TTreeItem *iTreeItemPtr)
[slot]
void TTreeModel::setRowAllParentVisible(const QModelIndex &iModelIndex)
[slot]
void TTreeModel::setRowAllParentVisible(TTreeItem *iTreeItemPtr)
[slot]
void TTreeModel::setRowData(const QModelIndex &iModelIndex, const QVariant &iRowDataVar, bool iResetBol = false)
设置行数据
index
rowdata
reset
[slot]
void TTreeModel::setRowExpanded(const QModelIndex &iModelIndex, bool iExpandBol)
设置行是否展开
index
expand
[slot]
void TTreeModel::setRowExpanded(TTreeItem *iTreeItemPtr, bool iExpandBol)
[slot]
void TTreeModel::setRowKeyValue(const QModelIndex &iModelIndex, const QString &iKeyStr, const QVariant &iValueVar, bool iEmitChangeBol = true)
设置行 key 列的数据为 value
index
key
value
[slot]
void TTreeModel::setRowVisible(const QModelIndex &iModelIndex, bool iVisibleBol)
设置行是否显示
index
visible
[slot]
void TTreeModel::setRowVisible(TTreeItem *iTreeItemPtr, bool iVisibleBol)
[slot]
void TTreeModel::setRowsExpanded(const QModelIndexList &iModelIndexLst, bool iExpandBol)
[slot]
void TTreeModel::setRowsVisible(const QModelIndexList &iModelIndexLst, bool iVisibleBol)
设置行是否显示
indexlist
visible
void TTreeModel::setSkipSortingBol(bool iSkipSortingBol)
See also skipSortingBol().
[slot]
void TTreeModel::setVisibleKey(const QString &iKeyStr)
See also visibleKey().
bool TTreeModel::skipSortingBol()
See also setSkipSortingBol().
[static]
Qt::Alignment TTreeModel::str2alignment(const QString &iStr)
[virtual protected]
Qt::DropActions TTreeModel::supportedDropActions() const
[slot]
void TTreeModel::syncParentItemVisible(int iFilterModeInt = 1, TTreeItem *iTreeItemPtr = nullptr)
[slot]
QVariantList TTreeModel::variantToItemDataList(const QVariant &iValueVar, bool *iExpandedBol = 0, bool *iVisibleBol = 0)
[slot]
QString TTreeModel::visibleKey()
See also setVisibleKey().