libyui-qt
2.46.13
|
Classes | |
class | Step |
Helper class to represent a wizard step internally. More... | |
class | StepHeading |
Helper class to represent a wizard step heading internally. More... | |
class | TreeItem |
Helper class for wizard tree item. More... | |
Public Types | |
enum | Direction { Forward, Backward } |
Public Slots | |
void | resizeClientArea () |
Adapt the size of the client area (the ReplacePoint(id( contents)) to fit in its current space. | |
void | showHelp () |
Show the current help text. More... | |
void | showSteps () |
Show the current wizard steps, if there are any. More... | |
void | showTree () |
Show the current selection tree in the side panel, if there is any. More... | |
Signals | |
void | backClicked () |
Emitted when the "Back" or "Cancel" button is clicked. | |
void | abortClicked () |
Emitted when the "Abort" button is clicked. | |
void | nextClicked () |
Emitted when the "Next" or "OK" button is clicked. More... | |
Public Member Functions | |
YQWizard (YWidget *parent, const std::string &backButtonLabel, const std::string &abortButtonLabel, const std::string &nextButtonLabel, YWizardMode wizardMode=YWizardMode_Standard) | |
Constructor. | |
virtual | ~YQWizard () |
Destructor. | |
virtual std::string | debugLabel () const |
Returns a descriptive label of this dialog instance for debugging. More... | |
Direction | direction () const |
Returns the current direction of wizard operations - going forward or going backward. More... | |
virtual YQWizardButton * | backButton () const |
Return internal widgets. More... | |
virtual YQWizardButton * | abortButton () const |
virtual YQWizardButton * | nextButton () const |
virtual YReplacePoint * | contentsReplacePoint () const |
virtual void | setButtonLabel (YPushButton *button, const std::string &newLabel) |
Set the label of one of the wizard buttons (backButton(), abortButton(), nextButton() ) if that button is non-null. More... | |
virtual void | setHelpText (const std::string &helpText) |
Set the help text. More... | |
virtual void | setDialogIcon (const std::string &iconName) |
Set the dialog icon. More... | |
virtual void | setDialogTitle (const std::string &titleText) |
Set the dialog title shown in window manager's title bar. More... | |
virtual void | setDialogHeading (const std::string &headingText) |
Set the dialog heading. More... | |
virtual void | addStep (const std::string &text, const std::string &id) |
Add a step for the steps panel on the side bar. More... | |
virtual void | addStepHeading (const std::string &text) |
Add a step heading for the steps panel on the side bar. More... | |
QList< YQWizard::Step * > | stepsList () |
Return list of pointers to steps. More... | |
void | copySteps (YQWizard *wizard) |
Create a copy of given wizard's steps set (names & IDs) Populates _stepsList structure of current wizard. More... | |
virtual void | deleteSteps () |
Delete all steps and step headings from the internal lists. More... | |
virtual void | setCurrentStep (const std::string &id) |
Set the current step. More... | |
QString | currentStep () |
Return QString ID of currently active step. More... | |
virtual void | updateSteps () |
Update the steps display: Reflect the internal steps and heading lists in the layout. More... | |
virtual void | addTreeItem (const std::string &parentID, const std::string &text, const std::string &id) |
Add a tree item. More... | |
virtual void | selectTreeItem (const std::string &id) |
Select the tree item with the specified ID, if such an item exists. More... | |
virtual std::string | currentTreeSelection () |
Returns the current tree selection or an empty std::string if nothing is selected or there is no tree. More... | |
virtual void | deleteTreeItems () |
Delete all tree items. More... | |
virtual void | addMenu (const std::string &text, const std::string &id) |
Add a menu to the menu bar. More... | |
virtual void | addSubMenu (const std::string &parentMenuID, const std::string &text, const std::string &id) |
Add a submenu to the menu with ID 'parentMenuID'. More... | |
virtual void | addMenuEntry (const std::string &parentMenuID, const std::string &text, const std::string &id) |
Add a menu entry to the menu with ID 'parentMenuID'. More... | |
virtual void | addMenuSeparator (const std::string &parentMenuID) |
Add a menu separator to a menu. More... | |
virtual void | deleteMenus () |
Delete all menus and hide the menu bar. More... | |
virtual void | showReleaseNotesButton (const std::string &label, const std::string &id) |
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. More... | |
virtual void | hideReleaseNotesButton () |
Hide an existing "Release Notes" button. More... | |
virtual void | retranslateInternalButtons () |
Retranslate internal buttons that are not accessible from the outside: More... | |
virtual bool | eventFilter (QObject *obj, QEvent *ev) |
Event filter. More... | |
QWidget * | workArea () const |
Return this wizard's work area (the pane right of the side bar). More... | |
virtual int | preferredWidth () |
Preferred width of the widget. More... | |
virtual int | preferredHeight () |
Preferred height of the widget. More... | |
virtual void | setSize (int newWidth, int newHeight) |
Set the new size of the widget. More... | |
bool | isSecondary () const |
Returns true if the wizard should follow the first wizard with steps. | |
Protected Slots | |
void | slotBackClicked () |
Internal notification that the "Back" button has been clicked. | |
void | slotAbortClicked () |
Internal notification that the "Abort" button has been clicked. | |
void | slotNextClicked () |
Internal notification that the "Next" button has been clicked. | |
void | showReleaseNotes () |
Propagate button clicked event of release notes button to the application. | |
void | sendTreeEvent (QTreeWidgetItem *item) |
Internal notification that [Space] or [Return] has been pressed on a tree item. More... | |
void | treeSelectionChanged () |
Internal notification that the tree selection has changed. More... | |
void | sendMenuEvent (QAction *action) |
Internal notification that a menu item with numeric ID 'numID' has been activated. | |
Protected Member Functions | |
void | layoutTitleBar (QWidget *parent) |
QLayout * | layoutSideBar (QWidget *parent) |
void | layoutSideBarButtonBox (QWidget *parent, QPushButton *button) |
void | layoutStepsPanel () |
void | layoutTreePanel () |
QWidget * | layoutWorkArea (QWidget *parent) |
void | layoutClientArea (QWidget *parent) |
QLayout * | layoutButtonBox (QWidget *parent) |
bool | titleIsOnTheLeft () |
void | destroyButtons () |
Destroy the button box's buttons. | |
void | updateStepStates () |
Update all step - use appropriate icons and colors. | |
void | sendEvent (const std::string &id) |
Send a wizard event with the specified ID. | |
void | connectNotify (const char *signal) |
Notification that a signal is being connected. More... | |
void | disconnectNotify (const char *signal) |
Notification that a signal is being disconnected. More... | |
void | setButtonLabel (YQWizardButton *button, const QString &newLabel) |
Set a button's label. | |
void | enableButton (YQWizardButton *button, bool enabled) |
Enable or disable a button. | |
void | setButtonFocus (YQWizardButton *button) |
Set the keyboard focus to a button. | |
YQWizard::Step * | findStep (const QString &id) |
Find a step with the specified ID. More... | |
YQWizard::TreeItem * | findTreeItem (const std::string &id) |
Find a tree item with the specified ID. More... | |
Protected Attributes | |
std::string | _backButtonLabel |
std::string | _abortButtonLabel |
std::string | _nextButtonLabel |
bool | _stepsEnabled |
bool | _stepsRegistered |
bool | _treeEnabled |
bool | _protectNextButton |
bool | _stepsDirty |
bool | _sendButtonEvents |
Direction | _direction |
QString | _currentStepID |
QString | _qHelpText |
QY2HelpDialog * | _helpDlg |
QStackedWidget * | _sideBar |
QWidget * | _stepsPanel |
QPushButton * | _releaseNotesButton |
QPushButton * | _helpButton |
QPushButton * | _stepsButton |
QPushButton * | _treeButton |
QFrame * | _treePanel |
QY2ListView * | _tree |
QFrame * | _workArea |
QWidget * | _clientArea |
QMenuBar * | _menuBar |
QLabel * | _dialogIcon |
QLabel * | _dialogLogo |
QLabel * | _dialogHeading |
YQAlignment * | _contents |
YQWizardButton * | _backButton |
YQWizardButton * | _abortButton |
YQWizardButton * | _nextButton |
YReplacePoint * | _contentsReplacePoint |
QList< YQWizard::Step * > | _stepsList |
QHash< QString, YQWizard::Step * > | _stepsIDs |
QHash< QString, YQWizard::TreeItem * > | _treeIDs |
QHash< QString, QMenu * > | _menuIDs |
QHash< QAction *, std::string > | _menuEntryIDs |
QIcon | _previousWindowIcon |
Static Protected Attributes | |
static std::string | _releaseNotesButtonId = "" |
static std::string | _releaseNotesButtonLabel = "" |
Definition at line 62 of file YQWizard.h.
|
virtual |
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.
Implemented from YWizard.
Definition at line 1110 of file YQWizard.cc.
|
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.
Implemented from YWizard.
Definition at line 1154 of file YQWizard.cc.
|
virtual |
Add a menu separator to a menu.
Implemented from YWizard.
Definition at line 1177 of file YQWizard.cc.
|
virtual |
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().
Implemented from YWizard.
Definition at line 284 of file YQWizard.cc.
|
virtual |
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().
Implemented from YWizard.
Definition at line 320 of file YQWizard.cc.
|
virtual |
Add a submenu to the menu with ID 'parentMenuID'.
Implemented from YWizard.
Definition at line 1130 of file YQWizard.cc.
|
virtual |
Add a tree item.
If "parentID" is an empty std::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.
Implemented from YWizard.
Definition at line 575 of file YQWizard.cc.
|
inlinevirtual |
|
protected |
Notification that a signal is being connected.
Reimplemented from QObject.
Definition at line 948 of file YQWizard.cc.
void YQWizard::copySteps | ( | YQWizard * | wizard | ) |
Create a copy of given wizard's steps set (names & IDs) Populates _stepsList structure of current wizard.
Definition at line 487 of file YQWizard.cc.
|
inline |
Return QString ID of currently active step.
Definition at line 210 of file YQWizard.h.
|
virtual |
Returns the current tree selection or an empty std::string if nothing is selected or there is no tree.
Implemented from YWizard.
Definition at line 665 of file YQWizard.cc.
|
virtual |
Returns a descriptive label of this dialog instance for debugging.
Reimplemented from YWidget.
Definition at line 1015 of file YQWizard.cc.
|
virtual |
Delete all menus and hide the menu bar.
Implemented from YWizard.
Definition at line 1192 of file YQWizard.cc.
|
virtual |
Delete all steps and step headings from the internal lists.
The display is only updated upon calling updateSteps().
Implemented from YWizard.
Definition at line 519 of file YQWizard.cc.
|
virtual |
Delete all tree items.
Implemented from YWizard.
Definition at line 610 of file YQWizard.cc.
|
inline |
Returns the current direction of wizard operations - going forward or going backward.
This can be used to maintain a consistent direction when assigning default buttons to a dialog.
Definition at line 99 of file YQWizard.h.
|
protected |
Notification that a signal is being disconnected.
Reimplemented from QObject.
Definition at line 958 of file YQWizard.cc.
|
virtual |
Event filter.
Reimplemented from QWidget.
Definition at line 1247 of file YQWizard.cc.
|
protected |
Find a step with the specified ID.
Returns 0 if there is no such step.
Definition at line 534 of file YQWizard.cc.
|
protected |
Find a tree item with the specified ID.
Tree items without IDs cannot be found at all. Returns the item or 0 if no such item found.
Definition at line 620 of file YQWizard.cc.
|
virtual |
Hide an existing "Release Notes" button.
Implemented from YWizard.
Definition at line 1303 of file YQWizard.cc.
|
signal |
Emitted when the "Next" or "OK" button is clicked.
Notice: As long as this signal is connected, the wizard will no longer send button events to the UI. Rather, the connected QObject has to take care to propagate those events. This is used in YQPatternSelector, for example.
|
virtual |
Preferred height of the widget.
Reimplemented from YWidget.
Definition at line 1229 of file YQWizard.cc.
|
virtual |
Preferred width of the widget.
Reimplemented from YWidget.
Definition at line 1223 of file YQWizard.cc.
|
virtual |
Retranslate internal buttons that are not accessible from the outside:
Implemented from YWizard.
Definition at line 1314 of file YQWizard.cc.
|
virtual |
Select the tree item with the specified ID, if such an item exists.
Implemented from YWizard.
Definition at line 629 of file YQWizard.cc.
|
protectedslot |
Internal notification that [Space] or [Return] has been pressed on a tree item.
If the item has an ID, that ID will be returned to UI::UserInput().
Definition at line 646 of file YQWizard.cc.
|
virtual |
Set the label of one of the wizard buttons (backButton(), abortButton(), nextButton() ) if that button is non-null.
Implemented from YWizard.
Definition at line 1265 of file YQWizard.cc.
|
virtual |
Set the current step.
This also triggers updateSteps() if necessary.
Implemented from YWizard.
Definition at line 479 of file YQWizard.cc.
|
virtual |
|
virtual |
Set the dialog icon.
An empty icon name clears the current icon.
Implemented from YWizard.
Definition at line 968 of file YQWizard.cc.
|
virtual |
Set the dialog title shown in window manager's title bar.
An empty std::string clears the current text.
Implemented from YWizard.
Definition at line 993 of file YQWizard.cc.
|
virtual |
|
virtual |
Set the new size of the widget.
Reimplemented from YWidget.
Definition at line 1235 of file YQWizard.cc.
|
slot |
Show the current help text.
This is useful only if it is obscured by any wizard steps, but it can safely be called at any time.
Definition at line 1068 of file YQWizard.cc.
|
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.
The button (or the wizard) will assume ownership of the id and delete it in the destructor.
Implemented from YWizard.
Definition at line 1282 of file YQWizard.cc.
|
slot |
Show the current wizard steps, if there are any.
If there are none, nothing happens.
Definition at line 1092 of file YQWizard.cc.
|
slot |
Show the current selection tree in the side panel, if there is any.
If there is none, nothing happens.
Definition at line 1101 of file YQWizard.cc.
|
inline |
Return list of pointers to steps.
Not needed outside copySteps() function
Definition at line 182 of file YQWizard.h.
|
protectedslot |
Internal notification that the tree selection has changed.
If the currently selected item has an ID, that ID will be returned to UI::UserInput().
Definition at line 658 of file YQWizard.cc.
|
virtual |
Update the steps display: Reflect the internal steps and heading lists in the layout.
Implemented from YWizard.
Definition at line 327 of file YQWizard.cc.
|
inline |
Return this wizard's work area (the pane right of the side bar).
This should not be needed outside of YQMainWinDock.
Definition at line 354 of file YQWizard.h.