[Kde-games-devel] KDE theme colors API for QML
Денис Купляков
dener.kup at gmail.com
Thu Aug 8 09:13:42 UTC 2013
> I think it is also important to keep in mind that such a change effects the
> usage pattern for a class considerably.
>
> KColorScheme is currently a value class, it can be copied, passed around and
> stored without any concern for ownership.
> A QObject derived class can not and is additionally bound to the thread that
> created it.
>
> The easiest way might be to create an enum holder class that is registered as
> an uncreatable type, i.e. just service as a namespace for the enum(s).
> BlackBerry's Cascades framework does that a lot [1]
> [1] LayoutOrientation is a class only holding a Type enum, used as the value
> for a different' class' properties, e.g. StackLayout's orientation property
> https://developer.blackberry.com/cascades/reference/bb__cascades__stacklayout.html
That way I think we need to rewrite all accesses to this enums around
all code that use this enums, or I don't understand something??
What do you think about Q_GADGET [1], it looks like what we need?
[1] http://harmattan-dev.nokia.com/docs/platform-api-reference/xml/daily-docs/libqt4/qobject.html
search for Q_GADGET
Best regards,
Denis Kuplyakov
More information about the kde-games-devel
mailing list