src/eric7/WebBrowser/PageScreenDialog.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
26 def __init__(self, view, parent=None): 26 def __init__(self, view, parent=None):
27 """ 27 """
28 Constructor 28 Constructor
29 29
30 @param view reference to the web view containing the page to be saved 30 @param view reference to the web view containing the page to be saved
31 (WebBrowserView) 31 @type WebBrowserView
32 @param parent reference to the parent widget (QWidget) 32 @param parent reference to the parent widget
33 @type QWidget
33 """ 34 """
34 super().__init__(parent) 35 super().__init__(parent)
35 self.setupUi(self) 36 self.setupUi(self)
36 self.setWindowFlags(Qt.WindowType.Window) 37 self.setWindowFlags(Qt.WindowType.Window)
37 38
66 67
67 def __savePageScreen(self): 68 def __savePageScreen(self):
68 """ 69 """
69 Private slot to save the page screen. 70 Private slot to save the page screen.
70 71
71 @return flag indicating success (boolean) 72 @return flag indicating success
73 @rtype bool
72 """ 74 """
73 fileName = EricFileDialog.getSaveFileName( 75 fileName = EricFileDialog.getSaveFileName(
74 self, 76 self,
75 self.tr("Save Page Screen"), 77 self.tr("Save Page Screen"),
76 self.tr("screen.png"), 78 self.tr("screen.png"),
106 @pyqtSlot(QAbstractButton) 108 @pyqtSlot(QAbstractButton)
107 def on_buttonBox_clicked(self, button): 109 def on_buttonBox_clicked(self, button):
108 """ 110 """
109 Private slot to handle clicks of the dialog buttons. 111 Private slot to handle clicks of the dialog buttons.
110 112
111 @param button button that was clicked (QAbstractButton) 113 @param button button that was clicked
114 @type QAbstractButton
112 """ 115 """
113 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 116 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
114 self.reject() 117 self.reject()
115 elif ( 118 elif (
116 button == self.buttonBox.button(QDialogButtonBox.StandardButton.Save) 119 button == self.buttonBox.button(QDialogButtonBox.StandardButton.Save)

eric ide

mercurial