4.56. umbra.ui.widgets.notification_QLabel
notification_QLabel.py
- Platform:
- Windows, Linux, Mac Os X.
- Description:
- Defines the Notification_QLabel class.
- Others:
- Portions of the code and logic from Prymatex:
https://github.com/D3f0/prymatex/blob/master/prymatex/gui/widgets/overlay.py
4.56.1. Module Attributes
-
umbra.ui.widgets.notification_QLabel.LOGGER
4.56.2. Classes
-
class umbra.ui.widgets.notification_QLabel.Notification_QLabel(parent=None, color=None, backgroundColor=None, borderColor=None, anchor=None, horizontalPadding=None, verticalPadding=None, horizontalOffset=None, verticalOffset=None, fadeSpeed=None, targetOpacity=None, duration=None)[source]
Bases: PyQt4.QtGui.QLabel
Defines a QLabel subclass providing
a notification label with fading capabilities.
Initializes the class.
Parameters: |
- parent (QObject) – Widget parent.
- color (QColor) – Widget text color.
- backgroundColor (QColor) – Widget background color.
- borderColor (QColor) – Widget border color.
- anchor (int) – Widget anchoring area ( From 0 to 8 ).
- horizontalPadding (int) – Left padding relative to parent Widget.
- verticalPadding (int) – Bottom padding relative to parent Widget.
- horizontalOffset (int) – Widget horizontal offset.
- verticalOffset (int) – Widget vertical offset.
- fadeSpeed (float) – Notification fading speed.
- targetOpacity (float) – Notification maximum target opacity.
- duration (int) – Notification duration in milliseconds.
|
-
notificationClicked
This signal is emited by the Notification_QLabel class when it receives a mouse press event. ( pyqtSignal )
Returns: | Current notification text. |
Return type: | QString |
-
fadedIn
This signal is emited by the Notification_QLabel class when it has faded in. ( pyqtSignal )
-
fadedOut
This signal is emited by the Notification_QLabel class when it has faded out. ( pyqtSignal )
-
color[source]
Property for self.__color attribute.
Returns: | self.__color. |
Return type: | QColor |
-
backgroundColor[source]
Property for self.__backgroundColor attribute.
Returns: | self.__backgroundColor. |
Return type: | QColor |
-
borderColor[source]
Property for self.__borderColor attribute.
Returns: | self.__borderColor. |
Return type: | QColor |
-
anchor[source]
Property for self.__anchor attribute.
Returns: | self.__anchor. |
Return type: | int |
-
horizontalPadding[source]
Property for self.__horizontalPadding attribute.
Returns: | self.__horizontalPadding. |
Return type: | int |
-
verticalPadding[source]
Property for self.__verticalPadding attribute.
Returns: | self.__verticalPadding. |
Return type: | int |
-
horizontalOffset[source]
Property for self.__horizontalOffset attribute.
Returns: | self.__horizontalOffset. |
Return type: | int |
-
verticalOffset[source]
Property for self.__verticalOffset attribute.
Returns: | self.__verticalOffset. |
Return type: | int |
-
fadeSpeed[source]
Property for self.__fadeSpeed attribute.
Returns: | self.__fadeSpeed. |
Return type: | float |
-
targetOpacity[source]
Property for self.__targetOpacity attribute.
Returns: | self.__targetOpacity. |
Return type: | float |
-
duration[source]
Property for self.__duration attribute.
Returns: | self.__duration. |
Return type: | int |
-
opacity[source]
Property for self.__opacity attribute.
Returns: | self.__opacity. |
Return type: | float |
-
style[source]
Property for self.__style attribute.
Returns: | self.__style. |
Return type: | unicode |
-
setParent(parent)[source]
Reimplements the QLabel.setParent() method.
Parameters: | parent (QObject) – Parent. |
-
resizeEvent(event)[source]
Reimplements the QLabel.resizeEvent() method.
Parameters: | event (QEvent) – QEvent. |
-
mousePressEvent(event)[source]
Reimplements the QLabel.mousePressEvent() method.
Parameters: | event (QEvent) – QEvent. |
-
showEvent(event)[source]
Reimplements the QLabel.showEvent() method.
Parameters: | event (QEvent) – QEvent. |
-
showMessage(message, duration=2500)[source]
Shows given message.
Parameters: |
- message (unicode) – Message.
- duration (int) – Notification duration in milliseconds.
|
Returns: | Method success.
|
Return type: | bool
|
-
hideMessage()[source]
Hides the current message.
Returns: | Method success. |
Return type: | bool |
-
refreshPosition()[source]
Refreshes the Widget position.
Returns: | Method success. |
Return type: | bool |