Using plasma enums from QML2

Aaron J. Seigo aseigo at kde.org
Sun May 12 00:44:44 UTC 2013


On Friday, May 10, 2013 19:44:09 Marco Martin wrote:
> After many experiments in varuious failing directions, i have the branch
> PlasmaTypesClass of palsma-framework

de-duplication is terrific.

it's still a draft state, i realize. the code in plasma.h is inconsistent in a 
few ways (e.g. Direction doesn't have a Q_ENUMS; the Q_ENUMS for Contraint and 
FormFactor are at the top of the class declaration while others are directly 
after the relevant enum), but i imagine that'll all get ironed out before this 
is merged.

> in QML they would be accessed by name with something like
>  PlasmaCore.Types.TopEdge

not a huge fan of the nomenclature. would be nicer if they could be accessed 
as Plasma.TopEdge (e.g.). no way to inject a top-level QObject anymore in 
QML2?

> * Types name (or any other for what matters) is not particularly pretty
> * in c++ all Plasma::Foo must be changed in Plasma::Types::Foo

what's wrong with the typedefs you put in there?

-- 
Aaron J. Seigo
-------------- 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/20130512/a58bd5e8/attachment.sig>


More information about the Plasma-devel mailing list