Пример #1
0
   def temporaryModStyle(self):
      if self.selectedDimStyle is None:
         return
      self.previewDim.eraseDim()

      Form = QadDIMSTYLE_DETAILS_Dialog(self.plugIn, self, self.selectedDimStyle)
      title = QadMsg.translate("DimStyle_Dialog", "Set temporary overrides to dimension style: ") + self.selectedDimStyle.name
      Form.setWindowTitle(title)
      if Form.exec_() == QDialog.Accepted:
         self.selectedDimStyle.set(Form.dimStyle)
         self.init()
         
      self.previewDim.drawDim(self.selectedDimStyle)
Пример #2
0
   def temporaryModStyle(self):
      if self.selectedDimStyle is None:
         return
      self.previewDim.eraseDim()

      Form = QadDIMSTYLE_DETAILS_Dialog(self.plugIn, self.selectedDimStyle)
      title = QadMsg.translate("DimStyle_Dialog", "Modifica locale allo stile corrente: ") + self.selectedDimStyle.name
      Form.setWindowTitle(title)
      if Form.exec_() == QDialog.Accepted:
         self.selectedDimStyle.set(Form.dimStyle)
         self.init()
         
      self.previewDim.drawDim(self.selectedDimStyle)
Пример #3
0
 def modStyle(self):
    if self.selectedDimStyle is None:
       return
    self.previewDim.eraseDim()
    
    Form = QadDIMSTYLE_DETAILS_Dialog(self.plugIn, self, self.selectedDimStyle)
    title = QadMsg.translate("DimStyle_Dialog", "Modify dimension style: ") + self.selectedDimStyle.name
    Form.setWindowTitle(title)
    if Form.exec_() == QDialog.Accepted:
       self.selectedDimStyle.set(Form.dimStyle)
       self.selectedDimStyle.save()
       self.init()
    del Form # forzo la chiamata al distruttore per rimuovere il preview della quota
    
    self.previewDim.drawDim(self.selectedDimStyle)
Пример #4
0
 def ButtonBOX_continue(self):
    if self.newDimStyleName.text() in self.dimNameList:
       QMessageBox.critical(self, QadMsg.translate("QAD", "QAD"), \
                            QadMsg.translate("DimStyle_Dialog", "Nome dello stile di quotatura già esistente. Specificare un altro nome."))
       return False
    self.newDimStyle.name = self.newDimStyleName.text()
    self.newDimStyle.description = self.newDimStyleDescr.text()
    Form = QadDIMSTYLE_DETAILS_Dialog(self.plugIn, self.newDimStyle)
    title = QadMsg.translate("DimStyle_Dialog", "Nuovo stile di quota: ") + self.newDimStyle.name
    Form.setWindowTitle(title)
    
    if Form.exec_() == QDialog.Accepted:
       self.dimStyle = Form.dimStyle
       QDialog.accept(self)
    else:
       self.dimStyle = None
       QDialog.reject(self)      
Пример #5
0
 def ButtonBOX_continue(self):
    if self.newDimStyleName.text() in self.dimNameList:
       QMessageBox.critical(self, QadMsg.translate("QAD", "QAD"), \
                            QadMsg.translate("DimStyle_Dialog", "Dimension style name already existing. Specify a different name."))
       return False
    self.newDimStyle.name = self.newDimStyleName.text()
    self.newDimStyle.description = self.newDimStyleDescr.text()
    Form = QadDIMSTYLE_DETAILS_Dialog(self.plugIn, self.newDimStyle)
    title = QadMsg.translate("DimStyle_Dialog", "New dimension style: ") + self.newDimStyle.name
    Form.setWindowTitle(title)
    
    if Form.exec_() == QDialog.Accepted:
       self.dimStyle = Form.dimStyle
       QDialog.accept(self)
    else:
       self.dimStyle = None
       QDialog.reject(self)      
Пример #6
0
    def ButtonBOX_continue(self):
        if self.newDimStyleName.text() in self.dimNameList:
            QMessageBox.critical(self, QadMsg.translate("QAD", "QAD"), \
                                 QadMsg.translate("DimStyle_Dialog", "Dimension style name already existing. Specify a different name."))
            return False
        self.newDimStyle.name = self.newDimStyleName.text()
        self.newDimStyle.description = self.newDimStyleDescr.text()
        Form = QadDIMSTYLE_DETAILS_Dialog(self.plugIn, self, self.newDimStyle)
        title = QadMsg.translate(
            "DimStyle_Dialog", "New dimension style: ") + self.newDimStyle.name
        Form.setWindowTitle(title)

        if Form.exec_() == QDialog.Accepted:
            self.dimStyle = Form.dimStyle
            QDialog.accept(self)
        else:
            self.dimStyle = None
            QDialog.reject(self)