Windows previews in qml plasmoid?

Martin Gräßlin mgraesslin at kde.org
Sat Jun 30 06:33:00 UTC 2012


Am 29.06.2012 16:35, schrieb Michail Vourlakos:
>>> I dont know if this is possible with KWIn scripting, is it possible 
>>> that
>>> maybe a KWin effect can do this?
>>> (backend in C++ and QML the ui?)
>> That's the idea behind declarative QML scripting: a very powerful 
>> user
>> interface to replace effects. With declarative KWin scripts you get 
>> the
>> complete power of KWin exposed + QML + anything you want to import 
>> from QML
>> (e.g. dataengines).
> So what I am asking is if a kwin effect can have a c++ part and a qml
> part. The c++ part is used only
> for that spesific effect. An example I think could be the new tabbox
> effect in kwin.  The tabbox effect
> I think is a C++ wrapper in kwin for QML Layouts.

What you want is a declarative KWin script: ui in QML and you import 
whatever you want. You can import e.g. all dataengines (except tasks) or 
any other declarative library.

Our solution to QML + effects are just declarative KWin scripts. It 
provides the same as effects, but more powerful.
>
> "I would love to have in my hands a Hello World effect for that 
> situation,
> for example a dashboard kwin effect that loads in the center a Hello
> qml element."
Have a look at the desktop change OSD KWin script :-)

>>> (for example the plasmoid currently uses atoms from Xlib in order 
>>> to move
>>> a task from activity to activity, I dont think scripting can do 
>>> this
>>> right now)
>> Right now not, but if you mention that to me, I can add the bindings 
>> in less
>> than five minutes and with KWin scripting it does not need XAtoms.
> About your proposal in implementing very fast all the needed
> bindings. It is not just the atoms,
> there are many workarounds in the plasmoid right now for example it
> can load the wallpapers
> even for stopped activities in order to use them in the WorkAreas
> represantations.
One of the ideas is to have everything a plasmoid could do with exactly 
the same API. It's on the TODO for 4.10 :-)

> What I am going to do is finish the plasmoid-workflow with no window
> previews in its basic
> implementation and create an experiment feature of window previews
> that the user can
> enable/disable easily (Being honest I dont even know if I can
> implement such feature).
Please don't: our solutions currently are not suited for something like 
that. The taskbar thumbnails are for taskbar thumbnails and nothing 
else. We tried to use it somewhere else and hit the wall. It's not 
flexible enough.

The screenshot effect is even less suited for the task and might fail 
completely if you try to get multiple screenshots at once. It's not 
meant for that, it's for KSnapshot's usecase.

Cheers
Martin


More information about the Plasma-devel mailing list