Mon, 09 Jan 2023 11:22:56 +0100
Moved the 'QtHelp' subpackage out of the WebBrowser package because it is used in the HelpViewer as well.
<!DOCTYPE html> <html><head> <title>eric7.Snapshot.SnapWidget</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.Snapshot.SnapWidget</h1> <p> Module implementing the snapshot widget. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#SnapWidget">SnapWidget</a></td> <td>Class implementing the snapshot widget.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /> <hr /> <a NAME="SnapWidget" ID="SnapWidget"></a> <h2>SnapWidget</h2> <p> Class implementing the snapshot widget. </p> <h3>Derived from</h3> QWidget, Ui_SnapWidget <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#SnapWidget.__init__">SnapWidget</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#SnapWidget.__autoIncFilename">__autoIncFilename</a></td> <td>Private method to auto-increment the file name.</td> </tr> <tr> <td><a href="#SnapWidget.__captured">__captured</a></td> <td>Private slot to show a preview of the snapshot.</td> </tr> <tr> <td><a href="#SnapWidget.__dragSnapshot">__dragSnapshot</a></td> <td>Private slot handling the dragging of the preview picture.</td> </tr> <tr> <td><a href="#SnapWidget.__initFileFilters">__initFileFilters</a></td> <td>Private method to define the supported image file filters.</td> </tr> <tr> <td><a href="#SnapWidget.__initShortcuts">__initShortcuts</a></td> <td>Private method to initialize the keyboard shortcuts.</td> </tr> <tr> <td><a href="#SnapWidget.__quickSave">__quickSave</a></td> <td>Private slot to save the snapshot bypassing the file selection dialog.</td> </tr> <tr> <td><a href="#SnapWidget.__redisplay">__redisplay</a></td> <td>Private method to redisplay the window.</td> </tr> <tr> <td><a href="#SnapWidget.__saveImage">__saveImage</a></td> <td>Private method to save the snapshot.</td> </tr> <tr> <td><a href="#SnapWidget.__updateCaption">__updateCaption</a></td> <td>Private method to update the window caption.</td> </tr> <tr> <td><a href="#SnapWidget.__updatePreview">__updatePreview</a></td> <td>Private slot to update the preview picture.</td> </tr> <tr> <td><a href="#SnapWidget.closeEvent">closeEvent</a></td> <td>Protected method handling the close event.</td> </tr> <tr> <td><a href="#SnapWidget.on_copyButton_clicked">on_copyButton_clicked</a></td> <td>Private slot to copy the snapshot to the clipboard.</td> </tr> <tr> <td><a href="#SnapWidget.on_copyPreviewButton_clicked">on_copyPreviewButton_clicked</a></td> <td>Private slot to copy the snapshot preview to the clipboard.</td> </tr> <tr> <td><a href="#SnapWidget.on_modeCombo_currentIndexChanged">on_modeCombo_currentIndexChanged</a></td> <td>Private slot handling the selection of a screenshot mode.</td> </tr> <tr> <td><a href="#SnapWidget.on_saveButton_clicked">on_saveButton_clicked</a></td> <td>Private slot to save the snapshot.</td> </tr> <tr> <td><a href="#SnapWidget.on_takeButton_clicked">on_takeButton_clicked</a></td> <td>Private slot to take a snapshot.</td> </tr> <tr> <td><a href="#SnapWidget.resizeEvent">resizeEvent</a></td> <td>Protected method handling a resizing of the window.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="SnapWidget.__init__" ID="SnapWidget.__init__"></a> <h4>SnapWidget (Constructor)</h4> <b>SnapWidget</b>(<i>parent=None</i>) <p> Constructor </p> <dl> <dt><i>parent</i></dt> <dd> reference to the parent widget (QWidget) </dd> </dl> <a NAME="SnapWidget.__autoIncFilename" ID="SnapWidget.__autoIncFilename"></a> <h4>SnapWidget.__autoIncFilename</h4> <b>__autoIncFilename</b>(<i></i>) <p> Private method to auto-increment the file name. </p> <a NAME="SnapWidget.__captured" ID="SnapWidget.__captured"></a> <h4>SnapWidget.__captured</h4> <b>__captured</b>(<i>pixmap</i>) <p> Private slot to show a preview of the snapshot. </p> <dl> <dt><i>pixmap</i></dt> <dd> pixmap of the snapshot (QPixmap) </dd> </dl> <a NAME="SnapWidget.__dragSnapshot" ID="SnapWidget.__dragSnapshot"></a> <h4>SnapWidget.__dragSnapshot</h4> <b>__dragSnapshot</b>(<i></i>) <p> Private slot handling the dragging of the preview picture. </p> <a NAME="SnapWidget.__initFileFilters" ID="SnapWidget.__initFileFilters"></a> <h4>SnapWidget.__initFileFilters</h4> <b>__initFileFilters</b>(<i></i>) <p> Private method to define the supported image file filters. </p> <a NAME="SnapWidget.__initShortcuts" ID="SnapWidget.__initShortcuts"></a> <h4>SnapWidget.__initShortcuts</h4> <b>__initShortcuts</b>(<i></i>) <p> Private method to initialize the keyboard shortcuts. </p> <a NAME="SnapWidget.__quickSave" ID="SnapWidget.__quickSave"></a> <h4>SnapWidget.__quickSave</h4> <b>__quickSave</b>(<i></i>) <p> Private slot to save the snapshot bypassing the file selection dialog. </p> <a NAME="SnapWidget.__redisplay" ID="SnapWidget.__redisplay"></a> <h4>SnapWidget.__redisplay</h4> <b>__redisplay</b>(<i></i>) <p> Private method to redisplay the window. </p> <a NAME="SnapWidget.__saveImage" ID="SnapWidget.__saveImage"></a> <h4>SnapWidget.__saveImage</h4> <b>__saveImage</b>(<i>fileName</i>) <p> Private method to save the snapshot. </p> <dl> <dt><i>fileName</i></dt> <dd> name of the file to save to (string) </dd> </dl> <dl> <dt>Return:</dt> <dd> flag indicating success (boolean) </dd> </dl> <a NAME="SnapWidget.__updateCaption" ID="SnapWidget.__updateCaption"></a> <h4>SnapWidget.__updateCaption</h4> <b>__updateCaption</b>(<i></i>) <p> Private method to update the window caption. </p> <a NAME="SnapWidget.__updatePreview" ID="SnapWidget.__updatePreview"></a> <h4>SnapWidget.__updatePreview</h4> <b>__updatePreview</b>(<i></i>) <p> Private slot to update the preview picture. </p> <a NAME="SnapWidget.closeEvent" ID="SnapWidget.closeEvent"></a> <h4>SnapWidget.closeEvent</h4> <b>closeEvent</b>(<i>evt</i>) <p> Protected method handling the close event. </p> <dl> <dt><i>evt</i></dt> <dd> close event (QCloseEvent) </dd> </dl> <a NAME="SnapWidget.on_copyButton_clicked" ID="SnapWidget.on_copyButton_clicked"></a> <h4>SnapWidget.on_copyButton_clicked</h4> <b>on_copyButton_clicked</b>(<i></i>) <p> Private slot to copy the snapshot to the clipboard. </p> <a NAME="SnapWidget.on_copyPreviewButton_clicked" ID="SnapWidget.on_copyPreviewButton_clicked"></a> <h4>SnapWidget.on_copyPreviewButton_clicked</h4> <b>on_copyPreviewButton_clicked</b>(<i></i>) <p> Private slot to copy the snapshot preview to the clipboard. </p> <a NAME="SnapWidget.on_modeCombo_currentIndexChanged" ID="SnapWidget.on_modeCombo_currentIndexChanged"></a> <h4>SnapWidget.on_modeCombo_currentIndexChanged</h4> <b>on_modeCombo_currentIndexChanged</b>(<i>index</i>) <p> Private slot handling the selection of a screenshot mode. </p> <dl> <dt><i>index</i> (int)</dt> <dd> index of the selection </dd> </dl> <a NAME="SnapWidget.on_saveButton_clicked" ID="SnapWidget.on_saveButton_clicked"></a> <h4>SnapWidget.on_saveButton_clicked</h4> <b>on_saveButton_clicked</b>(<i></i>) <p> Private slot to save the snapshot. </p> <a NAME="SnapWidget.on_takeButton_clicked" ID="SnapWidget.on_takeButton_clicked"></a> <h4>SnapWidget.on_takeButton_clicked</h4> <b>on_takeButton_clicked</b>(<i></i>) <p> Private slot to take a snapshot. </p> <a NAME="SnapWidget.resizeEvent" ID="SnapWidget.resizeEvent"></a> <h4>SnapWidget.resizeEvent</h4> <b>resizeEvent</b>(<i>evt</i>) <p> Protected method handling a resizing of the window. </p> <dl> <dt><i>evt</i></dt> <dd> resize event (QResizeEvent) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>