56 vtkMySQLDatabase *iDatabaseConnector)
68 std::string CreationDateStr =
75 if ( !this->CheckEntityAlreadyExists< GoDBBookmarkRow >(this->
m_NewBookmark) )
86 vtkMySQLDatabase *iDatabaseConnector, std::string iName)
99 vtkMySQLDatabase *iDatabaseConnector, std::string iName)
101 return FindOneID(iDatabaseConnector,
"bookmark",
102 "CoordID",
"Name", iName);
109 std::string iDescription)
111 this->ValidateNameTemplate< GoDBBookmarkRow >(this->
m_NewBookmark,
112 iName, iDescription);
119 vtkMySQLDatabase *iDatabaseConnector)
vtkMySQLDatabase * m_DatabaseConnector
std::string toStdString() const
int m_CoordIDForNewBookmark
QString toString(Qt::DateFormat format) const
QGoDBBookmarkManager(QWidget *iParent=0, int iImgSessionID=0)
void DeleteBookmark(vtkMySQLDatabase *iDatabaseConnector)
delete the bookmarks from the database from a list the user selects and send a signal to tell that th...
manages a map with keys matching fields of the gofiguredatabase Coordinate table and values of the ma...
virtual bool SetValuesForSpecificID(int ID, vtkMySQLDatabase *iDatabaseConnector)
get the data from the database corresponding to the specific ID and put them in the map ...
void AddABookmark(int iCoordID, vtkMySQLDatabase *iDatabaseConnector)
execute the dialog asking the user to enter a name and a description, validates the name...
Abstract class : the QGoDBNameDescEntityManager manages the interactions between the user and the dat...
virtual bool DeleteEntity(vtkMySQLDatabase *iDatabaseConnector)
show the list of the existing entities so the user can choose the ones he wants to delete...
int FindOneID(vtkMySQLDatabase *DatabaseConnector, const std::string &TableName, const std::string &ColumnName, const std::string &field, const std::string &value)
SELECT ColumnName FROM TableName WHERE field = value.
GoDBBookmarkRow m_NewBookmark
QDateTime currentDateTime()
void SetField(const std::string &key, const T &value)
convert the value into a string and assign it to the key in the map
void ValidateName(std::string iName, std::string iDescription)
void ListBookmarksChanged()
virtual int SaveInDB(vtkMySQLDatabase *DatabaseConnector)
Pure Virtual :check if the entity already exists in the DB, if yes, return the existing ID...
std::string AddAnEntity(vtkMySQLDatabase *iDatabaseConnector)
execute the dialog asking the user to enter a name and a description, validates the name...
GoDBCoordinateRow GetCoordinatesForBookmark(vtkMySQLDatabase *iDatabaseConnector, std::string iName)
return the coordinate for the bookmark with the name iName
int GetCoordIDForBookmark(vtkMySQLDatabase *iDatabaseConnector, std::string iName)
get the coordid for the bookmark with the name iName