-
- myFileInDir = new QString("");
- myFileOutDir = new QString("");
- myFileSizeMapDir = new QString("");
- if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
- {
- *myFileInDir = QDir::currentPath();
- *myFileOutDir = QDir::currentPath();
- *myFileSizeMapDir = QDir::currentPath();
- }
- else
- {
- *myFileInDir = SUIT_FileDlg::getLastVisitedPath();
- *myFileOutDir = SUIT_FileDlg::getLastVisitedPath();
- *myFileSizeMapDir = SUIT_FileDlg::getLastVisitedPath();
- }
-
-
- // Mesh in
- aMeshIn = new QGroupBox( tr( "MeshIn" ), this );
- aMedfile = new QRadioButton( tr( "MEDFile" ), aMeshIn );
- aBrowser = new QRadioButton( tr( "Browser" ), aMeshIn );
- aBrowserObject = new QLineEdit( aMeshIn );
- selectMedFilebutton = new QPushButton("", aMeshIn);
- selectMedFileLineEdit = new QLineEdit( aMeshIn );
-
- meshIn = new QGridLayout( aMeshIn );
-
- meshIn->setMargin( MARGIN );
- meshIn->setSpacing( SPACING );
- meshIn->addWidget( aMedfile, 0, 0, 1,1 );
- meshIn->addWidget( aBrowser, 0, 1,1,1);
- meshIn->addWidget( aBrowserObject, 0, 2, 1, 1 );
- meshIn->addWidget( selectMedFilebutton, 1, 0,1, 1);
- meshIn->addWidget( selectMedFileLineEdit, 1, 1, 1, 1 );
- hspacer = new QSpacerItem(188, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
-
- meshInGroup = new QButtonGroup( this );
- meshInGroup->addButton( aMedfile, 0 );
- meshInGroup->addButton( aBrowser, 1 );
-
- //Mesh out
-
- aMeshOut = new QGroupBox( tr( "MeshOut" ), this );
- meshName = new QLabel(tr("MeshName"), aMeshOut);
- secondHspacer = new QSpacerItem(100, 30);
- meshNameLineEdit = new QLineEdit(aMeshOut) ;
- medFileCheckBox = new QCheckBox(tr("MEDFile"), aMeshOut);
- selectOutMedFilebutton = new QPushButton("", aMeshOut);
- thirdHspacer = new QSpacerItem(188, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
- selectOutMedFileLineEdit = new QLineEdit(aMeshOut) ;
- publishOut = new QCheckBox(tr("Publish_MG_ADAPT"), aMeshOut);
-
- meshOut = new QGridLayout( aMeshOut );
-
- meshOut->setMargin( MARGIN );
- meshOut->setSpacing( SPACING );
- meshOut->addWidget( meshName, 0, 0, 1,1 );
- meshOut->addItem( secondHspacer, 0, 1, 1, 1 );
- meshOut->addWidget( meshNameLineEdit, 0, 2,1,1);
- meshOut->addWidget( medFileCheckBox, 1, 0,1,1 );
- meshOut->addWidget( selectOutMedFilebutton, 1, 1,1,1 );
- meshOut->addWidget( selectOutMedFileLineEdit, 1, 2,1,1);
- meshOut->addWidget( publishOut, 2, 0,1,1 );
-
- //size map definition
-
- sizeMapDefinition = new QGroupBox(tr("SIZE_MAP_DEF"), this);
- localButton = new QRadioButton(tr("LOCAL_MG_ADAPT"), sizeMapDefinition);
- backgroundButton = new QRadioButton(tr("BACKGRND_MG_ADAPT"), sizeMapDefinition);
- constantButton = new QRadioButton(tr("CNST_MG_ADAPT"), sizeMapDefinition);
- medFileBackground = new QLabel(tr("MED_FILE_BCKG"), sizeMapDefinition);
- selectMedFileBackgroundbutton = new QPushButton(tr(""), sizeMapDefinition);
- selectMedFileBackgroundLineEdit = new QLineEdit(sizeMapDefinition);
- valueLabel = new QLabel(tr("VALUE_MG_ADAPT"), sizeMapDefinition);
- dvalue = new QDoubleSpinBox(sizeMapDefinition);
- sizeMapDefGroup = new QButtonGroup( this );
- sizeMapDefGroup->addButton( localButton, 0 );
- sizeMapDefGroup->addButton( backgroundButton, 1 );
- sizeMapDefGroup->addButton( constantButton, 2 );
-
- sizeMapDefGroupLayout = new QGridLayout(sizeMapDefinition);
- sizeMapDefGroupLayout->addWidget(localButton, 0,0);
- sizeMapDefGroupLayout->addWidget(backgroundButton, 0,1);
- sizeMapDefGroupLayout->addWidget(constantButton, 0,2);
- sizeMapDefGroupLayout->addWidget(medFileBackground, 1,0);
- sizeMapDefGroupLayout->addWidget(selectMedFileBackgroundbutton, 1,1);
- sizeMapDefGroupLayout->addWidget(selectMedFileBackgroundLineEdit, 1,2);
- sizeMapDefGroupLayout->addWidget(valueLabel, 2,0);
- sizeMapDefGroupLayout->addWidget(dvalue, 2,1);
-
- // size Map field
- sizeMapField = new QGroupBox(tr("SIZE_MAP_FIELD"), this);
- fieldName = new QLabel(tr("MG_ADAPT_FIELD_NAME"), sizeMapField);
- fieldNameCmb = new QComboBox(sizeMapField);
- noTimeStep = new QRadioButton(tr("MG_ADAPT_NO_T_ST"), sizeMapField);
- lastTimeStep = new QRadioButton(tr("MG_ADAPT_L_ST"), sizeMapField);
- chosenTimeStep = new QRadioButton(tr("MG_ADAPT_CH_ST"), sizeMapField);
- timeStepLabel = new QLabel(tr("MG_ADAPT_TSTP"), sizeMapField);
- timeStep = new QSpinBox(sizeMapField);
- //~timeStep->setMinimum(-1);
- rankLabel = new QLabel(tr("MG_ADAPT_RANK"), sizeMapField);
- rankSpinBox = new QSpinBox(sizeMapField);
- rankSpinBox->setMinimum(-1);
-
- timeStepGroup = new QButtonGroup(this);
- timeStepGroup->addButton(noTimeStep, 0);
- timeStepGroup->addButton(lastTimeStep, 1);
- timeStepGroup->addButton(chosenTimeStep, 2);
-
- sizeMapFieldGroupLayout = new QGridLayout(sizeMapField);
-
- sizeMapFieldGroupLayout->addWidget(fieldName, 0,0);
- sizeMapFieldGroupLayout->addWidget(fieldNameCmb, 0,1);
- sizeMapFieldGroupLayout->addWidget(noTimeStep, 1,0);
- sizeMapFieldGroupLayout->addWidget(lastTimeStep, 1,1);
- sizeMapFieldGroupLayout->addWidget(chosenTimeStep, 1,2);
- sizeMapFieldGroupLayout->addWidget(timeStepLabel, 2,0);
- sizeMapFieldGroupLayout->addWidget(timeStep, 2,1);
- sizeMapFieldGroupLayout->addWidget(rankLabel, 2,2);
- sizeMapFieldGroupLayout->addWidget(rankSpinBox, 2,3);
-
-
- QGridLayout* argumentsLayout = new QGridLayout( this );
- argumentsLayout->setMargin( MARGIN );
- argumentsLayout->setSpacing( SPACING );
-
- argumentsLayout->addWidget( aMeshIn, 0, 0, 1, 3 );
- argumentsLayout->addWidget( aMeshOut, 1, 0, 1, 3 );
- argumentsLayout->addWidget( sizeMapDefinition, 2, 0, 1, 3 );
- argumentsLayout->addWidget( sizeMapField, 3, 0, 1, 3 );
- argumentsLayout->setColumnStretch( 1, 5 );
- argumentsLayout->setRowStretch( 4, 5 );
-
- // Initial state
- setMode( Mesh, Local);
- medFileCheckBox->setChecked(true);
-
- // Connections
- connect( meshInGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( modeChanged( int ) ) );
- connect( sizeMapDefGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( sizeMapDefChanged( int ) ) );
- connect( selectMedFilebutton, SIGNAL( pressed( ) ), this, SLOT( onSelectMedFilebuttonClicked( ) ) );
- connect(medFileCheckBox, SIGNAL (stateChanged(int)), this, SLOT(onMedFileCheckBox(int) ) );
- connect(publishOut, SIGNAL (stateChanged(int)), this, SLOT(onPublishOut(int) ) );
- connect(selectOutMedFilebutton, SIGNAL( pressed()), this, SLOT(onSelectOutMedFilebutton()));
- connect(selectMedFileBackgroundbutton, SIGNAL(pressed()), this, SLOT(onSelectMedFileBackgroundbutton()) );
- connect( timeStepGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( timeStepGroupChanged( int ) ) );
- emit updateSelection();
+ myFileInDir = new QString("");
+ myFileOutDir = new QString("");
+ myFileSizeMapDir = new QString("");
+ if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
+ {
+ *myFileInDir = QDir::currentPath();
+ *myFileOutDir = QDir::currentPath();
+ *myFileSizeMapDir = QDir::currentPath();
+ }
+ else
+ {
+ *myFileInDir = SUIT_FileDlg::getLastVisitedPath();
+ *myFileOutDir = SUIT_FileDlg::getLastVisitedPath();
+ *myFileSizeMapDir = SUIT_FileDlg::getLastVisitedPath();
+ }
+
+ meshDim = 0;
+ meshDimBG = 0;
+ // Mesh in
+ aMeshIn = new QGroupBox( tr( "MeshIn" ), this );
+ aMedfile = new QRadioButton( tr( "MEDFile" ), aMeshIn );
+ aBrowser = new QRadioButton( tr( "Browser" ), aMeshIn );
+ aBrowserObject = new QLineEdit( aMeshIn );
+ selectMedFilebutton = new QPushButton("", aMeshIn);
+ selectMedFileLineEdit = new QLineEdit( aMeshIn );
+
+ meshIn = new QGridLayout( aMeshIn );
+
+ meshIn->setMargin( MARGIN );
+ meshIn->setSpacing( SPACING );
+ meshIn->addWidget( aMedfile, 0, 0, 1,1 );
+ meshIn->addWidget( aBrowser, 0, 1,1,1);
+ meshIn->addWidget( aBrowserObject, 0, 2, 1, 1 );
+ meshIn->addWidget( selectMedFilebutton, 1, 0,1, 1);
+ meshIn->addWidget( selectMedFileLineEdit, 1, 1, 1, 1 );
+ hspacer = new QSpacerItem(188, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+ meshInGroup = new QButtonGroup( this );
+ meshInGroup->addButton( aMedfile, 0 );
+ meshInGroup->addButton( aBrowser, 1 );
+
+ //Mesh out
+
+ aMeshOut = new QGroupBox( tr( "MeshOut" ), this );
+ meshName = new QLabel(tr("MeshName"), aMeshOut);
+ secondHspacer = new QSpacerItem(100, 30);
+ meshNameLineEdit = new QLineEdit(aMeshOut) ;
+ medFileCheckBox = new QCheckBox(tr("MEDFile"), aMeshOut);
+ selectOutMedFilebutton = new QPushButton("", aMeshOut);
+ thirdHspacer = new QSpacerItem(188, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+ selectOutMedFileLineEdit = new QLineEdit(aMeshOut) ;
+ publishOut = new QCheckBox(tr("Publish_MG_ADAPT"), aMeshOut);
+
+ meshOut = new QGridLayout( aMeshOut );
+
+ meshOut->setMargin( MARGIN );
+ meshOut->setSpacing( SPACING );
+ meshOut->addWidget( meshName, 0, 0, 1,1 );
+ meshOut->addItem( secondHspacer, 0, 1, 1, 1 );
+ meshOut->addWidget( meshNameLineEdit, 0, 2,1,1);
+ meshOut->addWidget( medFileCheckBox, 1, 0,1,1 );
+ meshOut->addWidget( selectOutMedFilebutton, 1, 1,1,1 );
+ meshOut->addWidget( selectOutMedFileLineEdit, 1, 2,1,1);
+ meshOut->addWidget( publishOut, 2, 0,1,1 );
+
+ //size map definition
+
+ sizeMapDefinition = new QGroupBox(tr("SIZE_MAP_DEF"), this);
+ localButton = new QRadioButton(tr("LOCAL_MG_ADAPT"), sizeMapDefinition);
+ backgroundButton = new QRadioButton(tr("BACKGRND_MG_ADAPT"), sizeMapDefinition);
+ constantButton = new QRadioButton(tr("CNST_MG_ADAPT"), sizeMapDefinition);
+ medFileBackground = new QLabel(tr("MED_FILE_BCKG"), sizeMapDefinition);
+ selectMedFileBackgroundbutton = new QPushButton(tr(""), sizeMapDefinition);
+ selectMedFileBackgroundLineEdit = new QLineEdit(sizeMapDefinition);
+ valueLabel = new QLabel(tr("VALUE_MG_ADAPT"), sizeMapDefinition);
+ dvalue = new QDoubleSpinBox(sizeMapDefinition);
+ sizeMapDefGroup = new QButtonGroup( this );
+ sizeMapDefGroup->addButton( localButton, 0 );
+ sizeMapDefGroup->addButton( backgroundButton, 1 );
+ sizeMapDefGroup->addButton( constantButton, 2 );
+
+ sizeMapDefGroupLayout = new QGridLayout(sizeMapDefinition);
+ sizeMapDefGroupLayout->addWidget(localButton, 0,0);
+ sizeMapDefGroupLayout->addWidget(backgroundButton, 0,1);
+ sizeMapDefGroupLayout->addWidget(constantButton, 0,2);
+ sizeMapDefGroupLayout->addWidget(medFileBackground, 1,0);
+ sizeMapDefGroupLayout->addWidget(selectMedFileBackgroundbutton, 1,1);
+ sizeMapDefGroupLayout->addWidget(selectMedFileBackgroundLineEdit, 1,2);
+ sizeMapDefGroupLayout->addWidget(valueLabel, 2,0);
+ sizeMapDefGroupLayout->addWidget(dvalue, 2,1);
+
+ // size Map field
+ sizeMapField = new QGroupBox(tr("SIZE_MAP_FIELD"), this);
+ fieldName = new QLabel(tr("MG_ADAPT_FIELD_NAME"), sizeMapField);
+ fieldNameCmb = new QComboBox(sizeMapField);
+ noTimeStep = new QRadioButton(tr("MG_ADAPT_NO_T_ST"), sizeMapField);
+ lastTimeStep = new QRadioButton(tr("MG_ADAPT_L_ST"), sizeMapField);
+ chosenTimeStep = new QRadioButton(tr("MG_ADAPT_CH_ST"), sizeMapField);
+ timeStepLabel = new QLabel(tr("MG_ADAPT_TSTP"), sizeMapField);
+ timeStep = new QSpinBox(sizeMapField);
+ timeStep->setMinimum(-1);
+ rankLabel = new QLabel(tr("MG_ADAPT_RANK"), sizeMapField);
+ rankSpinBox = new QSpinBox(sizeMapField);
+ rankSpinBox->setMinimum(-1);
+
+ timeStepGroup = new QButtonGroup(this);
+ timeStepGroup->addButton(noTimeStep, 0);
+ timeStepGroup->addButton(lastTimeStep, 1);
+ timeStepGroup->addButton(chosenTimeStep, 2);
+
+ sizeMapFieldGroupLayout = new QGridLayout(sizeMapField);
+
+ sizeMapFieldGroupLayout->addWidget(fieldName, 0,0);
+ sizeMapFieldGroupLayout->addWidget(fieldNameCmb, 0,1);
+ sizeMapFieldGroupLayout->addWidget(noTimeStep, 1,0);
+ sizeMapFieldGroupLayout->addWidget(lastTimeStep, 1,1);
+ sizeMapFieldGroupLayout->addWidget(chosenTimeStep, 1,2);
+ sizeMapFieldGroupLayout->addWidget(timeStepLabel, 2,0);
+ sizeMapFieldGroupLayout->addWidget(timeStep, 2,1);
+ sizeMapFieldGroupLayout->addWidget(rankLabel, 2,2);
+ sizeMapFieldGroupLayout->addWidget(rankSpinBox, 2,3);
+
+ QGridLayout* argumentsLayout = new QGridLayout( this );
+ argumentsLayout->setMargin( MARGIN );
+ argumentsLayout->setSpacing( SPACING );
+
+ argumentsLayout->addWidget( aMeshIn, 0, 0, 1, 3 );
+ argumentsLayout->addWidget( aMeshOut, 1, 0, 1, 3 );
+ argumentsLayout->addWidget( sizeMapDefinition, 2, 0, 1, 3 );
+ argumentsLayout->addWidget( sizeMapField, 3, 0, 1, 3 );
+ argumentsLayout->setColumnStretch( 1, 5 );
+ argumentsLayout->setRowStretch( 4, 5 );
+
+ // Initial state
+ setMode( Mesh, Local);
+ medFileCheckBox->setChecked(true);
+ visibleTimeStepRankLabel (false);
+
+ // Connections
+ connect( meshInGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( modeChanged( int ) ) );
+ connect( sizeMapDefGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( sizeMapDefChanged( int ) ) );
+ connect( selectMedFilebutton, SIGNAL( pressed( ) ), this, SLOT( onSelectMedFilebuttonClicked( ) ) );
+ connect( medFileCheckBox, SIGNAL (stateChanged(int)), this, SLOT(onMedFileCheckBox(int) ) );
+ connect( publishOut, SIGNAL (stateChanged(int)), this, SLOT(onPublishOut(int) ) );
+ connect( selectOutMedFilebutton, SIGNAL( pressed()), this, SLOT(onSelectOutMedFilebutton()));
+ connect( selectMedFileBackgroundbutton, SIGNAL(pressed()), this, SLOT(onSelectMedFileBackgroundbutton()) );
+ connect( timeStepGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( timeStepGroupChanged( int ) ) );
+ emit updateSelection();