Events editor

Andreas Pakulat apaku at gmx.de
Mon Nov 10 18:51:06 UTC 2008


On 10.11.08 19:51:09, BogDan Vatra wrote:
> Hi,
> 
> I want to create an event editor for qt designer integration plugin.
> First, let me say something about the event editor.
> An event editor is an editor for signals (events) like property
> editor, but instead to set properties you will use this to manage the
> slots. This editor will create (if they not exists or remove/comment
> if they already exists) for you slots: void on_<widget name>_<signal
> name>(<signal parameters>);

Thats actually called a signal/slots editor and IMHO we should (in the
midterm) simply replace the "builtin" one from Qt Designer with one that
uses all our facilities to allow adding slots for code thats "yet going to
be written".

> What I want the event editor to do:
> 1. If you don't subclass the form, the event editor can subclass the
> form for you.

Subclassing is not needed for ui-files to work, so we shouldn't enforce
that. Its also not needed for the auto-connect feature to work, you can
simply call a method (I can't recall the name right now) to get it.

> 2. Let you create or remove/comments slots.
> 3. Rename all the slots related to a widget when you rename the widget
> name. Here I think is better to search and rename all declarations who
> use this widget.

Well, a slot connected to a signal of Widget "foo" doesn't necessarily need
to access "foo". So instead it would be better to do the following two
things:

a) check for slots that are called on_<xxx>_<yyy> where xxx is a variable
in the Ui-Class and yyy is a signal of the related class. 
b) check for connect statements that use the name of the form variable in
the whole project (longterm also in all opened projects)

> What I have done:
> 1. I manage to find the ui_<form_name>.h where is it. Please don't
> remove "KDevelop::DUChain::documents( )" function, it helped me a lot.

I guess starting with the Ui::Class? What about the .ui file that you
actually change? You and the C++ support won't see changes done to that
file, until a re-compile. We might need a mapping from the generated header
back to its source-files with CMake.

> P.S. I hope you understand what I want to say, my English is not so good.

Its good enough to understand you IMHO. Oh and btw, Welcome aboard :)

Andreas

-- 
Go to a movie tonight.  Darkness becomes you.




More information about the KDevelop-devel mailing list