Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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()
Ejemplo n.º 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())
Ejemplo n.º 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()
Ejemplo n.º 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())