libyui-qt  2.46.21
YQWizard.h
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: YQWizard.h
20 
21  Author: Stefan Hundhammer <sh@suse.de>
22 
23 /-*/
24 
25 
26 #ifndef YQWizard_h
27 #define YQWizard_h
28 
29 #include <string>
30 #include <vector>
31 
32 #include <qpixmap.h>
33 #include <qstringlist.h>
34 #include "QY2ListView.h"
35 #include <QGridLayout>
36 #include <QSplitter>
37 #include <qlabel.h>
38 #include <QMenu>
39 #include <qevent.h>
40 #include <yui/YWizard.h>
41 #include "YQWizardButton.h"
42 
43 using std::vector;
44 
45 class QGridLayout;
46 class QFrame;
47 class QSplitter;
48 class QLabel;
49 class QMenuBar;
50 class QPushButton;
51 class QSpacerItem;
52 class QToolButton;
53 class QStackedWidget;
54 class YReplacePoint;
55 class QTreeWidgetItem;
56 class YQAlignment;
57 class YQReplacePoint;
58 class QY2ListView;
59 class QY2HelpDialog;
60 class QY2RelNotesDialog;
61 
62 
63 class YQWizard : public QSplitter, public YWizard
64 {
65  Q_OBJECT
66 
67 protected:
68  class Step;
69  class TreeItem;
70 
71 public:
72  /**
73  * Constructor.
74  **/
75  YQWizard( YWidget * parent,
76  const std::string & backButtonLabel,
77  const std::string & abortButtonLabel,
78  const std::string & nextButtonLabel,
79  YWizardMode wizardMode = YWizardMode_Standard );
80 
81  /**
82  * Destructor.
83  **/
84  virtual ~YQWizard();
85 
86  /**
87  * Returns a descriptive label of this dialog instance for debugging.
88  *
89  * Reimplemented from YWidget.
90  **/
91  virtual std::string debugLabel() const;
92 
93  enum Direction { Forward, Backward };
94 
95  /**
96  * Returns the current direction of wizard operations - going forward or
97  * going backward. This can be used to maintain a consistent direction when
98  * assigning default buttons to a dialog.
99  **/
100  Direction direction() const { return _direction; }
101 
102  //
103  // Wizard basics
104  //
105 
106  /**
107  * Return internal widgets.
108  *
109  * Implemented from YWizard.
110  **/
111  virtual YQWizardButton * backButton() const { return _backButton; }
112  virtual YQWizardButton * abortButton() const { return _abortButton; }
113  virtual YQWizardButton * nextButton() const { return _nextButton; }
114 
115  virtual YReplacePoint * contentsReplacePoint() const { return _contentsReplacePoint; }
116 
117  /**
118  * Set the label of one of the wizard buttons (backButton(), abortButton(),
119  * nextButton() ) if that button is non-null.
120  *
121  * Implemented from YWizard.
122  **/
123  virtual void setButtonLabel( YPushButton * button, const std::string & newLabel );
124 
125  /**
126  * Set the help text.
127  *
128  * Implemented from YWizard.
129  **/
130  virtual void setHelpText( const std::string & helpText );
131 
132  /**
133  * Set the dialog icon. An empty icon name clears the current icon.
134  *
135  * Implemented from YWizard.
136  **/
137  virtual void setDialogIcon( const std::string & iconName );
138 
139  /**
140  * Set the dialog title shown in window manager's title bar.
141  * An empty std::string clears the current text.
142  *
143  * Implemented from YWizard.
144  **/
145  virtual void setDialogTitle( const std::string & titleText );
146 
147 
148  /**
149  * Set the dialog heading.
150  *
151  * Implemented from YWizard.
152  **/
153  virtual void setDialogHeading( const std::string & headingText );
154 
155 
156  //
157  // Steps handling
158  //
159 
160  /**
161  * Add a step for the steps panel on the side bar.
162  * This only adds the step to the internal list of steps.
163  * The display is only updated upon calling updateSteps().
164  *
165  * Implemented from YWizard.
166  **/
167  virtual void addStep( const std::string & text, const std::string & id );
168 
169  /**
170  * Add a step heading for the steps panel on the side bar.
171  * This only adds the heading to the internal list of steps.
172  * The display is only updated upon calling updateSteps().
173  *
174  * Implemented from YWizard.
175  **/
176  virtual void addStepHeading( const std::string & text );
177 
178  /**
179  * Return list of pointers to steps.
180  * Not needed outside copySteps() function
181  *
182  **/
183  QList<YQWizard::Step*> stepsList() { return _stepsList; }
184 
185  /**
186  * Create a copy of given wizard's steps set (names & IDs)
187  * Populates _stepsList structure of current wizard
188  *
189  **/
190  void copySteps( YQWizard *wizard);
191 
192  /**
193  * Delete all steps and step headings from the internal lists.
194  * The display is only updated upon calling updateSteps().
195  *
196  * Implemented from YWizard.
197  **/
198  virtual void deleteSteps();
199 
200  /**
201  * Set the current step. This also triggers updateSteps() if necessary.
202  *
203  * Implemented from YWizard.
204  **/
205  virtual void setCurrentStep( const std::string & id );
206 
207  /**
208  * Return QString ID of currently active step
209  *
210  **/
211  QString currentStep() { return _currentStepID; };
212 
213  /**
214  * Update the steps display: Reflect the internal steps and heading lists
215  * in the layout.
216  *
217  * Implemented from YWizard.
218  **/
219  virtual void updateSteps();
220 
221 
222  //
223  // Tree handling
224  //
225 
226  /**
227  * Add a tree item. If "parentID" is an empty std::string, it will be a root
228  * item. 'text' is the text that will be displayed in the tree, 'id' the ID
229  * with which this newly created item can be referenced - and that will be
230  * returned when the user clicks on a tree item.
231  *
232  * Implemented from YWizard.
233  **/
234  virtual void addTreeItem( const std::string & parentID,
235  const std::string & text,
236  const std::string & id );
237 
238  /**
239  * Select the tree item with the specified ID, if such an item exists.
240  *
241  * Implemented from YWizard.
242  **/
243  virtual void selectTreeItem( const std::string & id );
244 
245  /**
246  * Returns the current tree selection or an empty std::string if nothing is
247  * selected or there is no tree.
248  *
249  * Implemented from YWizard.
250  **/
251  virtual std::string currentTreeSelection();
252 
253  /**
254  * Delete all tree items.
255  *
256  * Implemented from YWizard.
257  **/
258  virtual void deleteTreeItems();
259 
260 
261  //
262  // Menu handling
263  //
264 
265  /**
266  * Add a menu to the menu bar. If the menu bar is not visible yet, it will
267  * be made visible. 'text' is the user-visible text for the menu bar
268  * (including keyboard shortcuts marked with '&'), 'id' is the menu ID for
269  * later addMenuEntry() etc. calls.
270  *
271  * Implemented from YWizard.
272  **/
273  virtual void addMenu( const std::string & text,
274  const std::string & id );
275 
276  /**
277  * Add a submenu to the menu with ID 'parentMenuID'.
278  *
279  * Implemented from YWizard.
280  **/
281  virtual void addSubMenu( const std::string & parentMenuID,
282  const std::string & text,
283  const std::string & id );
284 
285  /**
286  * Add a menu entry to the menu with ID 'parentMenuID'. 'id' is what will
287  * be returned by UI::UserInput() etc. when a user activates this menu entry.
288  *
289  * Implemented from YWizard.
290  **/
291  virtual void addMenuEntry( const std::string & parentMenuID,
292  const std::string & text,
293  const std::string & id );
294 
295  /**
296  * Add a menu separator to a menu.
297  *
298  * Implemented from YWizard.
299  **/
300  virtual void addMenuSeparator( const std::string & parentMenuID );
301 
302  /**
303  * Delete all menus and hide the menu bar.
304  *
305  * Implemented from YWizard.
306  **/
307  virtual void deleteMenus();
308 
309 
310  //
311  // Misc
312  //
313 
314  /**
315  * Show a "Release Notes" button above the "Help" button in the steps panel
316  * with the specified label that will return the specified id to
317  * UI::UserInput() when clicked.
318  *
319  * The button (or the wizard) will assume ownership of the id and delete it
320  * in the destructor.
321  *
322  * Implemented from YWizard.
323  **/
324  virtual void showReleaseNotesButton( const std::string & label,
325  const std::string & id );
326 
327  /**
328  * Hide an existing "Release Notes" button.
329  *
330  * Implemented from YWizard.
331  **/
332  virtual void hideReleaseNotesButton();
333 
334  /**
335  * Retranslate internal buttons that are not accessible from the outside:
336  * - [Help]
337  * - [Steps]
338  * - [Tree]
339  *
340  * Implemented from YWizard.
341  **/
342  virtual void retranslateInternalButtons();
343 
344  /**
345  * Event filter.
346  *
347  * Reimplemented from QWidget.
348  **/
349  virtual bool eventFilter( QObject * obj, QEvent * ev );
350 
351  /**
352  * Return this wizard's work area (the pane right of the side bar).
353  * This should not be needed outside of YQMainWinDock.
354  **/
355  QWidget * workArea() const { return _workArea; }
356 
357 
358  //
359  // Geometry management
360  //
361 
362  /**
363  * Preferred width of the widget.
364  *
365  * Reimplemented from YWidget.
366  **/
367  virtual int preferredWidth();
368 
369  /**
370  * Preferred height of the widget.
371  *
372  * Reimplemented from YWidget.
373  **/
374  virtual int preferredHeight();
375 
376  /**
377  * Set the new size of the widget.
378  *
379  * Reimplemented from YWidget.
380  **/
381  virtual void setSize( int newWidth, int newHeight );
382 
383  /**
384  * Returns true if the wizard should follow the first wizard with steps
385  **/
386  bool isSecondary() const;
387 
388 signals:
389 
390  /**
391  * Emitted when the "Back" or "Cancel" button is clicked.
392  **/
393  void backClicked();
394 
395  /**
396  * Emitted when the "Abort" button is clicked.
397  **/
398  void abortClicked();
399 
400  /**
401  * Emitted when the "Next" or "OK" button is clicked.
402  *
403  * Notice: As long as this signal is connected, the wizard will no longer
404  * send button events to the UI. Rather, the connected QObject has to take
405  * care to propagate those events.
406  * This is used in YQPatternSelector, for example.
407  **/
408  void nextClicked();
409 
410 
411 public slots:
412 
413  /**
414  * Adapt the size of the client area (the ReplacePoint(`id(`contents)) to
415  * fit in its current space.
416  **/
417  void resizeClientArea();
418 
419  /**
420  * Show the current help text.
421  *
422  * This is useful only if it is obscured by any wizard steps, but it can
423  * safely be called at any time.
424  **/
425  void showHelp();
426 
427  /**
428  * Show the current wizard steps, if there are any. If there are none,
429  * nothing happens.
430  **/
431  void showSteps();
432 
433  /**
434  * Show the current selection tree in the side panel, if there is any. If
435  * there is none, nothing happens.
436  **/
437  void showTree();
438 
439 protected slots:
440 
441  /**
442  * Internal notification that the "Back" button has been clicked.
443  **/
444  void slotBackClicked();
445 
446  /**
447  * Internal notification that the "Abort" button has been clicked.
448  **/
449  void slotAbortClicked();
450 
451  /**
452  * Internal notification that the "Next" button has been clicked.
453  **/
454  void slotNextClicked();
455 
456  /**
457  * Propagate button clicked event of release notes button to the
458  * application.
459  **/
460  void showReleaseNotes();
461 
462  /**
463  * Internal notification that [Space] or [Return] has been pressed on a
464  * tree item.
465  * If the item has an ID, that ID will be returned to UI::UserInput().
466  **/
467  void sendTreeEvent( QTreeWidgetItem * item );
468 
469  /**
470  * Internal notification that the tree selection has changed.
471  *
472  * If the currently selected item has an ID, that ID will be returned to
473  * UI::UserInput().
474  **/
475  void treeSelectionChanged();
476 
477  /**
478  * Internal notification that a menu item with numeric ID 'numID' has been
479  * activated.
480  **/
481  void sendMenuEvent( QAction *action );
482 
483 protected:
484 
485  // Layout functions
486 
487  void layoutTitleBar ( QWidget * parent );
488  QLayout *layoutSideBar ( QWidget * parent );
489  void layoutSideBarButtonBox ( QWidget * parent, QPushButton * button );
490  void layoutStepsPanel();
491  void layoutTreePanel();
492  QWidget *layoutWorkArea ( QWidget * parent );
493  void layoutClientArea ( QWidget * parent );
494  QLayout *layoutButtonBox ( QWidget * parent );
495  bool titleIsOnTheLeft();
496 
497  /**
498  * Destroy the button box's buttons
499  **/
500  void destroyButtons();
501 
502  /**
503  * Update all step - use appropriate icons and colors
504  **/
505  void updateStepStates();
506 
507  /**
508  * Send a wizard event with the specified ID.
509  **/
510  void sendEvent( const std::string & id );
511 
512  /**
513  * Notification that a signal is being connected.
514  *
515  * Reimplemented from QObject.
516  **/
517  void connectNotify ( const char * signal );
518 
519  /**
520  * Notification that a signal is being disconnected.
521  *
522  * Reimplemented from QObject.
523  **/
524  void disconnectNotify ( const char * signal );
525 
526  /**
527  * Set a button's label.
528  **/
529  void setButtonLabel( YQWizardButton * button, const QString & newLabel );
530 
531  /**
532  * Enable or disable a button.
533  **/
534  void enableButton( YQWizardButton * button, bool enabled );
535 
536  /**
537  * Set the keyboard focus to a button.
538  **/
539  void setButtonFocus( YQWizardButton * button );
540 
541  /**
542  * Find a step with the specified ID. Returns 0 if there is no such step.
543  **/
544  YQWizard::Step * findStep( const QString & id );
545 
546  /**
547  * Find a tree item with the specified ID. Tree items without IDs cannot be
548  * found at all.
549  * Returns the item or 0 if no such item found.
550  **/
551  YQWizard::TreeItem * findTreeItem( const std::string & id );
552 
553 
554  //
555  // Data members
556  //
557 
558  std::string _backButtonLabel;
559  std::string _abortButtonLabel;
560  std::string _nextButtonLabel;
561 
562  bool _stepsEnabled;
563  bool _stepsRegistered;
564  bool _treeEnabled;
565  bool _protectNextButton;
566  bool _stepsDirty;
567  bool _sendButtonEvents;
568  Direction _direction;
569 
570  QString _currentStepID;
571  QString _qHelpText;
572 
573  QY2HelpDialog * _helpDlg;
574  QY2RelNotesDialog * _relNotesDlg;
575 
576  QStackedWidget * _sideBar;
577  QWidget * _stepsPanel;
578  YQWizardButton * _releaseNotesButton;
579  static std::string _releaseNotesButtonId;
580  static std::string _releaseNotesButtonLabel;
581  YQWizardButton * _helpButton;
582  QPushButton * _stepsButton;
583  QPushButton * _treeButton;
584  QFrame * _treePanel;
585  QY2ListView * _tree;
586 
587  QFrame * _workArea;
588  QWidget * _clientArea;
589  QMenuBar * _menuBar;
590  QLabel * _dialogIcon;
591  QLabel * _dialogLogo;
592  QLabel * _dialogHeading;
593  YQAlignment * _contents;
594  YQWizardButton * _backButton;
595  YQWizardButton * _abortButton;
596  YQWizardButton * _nextButton;
597  YReplacePoint * _contentsReplacePoint;
598 
599  QList<YQWizard::Step*> _stepsList;
600  QHash<QString,YQWizard::Step*> _stepsIDs;
601  QHash<QString,YQWizard::TreeItem*> _treeIDs;
602  QHash<QString,QMenu*> _menuIDs;
603  QHash<QAction*, std::string> _menuEntryIDs;
604 
605  QIcon _previousWindowIcon;
606 
607 private:
608  static YQWizard *main_wizard;
609 
610 protected:
611 
612  /**
613  * Helper class to represent a wizard step internally
614  **/
615  class Step
616  {
617  public:
618 
619  Step( const QString & name = "", const QString & id = "" )
620  : _name( name )
621  , _statusLabel( 0 )
622  , _nameLabel(0)
623  , _enabled( true )
624  , _idList( id )
625  , _status( Unset )
626  {}
627 
628  /**
629  * Destructor. Intentionally not deleting the widgets.
630  **/
631  virtual ~Step();
632 
633  virtual bool isHeading() const { return false; }
634 
635  enum Status { Unset, Todo, Current, Done };
636 
637  QString name() const { return _name; }
638  QLabel * statusLabel() const { return _statusLabel; }
639  QLabel * nameLabel() const { return _nameLabel; }
640  bool isEnabled() const { return _enabled; }
641  const QStringList & id() const { return _idList; }
642  void addID( const QString & id ) { _idList.append( id ); }
643  virtual bool hasID( const QString & id ) { return _idList.indexOf( id ) != -1; }
644 
645  void setStatusLabel( QLabel * label ) { _statusLabel = label; }
646  void setNameLabel ( QLabel * label ) { _nameLabel = label; }
647  void setEnabled( bool enabled ) { _enabled = enabled; }
648 
649  void deleteLabels();
650 
651  /**
652  * Set text color and status icon for one wizard step
653  **/
654  void setStatus( Status s );
655 
656  protected:
657 
658  QString _name;
659  QLabel * _statusLabel;
660  QLabel * _nameLabel;
661  bool _enabled;
662  QStringList _idList;
663  Status _status;
664 
665  private:
666  Q_DISABLE_COPY(Step);
667  };
668 
669 
670  /**
671  * Helper class to represent a wizard step heading internally
672  **/
673  class StepHeading: public Step
674  {
675  public:
676 
677  StepHeading( const QString & name = "" )
678  : Step( name, "" )
679  {}
680 
681  virtual ~StepHeading() {}
682  virtual bool isHeading() const { return true; }
683  virtual bool hasID( const QString & id ) { return false; }
684 
685  private:
686  Q_DISABLE_COPY(StepHeading);
687  };
688 
689 
690  /**
691  * Helper class for wizard tree item
692  **/
693  class TreeItem: public QY2ListViewItem
694  {
695  public:
696  TreeItem( QY2ListView * parent,
697  const QString & text,
698  const QString & id )
699  : QY2ListViewItem( parent, text )
700  , _id( id )
701  {}
702 
703  TreeItem( YQWizard::TreeItem * parent,
704  const QString & text,
705  const QString & id )
706  : QY2ListViewItem( parent, text )
707  , _id( id )
708  {}
709 
710  virtual QString text(int index) const { return QTreeWidgetItem::text(index); }
711  QString text() const { return QTreeWidgetItem::text(0); }
712  QString id() const { return _id; }
713 
714  private:
715  QString _id;
716  };
717 
718 }; // class YQWizard
719 
720 
721 
722 #endif // YQWizard_h
virtual std::string currentTreeSelection()
Returns the current tree selection or an empty std::string if nothing is selected or there is no tree...
Definition: YQWizard.cc:668
void showReleaseNotes()
Propagate button clicked event of release notes button to the application.
Definition: YQWizard.cc:1090
virtual void setCurrentStep(const std::string &id)
Set the current step.
Definition: YQWizard.cc:482
QWidget * workArea() const
Return this wizard&#39;s work area (the pane right of the side bar).
Definition: YQWizard.h:355
void setButtonFocus(YQWizardButton *button)
Set the keyboard focus to a button.
void resizeClientArea()
Adapt the size of the client area (the ReplacePoint(id(contents)) to fit in its current space...
Definition: YQWizard.cc:1260
virtual ~Step()
Destructor.
Definition: YQWizard.cc:1375
virtual void setDialogIcon(const std::string &iconName)
Set the dialog icon.
Definition: YQWizard.cc:973
Direction direction() const
Returns the current direction of wizard operations - going forward or going backward.
Definition: YQWizard.h:100
void destroyButtons()
Destroy the button box&#39;s buttons.
Definition: YQWizard.cc:940
virtual void deleteTreeItems()
Delete all tree items.
Definition: YQWizard.cc:613
void sendTreeEvent(QTreeWidgetItem *item)
Internal notification that [Space] or [Return] has been pressed on a tree item.
Definition: YQWizard.cc:649
void showSteps()
Show the current wizard steps, if there are any.
Definition: YQWizard.cc:1111
Helper class to represent a wizard step heading internally.
Definition: YQWizard.h:673
virtual void setHelpText(const std::string &helpText)
Set the help text.
Definition: YQWizard.cc:1035
virtual void setButtonLabel(YPushButton *button, const std::string &newLabel)
Set the label of one of the wizard buttons (backButton(), abortButton(), nextButton() ) if that butto...
Definition: YQWizard.cc:1284
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
Definition: YQWizard.cc:1254
void connectNotify(const char *signal)
Notification that a signal is being connected.
Definition: YQWizard.cc:953
virtual YQWizardButton * backButton() const
Return internal widgets.
Definition: YQWizard.h:111
virtual void deleteSteps()
Delete all steps and step headings from the internal lists.
Definition: YQWizard.cc:522
bool isSecondary() const
Returns true if the wizard should follow the first wizard with steps.
Definition: YQWizard.cc:203
Helper class for wizard tree item.
Definition: YQWizard.h:693
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 tha...
Definition: YQWizard.cc:1301
virtual bool eventFilter(QObject *obj, QEvent *ev)
Event filter.
Definition: YQWizard.cc:1266
void slotAbortClicked()
Internal notification that the "Abort" button has been clicked.
Definition: YQWizard.cc:1053
virtual void selectTreeItem(const std::string &id)
Select the tree item with the specified ID, if such an item exists.
Definition: YQWizard.cc:632
void enableButton(YQWizardButton *button, bool enabled)
Enable or disable a button.
YQWizard(YWidget *parent, const std::string &backButtonLabel, const std::string &abortButtonLabel, const std::string &nextButtonLabel, YWizardMode wizardMode=YWizardMode_Standard)
Constructor.
Definition: YQWizard.cc:88
void copySteps(YQWizard *wizard)
Create a copy of given wizard&#39;s steps set (names & IDs) Populates _stepsList structure of current wiz...
Definition: YQWizard.cc:490
virtual void addStepHeading(const std::string &text)
Add a step heading for the steps panel on the side bar.
Definition: YQWizard.cc:323
void treeSelectionChanged()
Internal notification that the tree selection has changed.
Definition: YQWizard.cc:661
virtual void setDialogHeading(const std::string &headingText)
Set the dialog heading.
Definition: YQWizard.cc:1009
virtual void setDialogTitle(const std::string &titleText)
Set the dialog title shown in window manager&#39;s title bar.
Definition: YQWizard.cc:998
virtual ~YQWizard()
Destructor.
Definition: YQWizard.cc:182
virtual void addMenuEntry(const std::string &parentMenuID, const std::string &text, const std::string &id)
Add a menu entry to the menu with ID &#39;parentMenuID&#39;.
Definition: YQWizard.cc:1173
YQWizard::TreeItem * findTreeItem(const std::string &id)
Find a tree item with the specified ID.
Definition: YQWizard.cc:623
void abortClicked()
Emitted when the "Abort" button is clicked.
void setStatus(Status s)
Set text color and status icon for one wizard step.
Definition: YQWizard.cc:1381
virtual void hideReleaseNotesButton()
Hide an existing "Release Notes" button.
Definition: YQWizard.cc:1322
void slotBackClicked()
Internal notification that the "Back" button has been clicked.
Definition: YQWizard.cc:1042
virtual void retranslateInternalButtons()
Retranslate internal buttons that are not accessible from the outside:
Definition: YQWizard.cc:1333
virtual void addMenuSeparator(const std::string &parentMenuID)
Add a menu separator to a menu.
Definition: YQWizard.cc:1196
QString currentStep()
Return QString ID of currently active step.
Definition: YQWizard.h:211
virtual void addStep(const std::string &text, const std::string &id)
Add a step for the steps panel on the side bar.
Definition: YQWizard.cc:287
virtual void deleteMenus()
Delete all menus and hide the menu bar.
Definition: YQWizard.cc:1211
Enhanced QTreeWidget.
Definition: QY2ListView.h:47
void showHelp()
Show the current help text.
Definition: YQWizard.cc:1073
virtual void addSubMenu(const std::string &parentMenuID, const std::string &text, const std::string &id)
Add a submenu to the menu with ID &#39;parentMenuID&#39;.
Definition: YQWizard.cc:1149
void slotNextClicked()
Internal notification that the "Next" button has been clicked.
Definition: YQWizard.cc:1062
YQWizard::Step * findStep(const QString &id)
Find a step with the specified ID.
Definition: YQWizard.cc:537
virtual int preferredHeight()
Preferred height of the widget.
Definition: YQWizard.cc:1248
void showTree()
Show the current selection tree in the side panel, if there is any.
Definition: YQWizard.cc:1120
void sendEvent(const std::string &id)
Send a wizard event with the specified ID.
Definition: YQWizard.cc:1236
Helper class to represent a wizard step internally.
Definition: YQWizard.h:615
Enhanced QTreeWidgetItem.
Definition: QY2ListView.h:233
virtual void addMenu(const std::string &text, const std::string &id)
Add a menu to the menu bar.
Definition: YQWizard.cc:1129
QList< YQWizard::Step * > stepsList()
Return list of pointers to steps.
Definition: YQWizard.h:183
virtual void addTreeItem(const std::string &parentID, const std::string &text, const std::string &id)
Add a tree item.
Definition: YQWizard.cc:578
void nextClicked()
Emitted when the "Next" or "OK" button is clicked.
void disconnectNotify(const char *signal)
Notification that a signal is being disconnected.
Definition: YQWizard.cc:963
void updateStepStates()
Update all step - use appropriate icons and colors.
Definition: YQWizard.cc:439
void sendMenuEvent(QAction *action)
Internal notification that a menu item with numeric ID &#39;numID&#39; has been activated.
Definition: YQWizard.cc:1223
virtual int preferredWidth()
Preferred width of the widget.
Definition: YQWizard.cc:1242
void backClicked()
Emitted when the "Back" or "Cancel" button is clicked.
virtual void updateSteps()
Update the steps display: Reflect the internal steps and heading lists in the layout.
Definition: YQWizard.cc:330
virtual std::string debugLabel() const
Returns a descriptive label of this dialog instance for debugging.
Definition: YQWizard.cc:1020