From kde-core-devel Mon Jan 02 08:32:59 2006 From: Mirko Boehm Date: Mon, 02 Jan 2006 08:32:59 +0000 To: kde-core-devel Subject: Re: KJanusWidget and Model-View (was: Re: KDialog / KDialogBase) Message-Id: <200601020933.07325.mirko () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=113619080831715 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart10625834.MG5C5GNilq" --nextPart10625834.MG5C5GNilq Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 displ= ay > it in a view. Exactly. The key here is to *not* inherit QDialog to implement the dialog m= ain=20 contents, but to compose those two parts from one class that implements the= =20 dialog interface (for consistency) and another set of classes that implemen= t=20 the different dialog types. That is why the whole janus widget idea is wron= g.=20 It is possible to do this, but this does not mean it makes sense.=20 I again suggest the get rid of the janus widget idea and use a dialog base= =20 class and different dialog view classes. We have to come up with a nice ter= m=20 in lieu of view, as Qt has successfully occupied ~View for item view=20 implementations (no problem with that, though). Best regards, =2D-Mirko. =2D-=20 KDE e.V.: http://ev.kde.org --nextPart10625834.MG5C5GNilq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDuOVDYSSaITCTnKURAiy9AJ0aOQJ03oyG7OX5fMkmoZSEmfSjVACcCwAE 4UtJwO445zKTNtqoN0BgAjQ= =pmLC -----END PGP SIGNATURE----- --nextPart10625834.MG5C5GNilq--