Exemplo n.º 1
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V,
                dialogTitle='Add Angular Dimension',
                dialogIconPath=':/dd/icons/angularDimension.svg',
                endFunction=self.Activated)
     selectionOverlay.generateSelectionGraphicsItems(
         dimensionableObjects(V.page),
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doLines=True,
         maskPen=line_maskPen,
         maskHoverPen=line_maskHoverPen,
         maskBrush=line_maskBrush)
     selectionOverlay.generateSelectionGraphicsItems(
         dimensionableObjects(V.page),
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doPoints=True,
         maskPen=point_maskPen,
         maskHoverPen=point_maskHoverPen,
         maskBrush=point_maskBrush,  #clear
         clearPreviousSelectionItems=False,
     )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
         V.graphicsScene, V.graphicsView, V.width, V.height)
Exemplo n.º 2
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Angular Dimension', dialogIconPath=':/dd/icons/angularDimension.svg', endFunction=self.Activated )
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ), 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doLines=True,
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ),
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, 
         maskPen= point_maskPen, 
         maskHoverPen= point_maskHoverPen, 
         maskBrush = point_maskBrush, #clear
         clearPreviousSelectionItems = False,
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V,
                dialogTitle='Add Angular Dimension',
                dialogIconPath=os.path.join(iconPath,
                                            'angularDimension.svg'),
                endFunction=self.Activated)
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doLines=True,
         maskPen=line_maskPen,
         maskHoverPen=line_maskHoverPen,
         maskBrush=line_maskBrush)
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doPoints=True,
         maskPen=point_maskPen,
         maskHoverPen=point_maskHoverPen,
         maskBrush=point_maskBrush,  #clear
         clearPreviousSelectionItems=False,
     )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
         V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(V, [
         'strokeWidth', 'arrowL1', 'arrowL2', 'arrowW', 'gap_datum_points',
         'dimension_line_overshoot'
     ], ['lineColor'], ['textRenderer'])
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doLines=True,
         maskPen=line_maskPen,
         maskHoverPen=line_maskHoverPen,
         maskBrush=line_maskBrush)
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doPoints=True,
         maskPen=point_maskPen,
         maskHoverPen=point_maskHoverPen,
         maskBrush=point_maskBrush,  #clear
         clearPreviousSelectionItems=False,
     )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
         V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Angular Dimension', dialogIconPath=os.path.join( iconPath , 'angularDimension.svg' ), endFunction=self.Activated )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doLines=True,
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, 
         maskPen= point_maskPen, 
         maskHoverPen= point_maskHoverPen, 
         maskBrush = point_maskBrush, #clear
         clearPreviousSelectionItems = False,
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(V, ['strokeWidth','arrowL1','arrowL2','arrowW','gap_datum_points', 'dimension_line_overshoot'], ['lineColor'], ['textRenderer'] )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doLines=True,
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, 
         maskPen= point_maskPen, 
         maskHoverPen= point_maskHoverPen, 
         maskBrush = point_maskBrush, #clear
         clearPreviousSelectionItems = False,
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V,
                dialogTitle='Add Welding Note',
                dialogIconPath=self.generateIcon(),
                endFunction=self.Activated)
     d.proxy_svgFun = Command_svg_fun_wrapper(self)
     from grabPointAdd import Proxy_grabPoint
     selectionOverlay.generateSelectionGraphicsItems(
         dimensionableObjects(V.page) + [
             obj for obj in V.page.Group if hasattr(obj, 'Proxy')
             and isinstance(obj.Proxy, Proxy_grabPoint)
         ],
         self.selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doPoints=True,
         doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=maskBrush  #clear
     )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
         V.graphicsScene, V.graphicsView, V.width, V.height)
Exemplo n.º 8
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Center Lines', dialogIconPath=os.path.join( iconPath , 'centerLine.svg' ), endFunction=self.Activated )
     d.SVGFun = centerLineSVG
     maskBrush  =   QtGui.QBrush( QtGui.QColor(0,160,0,100) )
     maskPen =      QtGui.QPen( QtGui.QColor(0,160,0,100) )
     maskPen.setWidth(0.0)
     maskHoverPen = QtGui.QPen( QtGui.QColor(0,255,0,255) )
     maskHoverPen.setWidth(0.0)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')], 
         selectFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')],
         clearPreviousSelectionItems = False,
         doLines=True, 
         onClickFun=selectFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Center Lines', dialogIconPath=':/dd/icons/centerLine.svg', endFunction=self.Activated )
     d.SVGFun = centerLineSVG
     d.ProxyClass = Proxy_CenterLines
     d.proxy_svgFun = centerLineSVG
     maskBrush  =   QtGui.QBrush( QtGui.QColor(0,160,0,100) )
     maskPen =      QtGui.QPen( QtGui.QColor(0,160,0,100) )
     maskPen.setWidth(0.0)
     maskHoverPen = QtGui.QPen( QtGui.QColor(0,255,0,255) )
     maskHoverPen.setWidth(0.0)
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ), 
         selectFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ),
         clearPreviousSelectionItems = False,
         doLines=True, 
         onClickFun=selectFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(V)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doLines=True,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = QtGui.QBrush() #clear
         )
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(V)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectDimensioningPoint ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
Exemplo n.º 12
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, 'Add Radial Dimension', dialogIconPath=':/dd/icons/radiusDimension.svg', endFunction=self.Activated)
     selectionOverlay.generateSelectionGraphicsItems(
         dimensionableObjects( V.page ),
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene,
         doCircles=True, doFittedCircles=True,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush = QtGui.QBrush() #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, 'Add Radial Dimension', dialogIconPath=os.path.join( iconPath , 'radiusDimension.svg' ), endFunction=self.Activated)
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')],
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene,
         doCircles=True, doFittedCircles=True,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush = QtGui.QBrush() #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
Exemplo n.º 14
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Delete Dimension', dialogIconPath=':/dd/icons/deleteDimension.svg' , endFunction=self.Activated, grid=False)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if hasattr(obj,'Proxy') and isinstance(obj.Proxy, Proxy_DimensionObject_prototype)], 
         doSelectViewObjectPoints = True, 
         onClickFun=deleteDimension,
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Delete Dimension', dialogIconPath=':/dd/icons/deleteDimension.svg' , endFunction=self.Activated, grid=False)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if hasattr(obj,'Proxy') and isinstance(obj.Proxy, Proxy_DimensionObject_prototype)], 
         doSelectViewObjectPoints = True, 
         onClickFun=deleteDimension,
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Welding Note', dialogIconPath=self.generateIcon(), endFunction=self.Activated )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')], 
         self.selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(V, ['strokeWidth','arrowL1','arrowL2','arrowW'], ['lineColor'], ['textRenderer'] )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')], 
         self.selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Welding Note', dialogIconPath=self.generateIcon(), endFunction=self.Activated )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')], 
         self.selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     crudeDebuggerPrint('''angularDimension.py:49  	        V = getDrawingPageGUIVars() ''')
     V = getDrawingPageGUIVars()
     crudeDebuggerPrint('''angularDimension.py:50  	        dimensioning.activate(V) ''')
     dimensioning.activate(V)
     crudeDebuggerPrint('''angularDimension.py:51  	        selectionOverlay.generateSelectionGraphicsItems( ''')
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doLines=True,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = QtGui.QBrush() #clear
         )
Exemplo n.º 20
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Note Circle', dialogIconPath=':/dd/icons/noteCircle.svg', endFunction=self.Activated )
     from grabPointAdd import  Proxy_grabPoint
     selectionOverlay.generateSelectionGraphicsItems(
         dimensionableObjects( V.page ) + [obj for obj in V.page.Group if hasattr(obj,'Proxy') and isinstance( obj.Proxy, Proxy_grabPoint) ],
         selectFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene,
         doPoints=True, doMidPoints=True, doSelectViewObjectPoints = True, 
         pointWid=1.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush = maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(V, ['strokeWidth','centerPointDia'], ['lineColor'], ['textRenderer'])
     #dimensioning.SVGFun = noteCircleSVG
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')],
         selectFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene,
         doPoints=True, doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush = maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
Exemplo n.º 22
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Note Circle', dialogIconPath=':/dd/icons/noteCircle.svg', endFunction=self.Activated )
     from grabPointAdd import  Proxy_grabPoint
     selectionOverlay.generateSelectionGraphicsItems(
         dimensionableObjects( V.page ) + [obj for obj in V.page.Group if hasattr(obj,'Proxy') and isinstance( obj.Proxy, Proxy_grabPoint) ],
         selectFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene,
         doPoints=True, doMidPoints=True, doSelectViewObjectPoints = True, 
         pointWid=1.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush = maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Welding Note', dialogIconPath=self.generateIcon(), endFunction=self.Activated )
     d.proxy_svgFun = Command_svg_fun_wrapper(self)
     from grabPointAdd import  Proxy_grabPoint
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ) + [obj for obj in V.page.Group if hasattr(obj,'Proxy') and isinstance( obj.Proxy, Proxy_grabPoint) ],
         self.selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doPoints=True, doMidPoints=True,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = self.Activated_common()
     dimensioning.SVGFun = centerLinesSVG
     maskPen =      QtGui.QPen( QtGui.QColor(0,255,0,100) )
     maskPen.setWidth(2.0)
     maskHoverPen = QtGui.QPen( QtGui.QColor(0,255,0,255) )
     maskHoverPen.setWidth(2.0)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doCircles=True, doFittedCircles=True, 
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = QtGui.QBrush() #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(
         V,
         ['strokeWidth', 'arrowL1', 'arrowL2', 'arrowW', 'centerPointDia'],
         ['lineColor'], ['textRenderer'])
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doCircles=True,
         doFittedCircles=True,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=QtGui.QBrush()  #clear
     )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
         V.graphicsScene, V.graphicsView, V.width, V.height)
Exemplo n.º 26
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Center Lines', dialogIconPath=os.path.join( iconPath , 'centerLines.svg' ), endFunction=self.Activated )
     d.SVGFun = centerLinesSVG
     maskPen =      QtGui.QPen( QtGui.QColor(0,255,0,100) )
     maskPen.setWidth(2.0)
     maskHoverPen = QtGui.QPen( QtGui.QColor(0,255,0,255) )
     maskHoverPen.setWidth(2.0)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim')], 
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doCircles=True, doFittedCircles=True, 
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = QtGui.QBrush() #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     crudeDebuggerPrint(
         '''linearDimension.py:53  	        V = getDrawingPageGUIVars() ''')
     V = getDrawingPageGUIVars()
     crudeDebuggerPrint(
         '''linearDimension.py:54  	        dimensioning.activate(V) ''')
     dimensioning.activate(V)
     crudeDebuggerPrint(
         '''linearDimension.py:55  	        selectionOverlay.generateSelectionGraphicsItems( '''
     )
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectDimensioningPoint,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doPoints=True,
         pointWid=2.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=maskBrush)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V,
                'Add Radial Dimension',
                dialogIconPath=os.path.join(iconPath,
                                            'radiusDimension.svg'),
                endFunction=self.Activated)
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doCircles=True,
         doFittedCircles=True,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=QtGui.QBrush()  #clear
     )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
         V.graphicsScene, V.graphicsView, V.width, V.height)
Exemplo n.º 29
0
 def Activated(self):
     V = self.Activated_common()
     dimensioning.SVGFun = centerLinesSVG
     maskPen = QtGui.QPen(QtGui.QColor(0, 255, 0, 100))
     maskPen.setWidth(2.0)
     maskHoverPen = QtGui.QPen(QtGui.QColor(0, 255, 0, 255))
     maskHoverPen.setWidth(2.0)
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doCircles=True,
         doFittedCircles=True,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=QtGui.QBrush()  #clear
     )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
         V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Add Center Lines', dialogIconPath=':/dd/icons/centerLines.svg', endFunction=self.Activated )
     d.SVGFun = centerLinesSVG
     d.ProxyClass = Proxy_CenterLines
     d.proxy_svgFun = centerLinesSVG
     maskPen =      QtGui.QPen( QtGui.QColor(0,255,0,100) )
     maskPen.setWidth(2.0)
     maskHoverPen = QtGui.QPen( QtGui.QColor(0,255,0,255) )
     maskHoverPen.setWidth(2.0)
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ),
         selectFun ,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         doCircles=True, doFittedCircles=True, 
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = QtGui.QBrush() #clear
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     crudeDebuggerPrint(
         '''angularDimension.py:49  	        V = getDrawingPageGUIVars() '''
     )
     V = getDrawingPageGUIVars()
     crudeDebuggerPrint(
         '''angularDimension.py:50  	        dimensioning.activate(V) ''')
     dimensioning.activate(V)
     crudeDebuggerPrint(
         '''angularDimension.py:51  	        selectionOverlay.generateSelectionGraphicsItems( '''
     )
     selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if not obj.Name.startswith('dim')],
         selectFun,
         transform=V.transform,
         sceneToAddTo=V.graphicsScene,
         doLines=True,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=QtGui.QBrush()  #clear
     )
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate( V, dialogTitle='Add Linear Dimension Stack', dialogIconPath = self.iconPath, endFunction = self.Activated )
     commonArgs = dict( 
         onClickFun=stack_selectDimensioningPoint,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')],
         doPoints=True, 
         **commonArgs
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group if obj.Name.startswith('center')], 
         clearPreviousSelectionItems = False,
         doPathEndPoints=True, 
         **commonArgs
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')],
         clearPreviousSelectionItems = False,
         doLines=True, 
         onClickFun=stack_selectDimensioningPoint,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate( V, ['strokeWidth','arrowL1','arrowL2','arrowW','gap_datum_points', 'dimension_line_overshoot'], ['lineColor'], ['textRenderer'] )
     commonArgs = dict( 
         onClickFun=selectDimensioningPoint,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')],
         doPoints=True, 
         **commonArgs
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group if obj.Name.startswith('center')], 
         clearPreviousSelectionItems = False,
         doPathEndPoints=True, 
         **commonArgs
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if not obj.Name.startswith('dim') and not obj.Name.startswith('center')],
         clearPreviousSelectionItems = False,
         doLines=True, 
         onClickFun=selectDimensioningPoint,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V, dialogTitle='Delete Dimension', dialogIconPath=os.path.join( iconPath , 'deleteDimension.svg' ), endFunction=self.Activated)
     commonArgs = dict( 
         onClickFun=deleteDimension,
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim') or obj.Name.startswith('grabPoint')], 
         doSelectViewObjectPoints = True, 
         **commonArgs)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('center') or  obj.Name.startswith('unfold')], 
         clearPreviousSelectionItems = False,
         doSelectViewObjectPoints=True, 
         **commonArgs)
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     dimensioning.activate(V)
     commonArgs = dict( 
         onClickFun=deleteDimension,
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim')], 
         doSelectViewObjectPoints = True, 
         **commonArgs)
     selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('center') or  obj.Name.startswith('unfold')], 
         clearPreviousSelectionItems = False,
         doSelectViewObjectPoints=True, 
         **commonArgs)
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars() #needs to be done before dialog show, else Qt active is dialog and not freecads
     dimensioning.activate( V )
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim')], 
         EditDimensionText , 
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         doTextItems = True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
 def Activated(self):
     V = getDrawingPageGUIVars() #needs to be done before dialog show, else Qt active is dialog and not freecads
     d.activate( V,  dialogTitle='Move Text', dialogIconPath=os.path.join( iconPath , 'textMove.svg' ), endFunction=self.Activated  )
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim')], 
         MoveDimensionText , 
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         doTextItems = True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
Exemplo n.º 38
0
 def Activated(self):
     V = getDrawingPageGUIVars() #needs to be done before dialog show, else Qt active is dialog and not freecads
     d.activate( V,  dialogTitle='Move Text', dialogIconPath=':/dd/icons/textMove.svg', endFunction=self.Activated  )
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim')], 
         MoveDimensionText , 
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         doTextItems = True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate( V,  dialogTitle='Add Tolerance', dialogIconPath=os.path.join( iconPath , 'toleranceAdd.svg' ), endFunction=self.Activated  )
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim')], 
         AddToleranceToText , 
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         doTextItems = True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
Exemplo n.º 40
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate( V, dialogTitle='Edit Text', dialogIconPath= ':/dd/icons/textEdit.svg', endFunction=self.Activated, grid=False  )
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim')], 
         EditDimensionText , 
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         doTextItems = True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate( V,  dialogTitle='Add Tolerance', dialogIconPath=':/dd/icons/toleranceAdd.svg', endFunction=self.Activated  )
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group if hasattr(obj,'Proxy') and isinstance(obj.Proxy, Proxy_DimensionObject_prototype)], 
         AddToleranceToText , 
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         doTextItems = True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
Exemplo n.º 42
0
 def Activated(self):
     V = getDrawingPageGUIVars(
     )  #needs to be done before dialog show, else Qt active is dialog and not freecads
     dimensioning.activate(V)
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if obj.Name.startswith('dim')],
         EditDimensionText,
         sceneToAddTo=V.graphicsScene,
         transform=V.transform,
         doTextItems=True,
         pointWid=2.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=maskBrush)
Exemplo n.º 43
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V,
                dialogTitle='Add Tolerance',
                dialogIconPath=os.path.join(iconPath, 'toleranceAdd.svg'),
                endFunction=self.Activated)
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if obj.Name.startswith('dim')],
         AddToleranceToText,
         sceneToAddTo=V.graphicsScene,
         transform=V.transform,
         doTextItems=True,
         pointWid=2.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=maskBrush)
Exemplo n.º 44
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V,
                dialogTitle='Edit Text',
                dialogIconPath=':/dd/icons/textEdit.svg',
                endFunction=self.Activated,
                grid=False)
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if obj.Name.startswith('dim')],
         EditDimensionText,
         sceneToAddTo=V.graphicsScene,
         transform=V.transform,
         doTextItems=True,
         pointWid=2.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=maskBrush)
 def Activated(self):
     crudeDebuggerPrint('''deleteDimension.py:22  	        V = getDrawingPageGUIVars() ''')
     V = getDrawingPageGUIVars()
     crudeDebuggerPrint('''deleteDimension.py:23  	        dimensioning.activate(V) ''')
     dimensioning.activate(V)
     crudeDebuggerPrint('''deleteDimension.py:24  	        selectGraphicsItems = generateSelectionGraphicsItems( ''')
     selectGraphicsItems = generateSelectionGraphicsItems( 
         [obj for obj in V.page.Group  if obj.Name.startswith('dim')], 
         deleteDimension , 
         sceneToAddTo = V.graphicsScene, 
         transform = V.transform,
         doTextItems = True, 
         pointWid=2.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
 def Activated(self):
     V = getDrawingPageGUIVars()
     d.activate(V,
                dialogTitle='Add Tolerance',
                dialogIconPath=':/dd/icons/toleranceAdd.svg',
                endFunction=self.Activated)
     selectGraphicsItems = selectionOverlay.generateSelectionGraphicsItems(
         [
             obj for obj in V.page.Group if hasattr(obj, 'Proxy')
             and isinstance(obj.Proxy, Proxy_DimensionObject_prototype)
         ],
         AddToleranceToText,
         sceneToAddTo=V.graphicsScene,
         transform=V.transform,
         doTextItems=True,
         pointWid=2.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=maskBrush)
 def Activated(self):
     crudeDebuggerPrint(
         '''deleteDimension.py:22  	        V = getDrawingPageGUIVars() ''')
     V = getDrawingPageGUIVars()
     crudeDebuggerPrint(
         '''deleteDimension.py:23  	        dimensioning.activate(V) ''')
     dimensioning.activate(V)
     crudeDebuggerPrint(
         '''deleteDimension.py:24  	        selectGraphicsItems = generateSelectionGraphicsItems( '''
     )
     selectGraphicsItems = generateSelectionGraphicsItems(
         [obj for obj in V.page.Group if obj.Name.startswith('dim')],
         deleteDimension,
         sceneToAddTo=V.graphicsScene,
         transform=V.transform,
         doTextItems=True,
         pointWid=2.0,
         maskPen=maskPen,
         maskHoverPen=maskHoverPen,
         maskBrush=maskBrush)
Exemplo n.º 48
0
    def Activated(self):
        V = getDrawingPageGUIVars()
        d.activate(V,
                   dialogTitle='Add Linear Dimension',
                   dialogIconPath=self.iconPath,
                   endFunction=self.Activated)

        commonArgs = dict(onClickFun=selectDimensioningPoint,
                          transform=V.transform,
                          sceneToAddTo=V.graphicsScene,
                          pointWid=1.0,
                          maskPen=maskPen,
                          maskHoverPen=maskHoverPen,
                          maskBrush=maskBrush)
        selectionOverlay.generateSelectionGraphicsItems([
            obj for obj in V.page.Group if not obj.Name.startswith('dim')
            and not obj.Name.startswith('center')
        ],
                                                        doPoints=True,
                                                        **commonArgs)
        selectionOverlay.generateSelectionGraphicsItems(
            [obj for obj in V.page.Group if obj.Name.startswith('center')],
            clearPreviousSelectionItems=False,
            doPathEndPoints=True,
            **commonArgs)
        selectionOverlay.generateSelectionGraphicsItems(
            [
                obj for obj in V.page.Group if not obj.Name.startswith('dim')
                and not obj.Name.startswith('center')
            ],
            clearPreviousSelectionItems=False,
            doLines=True,
            onClickFun=selectDimensioningPoint,
            transform=V.transform,
            sceneToAddTo=V.graphicsScene,
            maskPen=line_maskPen,
            maskHoverPen=line_maskHoverPen,
            maskBrush=line_maskBrush)
        selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(
            V.graphicsScene, V.graphicsView, V.width, V.height)
Exemplo n.º 49
0
 def Activated(self):
     V = getDrawingPageGUIVars()
     self.d.activate( V, dialogTitle = self.toolTip, dialogIconPath = self.iconPath, endFunction = self.Activated )
     commonArgs = dict( 
         onClickFun= self.onClickFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ), 
         doPoints=True, 
         **commonArgs
         )
     from centerLines import Proxy_CenterLines
     selectionOverlay.generateSelectionGraphicsItems( 
         [ obj for obj in V.page.Group if hasattr(obj, 'Proxy') and isinstance( obj.Proxy, Proxy_CenterLines )], 
         clearPreviousSelectionItems = False,
         doPathEndPoints=True, 
         **commonArgs
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ), 
         clearPreviousSelectionItems = False,
         doLines=True, 
         onClickFun= self.onClickFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems(V.graphicsScene, V.graphicsView, V.width, V.height)
 def Activated(self):
     V = getDrawingPageGUIVars()
     self.d.activate( V, dialogTitle = self.toolTip, dialogIconPath = self.iconPath, endFunction = self.Activated )
     commonArgs = dict( 
         onClickFun= self.onClickFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         pointWid=1.0,
         maskPen=maskPen, 
         maskHoverPen=maskHoverPen, 
         maskBrush = maskBrush
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ), 
         doPoints=True, 
         **commonArgs
         )
     from centerLines import Proxy_CenterLines
     selectionOverlay.generateSelectionGraphicsItems( 
         [ obj for obj in V.page.Group if hasattr(obj, 'Proxy') and isinstance( obj.Proxy, Proxy_CenterLines )], 
         clearPreviousSelectionItems = False,
         doPathEndPoints=True, 
         **commonArgs
         )
     selectionOverlay.generateSelectionGraphicsItems( 
         dimensionableObjects( V.page ), 
         clearPreviousSelectionItems = False,
         doLines=True, 
         onClickFun= self.onClickFun,
         transform = V.transform,
         sceneToAddTo = V.graphicsScene, 
         maskPen= line_maskPen, 
         maskHoverPen= line_maskHoverPen, 
         maskBrush = line_maskBrush
         )
     selectionOverlay.addProxyRectToRescaleGraphicsSelectionItems( V.graphicsScene, V.graphicsView, V.width, V.height)
XML = '''<svg id="Ortho_0_1" width="%i" height="%i">  <g stroke-width="0.2" >
%s
</g> </svg>''' % (width, height, '\n'.join(circlesXML) )
class dummyViewObject:
    def __init__(self, XML):
        self.ViewResult = XML
viewObject = dummyViewObject( XML )
    

maskPen = QtGui.QPen( QtGui.QColor(255,0,0, 125) )
maskPen.setWidth(3.0)
hoverPen = QtGui.QPen( QtGui.QColor(255,0,0) )
hoverPen.setWidth(3.0)

selectGraphicsItems = generateSelectionGraphicsItems( [viewObject], dimensioningRect.selectCircle , doCircles=True,
                                                      maskPen=maskPen  , 
                                                      maskBrush=QtGui.QBrush(), 
                                                      maskHoverPen= hoverPen )

graphicsScene.addItem(dimensioningRect)    
for g in selectGraphicsItems:
    graphicsScene.addItem(g)



view = QtGui.QGraphicsView(graphicsScene)
#view.scale(2, 2)
view.show()

sys.exit(app.exec_())
</g> </svg>''' % (width, height, '\n'.join(circlesXML))


class dummyViewObject:
    def __init__(self, XML):
        self.ViewResult = XML


viewObject = dummyViewObject(XML)

hoverPen = QtGui.QPen(QtGui.QColor(255, 0, 0))
hoverPen.setWidth(3.0)

selectGraphicsItems = generateSelectionGraphicsItems(
    [viewObject],
    dimensioningRect.selectDimensioningPoint,
    doCircles=True,
    maskPen=QtGui.QPen(QtGui.QColor(0, 0, 0)),
    maskBrush=QtGui.QBrush(QtGui.QColor(0, 0, 255)),
    maskHoverPen=hoverPen)

graphicsScene.addItem(dimensioningRect)
for g in selectGraphicsItems:
    graphicsScene.addItem(g)

view = QtGui.QGraphicsView(graphicsScene)
#view.scale(2, 2)
view.show()

sys.exit(app.exec_())
Y = [ numpy.random.rand()*height*0.8 for i in range(noPoints) ]
for i in range(noPoints):
    circlesXML.append( '<circle id="circ%03i" cx ="%f" cy ="%f" r ="6" />' % (i,X[i],Y[i]) )
XML = '''<svg id="Ortho_0_1" width="%i" height="%i">  <g stroke-width="0.2" >
%s
</g> </svg>''' % (width, height, '\n'.join(circlesXML) )
class dummyViewObject:
    def __init__(self, XML):
        self.ViewResult = XML
viewObject = dummyViewObject( XML )
    

hoverPen = QtGui.QPen( QtGui.QColor(255,0,0) )
hoverPen.setWidth(3.0)

selectGraphicsItems = generateSelectionGraphicsItems( [viewObject], dimensioningRect.selectDimensioningPoint , doCircles=True,
                                                      maskPen= QtGui.QPen( QtGui.QColor(0,0,0) ) , 
                                                      maskBrush=QtGui.QBrush( QtGui.QColor(0,0,255) ), 
                                                      maskHoverPen= hoverPen )

graphicsScene.addItem(dimensioningRect)    
for g in selectGraphicsItems:
    graphicsScene.addItem(g)


view = QtGui.QGraphicsView(graphicsScene)
#view.scale(2, 2)
view.show()

sys.exit(app.exec_())

class dummyViewObject:
    def __init__(self, XML):
        self.ViewResult = XML


viewObject = dummyViewObject(XML)

maskPen = QtGui.QPen(QtGui.QColor(0, 160, 0))
maskPen.setWidth(5.0)
hoverPen = QtGui.QPen(QtGui.QColor(0, 0, 255))
hoverPen.setWidth(5.0)

selectGraphicsItems = generateSelectionGraphicsItems(
    [viewObject],
    dimensioningRect.selectDimensioningLine,
    doLines=True,
    maskPen=maskPen,
    maskHoverPen=hoverPen)

graphicsScene.addItem(dimensioningRect)
for g in selectGraphicsItems:
    graphicsScene.addItem(g)

view = QtGui.QGraphicsView(graphicsScene)
#view.scale(2, 2)
view.show()

sys.exit(app.exec_())