Esempio n. 1
0
 def __init__(self, py_design_document, model):
     PyDesignModelItem.__init__(self, None, model)
     self._data_object = py_design_document
     self._children.append(PyDesignParametersItem(py_design_document.global_parameters, self))
     self._children.append(PyDesignAnalysesItem(py_design_document, self))
     self._children.append(PyDesignReportsItem(py_design_document, self))
     self._type = "PyDesignDocumentModelItem"
 def __init__(self, py_design_line, parent=None):
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_line
     self._data_dict[PyDesignCommon.VALUE] = self.data_value
     self._data_dict[PyDesignNamedObject.NAME] = self.data_value
     self._set_data_dict[PyDesignCommon.VALUE] = self.set_data_value
     if py_design_line is not None:
         self._data_object.add_listener(self)
Esempio n. 3
0
 def __init__(self, py_design_analysis, parent):
     """
     :type py_design_analysis: PyDesignAnalysis
     :param py_design_analysis:
     :param parent:
     :return:
     """
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_analysis
Esempio n. 4
0
 def __init__(self, py_design_document, parent):
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_document
     self._data_dict[PyDesignNamedObject.NAME] = self.data_name
     self._icon = get_icon("reports")
     self._type = "PyDesignReportsModelItem"
     for i in range(0, py_design_document.report_count):
         analysis = py_design_document.get_report(i)
         self._children.append(PyDesignReportItem(self, analysis))
Esempio n. 5
0
 def __init__(self, py_design_mesh, parent):
     """
     :type py_design_mesh: PyDesignMesh
     :param py_design_mesh:
     :param parent:
     :return:
     """
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_mesh
 def __init__(self, py_design_analysis, parent):
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_analysis
     self._data_dict[PyDesignNamedObject.NAME] = self.data_name
     for i in range(0, py_design_analysis.calc_sheet_count):
         calc_sheet = py_design_analysis.calc_sheet(i)
         self._children.append(PyDesignCalcSheetItem(calc_sheet, self._model, self))
     self._icon = get_icon("calcsheet")
     self._data_object.add_listener(self)
     self._context_menu = QMenu()
     add_prop_menu = self._context_menu.addAction("Add calculation sheet")
     add_prop_menu.triggered.connect(self.on_add_sheet)
Esempio n. 7
0
 def __init__(self, py_design_document, parent):
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_document
     self._data_dict[PyDesignNamedObject.NAME] = self.data_name
     self._icon = get_icon("analyses")
     self._type = "PyDesignAnalysesModelItem"
     for i in range(0, py_design_document.analysis_count):
         analysis = py_design_document.get_analysis(i)
         self._children.append(PyDesignAnalysisItem(self, analysis))
     self._data_object.add_listener(self)
     self._context_menu = QMenu()
     add_prop_menu = self._context_menu.addAction("Add analysis")
     add_prop_menu.triggered.connect(self.on_add_analysis)
 def __init__(self, py_design_calc_sheet, model, parent=None):
     PyDesignModelItem.__init__(self, parent, model)
     self._data_object = py_design_calc_sheet
     self._data_dict[PyDesignNamedObject.NAME] = self.data_name
     self._data_dict[PyDesignCommon.VALUE] = self.data_value
     self._data_dict[PyDesignCommon.DESCRIPTION] = self.data_description
     self._set_data_dict[PyDesignNamedObject.NAME] = self.set_data_name
     self._set_data_dict[PyDesignCommon.DESCRIPTION] = self.set_data_description
     self._icon = get_icon("calcsheet")
     for i in range(0, py_design_calc_sheet.line_count):
         line = py_design_calc_sheet.line(i)
         self._children.append(PyDesignLineItem(line, self))
     dummy = PyDesignLineItem(None, self)
     dummy.is_dummy = True
     self._children.append(dummy)
     py_design_calc_sheet.add_listener(self)
Esempio n. 9
0
 def __init__(self, py_design_analysis, parent):
     """
     :type py_design_analysis: PyDesignAnalysis
     :param py_design_analysis:
     :param parent:
     :return:
     """
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_analysis
     self._data_dict[PyDesignNamedObject.NAME] = self.data_name
     self._type = "PyDesignMeshesModelItem"
     for i in range(0, py_design_analysis.mesh_count):
         mesh = py_design_analysis.parameter(i)
         self._children.append(PyDesignMaterialItem(self, mesh))
     self._icon = get_icon("material")
     self._context_menu = QMenu()
     add_prop_menu = self._context_menu.addAction("Add material")
     add_prop_menu.triggered.connect(self.on_add_material)
     self._data_object.add_listener(self)
Esempio n. 10
0
 def __init__(self, py_design_analysis, parent):
     """
     :type py_design_analysis: PyDesignAnalysis
     :type parent: PyDesignModelItem
     :param py_design_analysis: The analysis owning this Solver
     :param parent: parent PyDesignModelItem
     :return:
     """
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_analysis
     self._data_dict[PyDesignNamedObject.NAME] = self.data_name
     self._type = "PyDesignSolversModelItem"
     for i in range(0, py_design_analysis.solver_count):
         mesh = py_design_analysis.solver(i)
         self._children.append(PyDesignSolverItem(self, mesh))
     self._icon = get_icon("solver")
     self._context_menu = QMenu()
     add_prop_menu = self._context_menu.addAction("Add Solver")
     add_prop_menu.triggered.connect(self.on_add_solver)
     self._data_object.add_listener(self)
Esempio n. 11
0
    def __init__(self, parent, py_design_analysis):
        """
        :type py_design_analysis: PyDesignAnalysis
        :param parent:
        :param py_design_analysis:
        :return:
        """
        PyDesignModelItem.__init__(self, parent, parent.model)
        self._data_object = py_design_analysis
        self._data_dict[PyDesignNamedObject.NAME] = self.data_name
        self._data_dict[PyDesignCommon.VALUE] = self.data_value
        '''self._data_dict[PDP.size_temp] = self.data_size_temp
        self._data_dict[PDP.medium_type] = self.data_medium_type
        self._data_dict[PDP.size_pres] = self.data_size_pres'''

        self._set_data_dict[PyDesignNamedObject.NAME] = self.set_data_name
        self._icon = get_icon("analysis")
        py_design_analysis.add_listener(self)
        self._children.append(PyDesignParametersItem(py_design_analysis.properties, self))
        self._children.append(PyDesignCalcSheetsItem(py_design_analysis, self))
        self._children.append(PyDesignGeometriesItem(py_design_analysis, self))
        self._children.append(PyDesignMeshesItem(py_design_analysis, self))
        self._children.append(PyDesignMaterialsItem(py_design_analysis, self))
        self._children.append(PyDesignSolversItem(py_design_analysis, self))
        self._type = "PyDesignAnalysisModelItem"
        self._context_menu = QMenu()
        add_prop_menu = self._context_menu.addAction("Add property")
        add_prop_menu.triggered.connect(self.on_add_property)
        add_prop_menu = self._context_menu.addAction("Add calculation sheet")
        add_prop_menu.triggered.connect(self.on_add_sheet)
        add_prop_menu = self._context_menu.addAction("Add geometry")
        add_prop_menu.triggered.connect(self.on_add_geometry)
        add_prop_menu = self._context_menu.addAction("Add mesh")
        add_prop_menu.triggered.connect(self.on_add_mesh)
        add_prop_menu = self._context_menu.addAction("Add material")
        add_prop_menu.triggered.connect(self.on_add_material)
        add_prop_menu = self._context_menu.addAction("Delete analysis")
        add_prop_menu.triggered.connect(self.on_delete)
Esempio n. 12
0
 def __init__(self, py_design_solver, parent):
     PyDesignModelItem.__init__(self, parent, parent.model)
     self._data_object = py_design_solver
     self._type = "PyDesignSolverModelItem"
Esempio n. 13
0
 def __init__(self, py_design_feature, parent):
     PyDesignModelItem.__init__(self, None, parent.model)