[Kommander-devel] Kommander editor for KDE4
Eric Laffoon
eric at kdewebdev.org
Sun Mar 30 18:52:12 EDT 2008
Hi all,
I've been looking through the docs on extending the new Designer.
http://doc.trolltech.com/main-snapshot/qtdesigner.html
Of course it's never been hard to add a custom widget, but in the past that
meant a pixmap in the editor. I've looked through our editor code and so far
everything we've hacked is now functionality in the extension interfaces. So
in the past we created Kommander widgets and then hacked the editor to treat
them like Qt widgets, then hacked the editor to be more like KDE. I thought
it was interesting that Designer on Qt4 looked like it was using my KDE3 file
open dialog.
Anyway on KDE4 what we need to do to use Kommander is make the Kommander
widgets appear to designer as custom widgets. This is at the minimun a few
lines of code per widget. There is still the issue of the file extention for
opening and saving files, which I haven't seen the solution to yet, but it's
the only one and probably comparitively trivial to past solutions. Once in
the Designer inteface properties will be recognized and as far as I can see
eveything in Kommander widgets should be legal in Designer.
Properties can be handled in the property editor, which is not good for
Kommander Text. You can also define a new tool to handle a property and this
would be an *.so library file. That would take care of the editor... That
section of code as a library, or interfaced to a KDevelop platform editor
would do it. It appears you can do custom tools for Action editing and more.
What I'm thinking is that after porting the executor a minimum working editor
would potentially consist of:
1) making the widgets into custom widgets for Designer
2) porting the Kommander Text editor and making it into a library
3) writing the code to interface the editor
4) figuring out how to make designer open and save *.kmdr files
5) setting up a group for Kommander custom widgets and Kommander plugins
This leaves only the oddity that non Kommander widgets could be included, and
clearly if a user did that there would be limited functionality.
Paradoxically support could be added for these widgets, but not as trivially
as I initially imagined. Still it's worth pondering and discussing. I don't
think an initial release of the editor that has the warning "use non
Kommander widgets at your own risk" is that bad if it can be produced
quickly.
I have other things to work on now but I thought I'd toss this out for
consideration and discussion.
--
Eric Laffoon
Project Lead - kdewebdev module
More information about the Kommander-devel
mailing list