Στις 28/06/2012 08:19 μμ, ο/η Aaron J. Seigo έγραψε:
On Thursday, June 28, 2012 08:56:21 Michail V. wrote:
Is there a way to have windows previews in a qml plasmoid?
the ToolTip QML item (which isn't documented on api.kde.org with the other QML
elements since it is written in C++ *sigh*) does not expose the requisite
property in Plasma::ToolTipContent: windowsToPreview.

there are two ways to address this:

* add this functionality to the existing ToolTip element in kde-
runtime/plasma/declarativeimports/core/tooltip.cpp

* include a bit of C++ with the QML task manager applet which exposes this

the two methods are essentially identical with one important difference:
patching the tooltip.cpp in kde-runtime exposes this to *all* users of the QML
elements ... and i don't think we want to do that as we could not take that
API back later and this is one area that is likely to see some re-design in
libplasma2.

so including a bit of C++ that bridges between Plasma::ToolTipContent and QML
which does expose the windowsToPreview API would probably be best. you could
even start by just copying over those files from kde-runtime and modifying as
needed.

cheers.



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
Aaron thanks for the reply,

the plasmoid is already a hybrid one (backend in c++and qml ui) but I dont know if I have the skills to implement this task. I would definitely give it a try in the feature.

If I understood correct, you propose to take the QML ToolTip Item c++ code in my plasmoid and change it in order to use the Plasma::ToolTipContent, windowsPreview
in a way to use it in QML.

Being honest I have already tried to use QML ToolTip in my plasmoid with no success, I couldnt find any documentation but I will give it a second try by examining the
relevant source code...

cheers.



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to