WebBrowser/PageScreenDialog.py

Sat, 27 Feb 2016 18:19:09 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 27 Feb 2016 18:19:09 +0100
branch
QtWebEngine
changeset 4780
1d203a177b16
parent 4631
Helpviewer/PageScreenDialog.py@5c1a96925da4
child 4857
8dba5fb92f12
permissions
-rw-r--r--

Continued porting the web browser.

- ported the save page scree stuff (full page doesn't work yet because of QtWebEngine)

1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
4631
5c1a96925da4 Updated copyright for 2016.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
3 # Copyright (c) 2012 - 2016 Detlev Offenbach <detlev@die-offenbachs.de>
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to save a screenshot of a web page.
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3060
diff changeset
10 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
11
4780
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
12 from PyQt5.QtCore import pyqtSlot, Qt, QFile, QFileInfo, QSize
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
13 from PyQt5.QtGui import QImage, QPainter, QPixmap
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
14 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 from E5Gui import E5FileDialog, E5MessageBox
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 from .Ui_PageScreenDialog import Ui_PageScreenDialog
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 class PageScreenDialog(QDialog, Ui_PageScreenDialog):
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 Class documentation goes here.
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
25 def __init__(self, view, visibleOnly=False, parent=None):
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 Constructor
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 @param view reference to the web view containing the page to be saved
4780
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
30 (WebBrowserView)
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
31 @param visibleOnly flag indicating to just save the visible part
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
32 of the page (boolean)
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 @param parent reference to the parent widget (QWidget)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
35 super(PageScreenDialog, self).__init__(parent)
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.setupUi(self)
4278
ccd1e13cb9bd Fixed issues where dialogs could not be minimized on some desktop environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
37 self.setWindowFlags(Qt.Window)
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.__view = view
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
40 self.__createPixmap(visibleOnly)
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.pageScreenLabel.setPixmap(self.__pagePixmap)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
43 def __createPixmap(self, visibleOnly):
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 Private slot to create a pixmap of the associated view's page.
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
46
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
47 @param visibleOnly flag indicating to just save the visible part
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
48 of the page (boolean)
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 """
4780
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
50 res = self.__view.page().execJavaScript(
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
51 "(function() {"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
52 "var res = {"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
53 " width: 0,"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
54 " height: 0,"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
55 "};"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
56 "res.width = document.body.scrollWidth;"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
57 "res.height = document.body.scrollHeight;"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
58 "return res;"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
59 "})()"
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
60 )
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
61 if visibleOnly:
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
62 image = QImage(QSize(res["width"], self.__view.height()),
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
63 QImage.Format_ARGB32)
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
64 painter = QPainter(image)
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
65 self.__view.render(painter)
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
66 painter.end()
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
67 else:
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
68 # TODO: once QWebEngineView supports this
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
69 image = QImage(QSize(res["width"], self.__view.height()),
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
70 QImage.Format_ARGB32)
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
71 painter = QPainter(image)
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
72 self.__view.render(painter)
1d203a177b16 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
73 painter.end()
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 self.__pagePixmap = QPixmap.fromImage(image)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 def __savePageScreen(self):
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 Private slot to save the page screen.
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 @return flag indicating success (boolean)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 fileName = E5FileDialog.getSaveFileName(
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
85 self.tr("Save Page Screen"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
86 self.tr("screen.png"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
87 self.tr("Portable Network Graphics File (*.png)"),
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite))
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 if not fileName:
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 return False
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 if QFileInfo(fileName).exists():
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2999
diff changeset
93 res = E5MessageBox.yesNo(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2999
diff changeset
94 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
95 self.tr("Save Page Screen"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
96 self.tr("<p>The file <b>{0}</b> already exists."
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
97 " Overwrite it?</p>").format(fileName),
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 icon=E5MessageBox.Warning)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 if not res:
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 return False
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 file = QFile(fileName)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 if not file.open(QFile.WriteOnly):
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2999
diff changeset
104 E5MessageBox.warning(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2999
diff changeset
105 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
106 self.tr("Save Page Screen"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
107 self.tr("Cannot write file '{0}:\n{1}.")
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 .format(fileName, file.errorString()))
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 return False
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 res = self.__pagePixmap.save(file)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 file.close()
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 if not res:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2999
diff changeset
115 E5MessageBox.warning(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2999
diff changeset
116 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
117 self.tr("Save Page Screen"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
118 self.tr("Cannot write file '{0}:\n{1}.")
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 .format(fileName, file.errorString()))
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 return False
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 return True
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 @pyqtSlot(QAbstractButton)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 def on_buttonBox_clicked(self, button):
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 Private slot to handle clicks of the dialog buttons.
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 @param button button that was clicked (QAbstractButton)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 """
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 if button == self.buttonBox.button(QDialogButtonBox.Cancel):
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 self.reject()
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 elif button == self.buttonBox.button(QDialogButtonBox.Save):
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 if self.__savePageScreen():
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 self.accept()

eric ide

mercurial