示例#1
0
	def setZoom(self, zoom):
		""" Sets its own zoom factor and passes it to it's child widget if child is Zoomable.
		"""
		Zoomable.setZoom(self, zoom)
		if isinstance(self.widget(), ZoomableWidget):
			self.widget().setZoom(zoom)
		self.autosizeScrollWidget()
		self.emit(SIGNAL("zoomChanged(float)"), zoom)
示例#2
0
 def setZoom(self, zoom):
     """ Sets its own zoom factor and passes it to it's child widget if child is Zoomable.
     """
     Zoomable.setZoom(self, zoom)
     if isinstance(self.widget(), ZoomableWidget):
         self.widget().setZoom(zoom)
     self.autosizeScrollWidget()
     self.emit(SIGNAL("zoomChanged(float)"), zoom)
示例#3
0
	def __init__(self, parent=None):
		""" Constructor.
		"""
		QScrollArea.__init__(self, parent)
		Zoomable.__init__(self)               # Call after QScrollArea constructor, required by setZoom()
		
		self.connect(self.verticalScrollBar(), SIGNAL("valueChanged(int)"), self.scrollBarValueChanged)
		self.connect(self.horizontalScrollBar(), SIGNAL("valueChanged(int)"), self.scrollBarValueChanged)
示例#4
0
    def __init__(self, parent=None):
        """ Constructor.
        """
        QScrollArea.__init__(self, parent)
        Zoomable.__init__(self)               # Call after QScrollArea constructor, required by setZoom()

        self.connect(self.verticalScrollBar(), SIGNAL("valueChanged(int)"), self.scrollBarValueChanged)
        self.connect(self.horizontalScrollBar(), SIGNAL("valueChanged(int)"), self.scrollBarValueChanged)
示例#5
0
    def setZoom(self, zoom):
        """ Sets zoom of this widget and of it's children.
        """
        Zoomable.setZoom(self, zoom)

        for child in self.children():
            if isinstance(child, Zoomable):
                child.setZoom(zoom)
        self.update()
示例#6
0
    def __init__(self, parent=None):
        """ Constructor
        """
        QWidget.__init__(self, parent)
        Zoomable.__init__(self)
        self._imageExporter = None

        if isinstance(self.parent(), ZoomableWidget):
            self.setZoom(self.parent().zoom())
示例#7
0
 def setZoom(self, zoom):
     """ Sets zoom of this widget and of it's children.
     """
     Zoomable.setZoom(self, zoom)
     
     for child in self.children():
         if isinstance(child, Zoomable):
             child.setZoom(zoom)
     self.update()
示例#8
0
 def __init__(self, parent=None):
     """ Constructor
     """
     QWidget.__init__(self, parent)
     Zoomable.__init__(self)
     self._imageExporter = None
     
     if isinstance(self.parent(), ZoomableWidget):
         self.setZoom(self.parent().zoom())