[Icon Plasmoid] Provide a generic plasmoid class for icon based plasmoid

Loïc Marteau loic.marteau at gmail.com
Sat May 24 21:08:14 CEST 2008


Hi devs !


I was looking at the code of some plasmoid and their size constraint

In fact there is a lot of plasmoid that take to much place (in width) to 
the panel

Each plasmoid have a particular way to implement the size stuff and the 
result is not often perfect.

Is it possible to provide a virtual generic class for plasmoid that have 
only one icon to show ? There is several advantage in providing such class.

    * I think that it will be make the code of such plasmoid really more
      easily to maintain.
    * You can code only one time the stuff for size constraint and code
      it properly
    * there is actually an 100% cpu issue with show-desktop (related to
      specific plasma code i think) and such generic class can avoid
      this to happen
    * don't need to know plasma stuff to code "icon plasmoid"

The idea is to

    * let the herited class which icon to use (perhaps let them changed
      it when it want).
    * have a virtual function that the herited class have to implement
      and that is called when the mouse click on the icon so we don't
      need to know QT slot/signal too ;op.

I think that such class should be very easy to write for one of you and 
can be very useful.
If someone provide me such class i think that i can try to convert some 
existing plasmoid to use it. (Trashcan, showdesktop, showdashboard etc...)

Cheers !



More information about the Panel-devel mailing list