예제 #1
0
    def __init__(self):
        super(a2p_ConstraintPanel,self).__init__()
        self.resize(200,250)
        cc = a2p_ConstraintCollection(None)
        self.setWidget(cc)
        self.setWindowTitle(translate("A2plus_constraintDialog",'Constraint Tools'))
        #
        mw = FreeCADGui.getMainWindow()
        mw.addDockWidget(QtCore.Qt.RightDockWidgetArea,self)
        #
        self.setFloating(True)
        self.activateWindow()
        self.setAllowedAreas(QtCore.Qt.NoDockWidgetArea)
        self.move(getMoveDistToStoredPosition(self))

        a2plib.setConstraintDialogRef(self)
        #
        self.timer = QtCore.QTimer()
        QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.onTimer)
        self.timer.start(100)
예제 #2
0
 def closeEvent(self,event):
     a2plib.setConstraintDialogRef(None)
     self.deleteLater()
     event.accept()