1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
15 Author: Stefan Hundhammer <sh@suse.de>
17 Textdomain "packages-qt"
22 #define y2log_component "qt-wizard"
23 #include <ycp/y2log.h>
25 // For the command parser
28 #include <YShortcut.h>
31 #include <QSvgRenderer>
33 #include <QStackedWidget>
34 #include "ui_QHelpDialog.h"
39 #include <qmenudata.h>
42 #include <qpushbutton.h>
44 #include <qtabwidget.h>
45 #include <qtoolbutton.h>
47 #include "QY2ListView.h"
48 #include "QY2Styler.h"
49 #include <QGridLayout>
55 #include "YQApplication.h"
57 #include "YQAlignment.h"
58 #include "YQReplacePoint.h"
61 #include "YQWizardButton.h"
62 #include "YQIconPool.h"
63 #include "YQWidgetFactory.h"
64 #include "YQSignalBlocker.h"
73 #define TEXTDOMAIN "packages-qt"
75 #define USE_ICON_ON_HELP_BUTTON 0
78 YQWizard::YQWizard( YWidget * parent,
79 const string & backButtonLabel,
80 const string & abortButtonLabel,
81 const string & nextButtonLabel,
82 YWizardMode wizardMode )
83 : QFrame( (QWidget *) parent->widgetRep() )
89 , _backButtonLabel( backButtonLabel )
90 , _abortButtonLabel( abortButtonLabel )
91 , _nextButtonLabel( nextButtonLabel )
93 setObjectName( "wizard" );
95 QHBoxLayout* layout = new QHBoxLayout( this );
96 layout->setSpacing( 0 );
97 layout->setMargin( 0 );
101 _stepsEnabled = (wizardMode == YWizardMode_Steps);
102 _treeEnabled = (wizardMode == YWizardMode_Tree);
105 _direction = YQWizard::Forward;
112 _releaseNotesButton = 0;
123 _sendButtonEvents = true;
124 _contentsReplacePoint = 0;
126 YQUI::setTextdomain( TEXTDOMAIN );
128 //layoutTitleBar( this );
130 layout->addLayout( layoutSideBar( this ) );
131 layout->addWidget( layoutWorkArea( this ) );
133 QY2Styler::self()->registerWidget( this );
138 YQWizard::~YQWizard()
145 void YQWizard::layoutTitleBar( QWidget * parent )
147 QFrame * titleBar = new QFrame( parent );
148 YUI_CHECK_NEW( titleBar );
150 QHBoxLayout *layout = new QHBoxLayout( titleBar );
151 titleBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); // hor/vert
157 QLabel * left = new QLabel( titleBar );
158 layout->addWidget( left );
159 left->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); // hor/vert
160 left->setObjectName( "titleBar-left" );
163 // Center stretch space
166 layout->addStretch( 10 );
173 QLabel * right = new QLabel( titleBar );
174 YUI_CHECK_NEW( right );
176 layout->addWidget( right );
177 right->setObjectName( "titleBar-right" );
182 QLayout *YQWizard::layoutSideBar( QWidget * parent )
184 _sideBar = new QStackedWidget( parent );
185 YUI_CHECK_NEW( _sideBar );
186 _sideBar->setMinimumWidth( YQUI::ui()->defaultSize( YD_HORIZ ) / 5 );
187 _sideBar->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred ) ); // hor/vert
189 QVBoxLayout *vbox = new QVBoxLayout( );
190 vbox->addWidget( _sideBar );
197 else if ( _stepsEnabled )
207 void YQWizard::layoutStepsPanel()
210 _stepsPanel = new QFrame( _sideBar );
211 _sideBar->addWidget( _stepsPanel );
212 _sideBar->setObjectName( "steps" );
213 QY2Styler::self()->registerWidget( _sideBar );
214 _stepsPanel->setProperty( "class", "steps QFrame" );
216 // Steps panel bottom buttons ("Help", "Release Notes")
218 // Layouts for the buttons
220 _releaseNotesButton = new QPushButton( _( "Release Notes..." ), _stepsPanel );
221 _releaseNotesButton->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum ) ); // hor/vert
223 connect( _releaseNotesButton, SIGNAL( clicked() ),
224 this, SLOT ( releaseNotesClicked() ) );
226 _releaseNotesButton->hide(); // hidden until showReleaseNotesButton() is called
228 _stepsDirty = true; // no layout yet
233 void YQWizard::addStep( const string & text, const string & id )
235 QString qId = fromUTF8( id );
237 if ( _stepsIDs[ qId ] )
239 y2error( "Step ID \"%s\" (\"%s\") already used for \"%s\"",
242 qPrintable( _stepsIDs[ qId ]->name() ) );
246 if ( _stepsList.last() && _stepsList.last()->name() == fromUTF8( text ) )
248 // Consecutive steps with the same name will be shown as one single step.
250 // Since steps are always added at the end of the list, it is
251 // sufficient to check the last step of the list. If the texts are the
252 // same, the other with the same text needs to get another (additional)
253 // ID to make sure setCurrentStep() works as it should.
254 _stepsList.last()->addID( qId );
258 _stepsList.append( new YQWizard::Step( fromUTF8( text ), qId ) );
262 _stepsIDs.insert( qId, _stepsList.last() );
267 void YQWizard::addStepHeading( const string & text )
269 _stepsList.append( new YQWizard::StepHeading( fromUTF8( text ) ) );
275 void YQWizard::updateSteps()
280 // Create a grid layout for the steps
281 QVBoxLayout *_stepsVBox = new QVBoxLayout();
282 _stepsPanel->setLayout( _stepsVBox );
284 QGridLayout *_stepsGrid = new QGridLayout( );
285 YUI_CHECK_NEW( _stepsGrid );
286 _stepsVBox->addLayout( _stepsGrid );
287 _stepsGrid->setColumnMinimumWidth( 0, 10 );
288 _stepsGrid->setRowStretch( 0, 1 );
289 _stepsGrid->setRowStretch( 1, 1 );
290 _stepsGrid->setRowStretch( 2, 99 );
292 const int statusCol = 1;
293 const int nameCol = 2;
298 // Create widgets for all steps and step headings in the internal list
301 for ( QList<Step*>::iterator i = _stepsList.begin(); i != _stepsList.end(); ++i)
303 YQWizard::Step * step = *i;
304 if ( step->isHeading() )
310 QLabel * label = new QLabel( step->name(), _stepsPanel );
311 YUI_CHECK_NEW( label );
312 label->setAlignment( Qt::AlignLeft | Qt::AlignTop );
313 label->setProperty( "class", "steps_heading" );
315 step->setNameLabel( label );
316 _stepsGrid->addWidget( label,
318 1, nameCol - statusCol + 1);
320 else // No heading - ordinary step
326 QLabel * statusLabel = new QLabel( _stepsPanel );
327 YUI_CHECK_NEW( statusLabel );
329 step->setStatusLabel( statusLabel );
330 statusLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
331 _stepsGrid->addWidget( statusLabel, row, statusCol );
337 QLabel * nameLabel = new QLabel( step->name(), _stepsPanel );
338 YUI_CHECK_NEW( nameLabel );
339 nameLabel->setAlignment( Qt::AlignLeft | Qt::AlignTop );
341 step->setNameLabel( nameLabel );
342 _stepsGrid->addWidget( nameLabel, row, nameCol );
348 _stepsVBox->addStretch( 99 );
349 QVBoxLayout *rbl = new QVBoxLayout();
350 rbl->addWidget( _releaseNotesButton, 0, Qt::AlignCenter );
352 _stepsVBox->addLayout( rbl );
353 _stepsVBox->addStretch( 29 );
359 void YQWizard::updateStepStates()
364 YQWizard::Step * currentStep = findStep( _currentStepID );
365 QList<YQWizard::Step*>::iterator step = _stepsList.begin();
369 // Set status icon and color for the current step
370 currentStep->setStatus( Step::Current );
373 // Set all steps before the current to "done"
376 while ( step != _stepsList.end() && *step != currentStep )
378 ( *step )->setStatus( Step::Done );
382 // Skip the current step - continue with the step after it
384 if ( step != _stepsList.end() )
389 // Set all steps after the current to "to do"
392 while ( step != _stepsList.end() )
394 ( *step )->setStatus( Step::Todo );
399 void YQWizard::setCurrentStep( const string & id )
401 _currentStepID = fromUTF8( id );
406 void YQWizard::deleteSteps()
408 qDeleteAll(_stepsList);
414 YQWizard::Step * YQWizard::findStep( const QString & id )
419 return _stepsIDs[ id ];
423 void YQWizard::layoutTreePanel()
425 _treePanel = new QFrame( _sideBar );
426 YUI_CHECK_NEW( _treePanel );
427 QHBoxLayout *layout = new QHBoxLayout( _treePanel );
428 _sideBar->addWidget( _treePanel );
430 QVBoxLayout * vbox = new QVBoxLayout();
431 YUI_CHECK_NEW( vbox );
432 layout->addLayout( vbox );
436 _tree = new QY2ListView( _treePanel );
437 YUI_CHECK_NEW( _tree );
438 vbox->addWidget( _tree );
441 // _tree->addColumn( "" );
442 // _tree->header()->hide();
444 _tree->setRootIsDecorated( true );
445 _tree->setSortByInsertionSequence( true );
447 connect( _tree, SIGNAL( itemSelectionChanged ( void ) ),
448 this, SLOT ( treeSelectionChanged ( void ) ) );
450 connect( _tree, SIGNAL( itemActivated ( QTreeWidgetItem *, int ) ),
451 this, SLOT ( sendTreeEvent ( QTreeWidgetItem * ) ) );
453 connect( _tree, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int ) ),
454 this, SLOT ( sendTreeEvent ( QTreeWidgetItem * ) ) );
459 void YQWizard::addTreeItem( const string & parentID, const string & text, const string & id )
461 QString qId = fromUTF8( id );
465 y2error( "YQWizard widget not created with `opt(`treeEnabled) !" );
469 YQWizard::TreeItem * item = 0;
470 YQWizard::TreeItem * parent = 0;
472 if ( ! parentID.empty() )
474 parent = findTreeItem( parentID );
479 item = new YQWizard::TreeItem( parent, fromUTF8( text ), qId );
480 YUI_CHECK_NEW( item );
484 item = new YQWizard::TreeItem( _tree, fromUTF8( text ), qId );
485 YUI_CHECK_NEW( item );
488 if ( ! qId.isEmpty() )
489 _treeIDs.insert( qId, item );
494 void YQWizard::deleteTreeItems()
504 YQWizard::TreeItem * YQWizard::findTreeItem( const string & id )
509 return _treeIDs[ fromUTF8( id ) ];
513 void YQWizard::selectTreeItem( const string & id )
517 YQWizard::TreeItem * item = findTreeItem( id );
521 YQSignalBlocker sigBlocker( _tree );
523 _tree->setCurrentItem(item);
524 _tree->scrollToItem(item);
530 void YQWizard::sendTreeEvent( QTreeWidgetItem * listViewItem )
534 YQWizard::TreeItem * item = dynamic_cast<YQWizard::TreeItem *> ( listViewItem );
536 if ( item && ! item->id().isEmpty() )
537 sendEvent( toUTF8( item->id() ) );
542 void YQWizard::treeSelectionChanged()
543 { //FIXME is currentItem correct or selected.first
545 sendTreeEvent( _tree->currentItem() );
549 string YQWizard::currentTreeSelection()
553 QTreeWidgetItem * sel = _tree->currentItem();
557 YQWizard::TreeItem * item = dynamic_cast<YQWizard::TreeItem *> (sel);
559 if ( item && ! item->id().isEmpty() )
560 return toUTF8( item->id() );
569 QWidget *YQWizard::layoutWorkArea( QWidget * parent )
571 QFrame *workArea = new QFrame( parent );
572 workArea->setObjectName( "work_area" );
574 QY2Styler::self()->registerWidget( workArea );
576 QVBoxLayout *vbox = new QVBoxLayout( workArea );
578 _menuBar = new QMenuBar( workArea );
579 YUI_CHECK_NEW( _menuBar );
581 _menuBar->hide(); // will be made visible when menus are added
582 vbox->addWidget( _menuBar );
585 // Dialog icon and heading
588 QHBoxLayout * headingHBox = new QHBoxLayout();
589 YUI_CHECK_NEW( headingHBox );
590 //headingHBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
591 vbox->addLayout( headingHBox );
593 _dialogIcon = new QLabel( workArea );
594 YUI_CHECK_NEW( _dialogIcon );
595 headingHBox->addWidget( _dialogIcon );
596 _dialogIcon->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); // hor/vert
597 _dialogIcon->setObjectName( "DialogIcon" );
599 _dialogHeading = new QLabel( workArea );
600 YUI_CHECK_NEW( _dialogHeading );
601 headingHBox->addWidget( _dialogHeading );
602 _dialogHeading->setAlignment( Qt::AlignLeft );
603 _dialogHeading->setWordWrap( true );
604 _dialogHeading->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
605 _dialogHeading->setObjectName( "DialogHeading" );
608 // Client area (the part that belongs to the YCP application)
611 layoutClientArea( workArea );
612 vbox->addWidget( _clientArea );
618 QLayout *bb = layoutButtonBox( workArea );
619 vbox->addLayout( bb );
626 void YQWizard::layoutClientArea( QWidget * parent )
628 _clientArea = new QFrame( parent );
629 YUI_CHECK_NEW( _clientArea );
630 _clientArea->setObjectName("_clientArea");
631 QVBoxLayout *layout = new QVBoxLayout( _clientArea );
632 layout->setMargin( 0 );
635 // HVCenter for wizard contents
638 _contents = new YQAlignment( this, _clientArea, YAlignCenter, YAlignCenter );
639 YUI_CHECK_NEW( _contents );
640 layout->addWidget( _contents );
641 _contents->QObject::setProperty( "class", "Contents" );
643 _contents->setStretchable( YD_HORIZ, true );
644 _contents->setStretchable( YD_VERT, true );
645 _contents->installEventFilter( this );
646 _contents->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
649 // Replace point for wizard contents
652 _contentsReplacePoint = YUI::widgetFactory()->createReplacePoint( _contents );
655 // Initial YEmpty widget contents of replace point
658 YUI::widgetFactory()->createEmpty( _contentsReplacePoint );
659 _contentsReplacePoint->showChild();
665 QLayout *YQWizard::layoutButtonBox( QWidget * parent )
668 // QHBoxLayout for the buttons
671 QHBoxLayout * hbox = new QHBoxLayout(); // parent, spacing
672 YUI_CHECK_NEW( hbox );
674 hbox->setSpacing( 0 );
675 hbox->setMargin( 0 );
677 // Help button - intentionally without keyboard shortcut
678 _helpButton = new QPushButton( _( "Help" ), parent );
679 YUI_CHECK_NEW( _helpButton );
681 connect( _helpButton, SIGNAL( clicked() ),
682 this, SLOT ( showHelp() ) );
684 hbox->addWidget( _helpButton );
686 hbox->addStretch( 10 );
692 _abortButton = new YQWizardButton( this, parent, _abortButtonLabel );
693 YUI_CHECK_NEW( _abortButton );
695 hbox->addWidget( (QWidget *) _abortButton->widgetRep() );
696 connect( _abortButton, SIGNAL( clicked() ),
697 this, SLOT ( slotAbortClicked() ) );
699 hbox->addSpacing( 10 );
705 _backButton = new YQWizardButton( this, parent, _backButtonLabel );
706 YUI_CHECK_NEW( _backButton );
708 hbox->addWidget( (QWidget *) _backButton->widgetRep() );
709 connect( _backButton, SIGNAL( clicked() ),
710 this, SLOT ( slotBackClicked() ) );
712 if ( _backButton->text().isEmpty() )
719 hbox->addSpacing( 5 );
721 _nextButton = new YQWizardButton( this, parent, _nextButtonLabel );
722 YUI_CHECK_NEW( _nextButton );
724 hbox->addWidget( (QWidget *) _nextButton->widgetRep() );
725 connect( _nextButton, SIGNAL( clicked() ),
726 this, SLOT ( slotNextClicked() ) );
731 void YQWizard::destroyButtons()
744 void YQWizard::connectNotify ( const char * signal )
746 if ( QString( signal ).contains( "nextClicked()" ) )
748 y2debug( "nextClicked connected, no longer directly sending button events" );
749 _sendButtonEvents = false;
754 void YQWizard::disconnectNotify ( const char * signal )
756 if ( QString( signal ).contains( "nextClicked()" ) )
758 y2debug( "nextClicked disconnected, directly sending button events again" );
759 _sendButtonEvents = true;
764 void YQWizard::setDialogIcon( const string & iconName )
768 if ( ! iconName.empty() )
770 QPixmap icon( iconName.c_str() );
773 y2warning( "Couldn't load dialog icon \"%s\"", iconName.c_str() );
776 _dialogIcon->setPixmap( icon );
777 topLevelWidget()->setWindowIcon( icon );
782 _dialogIcon->clear();
783 topLevelWidget()->setWindowIcon( QIcon() );
789 void YQWizard::setDialogHeading( const string & headingText )
791 if ( _dialogHeading )
793 if ( ! headingText.empty() )
794 _dialogHeading->setText( fromUTF8( headingText ) );
796 _dialogHeading->clear();
800 string YQWizard::debugLabel()
802 if ( _dialogHeading )
804 QString label = _dialogHeading->text();
805 label = label.simplified(); // Replace any embedded newline with a single blank
807 if ( ! label.isEmpty() )
809 label.prepend( "YQWizard \"" );
810 label.append( "\"" );
812 return toUTF8( label );
816 return "untitled YQWizard";
819 void YQWizard::setHelpText( const string & helpText )
821 _qHelpText = fromUTF8( helpText );
822 _qHelpText.replace( "&product;", YQUI::ui()->productName() );
826 void YQWizard::slotBackClicked()
830 if ( _sendButtonEvents )
831 YQUI::ui()->sendEvent( new YWidgetEvent( _backButton, YEvent::Activated ) );
833 _direction = YQWizard::Backward;
837 void YQWizard::slotAbortClicked()
841 if ( _sendButtonEvents )
842 YQUI::ui()->sendEvent( new YWidgetEvent( _abortButton, YEvent::Activated ) );
846 void YQWizard::slotNextClicked()
850 if ( _sendButtonEvents )
851 YQUI::ui()->sendEvent( new YWidgetEvent( _nextButton, YEvent::Activated ) );
853 _direction = YQWizard::Forward;
857 void YQWizard::showHelp()
859 QDialog helpDlg( this );
861 ui.setupUi( &helpDlg );
862 ui.textBrowser->setText( _qHelpText );
867 void YQWizard::releaseNotesClicked()
869 YQUI::ui()->sendEvent( new YWidgetEvent( _nextButton, YEvent::Activated ) );
871 if ( ! _releaseNotesButtonId.empty() )
873 y2milestone( "Release Notes button clicked" );
874 sendEvent( _releaseNotesButtonId );
879 void YQWizard::showSteps()
881 if ( _sideBar && _stepsPanel )
883 _sideBar->setCurrentWidget( _stepsPanel );
888 void YQWizard::showTree()
890 if ( _sideBar && _treePanel )
892 _sideBar->setCurrentWidget( _treePanel );
898 void YQWizard::addMenu( const string & text,
903 QMenu * menu = new QMenu( _menuBar );
904 YUI_CHECK_NEW( menu );
906 _menuIDs.insert( fromUTF8( id ), menu );
907 //FIXME _menuBar->insertItem( fromUTF8( text ), menu );
909 connect( menu, SIGNAL( activated ( int ) ),
910 this, SLOT ( sendMenuEvent( int ) ) );
917 void YQWizard::addSubMenu( const string & parentMenuID,
921 QMenu* parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
925 QMenu * menu = new QMenu( _menuBar );
926 YUI_CHECK_NEW( menu );
928 _menuIDs.insert( fromUTF8( id ), menu );
929 //FIXME parentMenu->insertItem( fromUTF8( text ), menu );
931 connect( menu, SIGNAL( activated ( int ) ),
932 this, SLOT ( sendMenuEvent( int ) ) );
936 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
941 void YQWizard::addMenuEntry( const string & parentMenuID,
943 const string & idString )
945 QMenu * parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
949 int id = _menuEntryIDs.size();
950 _menuEntryIDs.push_back( idString );
951 //FIXME parentMenu->insertItem( fromUTF8( text ), id );
955 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
960 void YQWizard::addMenuSeparator( const string & parentMenuID )
962 QMenu * parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
966 parentMenu->addSeparator();
970 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
975 void YQWizard::deleteMenus()
982 _menuEntryIDs.clear();
987 void YQWizard::sendMenuEvent( int numID )
989 if ( numID >= 0 && numID < (int) _menuEntryIDs.size() )
991 sendEvent( _menuEntryIDs[ numID ] );
995 y2error( "Invalid menu ID: %d", numID );
1000 void YQWizard::sendEvent( const string & id )
1002 YQUI::ui()->sendEvent( new YMenuEvent( id ) );
1006 int YQWizard::preferredWidth()
1008 return sizeHint().width();
1012 int YQWizard::preferredHeight()
1014 return sizeHint().height();
1018 void YQWizard::setSize( int newWidth, int newHeight )
1020 resize( newWidth, newHeight );
1026 void YQWizard::resizeClientArea()
1028 y2debug( "resizing client area" );
1029 QRect contentsRect = _clientArea->contentsRect();
1030 _contents->setSize( contentsRect.width(), contentsRect.height() );
1033 bool YQWizard::eventFilter( QObject * obj, QEvent * ev )
1035 if ( ev->type() == QEvent::Resize && obj == _contents )
1038 return true; // Event handled
1041 return QWidget::eventFilter( obj, ev );
1045 void YQWizard::setButtonLabel( YPushButton * button, const string & newLabel )
1047 button->setLabel( newLabel );
1048 YDialog::currentDialog()->checkShortcuts();
1050 YQWizardButton * wizardButton = dynamic_cast<YQWizardButton *> (button);
1053 wizardButton->setVisible( !newLabel.empty() );
1057 void YQWizard::showReleaseNotesButton( const string & label, const string & id )
1059 return; // no longer supported!
1061 if ( ! _releaseNotesButton )
1063 y2error( "NULL Release Notes button" );
1065 if ( ! _stepsPanel )
1066 y2error( "This works only if there is a \"steps\" panel!" );
1071 // no way to check the shortcut, so strip it
1072 _releaseNotesButton->setText( fromUTF8( YShortcut::cleanShortcutString( label ) ) );
1073 _releaseNotesButtonId = id;
1075 _releaseNotesButton->show();
1079 void YQWizard::hideReleaseNotesButton()
1081 if ( _releaseNotesButton && !_releaseNotesButton->isHidden() )
1082 _releaseNotesButton->hide();
1086 void YQWizard::retranslateInternalButtons()
1088 YQUI::setTextdomain( TEXTDOMAIN );
1091 // "Help" button - intentionally without keyboard shortcut
1092 _helpButton->setText( _( "Help" ) );
1095 // "Steps" button - intentionally without keyboard shortcut
1096 _stepsButton->setText( _( "Steps" ) );
1099 // "Tree" button - intentionally without keyboard shortcut
1100 _treeButton->setText( _( "Tree" ) );
1103 void YQWizard::Step::setStatus( Status s )
1105 if ( !_statusLabel || !_nameLabel || _status == s )
1112 _statusLabel->setProperty( "class", "todo-step-status QLabel" );
1113 _nameLabel->setProperty( "class", "todo-step-name QLabel" );
1118 _statusLabel->setProperty( "class", "done-step-status QLabel" );
1119 _nameLabel->setProperty( "class", "done-step-name QLabel" );
1124 _statusLabel->setProperty( "class", "current-step-status QLabel" );
1125 _nameLabel->setProperty( "class", "current-step-name QLabel" );
1128 qApp->style()->polish( _statusLabel );
1129 qApp->style()->polish( _nameLabel );
1132 #include "YQWizard.moc"