Beispiel #1
0
    def __init__(self):
        QDialog.__init__(self)

        # Define the instance that handles all the
        # Image processing functionality.
        self._thumbnailMaker = ThumbnailMaker(self)

        # Define the instance to access the the UI elements defined in
        # class Ui_ThumbnailMakerDialog.
        self._dialog = Ui_ThumbnailMakerDialog()
        self._dialog.setupUi(self)
        self._dialog.retranslateUi(self)

        # Initialize some other variables.
        self._filePath = ''
        self._dirPath = ''

        # Aspect ratio checkbox is checked by default.
        self.maintainAspectRatio = True

        #Graphics scene for right hand panel.
        # see self._previiewImage() for details.
        self._graphicsScene = QGraphicsScene()

        # Connect slots with signals.
        self._connect()

        # Show the dialog.
        self.show()
Beispiel #2
0
 def set_pixmap(self, pmap):
     self.scene = QGraphicsScene()
     self.scene.addPixmap(pmap)
     self.setScene(self.scene)