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

this class describes the columns of the table widget with the corresponding info to find their values in the database if the columns refer to data stored in the database and provides methods to fill the rows of the table widget and to get the right queries to find the data in the database More...

#include <Code/IO/GoDBTableWidgetContainer.h>

Inheritance diagram for GoDBTableWidgetContainer:
Inheritance graph
[legend]

Public Types

typedef std::vector< std::pair
< GoDBTraceInfoForTableWidget,
std::vector< std::string > > > 
TWContainerType
 

Public Member Functions

std::vector< int > GetAllTraceIDsInContainer ()
 return all the traces IDs present in the RowContainer More...
 
virtual TWContainerType GetContainerForOneSpecificTrace (vtkMySQLDatabase *iDatabaseConnector, int iTraceID)
 get the results of the queries and put them in the row container corresponding to all the data needed to fill the table widget for the updated trace and return the link to the corresponding row container which has only 1 row More...
 
virtual TWContainerType GetContainerLoadedWithAllFromDB (vtkMySQLDatabase *iDatabaseConnector, std::list< unsigned int > iListTPs=std::list< unsigned int >())
 get the results of the queries and put them in the row container corresponding to all the data needed to fill the table widget for the traces and return the corresponding row container More...
 
std::vector< int > GetIndexForGroupColor (std::string iGroupName)
 get the results of the queries and put them in the row container corresponding to all the data needed to fill the table widget for the new created trace and return the link to the corresponding row container which has only 1 row More...
 
std::list< std::pair
< std::string, std::string > > 
GetListColumnsNamesAndToolTipsForTableWidget ()
 Return a list with all the ColumnNames and tooltips to be displayed in the tableWidget. More...
 
std::vector< std::string > GetNameComputedColumns ()
 Return a list with all the ColumnNames for computed values displayed in the tableWidget. More...
 
 GoDBTableWidgetContainer ()
 Default Constructor. More...
 
 GoDBTableWidgetContainer (std::string iCollectionName, std::string iTracesName, int iImgSessionID)
 constructor More...
 
virtual ~GoDBTableWidgetContainer ()
 desctructor More...
 

Protected Member Functions

virtual void ClearRowContainerValues ()
 
void FillRowContainer (std::vector< std::vector< std::string > > iResultsFromQuery, std::vector< std::string > iSelectFields, std::string BaseOn="")
 fill the columns of the row container following the vector of string containing the columns to be filled with the results contained in the vector results from query and look on the columnNameDatabase in the column Info by default or else More...
 
void FillRowContainerForComputedValues (std::vector< std::vector< std::string > > *iComputedValues)
 fill the row container with the values calculated and stored in th meshAttributes More...
 
virtual void FillRowContainerWithDBValues (vtkMySQLDatabase *iDatabaseConnector, std::string iRestrictionName, std::string iRestrictionValue, std::list< unsigned int > iListTimepoints=std::list< unsigned int >())
 
virtual std::vector
< GoDBTraceInfoForTableWidget
GetColumnsInfoForTraceTable ()
 Fill a vector of GoDBTraceInfoForTableWidget with the info needed to fill the table widget for all the traces. More...
 
int GetIndexInsideRowContainer (std::string iInfoName)
 return the index in the row container for the column with the given InfoName More...
 
size_t GetNumberOfRows ()
 
std::vector< std::string > GetQueryStringForSelectFieldsTables (bool SameFieldsInQuery)
 return a vector of the table.fields to be selected from the database for all the fields except the ones with the same name if SameFieldsQuery is set to false and only for them if SameFieldsQuery is set to true More...
 
std::vector< std::string > GetQueryStringForTraceJoinedTables (bool SameFieldsInQuery)
 return a vector of string with the tables to be joined with the trace table in the database query for all the fields except the ones with the same name if SameFieldsQuery is set to false and only for them if SameFieldsQuery is set to true More...
 
virtual void SetCommonInfoForTwoTracesTable ()=0
 Virtual Pure method Fill the vector of GoDBTraceInfoForTableWidget with the info common to 2 traces only. More...
 
void SetInfoForColumnIsVisible ()
 

Protected Attributes

std::string m_CollectionIDName
 
std::string m_CollectionName
 return a list of all the traces with a bounding box containing the given ZCoord More...
 
std::vector
< GoDBTraceInfoForTableWidget
m_ColumnsInfos
 
int m_ImgSessionID
 
TWContainerType m_RowContainer
 
std::string m_TracesIDName
 
std::string m_TracesName
 

Detailed Description

this class describes the columns of the table widget with the corresponding info to find their values in the database if the columns refer to data stored in the database and provides methods to fill the rows of the table widget and to get the right queries to find the data in the database

Definition at line 53 of file GoDBTableWidgetContainer.h.

Member Typedef Documentation

typedef std::vector< std::pair< GoDBTraceInfoForTableWidget, std::vector< std::string > > > GoDBTableWidgetContainer::TWContainerType

Definition at line 74 of file GoDBTableWidgetContainer.h.

Constructor & Destructor Documentation

GoDBTableWidgetContainer::GoDBTableWidgetContainer ( )

Default Constructor.

GoDBTableWidgetContainer::GoDBTableWidgetContainer ( std::string  iCollectionName,
std::string  iTracesName,
int  iImgSessionID 
)
explicit

constructor

Parameters
[in]iCollectionNamename of the collection
[in]iTracesNamename of the traces
[in]iImgSessionIDID of the imagingsession

Definition at line 38 of file GoDBTableWidgetContainer.cxx.

virtual GoDBTableWidgetContainer::~GoDBTableWidgetContainer ( )
inlinevirtual

desctructor

Definition at line 71 of file GoDBTableWidgetContainer.h.

Member Function Documentation

void GoDBTableWidgetContainer::ClearRowContainerValues ( )
protectedvirtual

Definition at line 836 of file GoDBTableWidgetContainer.cxx.

void GoDBTableWidgetContainer::FillRowContainer ( std::vector< std::vector< std::string > >  iResultsFromQuery,
std::vector< std::string >  iSelectFields,
std::string  BaseOn = "" 
)
protected

fill the columns of the row container following the vector of string containing the columns to be filled with the results contained in the vector results from query and look on the columnNameDatabase in the column Info by default or else

Definition at line 517 of file GoDBTableWidgetContainer.cxx.

void GoDBTableWidgetContainer::FillRowContainerForComputedValues ( std::vector< std::vector< std::string > > *  iComputedValues)
protected

fill the row container with the values calculated and stored in th meshAttributes

Todo:
Lydie: find a way to make it ok for all traces, now only for mesh

Definition at line 777 of file GoDBTableWidgetContainer.cxx.

void GoDBTableWidgetContainer::FillRowContainerWithDBValues ( vtkMySQLDatabase *  iDatabaseConnector,
std::string  iRestrictionName,
std::string  iRestrictionValue,
std::list< unsigned int >  iListTimepoints = std::list<unsigned int>() 
)
protectedvirtual

Definition at line 713 of file GoDBTableWidgetContainer.cxx.

std::vector< int > GoDBTableWidgetContainer::GetAllTraceIDsInContainer ( )

return all the traces IDs present in the RowContainer

Definition at line 864 of file GoDBTableWidgetContainer.cxx.

std::vector< GoDBTraceInfoForTableWidget > GoDBTableWidgetContainer::GetColumnsInfoForTraceTable ( )
protectedvirtual

Fill a vector of GoDBTraceInfoForTableWidget with the info needed to fill the table widget for all the traces.

Returns
a vector with all the info to fill the table widget for all the traces

Definition at line 55 of file GoDBTableWidgetContainer.cxx.

GoDBTableWidgetContainer::TWContainerType GoDBTableWidgetContainer::GetContainerForOneSpecificTrace ( vtkMySQLDatabase *  iDatabaseConnector,
int  iTraceID 
)
virtual

get the results of the queries and put them in the row container corresponding to all the data needed to fill the table widget for the updated trace and return the link to the corresponding row container which has only 1 row

Parameters
[in]iDatabaseConnectorconnection to the database
[in]iTraceIDtraceID the data are needed for
Returns
the row container with all the data for the specific trace

Reimplemented in GoDBTWContainerForMesh, GoDBTWContainerForLineage, and GoDBTWContainerForTrack.

Definition at line 701 of file GoDBTableWidgetContainer.cxx.

GoDBTableWidgetContainer::TWContainerType GoDBTableWidgetContainer::GetContainerLoadedWithAllFromDB ( vtkMySQLDatabase *  iDatabaseConnector,
std::list< unsigned int >  iListTPs = std::list<unsigned int>() 
)
virtual

get the results of the queries and put them in the row container corresponding to all the data needed to fill the table widget for the traces and return the corresponding row container

Parameters
[in]iDatabaseConnectorconnection to the database
Returns
all the values needed from the database and the description of the info to know how to display them in the table widget

Reimplemented in GoDBTWContainerForMesh.

Definition at line 687 of file GoDBTableWidgetContainer.cxx.

std::vector< int > GoDBTableWidgetContainer::GetIndexForGroupColor ( std::string  iGroupName)

get the results of the queries and put them in the row container corresponding to all the data needed to fill the table widget for the new created trace and return the link to the corresponding row container which has only 1 row

Definition at line 810 of file GoDBTableWidgetContainer.cxx.

int GoDBTableWidgetContainer::GetIndexInsideRowContainer ( std::string  iInfoName)
protected

return the index in the row container for the column with the given InfoName

Definition at line 671 of file GoDBTableWidgetContainer.cxx.

std::list< std::pair< std::string, std::string > > GoDBTableWidgetContainer::GetListColumnsNamesAndToolTipsForTableWidget ( )

Return a list with all the ColumnNames and tooltips to be displayed in the tableWidget.

Returns
a list with all the ColumnNames and tooltips to be displayed in the tableWidget

Definition at line 434 of file GoDBTableWidgetContainer.cxx.

std::vector< std::string > GoDBTableWidgetContainer::GetNameComputedColumns ( )

Return a list with all the ColumnNames for computed values displayed in the tableWidget.

Returns
a list with all the ColumnNames for computed values displayed in the tableWidget

Definition at line 454 of file GoDBTableWidgetContainer.cxx.

size_t GoDBTableWidgetContainer::GetNumberOfRows ( )
protected

Definition at line 850 of file GoDBTableWidgetContainer.cxx.

std::vector< std::string > GoDBTableWidgetContainer::GetQueryStringForSelectFieldsTables ( bool  SameFieldsInQuery)
protected

return a vector of the table.fields to be selected from the database for all the fields except the ones with the same name if SameFieldsQuery is set to false and only for them if SameFieldsQuery is set to true

Definition at line 473 of file GoDBTableWidgetContainer.cxx.

std::vector< std::string > GoDBTableWidgetContainer::GetQueryStringForTraceJoinedTables ( bool  SameFieldsInQuery)
protected

return a vector of string with the tables to be joined with the trace table in the database query for all the fields except the ones with the same name if SameFieldsQuery is set to false and only for them if SameFieldsQuery is set to true

Definition at line 581 of file GoDBTableWidgetContainer.cxx.

virtual void GoDBTableWidgetContainer::SetCommonInfoForTwoTracesTable ( )
protectedpure virtual

Virtual Pure method Fill the vector of GoDBTraceInfoForTableWidget with the info common to 2 traces only.

Implemented in GoDBTWContainerForContourMesh, and GoDBTWContainerForTrackLineage.

void GoDBTableWidgetContainer::SetInfoForColumnIsVisible ( )
protected

Definition at line 416 of file GoDBTableWidgetContainer.cxx.

Member Data Documentation

std::string GoDBTableWidgetContainer::m_CollectionIDName
protected

Definition at line 149 of file GoDBTableWidgetContainer.h.

std::string GoDBTableWidgetContainer::m_CollectionName
protected

return a list of all the traces with a bounding box containing the given ZCoord

*Set the info needed for mesh Insert a new created trace with the datas contained in the

NewTraceContainer into the m_RowContainer

Definition at line 148 of file GoDBTableWidgetContainer.h.

std::vector< GoDBTraceInfoForTableWidget > GoDBTableWidgetContainer::m_ColumnsInfos
protected

Definition at line 153 of file GoDBTableWidgetContainer.h.

int GoDBTableWidgetContainer::m_ImgSessionID
protected

Definition at line 152 of file GoDBTableWidgetContainer.h.

TWContainerType GoDBTableWidgetContainer::m_RowContainer
protected

Definition at line 154 of file GoDBTableWidgetContainer.h.

std::string GoDBTableWidgetContainer::m_TracesIDName
protected

Definition at line 151 of file GoDBTableWidgetContainer.h.

std::string GoDBTableWidgetContainer::m_TracesName
protected

Definition at line 150 of file GoDBTableWidgetContainer.h.


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