42 #include <QMessageBox>
46 #include <QGridLayout>
48 #include <QPushButton>
52 m_DatabaseConnector(0),
53 ExistingImgSession(false)
86 vlayout->
setAlignment(RadioButtonLayout, Qt::AlignHCenter);
135 tr(
"You are currently using The Database %1 ").arg(
136 field(
"DBName").toString() ) );
167 std::vector< std::string > vectListProjName =
170 if ( !vectListProjName.empty() )
172 for (
unsigned int i = 0; i < vectListProjName.size(); ++i )
194 myNewProject.
SetField(
"Name",
field(
"ProjectName").toString().toStdString() );
206 "project", myNewProject);
216 std::stringstream AuthorName;
221 AuthorName <<
" <none>";
247 if ( !ListFirstNames.empty() )
249 for (
unsigned int i = 0; i < ListFirstNames.size(); i++ )
251 std::stringstream AuthorTotalName;
252 AuthorTotalName << ListLastNames[i];
253 AuthorTotalName <<
" ";
254 AuthorTotalName << ListFirstNames[i];
255 AuthorTotalName <<
" ";
256 AuthorTotalName << ListMiddleNames[i];
258 std::vector< FieldWithValue > Conditions(3);
259 FieldWithValue FirstName = {
"FirstName", ListFirstNames[i],
"=" };
260 Conditions[0] = FirstName;
261 FieldWithValue MiddleName = {
"MiddleName", ListMiddleNames[i],
"=" };
262 Conditions[1] = MiddleName;
264 Conditions[2] = LastName;
267 "author",
"AuthorID", Conditions);
272 QString AuthorName = ( *iter ).first.c_str();
277 ListAuthors.
append(AuthorName);
284 tr(
"Please create the author of your project:") );
298 "When you click on 'Next' the project will be created in the Gofigure Database\n or select 'Open an existing project':") );
329 tr(
"Select the project you want to open or choose 'Create a new project':") );
354 if ( ProjectName !=
"" )
364 std::vector< std::string > ResultQuery;
370 Description = ResultQuery[0].c_str();
379 int AuthorID = atoi( ResultQuery[0].c_str() );
392 if ( iter->second == AuthorID )
394 AuthorName = ( *iter ).first.c_str();
419 msgBox.
setText(
tr(
"Please enter a name for your new project.") );
426 msgBox.
setText(
tr(
"The name you entered for your project already exists.") );
433 msgBox.
setText(
tr(
"Please select an Author for your project.") );
509 field(
"ProjectName").toString().toStdString() );
511 return !ListImgSessionID.empty();
531 field(
"User").toString().toStdString(),
532 field(
"Password").toString().toStdString() );
533 CreateAuthorPage->
show();