37 #include "vtkSQLQuery.h"
40 #include <QFormLayout>
41 #include <QMessageBox>
43 #include <QInputDialog>
45 #include <QPushButton>
55 setSubTitle(
tr(
"Create the microscopes for the gofigure projects:") );
80 "Name",
"microscope").empty() )
83 tr(
"Please create at least one microscope.") );
96 "The MySql user and the GoFigure Database \n\
97 have been successfully created !!\n\
98 Now you can save the work you do with GoFigure into the Database !!") );
113 if ( MicroscopeName.empty() )
116 tr(
"Please enter a name for your microscope.") );
122 "Name",
"Name", MicroscopeName).
size() > 0 )
125 tr(
"There is already a Microscope with the same name, please choose another one") );
131 std::stringstream queryScript;
132 queryScript <<
"INSERT INTO microscope VALUES ('";
133 queryScript << MicroscopeName;
134 queryScript <<
"') ;";
136 query->SetQuery( queryScript.str().c_str() );
137 if ( !query->Execute() )
139 std::cout <<
"Insert Microscope query failed." << std::endl;
145 tr(
"Your microscope has been successfully created") );
163 field(
"Password").toString().toStdString() );
176 std::string iUser, std::string iPassword)
181 this->
m_DBName =
"gofiguredatabase";