class KPassivePopup |
|
|
A dialog-like popup that displays messages without interupting the user. The simplest uses of KPassivePopup are by using the various message() static methods. The position the popup appears at depends on the type of the parent window:
You also have the option of calling show with a QPoint as a parameter that removes the automatic placing of KPassivePopup and shows it in the point you want. The most basic use of KPassivePopup displays a popup containing a piece of text: KPassivePopup.message( "This is the message", this );We can create popups with titles and icons too, as this example shows: QPixmap px; px.load( "hi32-app-logtracker.png" ); KPassivePopup.message( "Some title", "This is the main text", px, this );This screenshot shows a popup with both a caption and a main text which is being displayed next to the toolbar icon of the window that triggered it: For more control over the popup, you can use the setView(QWidget *) method to create a custom popup. KPassivePopup *pop = new KPassivePopup( parent ); Author Richard Moore, rich@kde.org Author Sascha Cunz, sascha.cunz@tiscali.de |
|
Creates a popup for the specified widget. |
|
Creates a popup for the specified window. |
|
Returns the position to which this popup is anchored. |
|
Returns true if the widget auto-deletes itself when the timeout occurs. See also setAutoDelete |
|
Calculates the position to place the popup near the specified rectangle. |
|
Emitted when the popup is clicked. |
|
Emitted when the popup is clicked. |
|
If no relative window (eg taskbar button, system tray window) is available, use this rectangle (pass it to moveNear()). Basically KWindowSystem.workArea() with width and height set to 0 so that moveNear uses the upper-left position. Returns The QRect to be passed to moveNear() if no other is available. |
|
Reimplemented to destroy the object when autoDelete() is enabled. |
|
Convenience method that displays popup with the specified message beside the icon of the specified widget. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified message beside the icon of the specified QSystemTrayIcon. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified caption and message beside the icon of the specified widget. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified caption and message beside the icon of the specified QSystemTrayIcon. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified icon, caption and message beside the icon of the specified widget. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified icon, caption and message beside the icon of the specified QSystemTrayIcon. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified icon, caption and message beside the icon of the specified window. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified popup-style and message beside the icon of the specified widget. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified popup-style and message beside the icon of the specified QSystemTrayIcon. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified popup-style, caption and message beside the icon of the specified QSystemTrayIcon. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified popup-style, caption and message beside the icon of the specified widget. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified popup-style, icon, caption and message beside the icon of the specified widget. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified popup-style, icon, caption and message beside the icon of the specified QSystemTrayIcon. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Convenience method that displays popup with the specified popup-style, icon, caption and message beside the icon of the specified window. Note that the returned object is destroyed when it is hidden. See also setAutoDelete |
|
Reimplemented to detect mouse clicks. |
|
Moves the popup to be adjacent to the icon of the specified rectangle. |
|
Overwrite to paint the border when PopupStyle == Balloon. Unused if PopupStyle == Boxed |
|
This method positions the popup. |
|
Sets the anchor of this popup. The popup tries automatically to adjust itself somehow around the point. |
|
Enables / disables auto-deletion of this widget when the timeout occurs. The default is false. If you use the class-methods message(), auto-delection is turned on by default. |
|
Sets the visual appearance of the popup. See also PopupStyle |
|
Sets 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. See also timeout |
|
Sets the main view to be the specified widget (which must be a child of the popup). |
|
Creates a standard view then calls setView(QWidget*) . |
|
Creates a standard view then calls setView(QWidget*) . |
|
|
Reimplemented to reposition the popup. |
|
Shows the popup in the given point |
|
Returns a widget that is used as standard view if one of the setView() methods taking the QString arguments is used. You can use the returned widget to customize the passivepopup while keeping the look similar to the "standard" passivepopups. After customizing the widget, pass it to setView( QWidget* )
caption - The window caption (title) on the popup text - The text for the popup icon - The icon to use for the popup parent - The parent widget used for the returned KVBox. If left 0L, then "this", i.e. the passive popup object will be used. Returns a KVBox containing the given arguments, looking like the standard passivepopups. See also setView( QWidget * ) See also setView( const QString&, const QString& ) See also setView( const QString&, const QString&, const QPixmap& ) |
|
Returns the delay before the popup is removed automatically. |
|
Updates the transparency mask. Unused if PopupStyle == Boxed |
|
Returns the main view. |
Boxed | - | Information will appear in a framed box ( default ) | |
Balloon | - | Information will appear in a comic - alike balloon | |
CustomStyle | - | Ids greater than this are reserved for use by subclasses |