itom 2.2.1
PopupWidget Class Reference

#include <popupWidget.h>

Inheritance diagram for PopupWidget:
BasePopupWidget

List of all members.

Public Types

typedef BasePopupWidget Superclass

Public Slots

void pinPopup (bool pin)

Public Member Functions

 PopupWidget (QWidget *parent=0)
bool isActive () const
void setActive (bool)
bool autoShow () const
void setAutoShow (bool)
int showDelay () const
void setShowDelay (int delay)
bool autoHide () const
void setAutoHide (bool autoHide)
int hideDelay () const
void setHideDelay (int delay)
virtual void hidePopup ()
 Reimplemented for internal reasons.

Protected Slots

void updatePopup ()
virtual void onEffectFinished ()

Protected Member Functions

virtual void leaveEvent (QEvent *event)
virtual void enterEvent (QEvent *event)
virtual bool eventFilter (QObject *obj, QEvent *event)
virtual void setBaseWidget (QWidget *baseWidget)

Properties

bool active
bool autoShow
int showDelay
bool autoHide
int hideDelay

Private Member Functions

 Q_DECLARE_PRIVATE (PopupWidget)
 Q_DISABLE_COPY (PopupWidget)

Detailed Description

Description:


Member Function Documentation

void PopupWidget::onEffectFinished ( ) [protected, virtual, slot]

restore the AutoShow if needed.

Reimplemented from BasePopupWidget.

void PopupWidget::pinPopup ( bool  pin) [slot]

Convenient function that calls setAutoHide(!pin) and opens the popup if pin is true regardless of the value of AutoShow. It is typically connected with a checkable button to anchor the popup.

void PopupWidget::setAutoHide ( bool  autoHide)

Don't automatically close the popup when leaving the widget. Calling setAutoHide automatically updates the state close the popup if the mouse is not over the popup nor the base widget.

void PopupWidget::setAutoShow ( bool  mode)

Calling setAutoShow automatically updates opens the popup if the cursor is above the popup or the base widget.

void PopupWidget::setBaseWidget ( QWidget *  baseWidget) [protected, virtual]

Widget the popup is attached to. It opens right under baseWidget and if the PopupWidget sizepolicy contains the growFlag/shrinkFlag, it tries to resize itself to fit the same width of baseWidget.

Reimplemented from BasePopupWidget.


Property Documentation

bool PopupWidget::active [read, write]

Control whether the popup listens to the application and baseWidget events and decides if it needs to be permanently or temporarily hidden. You might want to setActive(false) when embedding the popup into a static layout intead of having it top-level (no parent). Consider also removing its windowFlags (Qt::ToolTip | Qt::FramelessWindowHint) and removing the baseWidget. True by default

bool PopupWidget::autoHide [read, write]

Control wether the popup automatically closes when the mouse leaves the widget. True by default

bool PopupWidget::autoShow [read, write]

Control wether the popup automatically opens when the mouse enter the widget. True by default

int PopupWidget::hideDelay [read, write]

Time in ms to wait before closing the popup if autoHide is set. 200ms by default

int PopupWidget::showDelay [read, write]

Time in ms to wait before opening the popup if autoShow is set. 20ms by default


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Friends