RFC: KWizard
Thomas Zander
zander at kde.org
Fri Aug 4 08:23:14 BST 2006
On Thursday 3 August 2006 23:17, Olivier Goffart wrote:
> About appropriate, i was about to add it because it was in Q3Wizard,
> but i don't know the sens of it.
Reading the source I think you missed it indeed :)
If you have, say, 10 pages in a wizard and the first page has a
buttongroup of 3 choices then choosing different values may mean that the
page sequence changes.
For example see these page sequences; option a: 1, 4, 5
option b: 1, 2, 3, 10
option c: 1, 6, 7, 8, 9, 10
This means that on 'next' you need to be able to read the data from the
GUI and update the 'appropriate' settings before the wizard actually
chooses which page to show next.
Therefor I suggested the protected hook:
virtual void leavingPage(QWidget *from, bool usingNext);
Which allow you to do this nicely by reading the data from the widget and
updating the wizard state accordingly.
Due to the fact that in this scenario I don't want all pages to actually
show it would be a good idea to have:
virtual void enteringPage(QWidget *to, bool usingNext);
which can initialize the page with all the currently relevant data. In
case some expensive action is required to actually fill the widget see
the anti-spam-wizard in kmail for example) this is the right place to
initialize that process.
Last;
virtual void leavingWizard(bool successfull);
this method is very usefull to process the data. Especially using the
bool value. Pressing cancel will call this method and pressing finish
will also.
--
Thomas Zander
-------------- 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/20060804/ce248859/attachment.sig>
More information about the kde-core-devel
mailing list