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