Exemplo n.º 1
0
    def __init__(self, params):
        super(BaseDialog, self).__init__()
        self.params = params
        self.initUi()
        if Piping.HasFlamingoSupport() and not Piping.HasDodoSupport():
            self.labelFlamingoIsDepricated.show()
        else:
            self.labelFlamingoIsDepricated.hide()

        if Piping.HasDodoSupport() or Piping.HasFlamingoSupport():
            self.radioButtonDodoFlamingo.setEnabled(True)
        else:
            self.radioButtonDodoFlamingo.setEnabled(False)
Exemplo n.º 2
0
 def __init__(self, params):
     super(BaseDialog, self).__init__()
     self.params = params
     self.initUi()
     if Piping.HasFlamingoSupport():
         self.radioButtonFlamingo.setEnabled(True)
     else:
         self.radioButtonFlamingo.setEnabled(False)
Exemplo n.º 3
0
    def restoreInput(self):
        settings = QtCore.QSettings(
            BaseDialog.QSETTINGS_APPLICATION, self.params.settingsName)

        output = int(settings.value(
            "radioButtonsOutputType", Piping.OUTPUT_TYPE_SOLID))
        if output == Piping.OUTPUT_TYPE_DODO_OR_FLAMINGO  \
                and (Piping.HasDodoSupport() or Piping.HasFlamingoSupport()):
            self.radioButtonDodoFlamingo.setChecked(True)
        elif output == Piping.OUTPUT_TYPE_PARTS:
            self.radioButtonParts.setChecked(True)
        else:  # Default is solid. output == piping.OUTPUT_TYPE_SOLID
            self.radioButtonSolid.setChecked(True)

        self.selectPartByName(settings.value("LastSelectedPartNumber"))
        self.restoreAdditionalInput(settings)
Exemplo n.º 4
0
 def IsActive(self):
     """Here you can define if the command must be active or not (greyed) if certain conditions
     are met or not. This function is optional."""
     return (Piping.HasDodoSupport() or Piping.HasFlamingoSupport()) \
         and len(Gui.Selection.getSelectionEx()) >= 2 \
         and Modification.all_selected_parts_have_ports()