KJanusWidget and Model-View (was: Re: KDialog / KDialogBase)

Mirko Boehm mirko at kde.org
Mon Jan 2 08:32:59 GMT 2006


On Sunday 01 January 2006 15:51, Benjamin Meyer wrote:
> > Wouldn't it be possible to use the Qt4 Model-View interfaces for the
> > dialogs. Just a short sketch:
>
> yes
>
> > class KDialogView : public QAbstractItemView
> > This shows a standart KDE Dialog and uses the model to determine whether
> > it needs to show a tree or an iconview for navigating the pages (and
> > perhaps, if there's only one page, not showing any navigation).
>
> Well you wouldn't want to call it KDialogView because it wont implement a
> QAbstractItemView, but you could have KDialog take a Model and then display
> it in a view.
Exactly. The key here is to *not* inherit QDialog to implement the dialog main 
contents, but to compose those two parts from one class that implements the 
dialog interface (for consistency) and another set of classes that implement 
the different dialog types. That is why the whole janus widget idea is wrong. 
It is possible to do this, but this does not mean it makes sense. 

I again suggest the get rid of the janus widget idea and use a dialog base 
class and different dialog view classes. We have to come up with a nice term 
in lieu of view, as Qt has successfully occupied ~View for item view 
implementations (no problem with that, though).

Best regards,
--Mirko.
-- 
KDE e.V.: http://ev.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060102/f439af0c/attachment.sig>


More information about the kde-core-devel mailing list