Skip to content

Commit

Permalink
update the slot ChangeHighlightContours in table widget for mesh
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@1895 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
  • Loading branch information
lsouhait committed Dec 10, 2009
1 parent eeb74c3 commit bfbd86d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
37 changes: 35 additions & 2 deletions branches/GoFigure2Beta/Code/GUI/lib/QGoPrintDatabase.cxx
Expand Up @@ -615,14 +615,14 @@ ChangeContoursToHighLightInfoFromVisu(
{
m_ContoursInfo[j].Highlighted = true;

this->ContourTable->SetSelectRowTraceID( "contour",
Table->SetSelectRowTraceID( "contour",
m_ContoursInfo[j].TraceID, true );
}
else
{
m_ContoursInfo[j].Highlighted = false;

this->ContourTable->SetSelectRowTraceID( "contour",
Table->SetSelectRowTraceID( "contour",
m_ContoursInfo[j].TraceID, false);
}
++it;
Expand All @@ -631,6 +631,39 @@ ChangeContoursToHighLightInfoFromVisu(
}
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
void QGoPrintDatabase::
ChangeMeshesToHighLightInfoFromVisu(
std::list<int> iListMeshesHighLightedInVisu)
{
std::list<int>::iterator it = iListMeshesHighLightedInVisu.begin();
/** \todo get the tracename from the visu dock widget*/
QTableWidgetChild* Table = this->GetTableWidgetChild("mesh");

while( it != iListMeshesHighLightedInVisu.end() )
{
for( unsigned int j = 0 ; j < m_MeshesInfo.size(); j++ )
{
if (*it == this->m_MeshesInfo[j].TraceID)
{
m_MeshesInfo[j].Highlighted = true;

Table->SetSelectRowTraceID( "mesh",
m_MeshesInfo[j].TraceID, true );
}
else
{
m_MeshesInfo[j].Highlighted = false;

Table->SetSelectRowTraceID( "mesh",
m_MeshesInfo[j].TraceID, false);
}
++it;
}
}
}
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
int QGoPrintDatabase::SaveContoursFromVisuInDB(unsigned int iXCoordMin,
unsigned int iYCoordMin,unsigned int iZCoordMin,unsigned int iTCoord,
Expand Down
3 changes: 3 additions & 0 deletions branches/GoFigure2Beta/Code/GUI/lib/QGoPrintDatabase.h
Expand Up @@ -323,6 +323,9 @@ protected slots:
void ChangeContoursToHighLightInfoFromVisu(
std::list<int> iListContoursHighLightedInVisu);

void ChangeMeshesToHighLightInfoFromVisu(
std::list<int> iListMeshesHighLightedInVisu);

};

#endif
2 changes: 0 additions & 2 deletions branches/GoFigure2Beta/Code/GUI/lib/QTableWidgetChild.cxx
Expand Up @@ -164,8 +164,6 @@ void QTableWidgetChild::SetSelectRowTraceID (std::string TraceName,
this->item(RowIndex,0)->setCheckState(Qt::Unchecked);
}
this->UpdateVectorCheckedRows(RowIndex,0);
//QTableWidgetSelectionRange RangeToSelect(RowIndex,0,RowIndex,columnCount()-1);
//this->setRangeSelected(RangeToSelect,IsSelected);
}
}
//--------------------------------------------------------------------------
Expand Down

0 comments on commit bfbd86d

Please sign in to comment.