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

the QGoDBSubCellTypeManager manages the interactions between the user and the database for the SubCellularType DBTable. More...

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

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

Public Member Functions

 QGoDBSubCellTypeManager (QWidget *iParent=0)
 
 ~QGoDBSubCellTypeManager ()
 
- Public Member Functions inherited from QGoDBNameDescEntityManager
std::string AddAnEntity (vtkMySQLDatabase *iDatabaseConnector)
 execute the dialog asking the user to enter a name and a description, validates the name, set the m_DatabaseConnector, save the entity in the DB and return the name of the new entity More...
 
virtual bool DeleteEntity (vtkMySQLDatabase *iDatabaseConnector)
 show the list of the existing entities so the user can choose the ones he wants to delete, then delete them from the database More...
 
NamesDescrContainerType GetListExistingEntities (vtkMySQLDatabase *iDatabaseConnector)
 return the list of all the existing entities stored in the database More...
 
std::string GetNameNewEntity ()
 return the name of the new entity added More...
 
int GetTheEntityID (std::string iName, vtkMySQLDatabase *iDatabaseConnector)
 get the ID of the entity based on the name More...
 
 QGoDBNameDescEntityManager (QWidget *iParent=0, std::string iEntityName="", int iImgSessionID=0)
 
 ~QGoDBNameDescEntityManager ()
 

Protected Slots

virtual void ValidateName (std::string iName, std::string iDescription)
 
- Protected Slots inherited from QGoDBNameDescEntityManager
void DeleteEntitiesFromList (std::vector< std::string > iVectorNamesEntitiesToDelete)
 Delete in the database the entities with the names contained in the vector. More...
 
virtual void ValidateName (std::string iName, std::string iDescription)=0
 Pure Virtual method : check that the name doesn't already exists in the database, if so, make the m_NameDescDialog asks the user to choose another one, if no, close the m_NameDescDialog and call SaveNewEntityInDB() More...
 

Protected Member Functions

virtual void SaveNewEntityInDB ()
 Pure Virtual method : save the new entity in the database, the m_DatabaseConnectorForNewEntity needs to be set before calling this method. Check that the entity doesn't already exists in the database, if so, give the user the name of the existing entity. More...
 
- Protected Member Functions inherited from QGoDBNameDescEntityManager
template<typename T >
bool CheckEntityAlreadyExists (T iNewEntity)
 check if the entity already exists in the database, if yes, give the name of the existing entity to the user, if no, record the name iName as the name of the new entity More...
 
std::vector< std::string > GetNameExistingEntities (vtkMySQLDatabase *iDatabaseConnector)
 return the names of all the entities stored in the database More...
 
template<typename T >
void ValidateNameTemplate (T &ioNewEntity, std::string iName, std::string iDescription)
 check if the name already exists for this entity in the database, if yes, let the user know, if not, call SaveNewEntityInDB More...
 

Protected Attributes

GoDBSubCellTypeRow m_NewSubCellType
 
- Protected Attributes inherited from QGoDBNameDescEntityManager
vtkMySQLDatabase * m_DatabaseConnector
 
std::string m_EntityName
 
int m_ImgSessionID
 
QGoNameDescriptionInputDialogm_NameDescDialog
 
std::string m_NameNewEntity
 

Additional Inherited Members

- Public Types inherited from QGoDBNameDescEntityManager
typedef std::vector< std::pair
< std::string, std::string > > 
NamesDescrContainerType
 

Detailed Description

the QGoDBSubCellTypeManager manages the interactions between the user and the database for the SubCellularType DBTable.

Definition at line 47 of file QGoDBSubCellTypeManager.h.

Constructor & Destructor Documentation

QGoDBSubCellTypeManager::QGoDBSubCellTypeManager ( QWidget *  iParent = 0)
explicit
Todo:
Lydie: make a class template for celltype/subcelltype

Definition at line 36 of file QGoDBSubCellTypeManager.cxx.

QGoDBSubCellTypeManager::~QGoDBSubCellTypeManager ( )
inline

Definition at line 54 of file QGoDBSubCellTypeManager.h.

Member Function Documentation

void QGoDBSubCellTypeManager::SaveNewEntityInDB ( )
protectedvirtual

Pure Virtual method : save the new entity in the database, the m_DatabaseConnectorForNewEntity needs to be set before calling this method. Check that the entity doesn't already exists in the database, if so, give the user the name of the existing entity.

Implements QGoDBNameDescEntityManager.

Definition at line 44 of file QGoDBSubCellTypeManager.cxx.

void QGoDBSubCellTypeManager::ValidateName ( std::string  iName,
std::string  iDescription 
)
protectedvirtualslot

Definition at line 55 of file QGoDBSubCellTypeManager.cxx.

Member Data Documentation

GoDBSubCellTypeRow QGoDBSubCellTypeManager::m_NewSubCellType
protected

Definition at line 57 of file QGoDBSubCellTypeManager.h.


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