#include <kpassivepopup.h>
Public Slots | |
| void | setTimeout (int delay) |
| virtual void | show () |
Signals | |
| void | clicked () |
| void | clicked (QPoint pos) |
Public Methods | |
| KPassivePopup (QWidget *parent=0, const char *name=0, WFlags f=0) | |
| KPassivePopup (WId parent, const char *name=0, WFlags f=0) | |
| virtual | ~KPassivePopup () |
| void | setView (QWidget *child) |
| void | setView (const QString &caption, const QString &text=QString::null) |
| virtual void | setView (const QString &caption, const QString &text, const QPixmap &icon) |
| QVBox * | standardView (const QString &caption, const QString &text, const QPixmap &icon, QWidget *parent=0L) |
| QWidget * | view () const |
| int | timeout () const |
| virtual void | setAutoDelete (bool autoDelete) |
| bool | autoDelete () const |
Static Public Methods | |
| KPassivePopup * | message (const QString &text, QWidget *parent, const char *name=0) |
| KPassivePopup * | message (const QString &caption, const QString &text, QWidget *parent, const char *name=0) |
| KPassivePopup * | message (const QString &caption, const QString &text, const QPixmap &icon, QWidget *parent, const char *name=0, int timeout=-1) |
| KPassivePopup * | message (const QString &caption, const QString &text, const QPixmap &icon, WId parent, const char *name=0, int timeout=-1) |
Protected Methods | |
| virtual void | positionSelf () |
| virtual void | hideEvent (QHideEvent *) |
| void | moveNear (QRect target) |
| virtual void | mouseReleaseEvent (QMouseEvent *e) |
| QRect | defaultArea () const |
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 );
For more control over the popup, you can use the setView(QWidget *) method to create a custom popup.
KPassivePopup *pop = new KPassivePopup( parent );
QVBox *vb = new QVBox( pop );
(void) new QLabel( "<b>Isn't this great?</b>", vb );
QHBox *box = new QHBox( vb );
(void) new QPushButton( "Yes", box );
(void) new QPushButton( "No", box );
pop->setView( vb );
pop->show();
Definition at line 59 of file kpassivepopup.h.
|
||||||||||||||||
|
Creates a popup for the specified widget. |
|
||||||||||||||||
|
Creates a popup for the specified window. |
|
|
Cleans up. |
|
|
Definition at line 136 of file kpassivepopup.h. |
|
|
Emitted when the popup is clicked. |
|
|
Emitted when the popup is clicked. |
|
|
If no relative window (e.g. taskbar button, system tray window) is available, use this rectangle (pass it to moveNear()). Basically KWinModule::workArea() with width and height set to 0 so that moveNear uses the upper-left position.
|
|
|
Reimplemented to destroy the object when autoDelete() is enabled. |
|
||||||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||
|
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.
|
|
||||||||||||||||
|
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.
|
|
|
Reimplemented to detect mouse clicks. |
|
|
Moves the popup to be adjacent to the icon of the specified rectangle. |
|
|
This method positions the popup. |
|
|
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 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. |
|
||||||||||||||||
|
Creates a standard view then calls setView(QWidget*) . |
|
||||||||||||
|
Creates a standard view then calls setView(QWidget*) . |
|
|
Sets the main view to be the specified widget (which must be a child of the popup). |
|
|
Reimplemented to reposition the popup. |
|
||||||||||||||||||||
|
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* )
|
|
|
Returns the delay before the popup is removed automatically. Definition at line 122 of file kpassivepopup.h. |
|
|
Returns the main view. Definition at line 117 of file kpassivepopup.h. |
1.2.18