GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
QGoDBTraceManager Class Referenceabstract

Abstract class inherited by QGoDBContourManager,Mesh,Track,Lineage. More...

#include <Code/GUI/lib/DBManager/QGoDBTraceManager.h>

Inheritance diagram for QGoDBTraceManager:
Inheritance graph
[legend]
Collaboration diagram for QGoDBTraceManager:
Collaboration graph
[legend]

Public Types

typedef std::pair< unsigned
int, QColor > 
IDWithColorData
 
typedef std::pair< std::string,
QColor > 
NameWithColorData
 
typedef
GoDBTableWidgetContainer::TWContainerType 
TWContainerType
 

Signals

void AddNewTraceIDInTS (std::pair< std::string, QColor > iTraceToAddData)
 signal emitted when a new trace is created that need to be added in the trace settings widget. (when a new mesh is created while contour table is displayed for example) More...
 
void CheckedTracesToAddToSelectedCollection (std::list< unsigned int >)
 
void CheckedTracesToDelete ()
 signal emitted when the user click on the action "DeleteTraces" from the context menu as it can impact different TraceManagers More...
 
void DBConnectionNotNeededAnymore ()
 
void NeedToGetDatabaseConnection ()
 
void NeedToGoToTheLocation (int XCoord, int YCoord, int ZCoord, int TCoord)
 signal emitted when the user clicks on "go to the trace" in the context menu and return the coordinates for the center of the bounding box of the trace More...
 
void NewCollectionFromCheckedTraces (std::list< unsigned int >)
 signal emitted when the user clicks on "create a new collection from checked traces" in the context menu and return the list of checked tracesIDs More...
 
void PrintMessage (QString iMessage, int iTimeOut=0)
 
void TraceColorToChange ()
 signal emitted when the user click on the action "change color" from the context menu as it can impact different TraceManagers More...
 

Public Member Functions

void CheckShowRows ()
 if m_IsShowOnlyCurrentTimePointOn is true, call the method to show only the rows for the current timepoint, useful when the timepoint changes More...
 
virtual void DeleteCheckedTraces (vtkMySQLDatabase *iDatabaseConnector)=0
 delete the checked traces from the database, the TW and the container for visu More...
 
void DisplayInfoForExistingTraces (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTraces)
 get the data from the database corresponding to the iListTraces and display them in the Table Widget More...
 
virtual std::list
< NameWithColorData
GetAllTraceIDsWithColor (vtkMySQLDatabase *iDatabaseConnector, std::string &ioIDToSelect)
 return the distinct traces with their color for the imagingsession, for all timepoints if the timepoint is set to the default one or for the corresponding timepoint if not More...
 
std::list< unsigned int > GetLastCreatedTracesIDs (vtkMySQLDatabase *iDatabaseConnector, int iNumberOfTracesIDs)
 get the last saved traces in the database More...
 
std::list< unsigned int > GetListCollectionIDs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs)
 return the list of collection IDs distinct and different from zero corresponding to the tracesIDs More...
 
virtual std::list< unsigned int > GetListHighlightedIDs ()=0
 
std::list< unsigned int > GetListTracesIDsBelongingToCollectionIDs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListCollectionIDs)
 get the list of tracesIDs belonging to the collection listed in iListCollectionIDs More...
 
std::list< unsigned int > GetListTracesIDsFromThisCollectionOf (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTraces)
 get the collectionOf IDs for the TracesIDs found in iListTraces More...
 
QGoTableWidgetGetTableWidget ()
 get the m_Table More...
 
 QGoDBTraceManager (QObject *iParent=NULL)
 
void SetCurrentTimePoint (int *iTimePoint)
 set the pointer to the current timepoint More...
 
void SetDatabaseConnection (vtkMySQLDatabase *iDatabaseConnector)
 set the m_DatabaseConnection to iDatabaseConnector More...
 
void SetSelectedCollection (NameWithColorData *iCollectionData)
 set the pointer to the selected collection data More...
 
void SetSelectedColor (NameWithColorData *iColorData)
 set the pointer to the current selected color More...
 
virtual void UpdateBoundingBoxes (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs, bool UpdateTW=true)
 update in the database the bounding boxes corresponding to the TracesIDs and update the corresponding rows in the TW if the bool is set to true. More...
 
void UpdateCollectionID (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTracesIDs, int iCollectionID)
 update the collectionID of the tracesIDs in the list with the iCollectionID in the database and the TW More...
 
void UpdateLastSelectedOneAsCollection ()
 
virtual std::list< unsigned int > UpdateTheTracesColor (vtkMySQLDatabase *iDatabaseConnector)=0
 virtual pure. update the color of the checked traces in the database, the visu container and the TW and return the collectionOf IDs. (i.e traces that belongs to these traces as collection: contourIDs belonging to these meshes if the trace is a mesh) More...
 
void UpdateTWAndContainerForDeletedTraces (const std::list< unsigned int > &iTraceIDs)
 delete the corresponding traces in the table widget and in the container for visu More...
 
virtual void UpdateTWAndContainerForImportedTraces (const std::vector< int > &iVectorImportedTraces, vtkMySQLDatabase *iDatabaseConnector)=0
 get the data needed from the database for the imported traces,display them in new inserted rows of the m_Table and update the container for the visu. More...
 
virtual ~QGoDBTraceManager ()
 

Protected Slots

virtual void AddToSelectedCollection ()
 
virtual void ChangeTraceColor ()
 is called when the user choses the change color action in the context menu, emit the signal TraceColorToChange as it impacts the collectionOf also More...
 
void CheckSelectedRows ()
 
void CheckTheTraceInTW (unsigned int iTraceID, Qt::CheckState iState)
 slot called when a trace has been picked from the visu, to update the TW "checked/unchecked" column correspondingly More...
 
void CreateContextMenu (const QPoint &iPos)
 create the context menu when the user clicks on the table widget More...
 
virtual void CreateCorrespondingCollection ()
 slot called when the user click on "create a collection from checked traces" in the context menu, emit the signal NewCollectionFromCheckedTraces as it impact the collection also More...
 
void DeleteTracesFromContextMenu ()
 
void GoToTheTrace ()
 
void HideSelectedRows ()
 
virtual void SetColorCoding (bool IsChecked)=0
 ColorCode the traces in the visualization base on a selected column in the table widget. More...
 
void ShowOnlyRowsForCurrentTimePoint (bool IsChecked)
 Show only the rows in the table widget that have a timepoint equal to the current timepoint if IsChecked is true, show all the rows if false. More...
 
void ShowSelectedRows ()
 
void ShowTheTraceInTW (unsigned int iTraceID, Qt::CheckState iState)
 slot called when a trace has been shown/hidden from the visu, to update the TW "show/hide" column correspondingly More...
 
void UncheckSelectedRows ()
 
virtual void UpdateHighlightedElementsInVisuContainer (int iTraceID)=0
 modify to the opposite one the highlighted property of the corresponding trace base on traceID in the container for visu More...
 
virtual void UpdateVisibleElementsInVisuContainer (int iTraceID)=0
 modify to the opposite one the Visible property of the corresponding trace base on traceID in the container for visu More...
 

Protected Member Functions

virtual void AddActionForAddingCheckedTracesToCollection ()
 
virtual void AddActionsContextMenu (QMenu *iMenu)
 
void AddGeneralActionsContextMenu (QMenu *iMenu)
 
void AddSpecificActionsForContourMesh (QMenu *iMenu)
 
bool CheckThatThereAreTracesToDelete (const std::list< unsigned int > &iListTracesIDToDelete)
 
template<typename T >
unsigned int CreateNewTraceInDBFromVisu (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iTCoord, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, vtkPolyData *iTraceNodes, NameWithColorData iColor, vtkMySQLDatabase *iDatabaseConnector, T &iTrace, unsigned int iCollectionID, unsigned int iTCoordMax=0)
 create the trace row with the related data provided by the visu, iTCoordMax is equal to 0 as for contour and mesh, it is the same as TCoord More...
 
template<typename T >
void DeleteTracesTemplate (vtkMySQLDatabase *iDatabaseConnector, T *iContainerForVisu, std::list< unsigned int > iListTracesToDelete=std::list< unsigned int >(), bool DeleteHighlightedTraces=true)
 delete the traces from the database, the TW and the container for visu More...
 
template<typename T >
void DisplayInfoAndLoadVisuContainerWithAllTraces (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector)
 get all the data from the database to load all the traces for the imagingsession into the table widget and the container for the visu More...
 
template<typename C >
void DisplayInfoAndLoadVisuContainerWithAllTracesForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, C *iContainerForVisu, const std::list< unsigned int > &iListTPs)
 
virtual void DisplayInfoForAllTraces (vtkMySQLDatabase *iDatabaseConnector)=0
 Virtual pure method: get the data needed from the database and display them in the m_Table for all traces corresponding to the imagingsession. More...
 
template<typename T >
void DisplayInfoForAllTracesTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector, Qt::CheckState iState, int iIndexShowColumn=0)
 fill the TWContainer with all the data needed from the database and display them into the m_Table More...
 
virtual void DisplayInfoForExistingTrace (vtkMySQLDatabase *iDatabaseConnector, int iTraceID)=0
 Virtual pure method: get the data needed from the database for the existing trace with iTraceID and update the corresponding row in the m_Table. More...
 
template<typename T >
void DisplayInfoForExistingTraceTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector, int iTraceID)
 fill the TWContainer with the data needed from the database for the trace with the iTraceID and update the corresponding row into the m_Table More...
 
virtual void DisplayInfoForLastCreatedTrace (vtkMySQLDatabase *iDatabaseConnector)=0
 Virtual pure method: get the data needed from the database for the last created trace and display them in a new inserted row of the m_Table. More...
 
template<typename T >
void DisplayInfoForLastCreatedTraceTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector)
 fill the TWContainer with the data needed from the database for the last created trace and insert a new row into the m_Table to display them More...
 
virtual void DisplayInfoForTracesForSpecificTPs (vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTPs)=0
 
template<typename T >
void DisplayInfoForTracesForSpecificTPsTemplate (T *iTWContainer, vtkMySQLDatabase *iDatabaseConnector, Qt::CheckState iState, const std::list< unsigned int > &iListTPs, int iIndexShowColumn=0)
 
GoDBCoordinateRow GetCoordinateFromInt (int iXCoord, int iYCoord, int iZCoord, int iTCoord)
 create a GoDBCoordinateRow and set its fields X,Y,Z,Tcoord More...
 
int GetLastCreatedTraceID (vtkMySQLDatabase *iDatabaseConnector)
 get the ID for the last created trace in the database More...
 
std::string GetTheNameIDFromName (std::string iName)
 transform the iName into iNameID More...
 
template<typename C , typename S >
void GetTracesInfoFromDBAndModifyContainerForVisu (vtkMySQLDatabase *iDatabaseConnector, std::vector< int > iVectIDs, C *iContainerForVisu)
 
virtual void GetTracesInfoFromDBAndModifyContainerForVisu (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTraceIDs=std::list< unsigned int >())=0
 get the info needed from the database to update the container for visu More...
 
template<typename T >
void GetTracesInfoFromDBAndModifyContainerForVisuTemplate (T *iContainerForVisu, vtkMySQLDatabase *iDatabaseConnector, const std::list< unsigned int > &iListTraceIDs)
 get the info needed from the database to fill the container for visu More...
 
double * GetVectorFromQColor (QColor iColor)
 return a double rgba[4] from a QColor More...
 
template<typename C >
void RemoveTracesFromTWAndContainerForVisuForSpecificTPsTemplate (vtkMySQLDatabase *iDatabaseConnector, C *iContainerForVisu, const std::list< unsigned int > &iListTPs)
 
virtual void SetCollectionsTraceNames ()=0
 virtual pure method: set the std::string class members More...
 
template<typename T >
void SetColorCodingTemplate (T *iContainerForVisu, bool IsChecked)
 get a map with the tracesIDs as keys and the values of the selected columns as values for all traces in the table widget and update the color of the traces in the visu More...
 
void SetInfo (unsigned int iImgSessionID, QWidget *iParent)
 set the variables class members More...
 
template<typename T >
void SetTraceBoundingBoxAndPoints (unsigned int iXCoordMin, unsigned int iYCoordMin, unsigned int iZCoordMin, unsigned int iTCoord, unsigned int iXCoordMax, unsigned int iYCoordMax, unsigned int iZCoordMax, vtkPolyData *iTraceNodes, vtkMySQLDatabase *iDatabaseConnector, T &iTrace, unsigned int iTCoordMax=0)
 
template<typename T >
void SetTracesInfoContainerForVisuTemplate (T *iContainerForVisu, T **iMemberContainerForVisu)
 set the iMemberContainerInfoForVisu to the iContainerForVisu and create the connections SLOT/SIGNAL More...
 
template<typename T , typename C >
std::list< unsigned int > UpdateTheTracesColorTemplate (vtkMySQLDatabase *iDatabaseConnector, C *iContainerInfoForVisu)
 update the visu container, the database and the TW with the user selected color for the highlighted traces More...
 
template<typename T >
void UpdateTWAndContainerWithImportedTracesTemplate (T *iTWContainer, const std::vector< int > &iVectorTraceIDs, vtkMySQLDatabase *iDatabaseConnector)
 update for the imported traces the table widget and the database info of the container for visu. More...
 

Protected Attributes

QMenu * m_CheckedTracesMenu
 
std::string m_CollectionName
 
std::string m_CollectionNameID
 
std::string m_CollectionOf
 
std::string m_CollectionOfID
 
GoDBCollectionOfTracesm_CollectionOfTraces
 
int * m_CurrentTimePoint
 
vtkMySQLDatabase * m_DatabaseConnector
 
int m_ImgSessionID
 
bool m_IsColorCodingOn
 
bool m_IsShowOnlyCurrentTimePointOn
 
std::string m_LastSelectedTraceAsCollection
 
NameWithColorDatam_SelectedCollectionData
 
NameWithColorDatam_SelectedColorData
 
QGoTableWidgetm_Table
 
std::string m_TraceName
 
std::string m_TraceNameID
 

Detailed Description

Abstract class inherited by QGoDBContourManager,Mesh,Track,Lineage.

Definition at line 55 of file QGoDBTraceManager.h.

Member Typedef Documentation

typedef std::pair< unsigned int, QColor > QGoDBTraceManager::IDWithColorData

Definition at line 64 of file QGoDBTraceManager.h.

typedef std::pair< std::string, QColor > QGoDBTraceManager::NameWithColorData

Definition at line 63 of file QGoDBTraceManager.h.

Definition at line 62 of file QGoDBTraceManager.h.

Constructor & Destructor Documentation

QGoDBTraceManager::QGoDBTraceManager ( QObject *  iParent = NULL)
explicit

Definition at line 41 of file QGoDBTraceManager.cxx.

QGoDBTraceManager::~QGoDBTraceManager ( )
virtual

Definition at line 51 of file QGoDBTraceManager.cxx.

Member Function Documentation

void QGoDBTraceManager::AddActionForAddingCheckedTracesToCollection ( )
protectedvirtual

Definition at line 207 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::AddActionsContextMenu ( QMenu *  iMenu)
protectedvirtual

Reimplemented in QGoDBMeshManager, QGoDBTrackManager, and QGoDBContourManager.

Definition at line 129 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::AddGeneralActionsContextMenu ( QMenu *  iMenu)
protected

Definition at line 137 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::AddNewTraceIDInTS ( std::pair< std::string, QColor >  iTraceToAddData)
signal

signal emitted when a new trace is created that need to be added in the trace settings widget. (when a new mesh is created while contour table is displayed for example)

void QGoDBTraceManager::AddSpecificActionsForContourMesh ( QMenu *  iMenu)
protected
Todo:
Lydie: when using lineages, remove the following
Todo:
Lydie: when using lineage, put it in the generalActionsContextMenu

Definition at line 184 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::AddToSelectedCollection ( )
protectedvirtualslot

Reimplemented in QGoDBContourManager.

Definition at line 512 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::ChangeTraceColor ( )
protectedvirtualslot

is called when the user choses the change color action in the context menu, emit the signal TraceColorToChange as it impacts the collectionOf also

Reimplemented in QGoDBContourManager.

Definition at line 259 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::CheckedTracesToAddToSelectedCollection ( std::list< unsigned int >  )
signal
void QGoDBTraceManager::CheckedTracesToDelete ( )
signal

signal emitted when the user click on the action "DeleteTraces" from the context menu as it can impact different TraceManagers

void QGoDBTraceManager::CheckSelectedRows ( )
protectedslot

Definition at line 223 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::CheckShowRows ( )

if m_IsShowOnlyCurrentTimePointOn is true, call the method to show only the rows for the current timepoint, useful when the timepoint changes

Todo:
Lydie: create a class for ContourMesh

Definition at line 592 of file QGoDBTraceManager.cxx.

bool QGoDBTraceManager::CheckThatThereAreTracesToDelete ( const std::list< unsigned int > &  iListTracesIDToDelete)
protected

Definition at line 312 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::CheckTheTraceInTW ( unsigned int  iTraceID,
Qt::CheckState  iState 
)
protectedslot

slot called when a trace has been picked from the visu, to update the TW "checked/unchecked" column correspondingly

Parameters
[in]iTraceIDTraceID that has been picked
[in]iStatestate to which the TW needs to be updated

Definition at line 431 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::CreateContextMenu ( const QPoint &  iPos)
protectedslot

create the context menu when the user clicks on the table widget

Parameters
[in]iPosposition of the context menu event

Definition at line 118 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::CreateCorrespondingCollection ( )
protectedvirtualslot

slot called when the user click on "create a collection from checked traces" in the context menu, emit the signal NewCollectionFromCheckedTraces as it impact the collection also

Reimplemented in QGoDBContourManager.

Definition at line 476 of file QGoDBTraceManager.cxx.

template<typename T >
unsigned int QGoDBTraceManager::CreateNewTraceInDBFromVisu ( unsigned int  iXCoordMin,
unsigned int  iYCoordMin,
unsigned int  iZCoordMin,
unsigned int  iTCoord,
unsigned int  iXCoordMax,
unsigned int  iYCoordMax,
unsigned int  iZCoordMax,
vtkPolyData *  iTraceNodes,
NameWithColorData  iColor,
vtkMySQLDatabase *  iDatabaseConnector,
T &  iTrace,
unsigned int  iCollectionID,
unsigned int  iTCoordMax = 0 
)
inlineprotected

create the trace row with the related data provided by the visu, iTCoordMax is equal to 0 as for contour and mesh, it is the same as TCoord

Parameters
[in]iXCoordMinX coord min of the bounding box
[in]iYCoordMinY coord min of the bounding box
[in]iZCoordMinZ coord min of the bounding box
[in]iTCoordT coord min of the bounding box and max if iTCoordMax = 0
[in]iXCoordMaxX coord max of the bounding box
[in]iYCoordMaxY coord max of the bounding box
[in]iZCoordMaxZ coord max of the bounding box
[in]iTraceNodespolydata from which the points will be extracted
[in]iColorcolor of the trace
[in]iDatabaseConnectorconnection to the database
[in,out]iTraceGoDBTraceRow with the fields to be set
[in]iCollectionIDcollection ID of the trace
[in]iTCoordMaxT coord max of the bounding box
Template Parameters
T

Definition at line 531 of file QGoDBTraceManager.h.

void QGoDBTraceManager::DBConnectionNotNeededAnymore ( )
signal
virtual void QGoDBTraceManager::DeleteCheckedTraces ( vtkMySQLDatabase *  iDatabaseConnector)
pure virtual

delete the checked traces from the database, the TW and the container for visu

Parameters
[in]iDatabaseConnectorconnection to the database

Implemented in QGoDBMeshManager, QGoDBContourManager, QGoDBTrackManager, and QGoDBLineageManager.

void QGoDBTraceManager::DeleteTracesFromContextMenu ( )
protectedslot

Definition at line 345 of file QGoDBTraceManager.cxx.

template<typename T >
void QGoDBTraceManager::DeleteTracesTemplate ( vtkMySQLDatabase *  iDatabaseConnector,
T *  iContainerForVisu,
std::list< unsigned int >  iListTracesToDelete = std::list<unsigned int>(),
bool  DeleteHighlightedTraces = true 
)
inlineprotected

delete the traces from the database, the TW and the container for visu

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iContainerForVisucommon container for the visu and database
[in]iListTracesToDeletelist of the tracesIDs to be deleted
[in]DeleteHighlightedTracesif true, the traces to be deleted are the ones highlighted in the visu
Template Parameters
TContourMeshContainer or TrackContainer

Definition at line 775 of file QGoDBTraceManager.h.

template<typename T >
void QGoDBTraceManager::DisplayInfoAndLoadVisuContainerWithAllTraces ( T *  iTWContainer,
vtkMySQLDatabase *  iDatabaseConnector 
)
inlineprotected

get all the data from the database to load all the traces for the imagingsession into the table widget and the container for the visu

Parameters
[in]iTWContainercontains all the description of its columns to get the data from the database and to display them in the m_Table but has no value yet
[in]iDatabaseConnectorconnection to the database
Template Parameters
Tonly children of GoDBTableWidgetContainer as type T
Todo:
Lydie: modify the TWContainer to return a list of unsigned int

Definition at line 587 of file QGoDBTraceManager.h.

template<typename C >
void QGoDBTraceManager::DisplayInfoAndLoadVisuContainerWithAllTracesForSpecificTPs ( vtkMySQLDatabase *  iDatabaseConnector,
C *  iContainerForVisu,
const std::list< unsigned int > &  iListTPs 
)
inlineprotected

Definition at line 600 of file QGoDBTraceManager.h.

virtual void QGoDBTraceManager::DisplayInfoForAllTraces ( vtkMySQLDatabase *  iDatabaseConnector)
protectedpure virtual

Virtual pure method: get the data needed from the database and display them in the m_Table for all traces corresponding to the imagingsession.

Parameters
[in]iDatabaseConnectorconnection to the database

Implemented in QGoDBMeshManager, QGoDBTrackManager, QGoDBContourManager, and QGoDBLineageManager.

template<typename T >
void QGoDBTraceManager::DisplayInfoForAllTracesTemplate ( T *  iTWContainer,
vtkMySQLDatabase *  iDatabaseConnector,
Qt::CheckState  iState,
int  iIndexShowColumn = 0 
)
inlineprotected

fill the TWContainer with all the data needed from the database and display them into the m_Table

Parameters
[in]iTWContainercontains all the description of its columns to get the data from the database and to display them in the m_Table but has no value yet
[in]iDatabaseConnectorconnection to the database
[in]iStateif false the visible column will be unchecked in the TW
[in]iIndexShowColumnindex of the show column in the TW Container(to be set up for mesh and contour)
Template Parameters
Tthis method takes only children of GoDBTableWidgetContainer as type

Definition at line 403 of file QGoDBTraceManager.h.

virtual void QGoDBTraceManager::DisplayInfoForExistingTrace ( vtkMySQLDatabase *  iDatabaseConnector,
int  iTraceID 
)
protectedpure virtual

Virtual pure method: get the data needed from the database for the existing trace with iTraceID and update the corresponding row in the m_Table.

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTraceIDID of the trace

Implemented in QGoDBContourManager, QGoDBMeshManager, QGoDBTrackManager, and QGoDBLineageManager.

void QGoDBTraceManager::DisplayInfoForExistingTraces ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTraces 
)

get the data from the database corresponding to the iListTraces and display them in the Table Widget

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceslist of the TraceIDs the rows in the TW need to be updated

Definition at line 296 of file QGoDBTraceManager.cxx.

template<typename T >
void QGoDBTraceManager::DisplayInfoForExistingTraceTemplate ( T *  iTWContainer,
vtkMySQLDatabase *  iDatabaseConnector,
int  iTraceID 
)
inlineprotected

fill the TWContainer with the data needed from the database for the trace with the iTraceID and update the corresponding row into the m_Table

Parameters
[in]iTWContainercontains all the description of its columns to get the data from the database and to display them in the m_Table but has no value yet
[in]iDatabaseConnectorconnection to the database
[in]iTraceIDID for the trace the info will be displayed
Template Parameters
Tthis method takes only children of GoDBTableWidgetContainer as type

Definition at line 495 of file QGoDBTraceManager.h.

virtual void QGoDBTraceManager::DisplayInfoForLastCreatedTrace ( vtkMySQLDatabase *  iDatabaseConnector)
protectedpure virtual

Virtual pure method: get the data needed from the database for the last created trace and display them in a new inserted row of the m_Table.

Parameters
[in]iDatabaseConnectorconnection to the database

Implemented in QGoDBContourManager, QGoDBMeshManager, QGoDBTrackManager, and QGoDBLineageManager.

template<typename T >
void QGoDBTraceManager::DisplayInfoForLastCreatedTraceTemplate ( T *  iTWContainer,
vtkMySQLDatabase *  iDatabaseConnector 
)
inlineprotected

fill the TWContainer with the data needed from the database for the last created trace and insert a new row into the m_Table to display them

Parameters
[in]iTWContainercontains all the description of its columns to get the data from the database and to display them in the m_Table but has no value yet
[in]iDatabaseConnectorconnection to the database
Template Parameters
Tthis method takes only children of GoDBTableWidgetContainer as type

Definition at line 455 of file QGoDBTraceManager.h.

virtual void QGoDBTraceManager::DisplayInfoForTracesForSpecificTPs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTPs 
)
protectedpure virtual
template<typename T >
void QGoDBTraceManager::DisplayInfoForTracesForSpecificTPsTemplate ( T *  iTWContainer,
vtkMySQLDatabase *  iDatabaseConnector,
Qt::CheckState  iState,
const std::list< unsigned int > &  iListTPs,
int  iIndexShowColumn = 0 
)
inlineprotected

Definition at line 422 of file QGoDBTraceManager.h.

std::list< QGoDBTraceManager::NameWithColorData > QGoDBTraceManager::GetAllTraceIDsWithColor ( vtkMySQLDatabase *  iDatabaseConnector,
std::string &  ioIDToSelect 
)
virtual

return the distinct traces with their color for the imagingsession, for all timepoints if the timepoint is set to the default one or for the corresponding timepoint if not

Parameters
[in]iDatabaseConnectorconnection to the database
[in]ioIDToSelectID to be selected in the combobox
Returns
a list of the tracesIDs with their corresponding QColor

Reimplemented in QGoDBMeshManager.

Definition at line 419 of file QGoDBTraceManager.cxx.

GoDBCoordinateRow QGoDBTraceManager::GetCoordinateFromInt ( int  iXCoord,
int  iYCoord,
int  iZCoord,
int  iTCoord 
)
protected

create a GoDBCoordinateRow and set its fields X,Y,Z,Tcoord

Parameters
[in]iXCoord
[in]iYCoord
[in]iZCoord
[in]iTCoord
Returns
a new created GoDBCooordinateRow with coordinates

Definition at line 497 of file QGoDBTraceManager.cxx.

int QGoDBTraceManager::GetLastCreatedTraceID ( vtkMySQLDatabase *  iDatabaseConnector)
protected

get the ID for the last created trace in the database

Parameters
[in]iDatabaseConnectorconnection to the database
Returns
the ID corresponding to the trace

Definition at line 107 of file QGoDBTraceManager.cxx.

std::list< unsigned int > QGoDBTraceManager::GetLastCreatedTracesIDs ( vtkMySQLDatabase *  iDatabaseConnector,
int  iNumberOfTracesIDs 
)

get the last saved traces in the database

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iNumberOfTracesIDsnumber of the last tracesIDs required
Returns
a list of the IDs

Definition at line 532 of file QGoDBTraceManager.cxx.

std::list< unsigned int > QGoDBTraceManager::GetListCollectionIDs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTracesIDs 
)

return the list of collection IDs distinct and different from zero corresponding to the tracesIDs

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTracesIDslist of the tracesIDs from which the collectionID is needed
Returns
a list of the collectionIDs distinct and different from zero found in the database for these tracesIDs

Definition at line 375 of file QGoDBTraceManager.cxx.

virtual std::list< unsigned int > QGoDBTraceManager::GetListHighlightedIDs ( )
pure virtual
Returns
the list of traceIDs that have highlighted set to true in the ContainerForVisu.

Implemented in QGoDBMeshManager, QGoDBTrackManager, QGoDBContourManager, and QGoDBLineageManager.

std::list< unsigned int > QGoDBTraceManager::GetListTracesIDsBelongingToCollectionIDs ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListCollectionIDs 
)

get the list of tracesIDs belonging to the collection listed in iListCollectionIDs

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListCollectionIDslist of the collection for which the traces are needed
Returns
list of the traces belonging to these collections

Definition at line 283 of file QGoDBTraceManager.cxx.

std::list< unsigned int > QGoDBTraceManager::GetListTracesIDsFromThisCollectionOf ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTraces 
)

get the collectionOf IDs for the TracesIDs found in iListTraces

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTraceslist of the tracesIDs from which the collectionOf IDs are needed
Returns
a list of the corresponding CollectionOf IDs (exp: return a list of ContourIDs belonging to the meshesIDs listed in iListTraces)

Definition at line 271 of file QGoDBTraceManager.cxx.

QGoTableWidget * QGoDBTraceManager::GetTableWidget ( )

get the m_Table

Returns
a QGoTableWidget

Definition at line 99 of file QGoDBTraceManager.cxx.

std::string QGoDBTraceManager::GetTheNameIDFromName ( std::string  iName)
protected

transform the iName into iNameID

Parameters
[in]iName
Returns
iNameID

Definition at line 88 of file QGoDBTraceManager.cxx.

template<typename C , typename S >
void QGoDBTraceManager::GetTracesInfoFromDBAndModifyContainerForVisu ( vtkMySQLDatabase *  iDatabaseConnector,
std::vector< int >  iVectIDs,
C *  iContainerForVisu 
)
inlineprotected

Definition at line 372 of file QGoDBTraceManager.h.

virtual void QGoDBTraceManager::GetTracesInfoFromDBAndModifyContainerForVisu ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTraceIDs = std::list< unsigned int >() 
)
protectedpure virtual

get the info needed from the database to update the container for visu

Implemented in QGoDBMeshManager, QGoDBTrackManager, QGoDBContourManager, and QGoDBLineageManager.

template<typename T >
void QGoDBTraceManager::GetTracesInfoFromDBAndModifyContainerForVisuTemplate ( T *  iContainerForVisu,
vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTraceIDs 
)
inlineprotected

get the info needed from the database to fill the container for visu

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iContainerForVisucommon container for the visu and database
[in]iListTraceIDslist of the IDs the info are needed

Definition at line 866 of file QGoDBTraceManager.h.

double * QGoDBTraceManager::GetVectorFromQColor ( QColor  iColor)
protected

return a double rgba[4] from a QColor

Parameters
[in]iColorQColor
Returns
a double* rgba[4]

Definition at line 402 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::GoToTheTrace ( )
protectedslot

Definition at line 451 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::HideSelectedRows ( )
protectedslot

Definition at line 250 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::NeedToGetDatabaseConnection ( )
signal
void QGoDBTraceManager::NeedToGoToTheLocation ( int  XCoord,
int  YCoord,
int  ZCoord,
int  TCoord 
)
signal

signal emitted when the user clicks on "go to the trace" in the context menu and return the coordinates for the center of the bounding box of the trace

void QGoDBTraceManager::NewCollectionFromCheckedTraces ( std::list< unsigned int >  )
signal

signal emitted when the user clicks on "create a new collection from checked traces" in the context menu and return the list of checked tracesIDs

void QGoDBTraceManager::PrintMessage ( QString  iMessage,
int  iTimeOut = 0 
)
signal
template<typename C >
void QGoDBTraceManager::RemoveTracesFromTWAndContainerForVisuForSpecificTPsTemplate ( vtkMySQLDatabase *  iDatabaseConnector,
C *  iContainerForVisu,
const std::list< unsigned int > &  iListTPs 
)
inlineprotected

Definition at line 618 of file QGoDBTraceManager.h.

virtual void QGoDBTraceManager::SetCollectionsTraceNames ( )
protectedpure virtual

virtual pure method: set the std::string class members

Implemented in QGoDBMeshManager, QGoDBTrackManager, QGoDBContourManager, and QGoDBLineageManager.

virtual void QGoDBTraceManager::SetColorCoding ( bool  IsChecked)
protectedpure virtualslot

ColorCode the traces in the visualization base on a selected column in the table widget.

Parameters
[in]IsCheckedset to true if the action is checked, to false if not
template<typename T >
void QGoDBTraceManager::SetColorCodingTemplate ( T *  iContainerForVisu,
bool  IsChecked 
)
inlineprotected

get a map with the tracesIDs as keys and the values of the selected columns as values for all traces in the table widget and update the color of the traces in the visu

Parameters
[in]iContainerForVisucommon container for the visu and database
[in]IsCheckedcorresponds to the state of the checkable action
Template Parameters
ContourMeshContaineror TrackContainer

Definition at line 810 of file QGoDBTraceManager.h.

void QGoDBTraceManager::SetCurrentTimePoint ( int *  iTimePoint)

set the pointer to the current timepoint

Parameters
[in]iTimePointpointer to the current timepoint

Definition at line 559 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::SetDatabaseConnection ( vtkMySQLDatabase *  iDatabaseConnector)

set the m_DatabaseConnection to iDatabaseConnector

Definition at line 542 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::SetInfo ( unsigned int  iImgSessionID,
QWidget *  iParent 
)
protected

set the variables class members

Parameters
[in]iImgSessionIDto set the m_ImgSessionID
[in]iParentparent for the m_Table

Definition at line 61 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::SetSelectedCollection ( NameWithColorData iCollectionData)

set the pointer to the selected collection data

Parameters
[in]iCollectionDatapointer to the selected collection data

Definition at line 551 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::SetSelectedColor ( NameWithColorData iColorData)

set the pointer to the current selected color

Parameters
[in]iColorDatapointer to the current selected color

Definition at line 567 of file QGoDBTraceManager.cxx.

template<typename T >
void QGoDBTraceManager::SetTraceBoundingBoxAndPoints ( unsigned int  iXCoordMin,
unsigned int  iYCoordMin,
unsigned int  iZCoordMin,
unsigned int  iTCoord,
unsigned int  iXCoordMax,
unsigned int  iYCoordMax,
unsigned int  iZCoordMax,
vtkPolyData *  iTraceNodes,
vtkMySQLDatabase *  iDatabaseConnector,
T &  iTrace,
unsigned int  iTCoordMax = 0 
)
inlineprotected

Definition at line 547 of file QGoDBTraceManager.h.

template<typename T >
void QGoDBTraceManager::SetTracesInfoContainerForVisuTemplate ( T *  iContainerForVisu,
T **  iMemberContainerForVisu 
)
inlineprotected

set the iMemberContainerInfoForVisu to the iContainerForVisu and create the connections SLOT/SIGNAL

Parameters
[in]iContainerForVisucommon container for the visu and database
[in]iMemberContainerForVisum_TraceContainerInfoForVisu
Template Parameters
TContourMeshContainer or TrackContainer

Definition at line 736 of file QGoDBTraceManager.h.

void QGoDBTraceManager::ShowOnlyRowsForCurrentTimePoint ( bool  IsChecked)
protectedslot

Show only the rows in the table widget that have a timepoint equal to the current timepoint if IsChecked is true, show all the rows if false.

Parameters
[in]IsCheckedset to true if the action is checked, to false if not

Definition at line 575 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::ShowSelectedRows ( )
protectedslot

Definition at line 241 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::ShowTheTraceInTW ( unsigned int  iTraceID,
Qt::CheckState  iState 
)
protectedslot

slot called when a trace has been shown/hidden from the visu, to update the TW "show/hide" column correspondingly

Parameters
[in]iTraceIDTraceID that has been shown/hidden
[in]iStatestate to which the TW needs to be updated

Definition at line 441 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::TraceColorToChange ( )
signal

signal emitted when the user click on the action "change color" from the context menu as it can impact different TraceManagers

void QGoDBTraceManager::UncheckSelectedRows ( )
protectedslot

Definition at line 232 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::UpdateBoundingBoxes ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTracesIDs,
bool  UpdateTW = true 
)
virtual

update in the database the bounding boxes corresponding to the TracesIDs and update the corresponding rows in the TW if the bool is set to true.

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTracesIDslist of the tracesIDs with a bounding box to update
[in]UpdateTWdisplay the updates in the TW

Reimplemented in QGoDBLineageManager.

Definition at line 387 of file QGoDBTraceManager.cxx.

void QGoDBTraceManager::UpdateCollectionID ( vtkMySQLDatabase *  iDatabaseConnector,
const std::list< unsigned int > &  iListTracesIDs,
int  iCollectionID 
)

update the collectionID of the tracesIDs in the list with the iCollectionID in the database and the TW

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iListTracesIDslist of the tracesIDs that the collectionID need to be changed
[in]iCollectionIDcollectionID that needs to be changed for the traces

Definition at line 362 of file QGoDBTraceManager.cxx.

virtual void QGoDBTraceManager::UpdateHighlightedElementsInVisuContainer ( int  iTraceID)
protectedpure virtualslot

modify to the opposite one the highlighted property of the corresponding trace base on traceID in the container for visu

Parameters
[in]iTraceIDID of the trace for the property to be modified
void QGoDBTraceManager::UpdateLastSelectedOneAsCollection ( )

Definition at line 602 of file QGoDBTraceManager.cxx.

virtual std::list< unsigned int > QGoDBTraceManager::UpdateTheTracesColor ( vtkMySQLDatabase *  iDatabaseConnector)
pure virtual

virtual pure. update the color of the checked traces in the database, the visu container and the TW and return the collectionOf IDs. (i.e traces that belongs to these traces as collection: contourIDs belonging to these meshes if the trace is a mesh)

Parameters
[in]iDatabaseConnectorconnection to the database
Returns
a list of the tracesIDs, part of the collection represented by the checked traces

Implemented in QGoDBMeshManager, QGoDBContourManager, QGoDBTrackManager, and QGoDBLineageManager.

template<typename T , typename C >
std::list< unsigned int > QGoDBTraceManager::UpdateTheTracesColorTemplate ( vtkMySQLDatabase *  iDatabaseConnector,
C *  iContainerInfoForVisu 
)
inlineprotected

update the visu container, the database and the TW with the user selected color for the highlighted traces

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iContainerInfoForVisuinfo needed for the visu
Returns
a list of the tracesIDs, part of the collection represented by the checked traces
Template Parameters
Tchildren of GoDBTraceRow
CContourMeshContainer or TrackContainer

Definition at line 696 of file QGoDBTraceManager.h.

void QGoDBTraceManager::UpdateTWAndContainerForDeletedTraces ( const std::list< unsigned int > &  iTraceIDs)

delete the corresponding traces in the table widget and in the container for visu

Parameters
[in]iTraceIDslist of the IDs for the traces to be deleted
virtual void QGoDBTraceManager::UpdateTWAndContainerForImportedTraces ( const std::vector< int > &  iVectorImportedTraces,
vtkMySQLDatabase *  iDatabaseConnector 
)
pure virtual

get the data needed from the database for the imported traces,display them in new inserted rows of the m_Table and update the container for the visu.

Parameters
[in]iVectorImportedTracesIDs of the imported traces
[in]iDatabaseConnectorconnection to the database

Implemented in QGoDBMeshManager, QGoDBContourManager, QGoDBTrackManager, and QGoDBLineageManager.

template<typename T >
void QGoDBTraceManager::UpdateTWAndContainerWithImportedTracesTemplate ( T *  iTWContainer,
const std::vector< int > &  iVectorTraceIDs,
vtkMySQLDatabase *  iDatabaseConnector 
)
inlineprotected

update for the imported traces the table widget and the database info of the container for visu.

Parameters
[in]iTWContainercontains all the description of its columns to get the data from the database and to display them in the m_Table but has no value yet
[in]iVectorTraceIDsvector of the imported TracesIDs
[in]iDatabaseConnectorconnection to the database
Template Parameters
Tthis method takes only children of GoDBTableWidgetContainer
Todo:
Lydie modify to have as argument a list of unsigned int

Definition at line 654 of file QGoDBTraceManager.h.

virtual void QGoDBTraceManager::UpdateVisibleElementsInVisuContainer ( int  iTraceID)
protectedpure virtualslot

modify to the opposite one the Visible property of the corresponding trace base on traceID in the container for visu

Parameters
[in]iTraceIDID of the trace for the property to be modified

Member Data Documentation

QMenu* QGoDBTraceManager::m_CheckedTracesMenu
protected

Definition at line 298 of file QGoDBTraceManager.h.

std::string QGoDBTraceManager::m_CollectionName
protected

Definition at line 282 of file QGoDBTraceManager.h.

std::string QGoDBTraceManager::m_CollectionNameID
protected

Definition at line 283 of file QGoDBTraceManager.h.

std::string QGoDBTraceManager::m_CollectionOf
protected

Definition at line 284 of file QGoDBTraceManager.h.

std::string QGoDBTraceManager::m_CollectionOfID
protected

Definition at line 285 of file QGoDBTraceManager.h.

GoDBCollectionOfTraces* QGoDBTraceManager::m_CollectionOfTraces
protected

Definition at line 294 of file QGoDBTraceManager.h.

int* QGoDBTraceManager::m_CurrentTimePoint
protected

Definition at line 289 of file QGoDBTraceManager.h.

vtkMySQLDatabase* QGoDBTraceManager::m_DatabaseConnector
protected

Definition at line 295 of file QGoDBTraceManager.h.

int QGoDBTraceManager::m_ImgSessionID
protected

Definition at line 292 of file QGoDBTraceManager.h.

bool QGoDBTraceManager::m_IsColorCodingOn
protected

Definition at line 296 of file QGoDBTraceManager.h.

bool QGoDBTraceManager::m_IsShowOnlyCurrentTimePointOn
protected

Definition at line 297 of file QGoDBTraceManager.h.

std::string QGoDBTraceManager::m_LastSelectedTraceAsCollection
protected

Definition at line 290 of file QGoDBTraceManager.h.

NameWithColorData* QGoDBTraceManager::m_SelectedCollectionData
protected

Definition at line 287 of file QGoDBTraceManager.h.

NameWithColorData* QGoDBTraceManager::m_SelectedColorData
protected

Definition at line 288 of file QGoDBTraceManager.h.

QGoTableWidget* QGoDBTraceManager::m_Table
protected

Definition at line 293 of file QGoDBTraceManager.h.

std::string QGoDBTraceManager::m_TraceName
protected

Definition at line 280 of file QGoDBTraceManager.h.

std::string QGoDBTraceManager::m_TraceNameID
protected

Definition at line 281 of file QGoDBTraceManager.h.


The documentation for this class was generated from the following files: