Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit b80c08b2 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Project creation dialog replaced by a UIParamDialog.

parent 1e5cc421
......@@ -23,6 +23,7 @@
#include "ui_mainwindow.h"
#include "UIDataWidget.h"
#include "Interfaces.h"
#include "UIParamDialog.h"
#include "NodeEditor.h"
//#include "ShaderGraph.h"
......@@ -438,26 +439,15 @@ void UIMainWindow::update( bool mustBeUpdated )
void UIMainWindow::newProject()
{
UIParamSet *projectParams = new UIParamSet( "Project settings", this );
projectParams->Add( new UIParamString("name", "Project name", "Name of the new project to create.", "Default project" ) );
onDeclaringNewProjectParameters( *projectParams );
/* Create the dialog box for asking information about the project to create */
QDialog *dlg = new QDialog( this );
QDialogButtonBox *dlgButtons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
connect( dlgButtons, SIGNAL(accepted()), dlg, SLOT(accept()) );
connect( dlgButtons, SIGNAL(rejected()), dlg, SLOT(reject()) );
QVBoxLayout *l = new QVBoxLayout();
l->addWidget( projectParams );
l->addWidget( dlgButtons );
dlg->setLayout( l );
UIParamDialog dlg( "Project settings", this );
dlg.Add( new UIParamString("name", "Project name", "Name of the new project to create.", "Default project" ) );
onDeclaringNewProjectParameters( dlg.GetParameters() );
/* */
if( dlg->exec() == QDialog::Accepted )
if( dlg.exec() == QDialog::Accepted )
{
QString projectName = projectParams->GetString("name")->Value();
QString projectName = dlg.GetParameters().GetString("name")->Value();
if( !projectName.size() )
{
QMessageBox::warning(
......@@ -469,13 +459,10 @@ void UIMainWindow::newProject()
}
ProjectHandle *pHndl = new ProjectHandle();
pHndl->project = onCreatingProject( projectName, projectParams );
pHndl->project = onCreatingProject( projectName, &dlg.GetParameters() );
ui->comboProject->addItem( pHndl->project->Name(), QVariant::fromValue<void*>(pHndl) );
ui->comboProject->setCurrentIndex( ui->comboProject->count()-1 );
}
delete dlg;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment