예제 #1
0
파일: jdraw.py 프로젝트: cmft/taurus
 def getSceneObj(self, items):
     scene = TaurusGraphicsScene(self.myparent)
     for item in items:
         try:
             if isinstance(item, Qt.QWidget):
                 scene.addWidget(item)
             elif isinstance(item, Qt.QGraphicsItem):
                 scene.addItem(item)
         except:
             self.warning("Unable to add item %s to scene" % str(item))
             self.debug("Details:", exc_info=1)
     return scene
예제 #2
0
 def getSceneObj(self,items):
     scene = TaurusGraphicsScene(self.myparent)
     for item in items:
         print "\n item w getsceneobject: ", item
         try:
             if isinstance(item, Qt.QWidget):
                 print "\n instance of ", item, " = Qt.QWidget"
                 #scene.addItem(item)
                 scene.addWidget(item)
             elif isinstance(item, Qt.QGraphicsItem):
                 scene.addItem(item)
             #else:
              #   scene.addItem(item)
         except:
             self.warning("Unable to add item %s to scene" % str(item))
             self.debug("Details:", exc_info=1)
     return scene
예제 #3
0
 def getSceneObj(self, items):
     scene = TaurusGraphicsScene(self.myparent)
     for item in items:
         try:
             if isinstance(item, Qt.QWidget):
                 scene.addWidget(item)
             elif isinstance(item, Qt.QGraphicsItem):
                 scene.addItem(item)
         except:
             self.warning("Unable to add item %s to scene" % str(item))
             self.debug("Details:", exc_info=1)
     return scene
예제 #4
0
 def getSceneObj(self, items):
     scene = TaurusGraphicsScene(self.myparent)
     for item in items:
         print "\n item w getsceneobject: ", item
         try:
             if isinstance(item, Qt.QWidget):
                 print "\n instance of ", item, " = Qt.QWidget"
                 #scene.addItem(item)
                 scene.addWidget(item)
             elif isinstance(item, Qt.QGraphicsItem):
                 scene.addItem(item)
             #else:
             #   scene.addItem(item)
         except:
             self.warning("Unable to add item %s to scene" % str(item))
             self.debug("Details:", exc_info=1)
     return scene