コード例 #1
0
 def edit_template(self, name: str):
     requirement = self.db.requirement_template[name]
     editor = ConnectionsEditor(self, self.db, requirement)
     result = editor.exec_()
     if result == QtWidgets.QDialog.Accepted:
         self.db.requirement_template[name] = editor.final_requirement
         self.editor_for_template[name].create_visualizer(self.db)
コード例 #2
0
    def _open_edit_connection(self):
        from_node = self.current_node
        target_node = self.current_connection_node

        assert from_node is not None
        assert target_node is not None

        requirement_set = self.current_area.connections[from_node].get(target_node)
        editor = ConnectionsEditor(self, self.resource_database, requirement_set)
        result = editor.exec_()

        if result == QDialog.Accepted:
            self._apply_edit_connections(from_node, target_node, editor.final_requirement_set)