org.kde.koala

Class KWindowInfo

public class KWindowInfo extends QObject

Displays messages in the window icon and title. The message is usually transient with the original title and icon being restored automatically after a specified time. The simplest use displays a text message in the window title:
    KWindowInfo.showMessage( this, "Message Body" );
 
This more complex example changes the window icon, as well as displaying the text. In addition, this example overrides the default timeout to ensure the message is only displayed for 1 second.
    QPixmap px;
    px.load( "lo16-app-logtracker.png" );
    KWindowInfo.showMessage( this, "Message Body", px, 1000 );
 
If the parent window inherits KSystemTray then KWindowInfo changes the pixmap and tooltip of the system window to display the message.

Author: Richard Moore, rich@kde.org

UNKNOWN: Displays messages in the window icon and title.

Constructor Summary
protected KWindowInfo(Class dummy)
KWindowInfo(QWidget parent, String name)
Creates a KWindowInfo with the specified parent.
KWindowInfo(QWidget parent)
Method Summary
booleanautoDelete()
Returns true iff the object should delete itself when it resets.
StringclassName()
protected voiddisplay(String text, QPixmap pix)
Displays the message in the titlebar/icon.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
voidmessage(String text)
Shows the specified text in the window title.
voidmessage(String text, QPixmap pix)
Shows the specified text in the window title, and sets the window icon.
voidmessage(String text, int timeout)
Shows the specified text in the window title for the specified time.
voidmessage(String text, QPixmap pix, int timeout)
Shows the specified icon and text in the window title and WM icon, for the specified time.
QMetaObjectmetaObject()
voidpermanent(String text)
Shows the specified text in the window title with no timeout.
voidpermanent(String text, QPixmap pix)
Shows the specified text and icon in the window title with no timeout.
protected voidrestore()
Resets the window title and icon to the saved values.
protected voidsave()
Saves the window title and icon.
voidsetAutoDelete(boolean enable)
Set to true if you want the object to delete itself when the message timeout occurs.
static voidshowMessage(QWidget window, String text, int timeout)
Utility method to display a title bar message for the specified window.
static voidshowMessage(QWidget window, String text)
static voidshowMessage(QWidget window, String text, QPixmap pix, int timeout)
Utility method to display a title bar message and icon for the specified window.
static voidshowMessage(QWidget window, String text, QPixmap pix)

Constructor Detail

KWindowInfo

protected KWindowInfo(Class dummy)

KWindowInfo

public KWindowInfo(QWidget parent, String name)
Creates a KWindowInfo with the specified parent.

UNKNOWN: Creates a KWindowInfo with the specified parent.

KWindowInfo

public KWindowInfo(QWidget parent)

Method Detail

autoDelete

public boolean autoDelete()
Returns true iff the object should delete itself when it resets.

UNKNOWN: Returns true iff the object should delete itself when it resets.

className

public String className()

display

protected void display(String text, QPixmap pix)
Displays the message in the titlebar/icon.

UNKNOWN: Displays the message in the titlebar/icon.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

message

public void message(String text)
Shows the specified text in the window title.

UNKNOWN: Shows the specified text in the window title.

message

public void message(String text, QPixmap pix)
Shows the specified text in the window title, and sets the window icon.

UNKNOWN: Shows the specified text in the window title, and sets the window icon.

message

public void message(String text, int timeout)
Shows the specified text in the window title for the specified time.

UNKNOWN: Shows the specified text in the window title for the specified time.

message

public void message(String text, QPixmap pix, int timeout)
Shows the specified icon and text in the window title and WM icon, for the specified time. The time is a delay specified in milliseconds, or one of the two special values. The special values are -1 which means the default timeout should be used, and 0 which means the message is permanent.

UNKNOWN: Shows the specified icon and text in the window title and WM icon, for the specified time.

metaObject

public QMetaObject metaObject()

permanent

public void permanent(String text)
Shows the specified text in the window title with no timeout.

UNKNOWN: Shows the specified text in the window title with no timeout.

permanent

public void permanent(String text, QPixmap pix)
Shows the specified text and icon in the window title with no timeout.

UNKNOWN: Shows the specified text and icon in the window title with no timeout.

restore

protected void restore()
Resets the window title and icon to the saved values. If auto-delete is enabled then the object is deleted.

UNKNOWN: Resets the window title and icon to the saved values.

save

protected void save()
Saves the window title and icon.

UNKNOWN: Saves the window title and icon.

setAutoDelete

public void setAutoDelete(boolean enable)
Set to true if you want the object to delete itself when the message timeout occurs.

UNKNOWN: Set to true if you want the object to delete itself when the message timeout occurs.

showMessage

public static void showMessage(QWidget window, String text, int timeout)
Utility method to display a title bar message for the specified window.

UNKNOWN: Utility method to display a title bar message for the specified window.

showMessage

public static void showMessage(QWidget window, String text)

showMessage

public static void showMessage(QWidget window, String text, QPixmap pix, int timeout)
Utility method to display a title bar message and icon for the specified window.

UNKNOWN: Utility method to display a title bar message and icon for the specified window.

showMessage

public static void showMessage(QWidget window, String text, QPixmap pix)