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