aGridLay->addWidget( myXPosLbl, 0, 1);
aGridLay->addWidget( new QLabel ("Y:", aPosGrp), 1, 0);
myYPosLbl = new QLabel ("0", aPosGrp);
- aGridLay->addWidget( myYPosLbl, 2, 1);
+ aGridLay->addWidget( myYPosLbl, 1, 1);
aGridLay->addWidget( new QLabel ("Z:", aPosGrp), 2, 0);
myZPosLbl = new QLabel ("0", aPosGrp);
aGridLay->addWidget( myZPosLbl, 2, 1);
const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
for (int i = 0; anIter != aPointCoordsMap.end() && i < myListPoints->rowCount(); anIter++, i++) {
- myListPoints->verticalHeaderItem(i)->setText( QString::number( i ));
+ myListPoints->model()->setHeaderData( i, Qt::Vertical, QVariant(QString::number( i )), Qt::DisplayRole );
vtkIdType aNodeObjId = anIter->first;
//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(aNodeObjId);
}
//ENK: 23.11.2006
- myListPoints->item(i,0)->setText( QString::number( aNodeObjId ));
+ QAbstractItemModel* aModel = myListPoints->model();
+ aModel->setData( aModel->index(i,0), QVariant(QString::number( aNodeObjId )), Qt::DisplayRole );
const TCoordArray& aCoordArray = anIter->second;
- myListPoints->item(i,1)->setText( QString::number( aCoordArray[0] ));
- myListPoints->item(i,2)->setText( QString::number( aCoordArray[1] ));
- myListPoints->item(i,3)->setText( QString::number( aCoordArray[2] ));
- myListPoints->item(i,4)->setText( aI);//ENK: 23.11.2006 - PAL13176
- myListPoints->item(i,5)->setText( aJ);//ENK: 23.11.2006 - PAL13176
- myListPoints->item(i,6)->setText( aK);//ENK: 23.11.2006 - PAL13176
+ aModel->setData( aModel->index(i,1), QVariant(QString::number( aCoordArray[0] )), Qt::DisplayRole );
+ aModel->setData( aModel->index(i,2), QVariant(QString::number( aCoordArray[1] )), Qt::DisplayRole );
+ aModel->setData( aModel->index(i,3), QVariant(QString::number( aCoordArray[2] )), Qt::DisplayRole );
+ aModel->setData( aModel->index(i,4), QVariant( aI ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
+ aModel->setData( aModel->index(i,5), QVariant( aJ ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
+ aModel->setData( aModel->index(i,6), QVariant( aK ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
vtkIdType aNodeVTKId = anVISUActor->GetNodeVTKID(aNodeObjId);
- myListPoints->item(i,7)->setText( getValue(aPntData, aNodeVTKId));
- myListPoints->item(i,8)->setText( getVector(aPntData, aNodeVTKId));
+ aModel->setData( aModel->index(i,7), QVariant(getValue(aPntData, aNodeVTKId)), Qt::DisplayRole );
+ aModel->setData( aModel->index(i,8), QVariant(getVector(aPntData, aNodeVTKId)), Qt::DisplayRole );
}
//for(int aColumnId = 0; aColumnId < 9; aColumnId++)
myListPoints->resizeColumnsToContents();