--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eric7/Documentation/Source/eric7.UI.NotificationWidget.html Mon May 24 11:19:57 2021 +0200 @@ -0,0 +1,387 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.UI.NotificationWidget</title> +<meta charset="UTF-8"> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric7.UI.NotificationWidget</h1> + +<p> +Module implementing a Notification widget. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<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 list widget.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> +<tr><td>None</td></tr> +</table> +<hr /> +<hr /> +<a NAME="NotificationFrame" ID="NotificationFrame"></a> +<h2>NotificationFrame</h2> + +<p> + Class implementing a Notification widget. +</p> +<h3>Derived from</h3> +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.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> +<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="#NotificationWidget.__init__">NotificationWidget</a></td> +<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> +<tr> +<td><a href="#NotificationWidget.mousePressEvent">mousePressEvent</a></td> +<td>Protected method to handle presses of a mouse button.</td> +</tr> +<tr> +<td><a href="#NotificationWidget.mouseReleaseEvent">mouseReleaseEvent</a></td> +<td>Protected method to handle releases of a mouse button.</td> +</tr> +<tr> +<td><a href="#NotificationWidget.showNotification">showNotification</a></td> +<td>Public method to show a notification.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="NotificationWidget.__init__" ID="NotificationWidget.__init__"></a> +<h4>NotificationWidget (Constructor)</h4> +<b>NotificationWidget</b>(<i>parent=None, setPosition=False</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>parent</i> (QWidget)</dt> +<dd> +reference to the parent widget +</dd> +<dt><i>setPosition</i> (bool)</dt> +<dd> +flag indicating to set the display + 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> +<h4>NotificationWidget.mouseMoveEvent</h4> +<b>mouseMoveEvent</b>(<i>evt</i>) + +<p> + Protected method to handle dragging the window. +</p> +<dl> + +<dt><i>evt</i></dt> +<dd> +reference to the mouse event (QMouseEvent) +</dd> +</dl> +<a NAME="NotificationWidget.mousePressEvent" ID="NotificationWidget.mousePressEvent"></a> +<h4>NotificationWidget.mousePressEvent</h4> +<b>mousePressEvent</b>(<i>evt</i>) + +<p> + Protected method to handle presses of a mouse button. +</p> +<dl> + +<dt><i>evt</i></dt> +<dd> +reference to the mouse event (QMouseEvent) +</dd> +</dl> +<a NAME="NotificationWidget.mouseReleaseEvent" ID="NotificationWidget.mouseReleaseEvent"></a> +<h4>NotificationWidget.mouseReleaseEvent</h4> +<b>mouseReleaseEvent</b>(<i>evt</i>) + +<p> + Protected method to handle releases of a mouse button. +</p> +<dl> + +<dt><i>evt</i></dt> +<dd> +reference to the mouse event (QMouseEvent) +</dd> +</dl> +<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 show a notification. +</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>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> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file