Monday, May 21, 2007

clockwork plasma

with the time engine working, ruphy went to work on the clock a bit. i pitched in a few fixes to Plasma::Svg for what we are doing with the clock and we now have a fully svg themable clock interface. well, as long as its an analog goes-around-in-a-circle kind of clock. adding additional types of clock faces will be a future effort.

adding a rather unfancy text clock was pretty easy:

Plasma::LineEdit* l = new Plasma::LineEdit;
m_grahpicsScene->addItem(l);
Plasma::DataEngine* time = PlasmaApp::self()->loadDataEngine("time");
time->connectSource("time", l);


what's neat is that it uses the same data source as the analog clock being shown on screen, so there is only one thing waking up the cpu to look at what time it is. we
this has brought me to the issue of configuring DataEngines. since they are meant to be shared, i'm going to have to think a bit on how i want to do that. meanwhile i'll work on the laundry list of other things that need doing.

what's double neat is that you could connect any engine to that line edit =) we have a few other widgets already done: radio buttons, checkboxes, pushbuttons ... more to come including an html widget.

#plasma and panel-devel (irc and mailing list, respectively) are healthily active and happy places again. whee.

people are already working on other DataEngines, so that's happiness. doxygen pages are being generated, which means i need to get my ass in gear and start writing class docu for the ones that are missing it. like DataEngine ;) i also need to provide some tools for testing and exploring DataEngines. those are my next two tasks.

p.s. if you want screenshots or, better yet, screencasts of this stuff, that's coming with next week's commit digest. and speaking of commit digests, i'm rediculously hungry and i only ate a few hours ago. gah. stupid metabolism.

11 comments:

Milan said...

Can't wait until next week.. ;)

Diederik said...

Cool stuff! Let's hope it will stop those de-motivating dot comments too :)

Something slipped my mind: Would it be possible to use these same classes too in other applications, which like to implement themeable user interfaces? I understand it's a bit early for for idea, and it's more something for KDE 4.1 or 4.2. The whole separation of data source and visualization seams exactly the thing app developers need to accomplish such interface. :-)

Ian said...

Any thoughts about creating a separate QGV widget library? At least in the mid or long term - I understand there isn't much time before October.

These sound like handy widgets. Amarok might end up using them for our new context browser.

Landolsi said...

Hi Aron,

I can not wait to see the next week digest!!!!

By the way, will the new plasma widgets like the radio buttons, checkboxes, pushbuttons share the oxygen style?

Anonymous said...

when we are going to see more plasmoids? :D

Aaron J. Seigo said...

@ian:
"Any thoughts about creating a separate QGV widget library?"

no; the only reason we're doing this ourselves is that trolltech won't have the Real Deal ready before qt 4.4 so we have to come up with a stop gap solution. with qt 4.4 we should have something much, much more interesting.

they'll be releasing previews of this work, which should allow us to re-target pretty much any qwidget to QGV. it comes with a new and improved layout system as well. but .. it's still in research.

@diederik:
" Would it be possible to use these same classes too in other applications, which like to implement themeable user interfaces?"

see my above comment @ian regarding the widgets; other than the widgets, yes, i do want to see such classes as Plasma::Svg, ::DataEngine, etc available for other applications to use, both for apps to use internally as well as for apps to work better with the plasma workspace.

@landolsi:
"By the way, will the new plasma widgets like the radio buttons, checkboxes, pushbuttons share the oxygen style?"

they use whatever style you have active as they use QStyle to draw everything.

@anonymous
"when we are going to see more plasmoids?"

as more of the infrastructure gets into place, then we'll start making more plasmoids. in fact, i'll be publishing tutorials on techbase so others can do so as well.

applet loading (simple), dataengine configuration, layout save/restor, kross and packages are the remaining pieces.

Scott Nazelrod said...

I hope we'll be able to still have the seven-segment digital display that's in KDE 3. That's still my favorite taskbar clock.

Aaron J. Seigo said...

@scott nazelrod:
"I hope we'll be able to still have the seven-segment digital display that's in KDE 3."

if someone writes a DataVisualization class that paints LCD style letters that would be simple. in fact, even better would be to write one that loads in an SVG with the numerals 0-9, a ':', and perhaps the letters 'am' and 'pm' which would then take a QDate (passed into updated(DataEngine::Data&)) and paint the appropriate glyphs.

then with those same 4 loc you could have a nice clock with pretty much any sort of type face including digital. =)

if you'd like to try your hand at this (it's pretty simple!) find me in #plasma

Rno said...

Hello,

Where can I find any documentation, source code to help me understand the design of plasma ?

Aaron J. Seigo said...

@rno: once things are more settled in, i'll be writing a tutorial series on TechBase. API documentation is already started; classes that are in good working order are mostly or completely documented.

is there something in specific you are looking for or just general information? if you're wanting to get involved, you can find us in #plasma on irc or panel-devel@kde.org by email.

Rno said...

Hello,

in fact I would like some information about plasma concept to understand its internal design and how it works.

Plasma seems to be really promising and I would not like to miss a thing :)