Question about way of adding timezones support to clock

Rafał Miłecki zajec5 at gmail.com
Mon Mar 17 12:29:45 CET 2008


Hi,

I wish to add support for displaying list of choosen timezones in
clock's tooltip.

Currently we use
dataEngine("time")->connectSource(timezone, ...);
and we don't care about time in timezone anymore. It is given to us by
timer and "data" argument in
void Clock::dataUpdated(const QString& source, const
Plasma::DataEngine::Data &data);

My idea is to change every "timezone" argument to hard-coded string
"Local". That would still allow me to reveice timer's calling
"dataUpdated" so I won't need to create my own timer. The bad side of
this idea is that I'll have to manage timezones myself (I can't use
other sources from dataEngine("time").

So as result:
1) I connect "Local" source from dataEngine("time")
2) In dataUpdate I use local time and QDataTime for getting time for
choosen timezones

Is my idea acceptable? Or could it be resolved in other, better way?
It's may first time using DataEngine and I am new in C++ and
developing KDE so I'm not really sure of that.

-- 
Rafał Miłecki


More information about the Panel-devel mailing list