TrayIcon Class Reference

The TrayIcon class implements an entry in the system tray. More...

List of all members.

Public Slots

void setIcon (const QPixmap &icon)
void setToolTip (const QString &tip)
void show ()
void hide ()

Signals

void clicked (const QPoint &, int)
void doubleClicked (const QPoint &)
void closed ()

Public Member Functions

 TrayIcon (QWidget *parent=0, const char *name=0)
 TrayIcon (const QPixmap &, const QString &, QPopupMenu *popup=0, QWidget *parent=0, const char *name=0)
 ~TrayIcon ()
void setWMDock (bool use)
bool isWMDock ()
void setPopup (QPopupMenu *)
QPopupMenu * popup () const
QPixmap icon () const
QString toolTip () const
void gotCloseEvent ()

Protected Member Functions

bool event (QEvent *)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void mouseDoubleClickEvent (QMouseEvent *e)

Properties

QString toolTip
 the tooltip for the system tray entry
QPixmap icon
 the system tray icon.


Detailed Description

The TrayIcon class implements an entry in the system tray.


Constructor & Destructor Documentation

TrayIcon::TrayIcon QWidget *  parent = 0,
const char *  name = 0
 

Creates a TrayIcon object. parent and name are propagated to the QObject constructor. The icon is initially invisible.

See also:
show

TrayIcon::TrayIcon const QPixmap &  icon,
const QString &  tooltip,
QPopupMenu *  popup = 0,
QWidget *  parent = 0,
const char *  name = 0
 

Creates a TrayIcon object displaying icon and tooltip, and opening popup when clicked with the right mousebutton. parent and name are propagated to the QObject constructor. The icon is initially invisible.

See also:
show

TrayIcon::~TrayIcon  ) 
 

Removes the icon from the system tray and frees all allocated resources.


Member Function Documentation

void TrayIcon::doubleClicked const QPoint &  p  )  [signal]
 

This signal is emitted when the user double clicks the system tray icon with the left mouse button, with p being the global mouse position at that moment.

bool TrayIcon::event QEvent *  e  )  [protected]
 

void TrayIcon::hide  )  [slot]
 

Hides the system tray entry.

void TrayIcon::mouseDoubleClickEvent QMouseEvent *  e  )  [protected, virtual]
 

This event handler can be reimplemented in a subclass to receive mouse double click events for the system tray entry.

Note that the system tray entry gets a mousePressEvent() and a mouseReleaseEvent() before the mouseDoubleClickEvent().

See also:
mousePressEvent(), mouseReleaseEvent(), mouseMoveEvent(), QMouseEvent

void TrayIcon::mouseMoveEvent QMouseEvent *  e  )  [protected, virtual]
 

This event handler can be reimplemented in a subclass to receive mouse move events for the system tray entry.

See also:
mousePressEvent(), mouseReleaseEvent(), mouseDoubleClickEvent(), QMouseEvent

void TrayIcon::mousePressEvent QMouseEvent *  e  )  [protected, virtual]
 

This event handler can be reimplemented in a subclass to receive mouse press events for the system tray entry.

See also:
mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), QMouseEvent

void TrayIcon::mouseReleaseEvent QMouseEvent *  e  )  [protected, virtual]
 

This event handler can be reimplemented in a subclass to receive mouse release events for the system tray entry.

The default implementations opens the context menu when the entry has been clicked with the right mouse button.

See also:
setPopup(), mousePressEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), QMouseEvent

QPopupMenu * TrayIcon::popup  )  const
 

Returns the current popup menu.

See also:
setPopup

void TrayIcon::setPopup QPopupMenu *  popup  ) 
 

Sets the context menu to popup. The context menu will pop up when the user clicks the system tray entry with the right mouse button.

void TrayIcon::show  )  [slot]
 

Shows the icon in the system tray.

See also:
hide


Property Documentation

QString TrayIcon::toolTip [read, write]
 

the tooltip for the system tray entry

On some systems, the tooltip's length is limited and will be truncated as necessary.


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 10:20:50 2006 for Intelligence.kdevelop by  doxygen 1.4.6