#include <YQWizard.h>
Inheritance diagram for YQWizard:
Public Types | |
enum | Direction { Forward, Backward } |
Public Slots | |
void | setHelpText (QString helpText) |
void | resizeClientArea () |
void | showHelp () |
void | showSteps () |
void | showTree () |
void | setGradient (QWidget *widget, const QPixmap &pixmap) |
void | setBottomCroppedGradient (QWidget *widget, const QPixmap &pixmap, int croppedHeight) |
QPixmap | bottomCropPixmap (const QPixmap &pixmap, int croppedHeight) |
QColor | pixelColor (const QPixmap &pixmap, int x, int y) |
Public Member Functions | |
YQWizard (QWidget *parent, const YWidgetOpt &opt, const YCPValue &backButtonId, const YCPString &backButtonLabel, const YCPValue &abortButtonId, const YCPString &abortButtonLabel, const YCPValue &nextButtonId, const YCPString &nextButtonLabel) | |
virtual | ~YQWizard () |
Direction | direction () const |
virtual YCPValue | command (const YCPTerm &command) |
void | addChild (YWidget *child) |
long | nicesize (YUIDimension dim) |
void | setSize (long newWidth, long newHeight) |
bool | eventFilter (QObject *obj, QEvent *ev) |
void | setDialogIcon (const char *iconName) |
void | setDialogHeading (const QString &headingText) |
bool | stepsEnabled () const |
void | addStep (const QString &text, const QString &id) |
void | addStepHeading (const QString &text) |
void | deleteSteps () |
void | setCurrentStep (const QString &id) |
void | updateSteps () |
bool | treeEnabled () const |
YQWizardButton * | nextButton () const |
YQWizardButton * | backButton () const |
YQWizardButton * | abortButton () const |
void | setVerboseCommands (bool verbose) |
void | addTreeItem (const QString &parentID, const QString &text, const QString &id) |
void | selectTreeItem (const QString &id) |
void | deleteTreeItems () |
void | addMenu (const QString &text, const QString &id) |
void | addSubMenu (const QString &parentMenuID, const QString &text, const QString &id) |
void | addMenuEntry (const QString &parentMenuID, const QString &text, const QString &id) |
void | addMenuSeparator (const QString &parentMenuID) |
void | deleteMenus () |
Protected Slots | |
void | backClicked () |
void | abortClicked () |
void | nextClicked () |
void | sendTreeEvent (QListViewItem *item) |
void | treeSelectionChanged () |
void | sendMenuEvent (int numID) |
Protected Member Functions | |
void | layoutTitleBar (QWidget *parent) |
void | layoutSideBar (QWidget *parent) |
void | layoutStepsPanel () |
void | layoutHelpPanel () |
void | layoutTreePanel () |
void | layoutWorkArea (QHBox *parentHBox) |
void | layoutClientArea (QWidget *parent) |
void | layoutButtonBox () |
void | loadGradientPixmaps () |
void | loadStepsIcons () |
void | destroyButtons () |
void | updateStepStates () |
QWidget * | addGradientColumn (QWidget *parent, int width=8) |
QGridLayout * | centerAtBottom (QWidget *parent, QWidget *child, int margin) |
void | sendEvent (YCPValue id) |
bool | runningEmbedded () const |
bool | highColorDisplay () const |
bool | isCommand (QString declaration, const YCPTerm &term) |
QString | qStringArg (const YCPTerm &term, int argNo) |
std::string | stringArg (const YCPTerm &term, int argNo) |
bool | boolArg (const YCPTerm &term, int argNo) |
YCPValue | anyArg (const YCPTerm &term, int argNo) |
void | setButtonLabel (YQWizardButton *button, const QString &newLabel) |
void | setButtonID (YQWizardButton *button, const YCPValue &id) |
void | enableButton (YQWizardButton *button, bool enabled) |
void | setButtonFocus (YQWizardButton *button) |
void | setStepStatus (YQWizard::Step *step, const QPixmap &icon, const QColor &color) |
YQWizard::Step * | findStep (const QString &id) |
YQWizard::TreeItem * | findTreeItem (const QString &id) |
YCPString | currentTreeSelection () |
Protected Attributes | |
bool | _stepsEnabled |
bool | _treeEnabled |
bool | _verboseCommands |
bool | _protectNextButton |
bool | _stepsDirty |
bool | _runningEmbedded |
Direction | _direction |
QPixmap | _titleBarGradientPixmap |
QPixmap | _topGradientPixmap |
QColor | _gradientCenterColor |
QPixmap | _bottomGradientPixmap |
QPixmap | _stepCurrentIcon |
QPixmap | _stepToDoIcon |
QPixmap | _stepDoneIcon |
QColor | _stepCurrentColor |
QColor | _stepToDoColor |
QColor | _stepDoneColor |
QString | _currentStepID |
QWidgetStack * | _sideBar |
QVBox * | _stepsPanel |
QVBox * | _stepsBox |
QGridLayout * | _stepsGrid |
QHBox * | _helpPanel |
QTextBrowser * | _helpBrowser |
QHBox * | _treePanel |
QY2ListView * | _tree |
QVBox * | _clientArea |
QWidget * | _menuBarBox |
QMenuBar * | _menuBar |
QLabel * | _dialogIcon |
QLabel * | _dialogHeading |
YQAlignment * | _contents |
QHBox * | _buttonBox |
YQWizardButton * | _backButton |
QWidget * | _backButtonSpacer |
YQWizardButton * | _abortButton |
YQWizardButton * | _nextButton |
QPtrList< YQWizard::Step > | _stepsList |
QDict< YQWizard::Step > | _stepsIDs |
QDict< YQWizard::TreeItem > | _treeIDs |
QDict< QPopupMenu > | _menuIDs |
vector< QString > | _menuEntryIDs |
|
|
|
Constructor |
|
Destructor |
|
Returns the wizard's "Abort" button. |
|
Internal notification that the "Abort" button has been clicked. |
|
Notification that a child widget has been added. Reimplemented from YContainerWidget. Reimplemented from YContainerWidget. |
|
Add a (left or right) margin of the specified width to a widget, consisting of a fixed height top gradient , a flexible center part (in the gradient center color) and a fixed height bottom gradient. The bottom gradient widget is returned as a reference for other background pixmaps. |
|
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. |
|
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(). |
|
Add a submenu to the menu with ID 'parentMenuID'. |
|
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. |
|
Return argument as type 'any' (plain YCPValue) |
|
Returns the wizard's "Back" button. |
|
Internal notification that the "Back" button has been clicked. |
|
Return argument number 'argNo' from 'term' as bool. |
|
Bottom-crop a pixmap: Return a pixmap with the bottom 'croppedHeight' pixels. |
|
Add a grid layout to a parent widget that centers its (only) child at the parent's bottom, maintaining the specified margin from all edges (including the bottom). Returns the newly created grid layout. |
|
Generic direct access to implementation-specific functions. See YQWizard.cc for details. Returns 'true' on success, 'false' on failure. Reimplemented from YWizard. Reimplemented from YWizard. |
|
Returns the current tree selection or an empty string if nothing is selected or there is no tree. Reimplemented from YWizard. Reimplemented from YWizard. |
|
Delete all menus and hide the menu bar. |
|
Delete all steps and step headings from the internal lists. The display is only updated upon calling updateSteps(). |
|
Delete all tree items. |
|
Destroy the button box's buttons |
|
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. |
|
Enable or disable a button. |
|
Event filter - inherited from QWidget |
|
Find a step with the specified ID. Returns 0 if there is no such step. |
|
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. |
|
Returns 'true' if the application is running on a high-color display, i.e., on an X visual with more than 8 bit depth. |
|
Check if 'term' matches wizard command 'declaration'. 'declaration' is a function prototype like this: myFunction ( string, boolean, string ) Void functions are declared without any parameters: myFunction () Function names must be unique. They cannot be overloaded. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load gradient pixmaps |
|
Load step status icons |
|
Returns the wizard's "Next" (or "Accept") button. |
|
Internal notification that the "Next" button has been clicked. |
|
Minimum size the widget should have to make it look and feel nice. Dimension, either YD_HORIZ or YD_VERT Reimplemented from YContainerWidget. |
|
Return the color of pixel( x, y ) of a pixmap. This is a _very_ expensive operation! |
|
Return argument number 'argNo' from 'term' as QString. |
|
Adapt the size of the client area (the ReplacePoint(`id(`contents)) to fit in its current space. |
|
Check if we are running embedded as a KCMShell or KPart or something similar. This is really just a (chached) shortcut to YQUI::runningEmbedded(). |
|
Select the tree item with the specified ID, if such an item exists. |
|
Send a wizard event with the specified ID. |
|
Internal notification that a menu item with numeric ID 'numID' has been activated. |
|
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(). |
|
Set a widget's background to the lower portion (the bottom 'croppedHeight' pixels) of a pixmap and set the widget's height (fixed) to that 'croppedHeight'. |
|
Set the keyboard focus to a button. |
|
Set a button's ID. |
|
Set a button's label. |
|
Set the current step. This also triggers updateSteps() if necessary. |
|
Set a dialog heading. 0 is a valid value - it clears the old text. |
|
Set a dialog icon. 0 is a valid value - it clears the current icon. |
|
Set a widget's background pixmap to a gradient pixmap and set the widget's height (fixed) to that pixmap's height. |
|
Set the help text. 0 is a valid value - it clears the old text. |
|
Sets the new size of the widget. Reimplemented from YContainerWidget. |
|
Set text color and status icon for one wizard step |
|
Set wizard command verbosity |
|
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. |
|
Show the current wizard steps, if there are any. If there are none, nothing happens. |
|
Show the current selection tree in the side panel, if there is any. If there is none, nothing happens. |
|
Returns 'true' if this wizard was created with steps enabled, i.e. the side bar has a "steps" view. |
|
Return argument number 'argNo' from 'term' as std::string. |
|
Returns 'true' if this wizard was created with a selection tree enabled, i.e. the side bar has a tree selection. |
|
Internal notification that the tree selection has changed. If the currently selected item has an ID, that ID will be returned to UI::UserInput(). |
|
Update the steps display: Reflect the internal steps and heading lists in the layout. |
|
Update all step - use appropriate icons and colors |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|