52using namespace DISP3DLIB;
69 this->setToolTip(
"Abstract Tree Item");
80 QStandardItem::setData(value, role);
83 case Qt::CheckStateRole:{
92int AbstractTreeItem::type()
const
100 QStandardItem* pItemAdd)
102 if(pItemParent && pItemAdd) {
103 QList<QStandardItem*> list;
105 list <<
new QStandardItem(pItemAdd->toolTip());
106 pItemParent->appendRow(list);
114 QList<QStandardItem*> itemList;
116 if(this->hasChildren()) {
117 for(
int row = 0; row<this->rowCount(); row++) {
118 for(
int col = 0; col<this->columnCount(); col++) {
119 if(this->child(row, col)->type() == type) {
120 itemList.append(this->child(row, col));
133 QList<QStandardItem*> itemList;
135 if(this->hasChildren()) {
136 for(
int row = 0; row<this->rowCount(); row++) {
137 for(
int col = 0; col<this->columnCount(); col++) {
138 if(this->child(row, col)->text() == text) {
139 itemList.append(this->child(row, col));
152 this->appendRow(newItem);
161 this->appendRow(&newItem);
173 for(
int i = 0; i<this->rowCount(); i++) {
174 if(this->child(i)->isCheckable()) {
175 this->child(i)->setCheckState(checkState);
AbstractTreeItem class declaration.
Provides the basic tree item.
AbstractTreeItem & operator<<(AbstractTreeItem *newItem)
AbstractTreeItem(int iType=Data3DTreeModelItemTypes::UnknownItem, const QString &text="")
virtual void onCheckStateChanged(const Qt::CheckState &checkState)
Qt::CheckState m_checkStateOld
static void addItemWithDescription(QStandardItem *pItemParent, QStandardItem *pItemAdd)
void checkStateChanged(const Qt::CheckState &checkState)
QList< QStandardItem * > findChildren(int type)
void setData(const QVariant &value, int role=Qt::UserRole+1)