eric7.EricWidgets.EricPassivePopup

Module implementing dialog-like popup that displays messages without interrupting the user.

Global Attributes

None

Classes

EricPassivePopup Class implementing dialog-like popup that displays messages without interrupting the user.
EricPassivePopupStyle Class defining the popup styles.

Functions

None


EricPassivePopup

Class implementing dialog-like popup that displays messages without interrupting the user.

Signals

clicked
emitted to indicate a mouse button click

Derived from

QFrame

Class Attributes

DefaultPopupTime

Class Methods

None

Methods

EricPassivePopup Constructor
__calculateNearbyPoint Private method to calculate the position to place the popup near the specified rectangle.
__defaultArea Private method to determine the default rectangle to be passed to moveNear().
__moveNear Private method to move the popup to be adjacent to the specified rectangle.
__positionSelf Private method to position the popup.
getCustomData Public method to get some custom data.
hideEvent Protected method to handle the hide event.
mouseReleaseEvent Protected method to handle a mouse release event.
setCustomData Public method to set some custom data.
setTimeout Public method to set the delay for the popup is removed automatically.
setView Public method to set the message view.
setVisible Public method to show or hide the popup.
show Public slot to show the popup.
timeout Public method to get the delay before the popup is removed automatically.
view Public method to get a reference to the message view.

Static Methods

None

EricPassivePopup (Constructor)

EricPassivePopup(style=EricPassivePopupStyle.BOXED, parent=None)

Constructor

style (EricPassivePopupStyle)
style of the popup
parent (QWidget)
reference to the parent widget

EricPassivePopup.__calculateNearbyPoint

__calculateNearbyPoint(target)

Private method to calculate the position to place the popup near the specified rectangle.

target (QRect)
rectangle to be placed at
Return:
position to place the popup
Return Type:
QPoint

EricPassivePopup.__defaultArea

__defaultArea()

Private method to determine the default rectangle to be passed to moveNear().

Return:
default rectangle
Return Type:
QRect

EricPassivePopup.__moveNear

__moveNear(target)

Private method to move the popup to be adjacent to the specified rectangle.

target (QRect)
rectangle to be placed at

EricPassivePopup.__positionSelf

__positionSelf()

Private method to position the popup.

EricPassivePopup.getCustomData

getCustomData(key)

Public method to get some custom data.

key (str)
key for the custom data
Return:
stored data
Return Type:
Any

EricPassivePopup.hideEvent

hideEvent(evt)

Protected method to handle the hide event.

evt (QHideEvent)
reference to the hide event

EricPassivePopup.mouseReleaseEvent

mouseReleaseEvent(evt)

Protected method to handle a mouse release event.

evt (QMouseEvent)
reference to the mouse event

EricPassivePopup.setCustomData

setCustomData(key, data)

Public method to set some custom data.

key (str)
key for the custom data
data (Any)
data to be stored

EricPassivePopup.setTimeout

setTimeout(delay)

Public method to set the delay for the popup is removed automatically.

Setting the delay to 0 disables the timeout. If you're doing this, you may want to connect the clicked() signal to the hide() slot. Setting the delay to -1 makes it use the default value.

delay (int)
value for the delay in milliseconds

EricPassivePopup.setView

setView(child)

Public method to set the message view.

child (QWidget)
reference to the widget to set as the message view

EricPassivePopup.setVisible

setVisible(visible)

Public method to show or hide the popup.

visible (bool)
flag indicating the visibility status

EricPassivePopup.show

show(p=None)

Public slot to show the popup.

p (QPoint)
position for the popup

EricPassivePopup.timeout

timeout()

Public method to get the delay before the popup is removed automatically.

Return:
the delay before the popup is removed automatically
Return Type:
int

EricPassivePopup.view

view()

Public method to get a reference to the message view.

Return:
reference to the message view
Return Type:
QWidget
Up


EricPassivePopupStyle

Class defining the popup styles.

Derived from

enum.Enum

Class Attributes

BOXED
CUSTOM
STYLED

Class Methods

None

Methods

None

Static Methods

None
Up