Skip to content

Commit

Permalink
print only in the tablewidget the traces corresponding the imagingses…
Browse files Browse the repository at this point in the history
…sionid selected

git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@1765 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
  • Loading branch information
lsouhait committed Nov 16, 2009
1 parent 7061a41 commit bfba9ee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Expand Up @@ -180,7 +180,7 @@ int QGoCreateImgSessionPage::CreateImgSession(vtkMySQLDatabase* DatabaseConnecto
float XTileOverlap = 0; //todo get it from the header file
float YTileOverlap = 0; //todo get it from the header file
float ZTileOverlap = 0; //todo get it from the header file
std::string CreationDateTime = "2009-10-30 09:15:11"; //\todo: get the date+time creation date.
std::string CreationDateTime = "2009-10-30 09:15:16"; //\todo: get the date+time creation date.

GoDBImgSessionRow myNewImgSession;

Expand Down
6 changes: 3 additions & 3 deletions branches/GoFigure2Beta/Code/GUI/lib/QGoPrintDatabase.cxx
Expand Up @@ -208,7 +208,7 @@ void QGoPrintDatabase::FillTableFromDatabase()
this->setWindowTitle( title );
m_VisibilityAction->setText( title );

GetContentAndDisplayFromDB< GoDBContourRow >( "contour", ContourTable );
GetContentAndDisplayFromDB< GoDBContourRow >( "contour", ContourTable);
GetContentAndDisplayFromDB< GoDBMeshRow >( "mesh", MeshTable );
GetContentAndDisplayFromDB< GoDBTrackRow >( "track", TrackTable );
GetContentAndDisplayFromDB< GoDBLineageRow >( "lineage", LineageTable );
Expand All @@ -222,7 +222,7 @@ void QGoPrintDatabase::FillTableFromDatabase()
//--------------------------------------------------------------------------
void QGoPrintDatabase::closeEvent(QCloseEvent* iEvent)
{
int r = QMessageBox::warning(this, tr(""),
/*int r = QMessageBox::warning(this, tr(""),
tr("Are you sure you want to close\n"
"permanently the table?"),
QMessageBox::Yes,
Expand All @@ -243,7 +243,7 @@ void QGoPrintDatabase::closeEvent(QCloseEvent* iEvent)
else
{
iEvent->ignore();
}
}*/

m_VisibilityAction->setChecked( false );
}
Expand Down
13 changes: 12 additions & 1 deletion branches/GoFigure2Beta/Code/GUI/lib/QGoPrintDatabase.h
Expand Up @@ -124,7 +124,7 @@ class QGoPrintDatabase : public QWidget,
database, then display them in the QTableWidgetchild.
*/
template< class myT >
void GetContentAndDisplayFromDB( QString TableName, QTableWidgetChild* Table )
void GetContentAndDisplayFromDB( QString TableName, QTableWidgetChild* Table)
{
std::vector< std::string > ColumnNamesContainer;

Expand All @@ -137,6 +137,12 @@ class QGoPrintDatabase : public QWidget,
SetType* mySet = new SetType;
mySet->SetConnector(m_DatabaseConnector);
mySet->SetTableName(TableName.toStdString());

std::stringstream WhereClause;
WhereClause << "ImagingSessionID = ";
WhereClause << m_ImgSessionID;
WhereClause << ";";
mySet->SetWhereString(WhereClause.str());
mySet->PopulateFromDB();

myT myNewObject;
Expand Down Expand Up @@ -180,6 +186,11 @@ class QGoPrintDatabase : public QWidget,
SetType* mySet = new SetType;
mySet->SetConnector(DatabaseConnector);
mySet->SetTableName( TableName.toStdString() );
std::stringstream WhereClause;
WhereClause << "ImagingSessionID = ";
WhereClause << m_ImgSessionID;
WhereClause << ";";
mySet->SetWhereString(WhereClause.str());
mySet->PopulateFromDB();

myT myNewObject;
Expand Down

0 comments on commit bfba9ee

Please sign in to comment.