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

List:       koffice-devel
Subject:    Re: More about Events, tools and pointer devices
From:       Thomas Zander <zander () kde ! org>
Date:       2006-10-31 12:23:26
Message-ID: 200610311323.30791.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi Boudewijn.

On Monday 30 October 2006 21:57, Boudewijn Rempt wrote:
> I haven't found something in flake to supply this and I haven't a
> good design at the moment: for now, I want to have an empty base
> class
> KoCanvasResourceProvider that can be retrieved from KoCanvasBase and
> upcasted to an app-specific class like KisResourceProvider so I can
> continue porting the Krita tools.

The concept behind a resource associated with the canvas sounds fine to 
me.
Having it properties based (name/value pairs settable/gettable without 
an exact name) makes it more extendable and allows you to not have one 
class per app. I'd hate to see app-specific casts in tools as that 
makes it depend on the libraries of that app.

Take a look at libs/kotext/styles/Styles_p.h and the users of that class 
in the same dir.
Using an enum allows you endless extensibility, even without having 
extra methods in the class.

Last meme for this thread; make this KoCanvasResources class a QObject 
and make it emit a propertyChanged(PropertiesEnum p, const QVariant 
&v); so tools can connect to that.
-- 
Thomas Zander

[Attachment #5 (application/pgp-signature)]

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


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

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