[Kde-games-devel] KDE theme colors API for QML
Kevin Krammer
krammer at kde.org
Thu Aug 15 11:15:12 UTC 2013
On Friday, 2013-08-09, Денис Купляков wrote:
> > In case you are referring to C++ code that is currently using
> > KColorScheme enums, then no, that code can stay unchanged.
>
> I don't understand how it can be made? I have seen many uses like
> KColorScheme::NormalBackground, but it will need to be rewriten to
> BackgroundRole::NormalBackground if BackgroundRole is wrapper class
> for enum?
No, KColorScheme is still there, so usage of its enum is also still valid.
> > Any QML adapter would simply translate the values.
> > If the enums of the adapter are equal to the one of KColorScheme (which
> > is likely because this is the desired use), then "translating" is a
> > simple cast.
>
> Still we need to stay in sync between this adapter and KColorScheme
> enums that is not good in part of maintaining code.
First I wouldn't expect that the enum changes a lot, if at all. Second, since
this adaptor is only there for exporting an existing enum, it could be
autogenerated during build time, thus always be in sync.
> I still want to know about is Q_GADGET solution or not?
Hmm, yes, that might work as well. Might be an idea to suggest that for KDE
Frameworks 5.
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20130815/adc58509/attachment.sig>
More information about the kde-games-devel
mailing list