KWizard Class Reference

[kio Index] [kio Hierarchy] [Headers]


KWizard More...

#include <kwizard.h>

Inherits: KDialog (kdeui)

Public Members

Public Slots

Protected Members

Protected Slots

Signals


Detailed Description

KWizard is a multi-purpose dialog. It is very useful for:

- Configuration dialogs where the order in which the entries are filled is important.

- Tutorials. Just create some HTML-widgets and feed them to a KWizard and your done (almost).

- NoteBooks. KWizard is an integrated part of KNoteBook which provides a notebook dialog similar to the ones in OS/2 Warp 4.

- Propably many other things...

The dialog contains:

- A title at the top of the page.

- A separator.

- The userprovided page-widget.

- A separator.

- A label indicating the pagination.

- A Previous and a Next button.

- Optionally Ok, Cancel and Help buttons.


KWizard(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0) [public]

Constructor

~KWizard() [public]

Destructor

int addPage(KWizardPage *p) [public]

Adds a page to the wizard. The pages are numbered from 0-n where 0 is the page first added and n is the page last added.

Parameters:
p KWizardPage containing the page data.
Returns:
Returns the id of the new page.

void setPage(int id, QWidget *w) [public]

Changes the QWidget on the page with id "id" to "w".

void setPage(int id, QString title) [public]

Changes the title on the page with id "id" to "title".

void setPageEnabled(int page, bool state) [public]

En/disable a specified page. If a page is disable its content will be grayd out and it will not receive keyboard input.

Parameters:
state If 'state' is false the page will be disabled, otherwise it will be enabled.
page The page to en/disable.
See Also:
KNoteBook::setPageEnabled

bool isPageEnabled(int page) [public]

Check the state of the page.

Returns:
Returns true if the page is enabled, otherwise false.
See Also:
setPageEnabled

void setCancelButton() [public]

Adds a Cancel button to the bottom of the dialog. The text will be a translated version of the string '&Cancel' thereby giving it the shortcut key 'c'. If any buttons are added a space will be created at the bottom of the dialog to fit the buttons. When clicked the button will emit the cancelclicked signal.

See Also:
KLocale::translate

void setCancelButton(const char *text) [public]

Adds a Cancel button to the bottom of the dialog.

Parameters:
text A user supplied text to write to the button.

void setDefaultButton() [public]

Adds a Default button to the bottom of the dialog. The text will be a translated version of the string '&Default' thereby giving it the shortcut key 'd'. If any buttons are added a space will be created at the bottom of the dialog to fit the buttons. When clicked the button will emit the defaultclicked signal.

See Also:
KLocale::translate

void setDefaultButton(const char *text) [public]

Adds a Default button to the bottom of the dialog.

Parameters:
text A user supplied text to write to the button.

void setHelpButton() [public]

Adds a Help button to the bottom right of the dialog. The text will be a translated version of the string '&Help' thereby giving it the shortcut key 'h'. If any buttons are added a space will be created at the bottom of the dialog to fit the buttons. When clicked the button will emit the helpclicked signal.

See Also:
getHelpButton

void setHelpButton(const char *) [public]

Adds a Help button to the bottom of the dialog. This button will generate the signal helpclicked where the int is the page to which the help was requested.

Parameters:
text A user supplied text to write to the button.
See Also:
getHelpButton

void setOkButton() [public]

Adds an Ok button to the bottom right of the dialog. The text will be a translated version of the string '&Ok' thereby giving it the shortcut key 'o'. If any buttons are added a space will be created at the bottom of the dialog to fit the buttons. When clicked the button will emit the okclicked signal.

See Also:
getOkButton

void setOkButton(const char *) [public]

Adds an Ok button to the bottom of the dialog. This button will generate the signal okclicked where the int is the page to which the help was requested.

Parameters:
text A user supplied text to write to the button.
See Also:
getOkButton

QButton * getOkButton() [public]

Returns:
Returns the Ok buttonwidget or 0L if no button is added.
See Also:
setOkButton

QButton * getCancelButton() [public]

Returns:
Returns the Cancel buttonwidget or 0L if no button is added.
See Also:
setCancelButton

QButton * getDefaultButton() [public]

Returns:
Returns the Default buttonwidget or 0L if no button is added.
See Also:
setDefaultButton

QButton * getHelpButton() [public]

Returns:
Returns the Help buttonwidget or 0L if no button is added.
See Also:
setHelpButton

QButton * getNextButton() [public]

getNextButton.

Returns:
Returns the Next buttonwidget.

QButton * getPreviousButton() [public]

getPreviousButton

Returns:
Returns the Previous buttonwidget.

KDirectionButton * getLeftArrow() [public]

Returns:
Returns the left arrowbutton.
See Also:
setEnableArrowButtons

KDirectionButton * getRightArrow() [public]

Returns:
Returns the right arrowbutton.
See Also:
setEnableArrowButtons

void setDirectionsReflectsPage(bool state) [public]

Let direction buttons reflect page.

Parameters:
state If state is true the direction buttons (Previous and Next) will have the title of the corresponding page.
See Also:
directionsReflectsPage

bool directionsReflectsPage() [public]

Returns:
Returns whether the direction buttons reflects the title of the corresponding page.
See Also:
setDirectionsReflectsPage

void setEnablePopupMenu(bool state) [public]

En/Disable the popup menu.

Parameters:
state If state is true a menu containing the pages in the wizard will popup when the user RMB-clicks on the page-title.
See Also:
enablePopupMenu

bool enablePopupMenu() [public]

Returns:
Returns 'true' if the popupmenu is enabled.
See Also:
setEnablePopupMenu

QPopupMenu * getMenu() [public]

getMenu

Returns:
Returns the handle of the popup menu.
See Also:
setEnablePopupMenu

void setEnableArrowButtons(bool state) [public]

En/Disable the arrow buttons at the rightmost of the title.

Parameters:
state If state is true two arrows will appear to the right of the pagination allowing the user to change pages by clicking on them.
See Also:
enableArrowButtons

bool enableArrowButtons() [public]

Returns:
Returns 'true' if the arrow buttons are enabled.
See Also:
setEnableArrowButtons

const char * getTitle(int page) [public]

getTitle

Parameters:
page The page to retrieve the title from.
Returns:
Returns the title of a specified page. Used by KNoteBook

int numPages() [public]

numPages

Returns:
Returns the number of pages in the wizard.

void okclicked() [signal]

This signal is emitted when the user clicks on the Ok button.

void cancelclicked() [signal]

This signal is emitted when the user clicks on the Cancel button.

void defaultclicked(int) [signal]

This signal is emitted when the user clicks on the Default button. The int is the page which was showing when default settings was requested.

void helpclicked(int) [signal]

This signal is emitted when the user clicks on the Help button. The int is the page which was showing when help was requested.

See Also:
setHelpButton, getHelpButton

void selected(int) [signal]

This signal is emitted when a page is selected. The int is the page number

void closed() [signal]

This signal is emitted when the dialog is closed. Mainly usable if the dialog is a top level widget.

void popup(QPoint) [signal]

This signal is emitted when a popup menu is requested. This happens when the user RMB-clicks somewhere in the title (not the titlebar). This is used by KNoteBook.

void nomorepages(bool, bool) [signal]

This signal is used by KNoteBook.


  • Author: Thomas Tanghus <tanghus@earthling.net>
  • Version: 0.2
  • Documentation generated by tasin@cd1 on Die Nov 30 17:32:00 CET 1999
Kdoc