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

List:       koffice-devel
Subject:    Tools and plugins
From:       John Hughes <johughes () shaw ! ca>
Date:       2002-09-24 15:58:31
[Download RAW message or body]

Okay. I've been hacking around, and actually had something started, but then 
realized it wasn't working as planned. :-/

I think we need to step back for a second, and plan a little bit.

We have had a sudden influx in new tools/developments, using the current 
methods and techniques.

Instead of working directly with the karbon view, I think that there should be 
a level of abstraction. I think we also need to redesign the tool classes, 
and make them more complete.

For example, I think that a tool to create a shape should be given access to 
mouse events from the canvas, and somewhere to draw its thing. This is where 
the level of abstraction comes in. The tool would stick points in a buffer of 
sorts, and, while that tool is still being used (dragging a circle across) 
those points would be drawn on the canvas using the blue preview painter. 
Once the tool receives the correct mouse/keyboard events, it should say so, 
and the buffer would be used to do the command creation for undo proccesses, 
and actually stuck on the canvas in all its glory.

A modifying tool should also have its own class. It would be given 
mouse/keyboard events, and a copy of (not a pointer to..) the object(s) that 
it is directly working on. Again, it would be given an object buffer so that 
it could update whatever its doing.

At no time should the tool have to deal with anything underlying. Things that 
are common to the tool classes should be done automatically by the base 
class.

I'd also like to have stuff in the UI section improved.

As it currently sits, all tools are created and loaded at startup in 
karbon_view.cc. Slots are connected to the "toolbox".

With the kparts::plugin system, all the plugins are loaded at startup, but 
they are not loaded directly from anything. You can get the view by querying 
the kpart. You call the plugin's functions by creating KActions, and sticking 
them in toolbars with an .rc file.

Basically, what it comes down to, is I'm gonna need some help on this one to 
actually get the code down. I'm not going to pretend to be super coder. hehe 
;-)
-- 
Later,

-John
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://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