Exemplo n.º 1
0
 def resizeEvent(self, event):
     """
     ResiczeEvent do nadpisania w qgraphicsView
     """
     self.graphics_view.fitInView(self._camera_item.boundingRect(),
                                  Qt.KeepAspectRatio)
     QGraphicsView.resizeEvent(self.graphics_view, event)
Exemplo n.º 2
0
 def resizeEvent(self, event):
     # FIXME: Se la finestra viene massimizzata, il valore di fit_scale non si aggiorna
     if self.matrix().m11() <= self.fit_scale:
         self.zoom_fit()
     else:
         self.notify_change()
     QGraphicsView.resizeEvent(self, event)
Exemplo n.º 3
0
 def resizeEvent(self, event):
     if self.scene():
         self.scene().setSceneRect(QRectF(QPointF(0, 0), event.size()))
         self._chart.resize(event.size())
         self._coordX.setPos(self._chart.size().width() / 2 - 50,
                             self._chart.size().height() - 20)
         self._coordY.setPos(self._chart.size().width() / 2 + 50,
                             self._chart.size().height() - 20)
         for callout in self._callouts:
             callout.updateGeometry()
     QGraphicsView.resizeEvent(self, event)
Exemplo n.º 4
0
 def resizeEvent(self, event):
     if self.scene():
         self.scene().setSceneRect(QRectF(QPointF(0, 0), event.size()))
         self._chart.resize(event.size())
         self._coordX.setPos(
             self._chart.size().width()/2 - 50,
             self._chart.size().height() - 20)
         self._coordY.setPos(
             self._chart.size().width()/2 + 50,
             self._chart.size().height() - 20)
         for callout in self._callouts:
             callout.updateGeometry()
     QGraphicsView.resizeEvent(self, event)
Exemplo n.º 5
0
 def resizeEvent(self, event):
     QGraphicsView.resizeEvent(self, event)
     if self.matrix().m11() <= self.fit_scale:
         self.zoom_fit()
     else:
         self.notify_change()