The "new class" wizard

Nicolás Alvarez nicolas.alvarez at gmail.com
Tue Nov 16 23:19:39 UTC 2010


On 09/11/2010, Esben Mose Hansen <kde at mosehansen.dk> wrote:
> Hi,
>
> I was sitting and developing software and creating a new class, which was
> going to be a subclass QObject. So I dutifully add that as a parent class,
> and
> clicked next, selected the functions to overload, next, and selected the
> file
> names (I name my classes name_t and the files name.h/name.cpp, so I need to
> edit those).
>
> Isn't that work flow a bit silly? It is so easy to override functions these
> days, so couldn't the superclass/override section be skipped? That would
> allow
> us to have a one-page new class wizard:
>
> Name: mywidget_t
> Header File: mywidget.h
> cpp-file: mywidget.cpp
>
> License (drop down) (New license)
>
> Advanced (Hide/show)
>  *
>  * The bit about where in an existent file the class should be defined
>  *
>
> Thoughts?

Interesting idea, I approve. Overridding functions via code completion
is quite easy.

We could also add a dialog to implement/override multiple functions,
like Eclipse has:
http://android-er.blogspot.com/2009/08/tips-and-tricks-in-using-eclipse.html

But that dialog would be separate, which you could invoke after
creating the class or at any other moment, not built into the “create
class” dialog.

-- 
Nicolas




More information about the KDevelop-devel mailing list