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

List:       koffice-devel
Subject:    Re: Flake [KoDef/commands/threadweaver]
From:       Thomas Zander <zander () kde ! org>
Date:       2006-04-27 21:11:56
Message-ID: 200604272311.57582.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 26 April 2006 21:33, Boudewijn Rempt wrote:
> Is this the place to start thinking about the integration of
> commands, undo/redo and threadweaver?

I've been trying to get threadweaver to compile and failed; not sure why 
but my qmake refuses to create makefiles that automatically create the 
mocs.

Anyway; I read the manual and threadweaver certainly looks nice, but at 
this point I fail to see where in flake we need multithreading. Just 
about everything is about painting or processing input. Which by 
definition has to be single threaded.

For a next step I have been thinking about something I did in KWord; the 
messaging part of the MVC pattern.  The idea is that the data model emits 
signals about changes so the views can pick up on that.
Every app I know emits these changes not from the objects themselves (no 
need to make them qobjects), but by emitting from the controller code 
when the Shape has been moved or changed.

I suggest the InteractionStrategy notify the ShapeManager about things 
like a move, or a delete etc.
The ShapeManager (much like KWords KWFrameViewManager) will then act as 
distributor and re-emit the signals so that components that are 
interrested in, for example, selectionChanged, or ShapeMoved, or 
ShapeAdded they will get notified. The re-emitting is needed so those 
listeners can connect to just 1 object.

The trick here is to make sure that all these events will not get fired 
until the user interaction that caused them is processed. Since the data 
(the Shapes and the selection etc) is not fully stable until that time.
i.e it avoids race conditions.

Anyway; I implemented that all already in KWords KWFrameViewManager, but 
I'd like to hear your thoughts, and possibly ideas on how to integrate 
that with threadweaver.

Sorry for going very technical, I hope the above was clear, the API docs 
in kword might help a little as well here.
-- 
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