tooltips in QML widgets

Aaron J. Seigo aseigo at kde.org
Wed Nov 30 13:02:25 UTC 2011


On Wednesday, November 30, 2011 12:56:58 Marco Martin wrote:
> On Wednesday 30 November 2011, Aaron J. Seigo wrote:
> > On Wednesday, November 30, 2011 11:04:20 Marco Martin wrote:
> > > yes, ther are some things in core that i would move out to a graphics
> > > specific implementation, like the svg/framesvg items, tooltips and
> > > dialog, those will need 2 implementations, while the dataengine ones
> > > will be the same
> > 
> > a lot will depend on how much we want to provide via QML bindings. if
> > these
> > were all done via QML components, we don't need any public API in the C++
> > libplasma-qml, and the public API in libplasma-qgv could remain as-is. my
> > concern would only be to share implementations as i do not want the QML
> > tooltips drawn one way and the QGV ones another; the maintenance burdon
> > would be high.
> 
> ah, right the part in libplasma (was mostly thinking about the qml binding)
> for tooltips maybe it can be saved?
> 
> ie we would have an abstracttooltipmanager, and the two derivations, the
> target is a simple qobject then the implementations try to figure out what
> the passed qobject actually is so they can implement a working filter
> (yeah, not so pretty)

this approach is likely to end up with us having a lot of such classes and 
it'll be a little bit of a mess. most of these splits would be motivated by 
just a couple (if that) methods in each class.

 what i'm considering now is a "platform plugin", much as Qt itself has, which 
is used for these target-specific features. for instance, 
Plasma::Applet::Private would be generated by this platform class.

this way instead of having a bunch of abstract classes with reimplementations 
in two places we have nice clean regular classes in libplasma and the 
implementation target libraries register the platform specific 
implementation(s).

this may be done by having one abstract base class, such as Corona, which the 
implementation libraries subclass and which are used by either QGV or QtQuick-
only using apps. (Plasma::AbstractCorona in libplasma, Plasma::Corona in 
libplasma-qgv and something similar in libplasma-qml; this keeps a bit more 
source compatibility :)

> for things that need to be a qdeclarativeitem instead i don't see other
> solutions than 2 implementations, but the good news is that things like
> framesvgitem is a very thin glue boilerplate thing, so easy to deal and
> maintain

yes, for things like actual widgets / components, there is no real way around 
this: they are simply different targets. i don't expect, for instance, for 
their to be one Plasma::IconWidget that can be used as either pure QML or on a 
QGraphicsScene ;)

> > > > it would be very nice to get together for a week or so with some
> > > > people
> > > > in person to work on libplasma2 issues like this and see how much
> > > > progress we could make. i do have the house to myself for a week
> > > > starting on friday ...
> > > > plasma party at my place? ;)
> > > 
> > > ugh.. this friday ? ;) (only thing i'm concerned is the final rush for
> > > active2)
> > 
> > ah, yes, THAT thing. ;P ah well, was just a thought. it would still be
> > good, i think, to do an in-person devel sprint for the libplasma2 push.
> > doesn't have to be now, but i'd like to see it happen by early next year
> > (e.g. before march)
> 
> yep, 100% agree (and i would love next week, but with the release is really
> tight)
> i would like a meeting asap, and very small (like a magnitude of 3-4 people,
> independent from the next tokamak)

agreed completely. you, me and 1-3 other people would be excellent. people who 
can and will hack on libplasma. at least one newer person would be good too to 
keep the new blood pumping ;)

who on this list would be interested in attending such a thing? best if you 
live in / near Europe so we can get you here quickly and innexpensively :)

> don't know if is possible after the release,

you mean after the 13th? it's probably tight for most people.. i might be able 
to make it depending on the exact dates.

> maybe not many people can around christmas period?
> what about some days/a week of the very first days of january?

i can't during the start of january, unfortunately. mid-january works though.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111130/eb5ae441/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111130/eb5ae441/attachment-0001.sig>


More information about the Plasma-devel mailing list