示例#1
0
    def setEdit(self, vobj, mode):
        """Method called when the document requests the object to enter edit mode.

        Edit mode is entered when a user double clicks on an object in the tree
        view, or when they use the menu option [Edit -> Toggle Edit Mode].

        Just display the standard Arch component task panel.

        Parameters
        ----------
        mode: int or str
            The edit mode the document has requested. Set to 0 when requested via
            a double click or [Edit -> Toggle Edit Mode].

        Returns
        -------
        bool
            If edit mode was entered.
        """

        if (mode == 0) and hasattr(self, "Object"):
            import ArchComponent
            taskd = ArchComponent.ComponentTaskPanel()
            taskd.obj = self.Object
            taskd.update()
            FreeCADGui.Control.showDialog(taskd)
            return True
        return False
示例#2
0
 def setEdit(self, vobj, mode):
     if mode == 0:
         import ArchComponent
         taskd = ArchComponent.ComponentTaskPanel()
         taskd.obj = self.Object
         taskd.update()
         FreeCADGui.Control.showDialog(taskd)
         return True
     return False
示例#3
0
    def editProperties(self):

        sel = self.form.tree.selectedIndexes()
        if len(sel) <= 3:
            obj = FreeCAD.ActiveDocument.getObject(
                self.model.itemFromIndex(sel[0]).toolTip())
            if obj:
                import ArchComponent
                p = ArchComponent.ComponentTaskPanel()
                p.obj = obj
                p.editIfcProperties()
示例#4
0
 def setEdit(self, vobj, mode=0):
     if vobj.Object.Base.Shape.Solids:
         taskd = ArchComponent.ComponentTaskPanel()
         taskd.obj = self.Object
         taskd.update()
         FreeCADGui.Control.showDialog(taskd)
     else:
         taskd = _RoofTaskPanel()
         taskd.obj = self.Object
         taskd.update()
         FreeCADGui.Control.showDialog(taskd)
     return True
示例#5
0
 def setEdit(self, vobj, mode):
     if mode == 0:
         import FreeCADGui
         taskd = ArchComponent.ComponentTaskPanel()
         taskd.obj = self.Object
         taskd.update()
         if self.Object.Role == "Column":
             self.dentd = _DentsTaskPanel()
             self.dentd.form.show()
             self.dentd.fillDents(self.Object.Dents)
             taskd.form = [taskd.form, self.dentd.form]
         FreeCADGui.Control.showDialog(taskd)
         return True
     return False