# 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
  rectangle to be placed at (QRect)

Return:
  position to place the popup (QPoint)

#### EricPassivePopup.__defaultArea

__defaultArea()

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

Return:
  default rectangle (QRect)

#### EricPassivePopup.__moveNear

__moveNear(target)

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

target
  rectangle to be placed at (QRect)

#### 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
  reference to the hide event (QHideEvent)

#### EricPassivePopup.mouseReleaseEvent

mouseReleaseEvent(evt)

Protected method to handle a mouse release event.

evt
  reference to the mouse event (QMouseEvent)

#### 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
  value for the delay in milliseconds (integer)

#### EricPassivePopup.setView

setView(child)

Public method to set the message view.

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

#### EricPassivePopup.setVisible

setVisible(visible)

Public method to show or hide the popup.

visible
  flag indicating the visibility status (boolean)

#### EricPassivePopup.show

show(p=None)

Public slot to show the popup.

p
  position for the popup (QPoint)

#### EricPassivePopup.timeout

timeout()

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

Return:
  the delay before the popup is removed automatically (integer)

#### EricPassivePopup.view

view()

Public method to get a reference to the message view.

Return:
  reference to the message view (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