[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Passive message popup class
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       2001-11-23 0:33:08
[Download RAW message or body]

As part of my plan to improve the way KDE apps interact with the task 
manager, I've just finished a passive popup class that lets you display a 
message next to the taskbar icon. The popup does not interupt the user (hence 
the name 'passive'). The implementation uses the standard icon geometry 
properties from the WM specs, so it should work with any WM and taskbar.

I've attached, the code, a demo app, the docs and a small piccy. I'd like to 
see this (and hopefully some other related tools) in the 3.0 api. Any 
comments?

Cheers

Rich.

["KPassivePopup.html" (text/html)]

<HTML>
<HEAD>
<TITLE>class KPassivePopup</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= \
"#ffffff"> <TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class KPassivePopup</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">
 A passive notification popup widget. <small><A \
HREF="#longdesc">More...</A></small></TD></TR>  </TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Definition</TH><TD><code>#include &lt;<A \
HREF="kpassivepopup_h.html">kpassivepopup.h</A>&gt;</code></TD></TR> \
<TR><TH>Inherits</TH><TD>QFrame <small>(unknown)</small> <small>[public \
]</small></TD></TR> <TR><TH><A HREF="full-list-KPassivePopup.html">List of all \
Methods</A></TH></TR>  </TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A \
HREF="index-long.html">Annotated List</A></small></TD></TR> <TR><TD><small><A \
HREF="header-list.html">Files</A></small></TD></TR> <TR><TD><small><A \
HREF="all-globals.html">Globals</A></small></TD></TR> <TR><TD><small><A \
HREF="hier.html">Hierarchy</A></small></TD></TR> <TR><TD><small><A \
HREF="index.html">Index</A></small></TD></TR> </TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref1">KPassivePopup</A></b> ( \
QWidget *parent=0, const char *name=0 )  </LI>
<LI>&nbsp;<b><A HREF="#ref2">KPassivePopup</A></b> ( WId parent, const char *name=0 ) \
 </LI>
<LI>virtual  &nbsp;<b><A HREF="#ref3">~KPassivePopup</A></b> () 
</LI>
<LI>void &nbsp;<b><A HREF="#ref4">setView</A></b> ( QWidget *child ) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref5">setView</A></b> ( const QString &text, const \
QString &caption = QString::null )  </LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref6">setView</A></b> ( const QString &text, \
const QString &caption, const QPixmap &icon )  </LI>
<LI>QWidget *&nbsp;<b><A HREF="#ref7">view</A></b> ()  const
</LI>
<LI>void &nbsp;<b><A HREF="#ref8">setTimeout</A></b> ( int delay ) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref9">timeout</A></b> ()  const
</LI>
</ul><h4>Public Slots</h4><ul><LI>virtual  void &nbsp;<b><A \
HREF="#ref13">show</A></b> ()  </LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref14">mouseReleaseEvent</A></b> ( QMouseEvent \
*e )  </LI>
</ul><h4>Signals</h4><ul><LI>void &nbsp;<b><A HREF="#ref15">clicked</A></b> () 
</LI>
<LI>void &nbsp;<b><A HREF="#ref16">clicked</A></b> ( QPoint pos ) 
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static  <A \
HREF="KPassivePopup.html">KPassivePopup</A> *&nbsp;<b><A \
HREF="#ref10">message</A></b> ( const QString &text, QWidget *parent, const char \
*name=0 )  </LI>
<LI>static  <A HREF="KPassivePopup.html">KPassivePopup</A> *&nbsp;<b><A \
HREF="#ref11">message</A></b> ( const QString &text, const QString &caption,  QWidget \
*parent, const char *name=0 )  </LI>
<LI>static  <A HREF="KPassivePopup.html">KPassivePopup</A> *&nbsp;<b><A \
HREF="#ref12">message</A></b> ( const QString &text,  const QString &caption, const \
QPixmap &icon,  QWidget *parent, const char *name=0 ) 
</LI>
</ul><h4>Protected Methods</h4><ul><LI>virtual  void &nbsp;<b><A \
HREF="#ref17">positionSelf</A></b> ()  </LI>
<LI>void &nbsp;<b><A HREF="#ref18">moveNear</A></b> ( QRect target ) 
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 A passive notification popup widget.
</p>
<p></p>
<A NAME="KPassivePopup"></A><A NAME="ref1"></A><table width="100%"><tr \
bgcolor="#eeeeee"><td>&nbsp;<strong>KPassivePopup</strong> ( QWidget *parent=0, const \
char *name=0 ) <br></td><td \
align="right"><h3><strong>KPassivePopup</strong></h3></td></tr></table><p></p><p>  \
Creates a popup that will be displayed beside the icon of the specified widget.  </p>
<A NAME="KPassivePopup"></A><A NAME="ref2"></A><table width="100%"><tr \
bgcolor="#eeeeee"><td>&nbsp;<strong>KPassivePopup</strong> ( WId parent, const char \
*name=0 ) <br></td><td \
align="right"><h3><strong>KPassivePopup</strong></h3></td></tr></table><p></p><p>  \
Creates a popup that will be displayed beside the icon of the window specified WId.  \
</p> <A NAME="~KPassivePopup"></A><A NAME="ref3"></A><table width="100%"><tr \
bgcolor="#eeeeee"><td> &nbsp;<strong>~KPassivePopup</strong> () <br></td><td \
align="right"><h3><strong>~KPassivePopup</strong></h3></td></tr></table><p> \
<small>[virtual]</small></p><A NAME="setView"></A><A NAME="ref4"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setView</strong> ( QWidget \
*child ) <br></td><td \
align="right"><h3><strong>setView</strong></h3></td></tr></table><p></p><A \
NAME="setView"></A><A NAME="ref5"></A><table width="100%"><tr \
bgcolor="#eeeeee"><td>void &nbsp;<strong>setView</strong> ( const QString &text, \
const QString &caption = QString::null ) <br></td><td \
align="right"><h3><strong>setView</strong></h3></td></tr></table><p></p><A \
NAME="setView"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> \
void &nbsp;<strong>setView</strong> ( const QString &text, const QString &caption, \
const QPixmap &icon ) <br></td><td \
align="right"><h3><strong>setView</strong></h3></td></tr></table><p> \
<small>[virtual]</small></p><A NAME="view"></A><A NAME="ref7"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td>QWidget *&nbsp;<strong>view</strong> () \
<br></td><td align="right"><h3><strong>view</strong></h3></td></tr></table><p> \
<small>[const]</small></p><A NAME="setTimeout"></A><A NAME="ref8"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>setTimeout</strong> ( int \
delay ) <br></td><td \
align="right"><h3><strong>setTimeout</strong></h3></td></tr></table><p></p><A \
NAME="timeout"></A><A NAME="ref9"></A><table width="100%"><tr \
bgcolor="#eeeeee"><td>int &nbsp;<strong>timeout</strong> () <br></td><td \
align="right"><h3><strong>timeout</strong></h3></td></tr></table><p> \
<small>[const]</small></p><A NAME="message"></A><A NAME="ref10"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td> <A \
HREF="KPassivePopup.html">KPassivePopup</A> *&nbsp;<strong>message</strong> ( const \
QString &text, QWidget *parent, const char *name=0 ) <br></td><td \
align="right"><h3><strong>message</strong></h3></td></tr></table><p> \
<small>[static]</small></p><p>  Convenience method that displays popup with the \
specified  message  beside the  icon of the specified widget.
     </p>
<A NAME="message"></A><A NAME="ref11"></A><table width="100%"><tr \
bgcolor="#eeeeee"><td> <A HREF="KPassivePopup.html">KPassivePopup</A> \
*&nbsp;<strong>message</strong> ( const QString &text, const QString &caption,  \
QWidget *parent, const char *name=0 ) <br></td><td \
align="right"><h3><strong>message</strong></h3></td></tr></table><p> \
<small>[static]</small></p><p>  Convenience method that displays popup with the \
specified caption and message   beside the icon of the specified widget.
     </p>
<A NAME="message"></A><A NAME="ref12"></A><table width="100%"><tr \
bgcolor="#eeeeee"><td> <A HREF="KPassivePopup.html">KPassivePopup</A> \
*&nbsp;<strong>message</strong> ( const QString &text,  const QString &caption, const \
QPixmap &icon,  QWidget *parent, const char *name=0 )
<br></td><td align="right"><h3><strong>message</strong></h3></td></tr></table><p> \
<small>[static]</small></p><p>  Convenience method that displays popup with the \
specified icon, caption and  message beside the icon of the specified widget.
     </p>
<A NAME="show"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td> \
void &nbsp;<strong>show</strong> () <br></td><td \
align="right"><h3><strong>show</strong></h3></td></tr></table><p> <small>[virtual \
slot]</small></p><A NAME="mouseReleaseEvent"></A><A NAME="ref14"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>mouseReleaseEvent</strong> \
( QMouseEvent *e ) <br></td><td \
align="right"><h3><strong>mouseReleaseEvent</strong></h3></td></tr></table><p> \
<small>[virtual slot]</small></p><A NAME="clicked"></A><A NAME="ref15"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>clicked</strong> () \
<br></td><td align="right"><h3><strong>clicked</strong></h3></td></tr></table><p> \
<small>[signal]</small></p><A NAME="clicked"></A><A NAME="ref16"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>clicked</strong> ( QPoint \
pos ) <br></td><td align="right"><h3><strong>clicked</strong></h3></td></tr></table><p> \
<small>[signal]</small></p><A NAME="positionSelf"></A><A NAME="ref17"></A><table \
width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>positionSelf</strong> () \
<br></td><td align="right"><h3><strong>positionSelf</strong></h3></td></tr></table><p> \
<small>[protected virtual]</small></p><A NAME="moveNear"></A><A \
NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void \
&nbsp;<strong>moveNear</strong> ( QRect target ) <br></td><td \
align="right"><h3><strong>moveNear</strong></h3></td></tr></table><p> \
<small>[protected]</small></p><HR><UL><LI><i>Author</i>: Richard Moore  \
</LI><LI><i>Generated</i>: rich on pegasus on Fri Nov 23 00:26:06 2001, using kdoc \
2.0a53.</LI></UL></BODY></HTML>


["logtracker.tar.gz" (application/x-gzip)]
["snapshot5.png" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic