Snapshot/SnapWidget.py

branch
Py2 comp.
changeset 3142
55030c09e142
parent 3060
5883ce99ee12
parent 3129
138331f6b0a0
child 3145
a9de05d4a22f
--- a/Snapshot/SnapWidget.py	Fri Dec 13 22:45:47 2013 +0100
+++ b/Snapshot/SnapWidget.py	Fri Dec 13 23:39:14 2013 +0100
@@ -51,6 +51,7 @@
         self.saveButton.setIcon(UI.PixmapCache.getIcon("fileSaveAs.png"))
         self.takeButton.setIcon(UI.PixmapCache.getIcon("cameraPhoto.png"))
         self.copyButton.setIcon(UI.PixmapCache.getIcon("editCopy.png"))
+        self.copyPreviewButton.setIcon(UI.PixmapCache.getIcon("editCopy.png"))
         self.setWindowIcon(UI.PixmapCache.getIcon("ericSnap.png"))
         
         self.modeCombo.addItem(self.trUtf8("Fullscreen"),
@@ -404,12 +405,21 @@
         
         self.saveButton.setEnabled(not self.__snapshot.isNull())
         self.copyButton.setEnabled(not self.__snapshot.isNull())
+        self.copyPreviewButton.setEnabled(not self.__snapshot.isNull())
     
     @pyqtSlot()
     def on_copyButton_clicked(self):
         """
         Private slot to copy the snapshot to the clipboard.
         """
+        if not self.__snapshot.isNull():
+            QApplication.clipboard().setPixmap(QPixmap(self.__snapshot))
+    
+    @pyqtSlot()
+    def on_copyPreviewButton_clicked(self):
+        """
+        Private slot to copy the snapshot preview to the clipboard.
+        """
         QApplication.clipboard().setPixmap(self.preview.pixmap())
     
     def __captured(self, pixmap):

eric ide

mercurial