libyui
|
#include <YWizard.h>
Protected Member Functions | |
YWizard (YWidget *parent, const std::string &backButtonLabel, const std::string &abortButtonLabel, const std::string &nextButtonLabel, YWizardMode wizardMode=YWizardMode_Standard) | |
![]() | |
YWidget (YWidget *parent) | |
YWidgetChildrenManager * | childrenManager () const |
void | setChildrenManager (YWidgetChildrenManager *manager) |
void | setBeingDestroyed () |
void | dumpWidget (YWidget *w, int indentationLevel) |
A wizard is a more complex frame typically used for multi-step workflows:
+---------—+---------------------------------------------—+
Side bar | Content Area |
(YReplacePoint) | |
[Back] [Abort] [Next] |
+---------—+---------------------------------------------—+
The side bar can contain help text, a list of steps that are performed, or an embedded tree (much like the YTree widget).
The client application creates the wizard and replaces the widget in the content area for each step.
The wizard buttons can theoretically be used to do anything, but good UI design will stick to the model above: [Back], [Abort], [Next].
If only two buttons are desired, leave the [Back] button's label emtpy. The remaining two buttons will be rearranged accordingly in the button area.
In the last step of a multi-step workflow, the [Next] button's label is customarily replaced with a label that indicates that this is the last step. [Accept] is recommended for that button label: [Finish] (as sometimes used in other environments) by no means clearly indicates that this is the positive ending, the final "do it" button. Worse, translations of that are often downright miserable: To German, [Finish] gets translated as [Beenden] which is the same word as "Quit" (used in menus). This does not at all tell the user that that button really performs the requested action the multi-step wizard is all about.
|
protected |
Constructor.
If only two buttons are desired, leave 'backButtonLabel' empty.
|
virtual |
Destructor.
Add a menu to the menu bar. If the menu bar is not visible yet, it will be made visible. 'text' is the user-visible text for the menu bar (including keyboard shortcuts marked with '&'), 'id' is the menu ID for later addMenuEntry() etc. calls.
|
pure virtual |
Add a menu entry to the menu with ID 'parentMenuID'. 'id' is what will be returned by UI::UserInput() etc. when a user activates this menu entry.
Add a menu separator to a menu.
Add a step for the steps panel on the side bar. This only adds the step to the internal list of steps. The display is only updated upon calling updateSteps().
Add a step heading for the steps panel on the side bar. This only adds the heading to the internal list of steps. The display is only updated upon calling updateSteps().
|
pure virtual |
Add a submenu to the menu with ID 'parentMenuID'.
|
pure virtual |
Add a tree item. If "parentID" is an empty string, it will be a root item. 'text' is the text that will be displayed in the tree, 'id' the ID with which this newly created item can be referenced - and that will be returned when the user clicks on a tree item.
|
pure virtual |
Return the wizard buttons or 0 if there is no such button.
Derived classes are required to implement this.
|
pure virtual |
Return the internal contents ReplacePoint.
Derived classes are required to implement this.
|
pure virtual |
Returns the current tree selection or an empty string if nothing is selected or there is no tree.
Delete all steps and step headings from the internal lists. The display is only updated upon calling updateSteps().
|
pure virtual |
Get the dialog heading.
|
pure virtual |
Get the current dialog title shown in the window manager's title bar.
|
virtual |
Hide an existing "Release Notes" button.
bool YWizard::nextButtonIsProtected | ( | ) | const |
Check if the wizard's "Next" button is currently protected against disabling.
|
virtual |
Protect the wizard's "Next" button against disabling.
Retranslate internal buttons that are not accessible from the outside:
Select the tree item with the specified ID, if such an item exists.
|
virtual |
Set the label of one of the wizard buttons (backButton(), abortButton(), nextButton() ) if that button is non-null.
The default implementation simply calls button->setLabel( newLabel ).
Set the current step. This also triggers updateSteps() if necessary.
Set the dialog heading.
Set the dialog icon. An empty icon name clears the current icon.
Set the dialog title shown in the window manager's title bar. An empty string clears the current title.
|
pure virtual |
Show a "Release Notes" button above the "Help" button in the steps panel with the specified label that will return the specified id to UI::UserInput() when clicked.
Update the steps display: Reflect the internal steps and heading lists in the layout.
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YWidget.
YWizardMode YWizard::wizardMode | ( | ) | const |
Return the wizard mode (what kind of wizard this is): YWizardMode_Standard, YWizardMode_Steps, YWizardMode_Tree, YWizardMode_TitleOnLeft