Hello Everyone,<br>
<br>
First of all, Sorry to [mX] for putting SK back in the scenario of plasma ;-)<br>
<br>
I saw the slides of Aaron's presentation about plasma. Looks like he
has very nice and very well defined ideas about plasma. There are
things which suits to our purposes too. As superkaramaba is going to be
integrated to plasma, and some of the libs of SK may be useful to other
plasma components, I think It would be very&nbsp; nice to make such
libs of SK decoupled from SK design and make generic enough to be used
by other extenders, applets. <br>
First thing, sensors.<br>
<br>
Right now, sensors are integrated with SK as We can define in theme
file, which sensor is shown by a meter.The purpose of sensor is just to
provide data independent of how the data is being shown, So sensor has
nothing to do with meter.<br>
We can create a interface of the class sensor, which will be implemented by subclasses.The interface may consist of :-<br>
<br>
type(), which says what type of data is returned by the sensor. it can be bool,int,QString,QMap&lt;QString,QString&gt; <br>
returnValue() which actually returns the value.<br>
readOnly(), which tells if sensor is readOnly Or its properties can be
changed. e.g., cpusensor is readonly. xmmssensor is read-write..<br>
SIGNAL update(), which can be connected by a meter to know when it needs to be updated.<br>
....and so on.<br>
<br>
Sensors doesn't know anything about Meters at all. This way, sensors are useful for all the applets and extenders too. <br>
And one more useful feature is that, we can make sensor interface public and sensors can be created as plugins.<br>
<br>
Now Meters:-<br>
Meters actually acts as widgets but implemented as QObject, where they
just paint over karambawidget. I think, this is inefficient as one
repaint of karambawidget results in repaint of all the Meters(because
karambawidget iterates over all the meters for painting). QWidgets are
inherently optimized for painting. We should utilize this fact. Make
all the Meters as real Widgets with karambaWidget as Parent widget.<br>
The Meter Widgets would be very customizable. Take e.g. bars:- We
should be able to set Mask, backgrounds etc. It may even be possible to
make the each percent of bar as different picture. This way bars can be
converted into a dial(through assigning different QPixmap for different
percentage).<br>
<br>
theme write are responsible to connect meters to sensors. For example,
setBarValue(cpuload.returnValue()). then connecting sensors update
SIGNALS to meters slots.<br>
<br>
Now, As meters are very customizable, these meters can be used even by applets and extenders. <br>
meters would go into libplasma. Sensors would become plasma engine.<br>
<br>
The SK parts part would be done by KarambaWidget. KarambaManager would
load/unload theme. It creates KarambaWidget and And its childwidgets
and all the language interface stuff, as we discussed.<br>
So we should start making sensors free of meters. and meters, free of sensors in SK codebase.<br>
Is this design looks good enough?<br>
<br>
Vinay Khaitan<br>