• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Slots | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KWindowInfo Class Reference

#include <twindowinfo.h>

Inherits TQObject.

Public Slots

void message (const TQString &text)
 
void message (const TQString &text, const TQPixmap &pix)
 
void message (const TQString &text, int timeout)
 
void message (const TQString &text, const TQPixmap &pix, int timeout)
 
void permanent (const TQString &text)
 
void permanent (const TQString &text, const TQPixmap &pix)
 

Public Member Functions

 KWindowInfo (TQWidget *parent, const char *name=0)
 
virtual ~KWindowInfo ()
 
bool autoDelete () const
 
void setAutoDelete (bool enable)
 

Static Public Member Functions

static void showMessage (TQWidget *window, const TQString &text, int timeout=-1)
 
static void showMessage (TQWidget *window, const TQString &text, const TQPixmap &pix, int timeout=-1)
 

Protected Slots

virtual void save ()
 
virtual void restore ()
 

Protected Member Functions

virtual void display (const TQString &text, const TQPixmap &pix)
 

Detailed Description

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, i18n("Message Body") );
KWindowInfo::showMessage
static void showMessage(TQWidget *window, const TQString &text, int timeout=-1)
Utility method to display a title bar message for the specified window.
Definition: twindowinfo.cpp:29

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.

TQPixmap px;
px.load( "lo16-app-logtracker.png" );
KWindowInfo::showMessage( this, i18n("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@.nosp@m.kde..nosp@m.org
Since
3.1

Definition at line 39 of file twindowinfo.h.

Constructor & Destructor Documentation

◆ KWindowInfo()

KWindowInfo::KWindowInfo ( TQWidget *  parent,
const char *  name = 0 
)

Creates a KWindowInfo with the specified parent.

Definition at line 20 of file twindowinfo.cpp.

◆ ~KWindowInfo()

KWindowInfo::~KWindowInfo ( )
virtual

Cleans up.

Definition at line 25 of file twindowinfo.cpp.

Member Function Documentation

◆ autoDelete()

bool KWindowInfo::autoDelete ( ) const
inline

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

Definition at line 57 of file twindowinfo.h.

◆ display()

void KWindowInfo::display ( const TQString &  text,
const TQPixmap &  pix 
)
protectedvirtual

Displays the message in the titlebar/icon.

Definition at line 103 of file twindowinfo.cpp.

◆ message [1/4]

void KWindowInfo::message ( const TQString &  text)
slot

Shows the specified text in the window title.

Definition at line 45 of file twindowinfo.cpp.

◆ message [2/4]

void KWindowInfo::message ( const TQString &  text,
const TQPixmap &  pix 
)
slot

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

Definition at line 50 of file twindowinfo.cpp.

◆ message [3/4]

void KWindowInfo::message ( const TQString &  text,
const TQPixmap &  pix,
int  timeout 
)
slot

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.

Definition at line 60 of file twindowinfo.cpp.

◆ message [4/4]

void KWindowInfo::message ( const TQString &  text,
int  timeout 
)
slot

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

Definition at line 55 of file twindowinfo.cpp.

◆ permanent [1/2]

void KWindowInfo::permanent ( const TQString &  text)
slot

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

Definition at line 73 of file twindowinfo.cpp.

◆ permanent [2/2]

void KWindowInfo::permanent ( const TQString &  text,
const TQPixmap &  pix 
)
slot

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

Definition at line 85 of file twindowinfo.cpp.

◆ restore

void KWindowInfo::restore ( )
protectedvirtualslot

Resets the window title and icon to the saved values.

If auto-delete is enabled then the object is deleted.

Definition at line 154 of file twindowinfo.cpp.

◆ save

void KWindowInfo::save ( )
protectedvirtualslot

Saves the window title and icon.

Definition at line 125 of file twindowinfo.cpp.

◆ setAutoDelete()

void KWindowInfo::setAutoDelete ( bool  enable)
inline

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

Definition at line 63 of file twindowinfo.h.

◆ showMessage() [1/2]

void KWindowInfo::showMessage ( TQWidget *  window,
const TQString &  text,
const TQPixmap &  pix,
int  timeout = -1 
)
static

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

Definition at line 38 of file twindowinfo.cpp.

◆ showMessage() [2/2]

void KWindowInfo::showMessage ( TQWidget *  window,
const TQString &  text,
int  timeout = -1 
)
static

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

Definition at line 29 of file twindowinfo.cpp.


The documentation for this class was generated from the following files:
  • twindowinfo.h
  • twindowinfo.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.