コード例 #1
0
 def createEditor(self, parent, option, index):
     editor = QLineEdit(parent)
     rx = "[\-_A-Za-z0-9]{1," + str(LABEL_LENGTH_MAX) + "}"
     self.regExp = QRegExp(rx)
     v = RegExpValidator(editor, self.regExp)
     editor.setValidator(v)
     return editor
コード例 #2
0
 def createEditor(self, parent, option, index):
     editor = QLineEdit(parent)
     self.old_pname = ""
     #editor.installEventFilter(self)
     rx = "[_a-zA-Z][_A-Za-z0-9]{1," + str(LABEL_LENGTH_MAX-1) + "}"
     self.regExp = QRegExp(rx)
     v = RegExpValidator(editor, self.regExp)
     editor.setValidator(v)
     return editor
コード例 #3
0
 def createEditor(self, parent, option, index):
     editor = QLineEdit(parent)
     self.old_pname = ""
     rx = "[chonslCHONSL()][CHONSLchonsl()0-9]{0," + str(LABEL_LENGTH_MAX -
                                                         1) + "}"
     self.regExp = QRegExp(rx)
     v = RegExpValidator(editor, self.regExp)
     editor.setValidator(v)
     return editor
コード例 #4
0
    def createEditor(self, parent, option, index):
        editor = QLineEdit(parent)
        validator = RegExpValidator(editor, QRegExp("[ -~]*"))
        editor.setValidator(validator)

        # Autocompletion for selection criteria!
        comp_list = GuiLabelManager().getCompleter('mesh_selection')

        completer = QCompleter()
        editor.setCompleter(completer)
        model = QStringListModel()
        completer.setModel(model)
        model.setStringList(comp_list)

        return editor
コード例 #5
0
    def __init__(self, parent, default):
        """
        Constructor
        """
        QDialog.__init__(self, parent)

        Ui_VerifyExistenceLabelDialogForm.__init__(self)
        self.setupUi(self)

        self.setWindowTitle(self.tr("New label"))
        self.default = default
        self.default['list'].remove(self.default['label'])
        self.result = self.default.copy()

        v = RegExpValidator(self.lineEdit, self.default['regexp'])
        self.lineEdit.setValidator(v)

        self.lineEdit.textChanged[str].connect(self.slotLabel)
コード例 #6
0
    def __init__(self, parent, case):
        """
        Constructor
        """
        QWidget.__init__(self, parent)

        Ui_GasCombustionForm.__init__(self)
        self.setupUi(self)

        self.case = case
        self.case.undoStopGlobal()
        self.mdl = GasCombustionModel(self.case)
        self.thermodata = ThermochemistryData(self.case)

        # Model for table View
        self.modelSpecies = StandardItemModelSpecies(self, self.thermodata)
        self.tableViewSpecies.setModel(self.modelSpecies)

        # Delegates
        delegateLabel = NameDelegate(self.tableViewSpecies)
        delegateChemicalFormula = ChemicalFormulaDelegate(
            self.tableViewSpecies)
        delegateCompFuel = ValueDelegate(self.tableViewSpecies)
        delegateCompOxi = ValueDelegate(self.tableViewSpecies)
        delegateCompProd = ValueDelegate(self.tableViewSpecies)
        delegateCoeffAbsorp = ValueDelegate(self.tableViewSpecies)

        self.tableViewSpecies.setItemDelegateForColumn(0, delegateLabel)
        self.tableViewSpecies.setItemDelegateForColumn(
            1, delegateChemicalFormula)
        self.tableViewSpecies.setItemDelegateForColumn(2, delegateCompFuel)
        self.tableViewSpecies.setItemDelegateForColumn(3, delegateCompOxi)
        self.tableViewSpecies.setItemDelegateForColumn(4, delegateCompProd)
        self.tableViewSpecies.setItemDelegateForColumn(5, delegateCoeffAbsorp)

        # tableView
        if QT_API == "PYQT4":
            self.tableViewSpecies.horizontalHeader().setResizeMode(
                QHeaderView.Stretch)
            self.tableViewSpecies.horizontalHeader().setResizeMode(
                0, QHeaderView.ResizeToContents)
            self.tableViewSpecies.horizontalHeader().setResizeMode(
                1, QHeaderView.ResizeToContents)
        elif QT_API == "PYQT5":
            self.tableViewSpecies.horizontalHeader().setSectionResizeMode(
                QHeaderView.Stretch)
            self.tableViewSpecies.horizontalHeader().setSectionResizeMode(
                0, QHeaderView.ResizeToContents)
            self.tableViewSpecies.horizontalHeader().setSectionResizeMode(
                1, QHeaderView.ResizeToContents)

        # Set models and number of elements for combo boxes
        self.modelGasCombustionOption = ComboModel(
            self.comboBoxGasCombustionOption, 1, 1)

        # Combo models to choose the mode to create the Janaf File

        self.userModeForChemicalReaction = ComboModel(self.comboBoxUserChoice,
                                                      2, 1)

        self.userModeForChemicalReaction.addItem("Automatic definition",
                                                 'auto')
        self.userModeForChemicalReaction.addItem("Defined by user", 'user')

        # Connections
        self.comboBoxUserChoice.activated[str].connect(self.slotUserChoice)
        self.comboBoxGasCombustionOption.activated[str].connect(
            self.slotGasCombustionOption)
        self.pushButtonThermochemistryData.pressed.connect(
            self.__slotSearchThermochemistryData)
        self.radioButtonCreateJanafFile.clicked.connect(
            self.slotCreateJanafFile)
        self.lineEditNbPointsTabu.textChanged[str].connect(
            self.slotNbPointsTabu)
        self.lineEditMaximumTemp.textChanged[str].connect(self.slotMaximumTemp)
        self.lineEditMinimumTemp.textChanged[str].connect(self.slotMinimumTemp)
        self.pushButtonAddSpecies.clicked.connect(self.slotAddSpecies)
        self.pushButtonDeleteSpecies.clicked.connect(self.slotDeleteSpecies)
        self.pushButtonGenerateJanafFile.clicked.connect(
            self.slotGenerateJanafFile)
        self.lineEditFuel.textChanged[str].connect(self.slotFuel)
        self.lineEditO2.textChanged[str].connect(self.slotVolPropO2)
        self.lineEditN2.textChanged[str].connect(self.slotVolPropN2)
        self.lineEditCOyield.textChanged[str].connect(self.slotCOyield)
        self.lineEditCSyield.textChanged[str].connect(self.slotCSyield)
        self.modelSpecies.dataChanged.connect(self.dataChanged)

        # Validators
        validatorNbPointsTabu = IntValidator(self.lineEditNbPointsTabu, min=1)
        validatorMaximumTemp = DoubleValidator(self.lineEditMaximumTemp,
                                               min=273.0)
        validatorMinimumTemp = DoubleValidator(self.lineEditMinimumTemp,
                                               min=273.0)
        rx = "[chonlCHONL()][CHONLchonl()0-9]{0," + str(LABEL_LENGTH_MAX -
                                                        1) + "}"
        validatorFuel = RegExpValidator(self.lineEditFuel, QRegExp(rx))
        validatorO2 = DoubleValidator(self.lineEditO2, min=1e-12, max=1.0)
        validatorN2 = DoubleValidator(self.lineEditN2, min=0.0, max=1.0)
        validatorCOyield = DoubleValidator(self.lineEditCOyield, min=0.0)
        validatorCSyield = DoubleValidator(self.lineEditCSyield, min=0.0)

        self.lineEditNbPointsTabu.setValidator(validatorNbPointsTabu)
        self.lineEditMaximumTemp.setValidator(validatorMaximumTemp)
        self.lineEditMinimumTemp.setValidator(validatorMinimumTemp)
        self.lineEditFuel.setValidator(validatorFuel)
        self.lineEditO2.setValidator(validatorO2)
        self.lineEditN2.setValidator(validatorN2)
        self.lineEditCOyield.setValidator(validatorCOyield)
        self.lineEditCSyield.setValidator(validatorCSyield)

        NbPointsTabu = self.thermodata.getNbPointsTabu()
        MaximumTemp = self.thermodata.getMaximumTemp()
        MinimumTemp = self.thermodata.getMinimumTemp()
        Option_UserMode = self.thermodata.getUserModeForChemicalReaction()
        ChemicalFormulaFuel = self.thermodata.getChemicalFormulaFuel()
        VolPropO2 = self.thermodata.getVolPropO2()
        VolPropN2 = self.thermodata.getVolPropN2()
        COyield = self.thermodata.getCOyield()
        CSyield = self.thermodata.getCSyield()

        self.lineEditNbPointsTabu.setText(str(NbPointsTabu))
        self.lineEditMaximumTemp.setText(str(MaximumTemp))
        self.lineEditMinimumTemp.setText(str(MinimumTemp))
        self.lineEditFuel.setText(str(ChemicalFormulaFuel))
        self.lineEditO2.setText(str(VolPropO2))
        self.lineEditN2.setText(str(VolPropN2))
        self.lineEditCOyield.setText(str(COyield))
        self.lineEditCSyield.setText(str(CSyield))

        # Initialize Widgets

        self.tableViewSpecies.reset()
        self.modelSpecies = StandardItemModelSpecies(self, self.thermodata)
        self.tableViewSpecies.setModel(self.modelSpecies)

        model = self.mdl.getGasCombustionModel()

        if model == 'd3p':
            self.modelGasCombustionOption.addItem(self.tr("adiabatic model"),
                                                  "adiabatic")
            self.modelGasCombustionOption.addItem(
                self.tr("non adiabatic model"), "extended")
        elif model == 'ebu':
            self.modelGasCombustionOption.addItem(
                self.tr("reference Spalding model"), "spalding")
            self.modelGasCombustionOption.addItem(
                self.tr("extended model with enthalpy source term"),
                "enthalpy_st")
            self.modelGasCombustionOption.addItem(
                self.tr("extended model with mixture fraction transport"),
                "mixture_st")
            self.modelGasCombustionOption.addItem(
                self.
                tr("extended model with enthalpy and mixture fraction transport"
                   ), "enthalpy_mixture_st")
        elif model == 'lwp':
            self.modelGasCombustionOption.addItem(
                self.tr("reference two-peak model with adiabatic condition"),
                "2-peak_adiabatic")
            self.modelGasCombustionOption.addItem(
                self.tr("reference two-peak model with enthalpy source term"),
                "2-peak_enthalpy")
            self.modelGasCombustionOption.addItem(
                self.tr("reference three-peak model with adiabatic condition"),
                "3-peak_adiabatic")
            self.modelGasCombustionOption.addItem(
                self.tr(
                    "reference three-peak model with enthalpy source term"),
                "3-peak_enthalpy")
            self.modelGasCombustionOption.addItem(
                self.tr("reference four-peak model with adiabatic condition"),
                "4-peak_adiabatic")
            self.modelGasCombustionOption.addItem(
                self.tr("reference four-peak model with enthalpy source term"),
                "4-peak_enthalpy")

        option = self.mdl.getGasCombustionOption()
        self.modelGasCombustionOption.setItem(str_model=option)

        name = self.mdl.getThermoChemistryDataFileName()
        if name != None and name != "":
            self.labelThermochemistryFile.setText(str(name))
            self.pushButtonThermochemistryData.setStyleSheet(
                "background-color: green")
        else:
            self.pushButtonThermochemistryData.setStyleSheet(
                "background-color: red")

        self.radioButtonCreateJanafFile.hide()

        if self.thermodata.getCreateThermoDataFile() == 'on':
            self.radioButtonCreateJanafFile.setChecked(True)
            self.userModeForChemicalReaction.setItem(str_model=Option_UserMode)
            for label in self.thermodata.getSpeciesNamesList():
                self.modelSpecies.newItem(label)
        else:
            self.radioButtonCreateJanafFile.setChecked(False)

        # for the moment the option to create Janaf file in the GUI is only available with d3p
        if model == 'd3p':
            self.radioButtonCreateJanafFile.show()
            self.groupBoxTabulation.show()
            self.groupBoxChemicalReaction.show()
            self.groupBoxDefinedByUser.show()
            self.groupBoxGenerateDataFile.show()
            self.groupBoxAutomatic.show()

        self.slotCreateJanafFile()

        self.case.undoStartGlobal()
コード例 #7
0
    def __init__(self, parent, case):
        """
        Constructor
        """
        QWidget.__init__(self, parent)

        Ui_BatchRunningDialogForm.__init__(self)
        self.setupUi(self)

        self.case = case
        self.parent = parent

        case_is_saved = not self.case.isModified()

        title = self.tr("Run computation")
        self.setWindowTitle(title)

        self.case.undoStopGlobal()

        self.mdl = ScriptRunningModel(self.case)
        self.jmdl = self.case['job_model']
        self.batch_help = None

        if self.jmdl is None:
            if self.case['data_path']:
                run_conf_path = os.path.join(self.case['data_path'], 'run.cfg')
            else:
                run_conf_path = None
            self.jmdl = BatchRunningModel(path=run_conf_path,
                                          pkg=self.case['package'])

        self.jmdl.load()

        # Remark: if the view was closed without settings being applied,
        # the job model batch dictionnary may have beed updated for display
        # purposes but not have been applied to the job header lines.
        # The batch object (and its dictionnary) could be moved from the
        # job model to the current object.

        if self.jmdl.job_header_lines != None:
            self.jmdl.batch.parse_lines(self.jmdl.job_header_lines)
            self.job_header_lines = self.jmdl.job_header_lines.copy()
        else:
            self.job_header_lines = None

        self.run_dict = {}
        for k in self.jmdl.run_dict:
            self.run_dict[k] = self.jmdl.run_dict[k]
        self.job_dict = {}
        for k in self.jmdl.job_dict:
            self.job_dict[k] = self.jmdl.job_dict[k]

        self.have_mpi = self.jmdl.have_mpi
        self.have_openmp = self.jmdl.have_openmp

        # Batch info

        self.hideBatchInfo()

        self.labelNProcs.hide()
        self.spinBoxNProcs.hide()

        self.labelNThreads.hide()
        self.spinBoxNThreads.hide()

        compute_build_id = -1
        if self.jmdl.compute_builds:
            compute_build = self.run_dict['compute_build']
            if compute_build in self.jmdl.compute_builds:
                compute_build_id = self.jmdl.compute_builds.index(
                    compute_build)
            else:
                compute_build_id = 0
                self.run_dict['compute_build'] = self.jmdl.compute_builds[0]
        if compute_build_id < 0:
            self.labelBuildType.hide()
            self.comboBoxBuildType.hide()
        else:
            self.comboBoxBuildType.currentIndexChanged[int].connect(
                self.slotBuildType)
            for b in self.jmdl.compute_builds:
                build_type_label = os.path.basename(b)
                if not build_type_label:
                    build_type_label = "[default]"
                self.comboBoxBuildType.addItem(self.tr(build_type_label),
                                               build_type_label)
            self.comboBoxBuildType.setCurrentIndex(compute_build_id)

        self.class_list = None

        self.__updateRunButton__(case_is_saved)

        if self.jmdl.batch.rm_type != None:
            validatorSimpleName = RegExpValidator(self.lineEditJobName,
                                                  QRegExp("[_A-Za-z0-9]*"))
            validatorAccountName = RegExpValidator(self.lineEditJobAccount,
                                                   QRegExp("\\S+"))
            self.lineEditJobName.setValidator(validatorSimpleName)
            self.lineEditJobAccount.setValidator(validatorAccountName)
            self.lineEditJobWCKey.setValidator(validatorAccountName)

        validatorRunId = RegExpValidator(self.lineEditRunId,
                                         QRegExp("[_A-Za-z0-9]*"))
        self.lineEditRunId.setValidator(validatorRunId)

        # Connections

        if self.jmdl.batch.rm_type != None:
            self.lineEditJobName.textChanged[str].connect(self.slotJobName)
            self.spinBoxNodes.valueChanged[int].connect(self.slotJobNodes)
            self.spinBoxPpn.valueChanged[int].connect(self.slotJobPpn)
            self.spinBoxProcs.valueChanged[int].connect(self.slotJobProcs)
            self.spinBoxThreads.valueChanged[int].connect(self.slotJobThreads)
            self.spinBoxDays.valueChanged[int].connect(self.slotJobWallTime)
            self.spinBoxHours.valueChanged[int].connect(self.slotJobWallTime)
            self.spinBoxMinutes.valueChanged[int].connect(self.slotJobWallTime)
            self.spinBoxSeconds.valueChanged[int].connect(self.slotJobWallTime)
            self.comboBoxClass.activated[str].connect(self.slotClass)
            self.lineEditJobAccount.textChanged[str].connect(
                self.slotJobAccount)
            self.lineEditJobWCKey.textChanged[str].connect(self.slotJobWCKey)

        else:
            self.spinBoxNProcs.valueChanged[int].connect(self.slotNProcs)
            self.spinBoxNThreads.valueChanged[int].connect(self.slotNThreads)

        self.pushButtonCancel.clicked.connect(self.slotCancel)
        self.pushButtonApply.clicked.connect(self.slotApply)
        self.pushButtonRunSubmit.clicked.connect(self.slotBatchRunning)

        self.lineEditRunId.textChanged[str].connect(self.slotJobRunId)
        self.lineEdit_tool.textChanged[str].connect(self.slotDebug)
        self.toolButton_2.clicked.connect(self.slotDebugHelp)

        self.checkBoxInitOnly.stateChanged.connect(self.slotInitOnly)

        self.checkBoxTrace.stateChanged.connect(self.slotTrace)
        self.checkBoxLogParallel.stateChanged.connect(self.slotLogParallel)

        self.tabWidgetJob.setHidden(True)
        self.haveAdvparam = False

        self.pushButtonAdvparam.setCheckable(True)
        self.pushButtonAdvparam.pressed.connect(self.switchBox)

        if not self.case['data_path']:
            self.pushButtonRunSubmit.setEnabled(False)

        # initialize Widgets

        if self.jmdl.batch.rm_type != None:
            self.displayBatchInfo()

        run_id = str(self.run_dict['id'])

        if run_id != 'None':
            self.lineEditRunId.setText(run_id)
        else:
            self.lineEditRunId.setText("")

        # Advanced options

        self.debug = self.job_dict['debug_args']
        if self.debug is not None:
            self.lineEdit_tool.setText(str(self.debug))

        self.trace_iter = self.mdl.getTrace()
        self.log_parallel = self.mdl.getLogParallel()

        if self.trace_iter:
            self.checkBoxTrace.setChecked(True)
        if self.log_parallel:
            self.checkBoxLogParallel.setChecked(True)

        self.checkBoxInitOnly.setChecked(self.run_dict['initialize'] == True)

        # Script info is based on the XML model

        self.displayScriptInfo()

        # self.resize(self.minimumSizeHint())

        self.case.undoStartGlobal()
コード例 #8
0
 def createEditor(self, parent, option, index):
     editor = QLineEdit(parent)
     validator = RegExpValidator(editor, QRegExp("[ -~]*"))
     editor.setValidator(validator)
     return editor
コード例 #9
0
 def createEditor(self, parent, option, index):
     editor = QLineEdit(parent)
     vd = RegExpValidator(editor, QRegExp("[0-9- ]*"))
     editor.setValidator(vd)
     editor.installEventFilter(self)
     return editor
コード例 #10
0
    def __init__(self, parent, case):
        """
        Constructor
        """
        QWidget.__init__(self, parent)

        Ui_PerformanceTuningForm.__init__(self)
        self.setupUi(self)
        self.case = case
        self.case.undoStopGlobal()

        self.mdl = PerformanceTuningModel(self.case)

        # Combo models and items

        self.modelPartType = ComboModel(self.comboBox_PartType, 4, 1)
        self.modelPartOut = ComboModel(self.comboBox_PartOutput, 3, 1)

        self.modelPartType.addItem(self.tr("Default"), 'default')
        self.modelPartType.addItem(self.tr("PT-SCOTCH / SCOTCH"), 'scotch')
        self.modelPartType.addItem(self.tr("ParMETIS / METIS"), 'metis')
        self.modelPartType.addItem(self.tr("Morton curve (bounding box)"),
                                   'morton sfc')
        self.modelPartType.addItem(self.tr("Morton curve (bounding cube)"),
                                   'morton sfc cube')
        self.modelPartType.addItem(self.tr("Hilbert curve (bounding box)"),
                                   'hilbert sfc')
        self.modelPartType.addItem(self.tr("Hilbert curve (bounding cube)"),
                                   'hilbert sfc cube')
        self.modelPartType.addItem(self.tr("Block (unoptimized)"), 'block')

        try:
            cfg = case.case['package'].config
            if cfg.libs['scotch'].have == False:
                self.comboBox_PartType.setItemData(1, QColor(Qt.red),
                                                   Qt.TextColorRole)
            if cfg.libs['metis'].have == False:
                self.comboBox_PartType.setItemData(2, QColor(Qt.red),
                                                   Qt.TextColorRole)
        except Exception:  # if case/package not available (should not happen)
            print("Warning: package configuration not available")
            pass

        self.modelPartOut.addItem(self.tr("No"), 'no')
        self.modelPartOut.addItem(self.tr("For graph-based partitioning"),
                                  'default')
        self.modelPartOut.addItem(self.tr("Yes"), 'yes')

        self.modelBlockIORead = ComboModel(self.comboBox_IORead, 6, 1)
        self.modelBlockIOWrite = ComboModel(self.comboBox_IOWrite, 4, 1)

        self.modelBlockIORead.addItem(self.tr("Default"), 'default')
        self.modelBlockIORead.addItem(self.tr("Standard I/O, serial"),
                                      'stdio serial')
        self.modelBlockIORead.addItem(self.tr("Standard I/O, parallel"),
                                      'stdio parallel')
        self.modelBlockIORead.addItem(self.tr("MPI I/O, independent"),
                                      'mpi independent')
        self.modelBlockIORead.addItem(self.tr("MPI I/O, non-collective"),
                                      'mpi noncollective')
        self.modelBlockIORead.addItem(self.tr("MPI I/O, collective"),
                                      'mpi collective')

        self.modelBlockIOWrite.addItem(self.tr("Default"), 'default')
        self.modelBlockIOWrite.addItem(self.tr("Standard I/O, serial"),
                                       'stdio serial')
        self.modelBlockIOWrite.addItem(self.tr("MPI I/O, non-collective"),
                                       'mpi noncollective')
        self.modelBlockIOWrite.addItem(self.tr("MPI I/O, collective"),
                                       'mpi collective')

        self.modelAllToAll = ComboModel(self.comboBox_AllToAll, 2, 1)

        self.modelAllToAll.addItem(
            self.tr("Default (MPI_Alltoall/MPI_Alltoallv)"), 'default')
        self.modelAllToAll.addItem(self.tr("Crystal Router"), 'crystal router')

        # Validators

        partListVd = RegExpValidator(self.lineEdit_PartList,
                                     QRegExp("[0-9- ]*"))
        self.lineEdit_PartList.setValidator(partListVd)

        # Connections

        self.radioButtonYes.clicked.connect(self.slotPartition)
        self.radioButtonNo.clicked.connect(self.slotPartition)
        self.toolButton_PartInputDir.pressed.connect(
            self.slotSearchPartInputDirectory)
        self.comboBox_PartOutput.activated[str].connect(self.slotPartOut)

        self.comboBox_PartType.activated[str].connect(self.slotPartType)
        self.lineEdit_PartList.textChanged[str].connect(self.slotPartitionList)
        self.spinBoxRankStep.valueChanged[int].connect(self.slotRankStep)

        self.checkBox_IgnorePerio.clicked[bool].connect(self.slotIgnorePerio)

        self.comboBox_IORead.activated[str].connect(self.slotBlockIOReadMethod)
        self.comboBox_IOWrite.activated[str].connect(
            self.slotBlockIOWriteMethod)

        self.spinBoxIORankStep.valueChanged[int].connect(
            self.slotBlockIORankStep)
        self.spinBoxIOMinBlockSize.valueChanged[int].connect(
            self.slotBlockIOMinSize)

        self.comboBox_AllToAll.activated[str].connect(self.slotAllToAll)

        self.tabWidget.currentChanged[int].connect(self.slotchanged)

        # Widget initialization

        self.partinput_path = self.mdl.getPartitionInputPath()

        if self.partinput_path:
            if not os.path.isdir(
                    os.path.join(self.case['case_path'], self.partinput_path)):
                title = self.tr("WARNING")
                msg = self.tr("Invalid path in %s!" % self.partinput_path)
                QMessageBox.warning(self, title, msg)

            self.radioButtonYes.setChecked(True)
            self.radioButtonNo.setChecked(False)
コード例 #11
0
class ProfilesView(QWidget, Ui_ProfilesForm):
    """
    """
    def __init__(self, parent, case, stbar):
        """
        Constructor
        """
        QWidget.__init__(self, parent)

        Ui_ProfilesForm.__init__(self)
        self.setupUi(self)

        self.case = case
        self.case.undoStopGlobal()
        self.mdl = ProfilesModel(self.case)
        self.notebook = NotebookModel(self.case)

        #  Initialize variables concerning the display of the Hlist

        self.entriesNumber = 0

        # Models
        self.modelProfile = StandardItemModelProfile()
        self.treeViewProfile.setModel(self.modelProfile)
        self.treeViewProfile.resizeColumnToContents(0)

        # QListView layout
        self.gridlayout1 = QGridLayout(self.widgetDrag)
        self.gridlayout1.setContentsMargins(0, 0, 0, 0)
        self.DragList = QListView(self.widgetDrag)
        self.gridlayout1.addWidget(self.DragList, 0, 0, 1, 1)

        self.gridlayout2 = QGridLayout(self.widgetDrop)
        self.gridlayout2.setContentsMargins(0, 0, 0, 0)
        self.DropList = QListView(self.widgetDrop)
        self.gridlayout2.addWidget(self.DropList, 0, 0, 1, 1)

        self.modelDrag = QStringListModel()
        self.modelDrop = QStringListModel()
        self.DragList.setModel(self.modelDrag)
        self.DropList.setModel(self.modelDrop)
        self.DragList.setAlternatingRowColors(True)
        self.DragList.setEditTriggers(QAbstractItemView.NoEditTriggers)
        self.DropList.setAlternatingRowColors(True)
        self.DropList.setEditTriggers(QAbstractItemView.NoEditTriggers)

        # Combo items
        self.modelFreq = ComboModel(self.comboBoxFreq, 3, 1)
        self.modelFreq.addItem(self.tr("at the end of the calculation"), "end")
        self.modelFreq.addItem(self.tr("at each 'n' time steps"), "frequency")
        self.modelFreq.addItem(self.tr("Output every 'x' seconds"),
                               'time_value')

        self.modelFormat = ComboModel(self.comboBoxFormat, 2, 1)
        self.modelFormat.addItem(self.tr(".dat"), "DAT")
        self.modelFormat.addItem(self.tr(".csv"), "CSV")

        # Connections
        self.treeViewProfile.pressed[QModelIndex].connect(
            self.slotSelectProfile)
        self.pushButtonAdd.clicked.connect(self.slotAddProfile)
        self.pushButtonDelete.clicked.connect(self.slotDeleteProfile)
        self.pushButtonAddVar.clicked.connect(self.slotAddVarProfile)
        self.pushButtonSuppressVar.clicked.connect(self.slotDeleteVarProfile)
        self.comboBoxFreq.activated[str].connect(self.slotFrequencyType)
        self.comboBoxFormat.activated[str].connect(self.slotFormatType)
        self.pushButtonFormula.clicked.connect(self.slotFormula)
        self.lineEditBaseName.textChanged[str].connect(self.slotBaseName)
        self.lineEditFreq.textChanged[str].connect(self.slotFrequence)
        self.lineEditFreqTime.textChanged[str].connect(self.slotFrequenceTime)
        self.lineEditNbPoint.textChanged[str].connect(self.slotNbPoint)

        self.checkBoxSnapToCenter.clicked.connect(self.slotSnapToCenter)
        self.checkBoxActivateInterpolation.clicked.connect(
            self.slotActivateInterpolation)

        # Validators
        validatorFreq = IntValidator(self.lineEditFreq, min=0)
        validatorFreq.setExclusiveMin(True)
        self.lineEditFreq.setValidator(validatorFreq)

        validatorFreqT = DoubleValidator(self.lineEditFreqTime, min=0.)
        validatorFreqT.setExclusiveMin(True)
        self.lineEditFreqTime.setValidator(validatorFreqT)

        validatorNbPoint = IntValidator(self.lineEditNbPoint, min=0)
        self.lineEditNbPoint.setValidator(validatorNbPoint)

        rx = "[\-_A-Za-z0-9]{1," + str(LABEL_LENGTH_MAX) + "}"
        validatorBaseName = RegExpValidator(self.lineEditBaseName, QRegExp(rx))
        self.lineEditBaseName.setValidator(validatorBaseName)

        #update list of variables, properties, scalars ...
        liste_label = []
        for label in self.mdl.getVariablesAndVolumeProperties():
            liste_label.append(label)
        self.modelDrag.setStringList(sorted(liste_label, key=str.lower))

        #update list of profiles for view from xml file
        for lab in self.mdl.getProfilesLabelsList():
            self.entriesNumber = self.entriesNumber + 1
            label, fmt, lst, choice, freq, formula, nb_point = self.mdl.getProfileData(
                lab)
            self.__insertProfile(label, lst)

        self.__eraseEntries()

        self.case.undoStartGlobal()