[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] KDE theme colors API for QML
From:       Kevin Krammer <krammer () kde ! org>
Date:       2013-08-08 12:30:35
Message-ID: 201308081430.40110.krammer () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday, 2013-08-08, Денис Купляков wrote:
> > 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__stackl
> > ayout.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??

I was under the impression that there is no QML related code (QML files or C++ 
adapter code) with those enums yet. 

In case you are referring to C++ code that is currently using KColorScheme 
enums, then no, that code can stay unchanged. 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.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["signature.asc" (application/pgp-signature)]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic