Question about way of adding timezones support to clock

Chani chanika at gmail.com
Tue Mar 18 09:41:16 CET 2008


On March 18, 2008 01:30:48 Rafał Miłecki wrote:
> 2008/3/17, Aaron J. Seigo <aseigo at kde.org>:
> > On Monday 17 March 2008, Rafał Miłecki wrote:
> >  > I wish to add support for displaying list of choosen timezones in
> >  > clock's tooltip.
> >
> > the patch found here:
> >
> >         http://mattr.info/r/306/
> >
> >  should give us the ability to update the tooltip right before it is
> > shown. would you like to apply it locally and give it a try with the
> > clock's tip? if it works out well enough, then we could commit this to
> > libplasma.
> >
> >  it would open up a nice "junior job" as well: going around and moving
> >  expensive tooltips in applets to updateToolTip =)
>
> Sorry, but I can't understand how could I use it :(
>
> Of course I can make
>
> void Clock::updateToolTip() {
>     Plasma::ToolTipData tipData;
>     tipData.mainText = currentTime();
>     setToolTip(tipData);
> }
>
> but what about updating this tooltip? I still need to have some source
> connected plus I need this source for updaing clock itself (not only
> it's tooltip).
>
> I really tried to understand this idea but simply can't.

connect to just the source needed for the clock itself.
inside Clock::updateToolTip() use DataEngine::query(const QString& source) to 
get the time for other timezones you want.
the query function gets the data immediately, once, without connecting.

-- 
This message brought to you by evyl bananas, and the number 3.
www.chani3.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080318/3e753057/attachment.pgp 


More information about the Panel-devel mailing list