libyui-qt  2.43.5
YQWizard Class Reference
Collaboration diagram for YQWizard:

List of all members.

Classes

class  Step
class  StepHeading
class  TreeItem

Public Types

enum  Direction { Forward, Backward }

Public Slots

void resizeClientArea ()
void showHelp ()
void showSteps ()
void showTree ()

Signals

void backClicked ()
void abortClicked ()
void nextClicked ()

Public Member Functions

 YQWizard (YWidget *parent, const std::string &backButtonLabel, const std::string &abortButtonLabel, const std::string &nextButtonLabel, YWizardMode wizardMode=YWizardMode_Standard)
virtual ~YQWizard ()
virtual std::string debugLabel () const
Direction direction () const
virtual YQWizardButtonbackButton () const
virtual YQWizardButtonabortButton () const
virtual YQWizardButtonnextButton () const
virtual YReplacePoint * contentsReplacePoint () const
virtual void setButtonLabel (YPushButton *button, const std::string &newLabel)
virtual void setHelpText (const std::string &helpText)
virtual void setDialogIcon (const std::string &iconName)
virtual void setDialogTitle (const std::string &titleText)
virtual void setDialogHeading (const std::string &headingText)
virtual void addStep (const std::string &text, const std::string &id)
virtual void addStepHeading (const std::string &text)
QList< YQWizard::Step * > stepsList ()
void copySteps (YQWizard *wizard)
virtual void deleteSteps ()
virtual void setCurrentStep (const std::string &id)
QString currentStep ()
virtual void updateSteps ()
virtual void addTreeItem (const std::string &parentID, const std::string &text, const std::string &id)
virtual void selectTreeItem (const std::string &id)
virtual std::string currentTreeSelection ()
virtual void deleteTreeItems ()
virtual void addMenu (const std::string &text, const std::string &id)
virtual void addSubMenu (const std::string &parentMenuID, const std::string &text, const std::string &id)
virtual void addMenuEntry (const std::string &parentMenuID, const std::string &text, const std::string &id)
virtual void addMenuSeparator (const std::string &parentMenuID)
virtual void deleteMenus ()
virtual void showReleaseNotesButton (const std::string &label, const std::string &id)
virtual void hideReleaseNotesButton ()
virtual void retranslateInternalButtons ()
virtual bool eventFilter (QObject *obj, QEvent *ev)
QWidget * workArea () const
virtual int preferredWidth ()
virtual int preferredHeight ()
virtual void setSize (int newWidth, int newHeight)
bool isSecondary () const

Protected Slots

void slotBackClicked ()
void slotAbortClicked ()
void slotNextClicked ()
void releaseNotesClicked ()
void sendTreeEvent (QTreeWidgetItem *item)
void treeSelectionChanged ()
void sendMenuEvent (QAction *action)

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)
void destroyButtons ()
void updateStepStates ()
void sendEvent (const std::string &id)
void connectNotify (const char *signal)
void disconnectNotify (const char *signal)
void setButtonLabel (YQWizardButton *button, const QString &newLabel)
void enableButton (YQWizardButton *button, bool enabled)
void setButtonFocus (YQWizardButton *button)
YQWizard::StepfindStep (const QString &id)
YQWizard::TreeItemfindTreeItem (const std::string &id)

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
std::string _releaseNotesButtonId
QPushButton * _helpButton
QPushButton * _stepsButton
QPushButton * _treeButton
QFrame * _treePanel
QY2ListView_tree
QFrame * _workArea
QWidget * _clientArea
QMenuBar * _menuBar
QLabel * _dialogIcon
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

Detailed Description

Definition at line 62 of file YQWizard.h.


Constructor & Destructor Documentation

YQWizard::YQWizard ( YWidget *  parent,
const std::string &  backButtonLabel,
const std::string &  abortButtonLabel,
const std::string &  nextButtonLabel,
YWizardMode  wizardMode = YWizardMode_Standard 
)

Constructor.

Definition at line 86 of file YQWizard.cc.

Here is the call graph for this function:

YQWizard::~YQWizard ( ) [virtual]

Destructor.

Definition at line 178 of file YQWizard.cc.

Here is the call graph for this function:


Member Function Documentation

void YQWizard::abortClicked ( ) [signal]

Emitted when the "Abort" button is clicked.

void YQWizard::addMenu ( const std::string &  text,
const std::string &  id 
) [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 1056 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::addMenuEntry ( const std::string &  parentMenuID,
const std::string &  text,
const std::string &  id 
) [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 1100 of file YQWizard.cc.

void YQWizard::addMenuSeparator ( const std::string &  parentMenuID) [virtual]

Add a menu separator to a menu.

Implemented from YWizard.

Definition at line 1123 of file YQWizard.cc.

void YQWizard::addStep ( const std::string &  text,
const std::string &  id 
) [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 294 of file YQWizard.cc.

void YQWizard::addStepHeading ( const std::string &  text) [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 330 of file YQWizard.cc.

void YQWizard::addSubMenu ( const std::string &  parentMenuID,
const std::string &  text,
const std::string &  id 
) [virtual]

Add a submenu to the menu with ID 'parentMenuID'.

Implemented from YWizard.

Definition at line 1076 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::addTreeItem ( const std::string &  parentID,
const std::string &  text,
const std::string &  id 
) [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 585 of file YQWizard.cc.

Here is the call graph for this function:

virtual YQWizardButton* YQWizard::backButton ( ) const [inline, virtual]

Return internal widgets.

Implemented from YWizard.

Definition at line 110 of file YQWizard.h.

void YQWizard::backClicked ( ) [signal]

Emitted when the "Back" or "Cancel" button is clicked.

void YQWizard::connectNotify ( const char *  signal) [protected]

Notification that a signal is being connected.

Reimplemented from QObject.

Definition at line 889 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 497 of file YQWizard.cc.

Here is the call graph for this function:

QString YQWizard::currentStep ( ) [inline]

Return QString ID of currently active step

Definition at line 210 of file YQWizard.h.

string YQWizard::currentTreeSelection ( ) [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 675 of file YQWizard.cc.

string YQWizard::debugLabel ( ) const [virtual]

Returns a descriptive label of this dialog instance for debugging.

Reimplemented from YWidget.

Definition at line 956 of file YQWizard.cc.

void YQWizard::deleteMenus ( ) [virtual]

Delete all menus and hide the menu bar.

Implemented from YWizard.

Definition at line 1138 of file YQWizard.cc.

void YQWizard::deleteSteps ( ) [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 529 of file YQWizard.cc.

void YQWizard::deleteTreeItems ( ) [virtual]

Delete all tree items.

Implemented from YWizard.

Definition at line 620 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::destroyButtons ( ) [protected]

Destroy the button box's buttons

Definition at line 876 of file YQWizard.cc.

Direction YQWizard::direction ( ) const [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.

void YQWizard::disconnectNotify ( const char *  signal) [protected]

Notification that a signal is being disconnected.

Reimplemented from QObject.

Definition at line 899 of file YQWizard.cc.

void YQWizard::enableButton ( YQWizardButton button,
bool  enabled 
) [protected]

Enable or disable a button.

bool YQWizard::eventFilter ( QObject *  obj,
QEvent *  ev 
) [virtual]

Event filter.

Reimplemented from QWidget.

Definition at line 1193 of file YQWizard.cc.

Here is the call graph for this function:

YQWizard::Step * YQWizard::findStep ( const QString &  id) [protected]

Find a step with the specified ID. Returns 0 if there is no such step.

Definition at line 544 of file YQWizard.cc.

YQWizard::TreeItem * YQWizard::findTreeItem ( const std::string &  id) [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 630 of file YQWizard.cc.

Hide an existing "Release Notes" button.

Implemented from YWizard.

Definition at line 1250 of file YQWizard.cc.

bool YQWizard::isSecondary ( ) const

Returns true if the wizard should follow the first wizard with steps

Definition at line 198 of file YQWizard.cc.

void YQWizard::nextClicked ( ) [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.

int YQWizard::preferredHeight ( ) [virtual]

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 1175 of file YQWizard.cc.

int YQWizard::preferredWidth ( ) [virtual]

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 1169 of file YQWizard.cc.

void YQWizard::releaseNotesClicked ( ) [protected, slot]

Propagate button clicked event of release notes button to the application.

Definition at line 1026 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::resizeClientArea ( ) [slot]

Adapt the size of the client area (the ReplacePoint(`id(`contents)) to fit in its current space.

Definition at line 1187 of file YQWizard.cc.

Here is the call graph for this function:

Retranslate internal buttons that are not accessible from the outside:

  • [Help]
  • [Steps]
  • [Tree]

Implemented from YWizard.

Definition at line 1257 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::selectTreeItem ( const std::string &  id) [virtual]

Select the tree item with the specified ID, if such an item exists.

Implemented from YWizard.

Definition at line 639 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::sendEvent ( const std::string &  id) [protected]

Send a wizard event with the specified ID.

Definition at line 1163 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::sendMenuEvent ( QAction *  action) [protected, slot]

Internal notification that a menu item with numeric ID 'numID' has been activated.

Definition at line 1150 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::sendTreeEvent ( QTreeWidgetItem *  item) [protected, slot]

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 656 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::setButtonFocus ( YQWizardButton button) [protected]

Set the keyboard focus to a button.

void YQWizard::setButtonLabel ( YPushButton *  button,
const std::string &  newLabel 
) [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 1211 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::setButtonLabel ( YQWizardButton button,
const QString &  newLabel 
) [protected]

Set a button's label.

void YQWizard::setCurrentStep ( const std::string &  id) [virtual]

Set the current step. This also triggers updateSteps() if necessary.

Implemented from YWizard.

Definition at line 489 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::setDialogHeading ( const std::string &  headingText) [virtual]

Set the dialog heading.

Implemented from YWizard.

Definition at line 945 of file YQWizard.cc.

void YQWizard::setDialogIcon ( const std::string &  iconName) [virtual]

Set the dialog icon. An empty icon name clears the current icon.

Implemented from YWizard.

Definition at line 909 of file YQWizard.cc.

void YQWizard::setDialogTitle ( const std::string &  titleText) [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 934 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::setHelpText ( const std::string &  helpText) [virtual]

Set the help text.

Implemented from YWizard.

Definition at line 971 of file YQWizard.cc.

void YQWizard::setSize ( int  newWidth,
int  newHeight 
) [virtual]

Set the new size of the widget.

Reimplemented from YWidget.

Definition at line 1181 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::showHelp ( ) [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 1009 of file YQWizard.cc.

void YQWizard::showReleaseNotesButton ( const std::string &  label,
const std::string &  id 
) [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 1228 of file YQWizard.cc.

void YQWizard::showSteps ( ) [slot]

Show the current wizard steps, if there are any. If there are none, nothing happens.

Definition at line 1038 of file YQWizard.cc.

void YQWizard::showTree ( ) [slot]

Show the current selection tree in the side panel, if there is any. If there is none, nothing happens.

Definition at line 1047 of file YQWizard.cc.

void YQWizard::slotAbortClicked ( ) [protected, slot]

Internal notification that the "Abort" button has been clicked.

Definition at line 989 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::slotBackClicked ( ) [protected, slot]

Internal notification that the "Back" button has been clicked.

Definition at line 978 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::slotNextClicked ( ) [protected, slot]

Internal notification that the "Next" button has been clicked.

Definition at line 998 of file YQWizard.cc.

Here is the call graph for this function:

QList<YQWizard::Step*> YQWizard::stepsList ( ) [inline]

Return list of pointers to steps. Not needed outside copySteps() function

Definition at line 182 of file YQWizard.h.

void YQWizard::treeSelectionChanged ( ) [protected, slot]

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 668 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::updateSteps ( ) [virtual]

Update the steps display: Reflect the internal steps and heading lists in the layout.

Implemented from YWizard.

Definition at line 337 of file YQWizard.cc.

Here is the call graph for this function:

void YQWizard::updateStepStates ( ) [protected]

Update all step - use appropriate icons and colors

Definition at line 446 of file YQWizard.cc.

Here is the call graph for this function:

QWidget* YQWizard::workArea ( ) const [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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables