eric6/Documentation/Source/eric6.UI.NotificationWidget.html

branch
maintenance
changeset 8043
0acf98cd089a
parent 7989
a21d673a8f99
child 8266
560547c2b6ec
--- a/eric6/Documentation/Source/eric6.UI.NotificationWidget.html	Sun Jan 17 13:53:08 2021 +0100
+++ b/eric6/Documentation/Source/eric6.UI.NotificationWidget.html	Mon Feb 01 10:38:16 2021 +0100
@@ -35,8 +35,16 @@
 <table>
 
 <tr>
+<td><a href="#NotificationFrame">NotificationFrame</a></td>
+<td>Class implementing a Notification widget.</td>
+</tr>
+<tr>
+<td><a href="#NotificationTypes">NotificationTypes</a></td>
+<td>Class implementing the notification types.</td>
+</tr>
+<tr>
 <td><a href="#NotificationWidget">NotificationWidget</a></td>
-<td>Class implementing a Notification widget.</td>
+<td>Class implementing a Notification list widget.</td>
 </tr>
 </table>
 <h3>Functions</h3>
@@ -46,14 +54,172 @@
 </table>
 <hr />
 <hr />
-<a NAME="NotificationWidget" ID="NotificationWidget"></a>
-<h2>NotificationWidget</h2>
+<a NAME="NotificationFrame" ID="NotificationFrame"></a>
+<h2>NotificationFrame</h2>
 
 <p>
     Class implementing a Notification widget.
 </p>
 <h3>Derived from</h3>
-QWidget, Ui_NotificationWidget
+QFrame, Ui_NotificationFrame
+<h3>Class Attributes</h3>
+
+<table>
+<tr><td>NotificationStyleSheetTemplate</td></tr>
+</table>
+<h3>Class Methods</h3>
+
+<table>
+
+<tr>
+<td><a href="#NotificationFrame.getIcon">getIcon</a></td>
+<td>Class method to get the icon for a specific notification kind.</td>
+</tr>
+<tr>
+<td><a href="#NotificationFrame.getStyleSheet">getStyleSheet</a></td>
+<td>Class method to get a style sheet for specific notification kind.</td>
+</tr>
+</table>
+<h3>Methods</h3>
+
+<table>
+
+<tr>
+<td><a href="#NotificationFrame.__init__">NotificationFrame</a></td>
+<td>Constructor</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<a NAME="NotificationFrame.getIcon" ID="NotificationFrame.getIcon"></a>
+<h4>NotificationFrame.getIcon (class method)</h4>
+<b>getIcon</b>(<i>kind</i>)
+
+<p>
+        Class method to get the icon for a specific notification kind.
+</p>
+<dl>
+
+<dt><i>kind</i> (NotificationTypes)</dt>
+<dd>
+notification kind
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+icon for the notification kind
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+QPixmap
+</dd>
+</dl>
+<a NAME="NotificationFrame.getStyleSheet" ID="NotificationFrame.getStyleSheet"></a>
+<h4>NotificationFrame.getStyleSheet (class method)</h4>
+<b>getStyleSheet</b>(<i>kind</i>)
+
+<p>
+        Class method to get a style sheet for specific notification kind.
+</p>
+<dl>
+
+<dt><i>kind</i> (NotificationTypes)</dt>
+<dd>
+notification kind
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+string containing the style sheet for the notification kind
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
+<a NAME="NotificationFrame.__init__" ID="NotificationFrame.__init__"></a>
+<h4>NotificationFrame (Constructor)</h4>
+<b>NotificationFrame</b>(<i>icon, heading, text, kind=NotificationTypes.Information, parent=None</i>)
+
+<p>
+        Constructor
+</p>
+<dl>
+
+<dt><i>icon</i> (QPixmap)</dt>
+<dd>
+icon to be used
+</dd>
+<dt><i>heading</i> (str)</dt>
+<dd>
+heading to be used
+</dd>
+<dt><i>text</i> (str)</dt>
+<dd>
+text to be used
+</dd>
+<dt><i>kind</i> (NotificationTypes)</dt>
+<dd>
+kind of notification to be shown
+</dd>
+<dt><i>parent</i> (QWidget)</dt>
+<dd>
+reference to the parent widget
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="NotificationTypes" ID="NotificationTypes"></a>
+<h2>NotificationTypes</h2>
+
+<p>
+    Class implementing the notification types.
+</p>
+<h3>Derived from</h3>
+Enum
+<h3>Class Attributes</h3>
+
+<table>
+<tr><td>Critical</td></tr><tr><td>Information</td></tr><tr><td>Other</td></tr><tr><td>Warning</td></tr>
+</table>
+<h3>Class Methods</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Static Methods</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="NotificationWidget" ID="NotificationWidget"></a>
+<h2>NotificationWidget</h2>
+
+<p>
+    Class implementing a Notification list widget.
+</p>
+<h3>Derived from</h3>
+QWidget
 <h3>Class Attributes</h3>
 
 <table>
@@ -73,6 +239,14 @@
 <td>Constructor</td>
 </tr>
 <tr>
+<td><a href="#NotificationWidget.__adjustSizeAndPosition">__adjustSizeAndPosition</a></td>
+<td>Private slot to adjust the notification list widget size and position.</td>
+</tr>
+<tr>
+<td><a href="#NotificationWidget.__removeNotification">__removeNotification</a></td>
+<td>Private method to remove a notification from the list.</td>
+</tr>
+<tr>
 <td><a href="#NotificationWidget.mouseMoveEvent">mouseMoveEvent</a></td>
 <td>Protected method to handle dragging the window.</td>
 </tr>
@@ -85,24 +259,8 @@
 <td>Protected method to handle releases of a mouse button.</td>
 </tr>
 <tr>
-<td><a href="#NotificationWidget.setHeading">setHeading</a></td>
-<td>Public method to set the heading for the notification.</td>
-</tr>
-<tr>
-<td><a href="#NotificationWidget.setPixmap">setPixmap</a></td>
-<td>Public method to set the icon for the notification.</td>
-</tr>
-<tr>
-<td><a href="#NotificationWidget.setText">setText</a></td>
-<td>Public method to set the text for the notification.</td>
-</tr>
-<tr>
-<td><a href="#NotificationWidget.setTimeout">setTimeout</a></td>
-<td>Public method to set the timeout for the notification.</td>
-</tr>
-<tr>
-<td><a href="#NotificationWidget.show">show</a></td>
-<td>Public method to show the notification.</td>
+<td><a href="#NotificationWidget.showNotification">showNotification</a></td>
+<td>Public method to show a notification.</td>
 </tr>
 </table>
 <h3>Static Methods</h3>
@@ -120,14 +278,35 @@
 </p>
 <dl>
 
-<dt><i>parent</i></dt>
+<dt><i>parent</i> (QWidget)</dt>
 <dd>
-reference to the parent widget (QWidget)
+reference to the parent widget
 </dd>
-<dt><i>setPosition</i></dt>
+<dt><i>setPosition</i> (bool)</dt>
 <dd>
 flag indicating to set the display
-            position interactively (boolean)
+            position interactively
+</dd>
+</dl>
+<a NAME="NotificationWidget.__adjustSizeAndPosition" ID="NotificationWidget.__adjustSizeAndPosition"></a>
+<h4>NotificationWidget.__adjustSizeAndPosition</h4>
+<b>__adjustSizeAndPosition</b>(<i></i>)
+
+<p>
+        Private slot to adjust the notification list widget size and position.
+</p>
+<a NAME="NotificationWidget.__removeNotification" ID="NotificationWidget.__removeNotification"></a>
+<h4>NotificationWidget.__removeNotification</h4>
+<b>__removeNotification</b>(<i>notification</i>)
+
+<p>
+        Private method to remove a notification from the list.
+</p>
+<dl>
+
+<dt><i>notification</i> (NotificationFrame)</dt>
+<dd>
+reference to the notification to be removed
 </dd>
 </dl>
 <a NAME="NotificationWidget.mouseMoveEvent" ID="NotificationWidget.mouseMoveEvent"></a>
@@ -172,69 +351,37 @@
 reference to the mouse event (QMouseEvent)
 </dd>
 </dl>
-<a NAME="NotificationWidget.setHeading" ID="NotificationWidget.setHeading"></a>
-<h4>NotificationWidget.setHeading</h4>
-<b>setHeading</b>(<i>heading</i>)
+<a NAME="NotificationWidget.showNotification" ID="NotificationWidget.showNotification"></a>
+<h4>NotificationWidget.showNotification</h4>
+<b>showNotification</b>(<i>icon, heading, text, kind=NotificationTypes.Information, timeout=0</i>)
 
 <p>
-        Public method to set the heading for the notification.
-</p>
-<dl>
-
-<dt><i>heading</i></dt>
-<dd>
-heading to be used (string)
-</dd>
-</dl>
-<a NAME="NotificationWidget.setPixmap" ID="NotificationWidget.setPixmap"></a>
-<h4>NotificationWidget.setPixmap</h4>
-<b>setPixmap</b>(<i>icon</i>)
-
-<p>
-        Public method to set the icon for the notification.
+        Public method to show a notification.
 </p>
 <dl>
 
-<dt><i>icon</i></dt>
+<dt><i>icon</i> (QPixmap)</dt>
 <dd>
-icon to be used (QPixmap)
+icon to be used
+</dd>
+<dt><i>heading</i> (str)</dt>
+<dd>
+heading to be used
 </dd>
-</dl>
-<a NAME="NotificationWidget.setText" ID="NotificationWidget.setText"></a>
-<h4>NotificationWidget.setText</h4>
-<b>setText</b>(<i>text</i>)
-
-<p>
-        Public method to set the text for the notification.
-</p>
-<dl>
-
-<dt><i>text</i></dt>
+<dt><i>text</i> (str)</dt>
+<dd>
+text to be used
+</dd>
+<dt><i>kind</i> (NotificationTypes)</dt>
 <dd>
-text to be used (string)
+kind of notification to be shown
+</dd>
+<dt><i>timeout</i> (int)</dt>
+<dd>
+timeout in seconds after which the notification is
+            to be removed (0 = do not remove until it is clicked on)
 </dd>
 </dl>
-<a NAME="NotificationWidget.setTimeout" ID="NotificationWidget.setTimeout"></a>
-<h4>NotificationWidget.setTimeout</h4>
-<b>setTimeout</b>(<i>timeout</i>)
-
-<p>
-        Public method to set the timeout for the notification.
-</p>
-<dl>
-
-<dt><i>timeout</i> (int)</dt>
-<dd>
-timeout to be used in seconds (0 = indefinitely)
-</dd>
-</dl>
-<a NAME="NotificationWidget.show" ID="NotificationWidget.show"></a>
-<h4>NotificationWidget.show</h4>
-<b>show</b>(<i></i>)
-
-<p>
-        Public method to show the notification.
-</p>
 <div align="right"><a href="#top">Up</a></div>
 <hr />
 </body></html>
\ No newline at end of file

eric ide

mercurial