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( _stepsPanel );
283 QGridLayout *_stepsGrid = new QGridLayout( );
284 YUI_CHECK_NEW( _stepsGrid );
285 _stepsVBox->addLayout( _stepsGrid );
286 _stepsGrid->setColumnMinimumWidth( 0, 10 );
287 _stepsGrid->setRowStretch( 0, 1 );
288 _stepsGrid->setRowStretch( 1, 1 );
289 _stepsGrid->setRowStretch( 2, 99 );
291 const int statusCol = 1;
292 const int nameCol = 2;
297 // Create widgets for all steps and step headings in the internal list
300 for ( QList<Step*>::iterator i = _stepsList.begin(); i != _stepsList.end(); ++i)
302 YQWizard::Step * step = *i;
303 if ( step->isHeading() )
309 QLabel * label = new QLabel( step->name(), _stepsPanel );
310 YUI_CHECK_NEW( label );
311 label->setAlignment( Qt::AlignLeft | Qt::AlignTop );
312 label->setProperty( "class", "steps_heading" );
314 step->setNameLabel( label );
315 _stepsGrid->addWidget( label,
317 1, nameCol - statusCol + 1);
319 else // No heading - ordinary step
325 QLabel * statusLabel = new QLabel( _stepsPanel );
326 YUI_CHECK_NEW( statusLabel );
328 step->setStatusLabel( statusLabel );
329 statusLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
330 _stepsGrid->addWidget( statusLabel, row, statusCol );
336 QLabel * nameLabel = new QLabel( step->name(), _stepsPanel );
337 YUI_CHECK_NEW( nameLabel );
338 nameLabel->setAlignment( Qt::AlignLeft | Qt::AlignTop );
340 step->setNameLabel( nameLabel );
341 _stepsGrid->addWidget( nameLabel, row, nameCol );
347 _stepsVBox->addStretch( 99 );
348 QVBoxLayout *rbl = new QVBoxLayout();
349 rbl->addWidget( _releaseNotesButton, 0, Qt::AlignCenter );
351 _stepsVBox->addLayout( rbl );
352 _stepsVBox->addStretch( 29 );
358 void YQWizard::updateStepStates()
363 YQWizard::Step * currentStep = findStep( _currentStepID );
364 QList<YQWizard::Step*>::iterator step = _stepsList.begin();
368 // Set status icon and color for the current step
369 currentStep->setStatus( Step::Current );
372 // Set all steps before the current to "done"
375 while ( step != _stepsList.end() && *step != currentStep )
377 ( *step )->setStatus( Step::Done );
381 // Skip the current step - continue with the step after it
383 if ( step != _stepsList.end() )
388 // Set all steps after the current to "to do"
391 while ( step != _stepsList.end() )
393 ( *step )->setStatus( Step::Todo );
398 void YQWizard::setCurrentStep( const string & id )
400 _currentStepID = fromUTF8( id );
405 void YQWizard::deleteSteps()
407 qDeleteAll(_stepsList);
413 YQWizard::Step * YQWizard::findStep( const QString & id )
418 return _stepsIDs[ id ];
422 void YQWizard::layoutTreePanel()
424 _treePanel = new QFrame( _sideBar );
425 YUI_CHECK_NEW( _treePanel );
426 QHBoxLayout *layout = new QHBoxLayout( _treePanel );
427 _sideBar->addWidget( _treePanel );
429 QVBoxLayout * vbox = new QVBoxLayout();
430 YUI_CHECK_NEW( vbox );
431 layout->addLayout( vbox );
435 _tree = new QY2ListView( _treePanel );
436 YUI_CHECK_NEW( _tree );
437 vbox->addWidget( _tree );
440 // _tree->addColumn( "" );
441 // _tree->header()->hide();
443 _tree->setRootIsDecorated( true );
444 _tree->setSortByInsertionSequence( true );
446 connect( _tree, SIGNAL( itemSelectionChanged ( void ) ),
447 this, SLOT ( treeSelectionChanged ( void ) ) );
449 connect( _tree, SIGNAL( itemActivated ( QTreeWidgetItem *, int ) ),
450 this, SLOT ( sendTreeEvent ( QTreeWidgetItem * ) ) );
452 connect( _tree, SIGNAL( itemDoubleClicked ( QTreeWidgetItem *, int ) ),
453 this, SLOT ( sendTreeEvent ( QTreeWidgetItem * ) ) );
458 void YQWizard::addTreeItem( const string & parentID, const string & text, const string & id )
460 QString qId = fromUTF8( id );
464 y2error( "YQWizard widget not created with `opt(`treeEnabled) !" );
468 YQWizard::TreeItem * item = 0;
469 YQWizard::TreeItem * parent = 0;
471 if ( ! parentID.empty() )
473 parent = findTreeItem( parentID );
478 item = new YQWizard::TreeItem( parent, fromUTF8( text ), qId );
479 YUI_CHECK_NEW( item );
483 item = new YQWizard::TreeItem( _tree, fromUTF8( text ), qId );
484 YUI_CHECK_NEW( item );
487 if ( ! qId.isEmpty() )
488 _treeIDs.insert( qId, item );
493 void YQWizard::deleteTreeItems()
503 YQWizard::TreeItem * YQWizard::findTreeItem( const string & id )
508 return _treeIDs[ fromUTF8( id ) ];
512 void YQWizard::selectTreeItem( const string & id )
516 YQWizard::TreeItem * item = findTreeItem( id );
520 YQSignalBlocker sigBlocker( _tree );
522 _tree->setCurrentItem(item);
523 _tree->scrollToItem(item);
529 void YQWizard::sendTreeEvent( QTreeWidgetItem * listViewItem )
533 YQWizard::TreeItem * item = dynamic_cast<YQWizard::TreeItem *> ( listViewItem );
535 if ( item && ! item->id().isEmpty() )
536 sendEvent( toUTF8( item->id() ) );
541 void YQWizard::treeSelectionChanged()
542 { //FIXME is currentItem correct or selected.first
544 sendTreeEvent( _tree->currentItem() );
548 string YQWizard::currentTreeSelection()
552 QTreeWidgetItem * sel = _tree->currentItem();
556 YQWizard::TreeItem * item = dynamic_cast<YQWizard::TreeItem *> (sel);
558 if ( item && ! item->id().isEmpty() )
559 return toUTF8( item->id() );
568 QWidget *YQWizard::layoutWorkArea( QWidget * parent )
570 QFrame *workArea = new QFrame( parent );
571 workArea->setObjectName( "work_area" );
573 QY2Styler::self()->registerWidget( workArea );
575 QVBoxLayout *vbox = new QVBoxLayout( workArea );
577 _menuBar = new QMenuBar( workArea );
578 YUI_CHECK_NEW( _menuBar );
580 _menuBar->hide(); // will be made visible when menus are added
581 vbox->addWidget( _menuBar );
584 // Dialog icon and heading
587 QHBoxLayout * headingHBox = new QHBoxLayout();
588 YUI_CHECK_NEW( headingHBox );
589 //headingHBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
590 vbox->addLayout( headingHBox );
592 _dialogIcon = new QLabel( workArea );
593 YUI_CHECK_NEW( _dialogIcon );
594 headingHBox->addWidget( _dialogIcon );
595 _dialogIcon->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); // hor/vert
596 _dialogIcon->setObjectName( "DialogIcon" );
598 _dialogHeading = new QLabel( workArea );
599 YUI_CHECK_NEW( _dialogHeading );
600 headingHBox->addWidget( _dialogHeading );
601 _dialogHeading->setAlignment( Qt::AlignLeft );
602 _dialogHeading->setWordWrap( true );
603 _dialogHeading->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
604 _dialogHeading->setObjectName( "DialogHeading" );
607 // Client area (the part that belongs to the YCP application)
610 layoutClientArea( workArea );
611 vbox->addWidget( _clientArea );
617 QLayout *bb = layoutButtonBox( workArea );
618 vbox->addLayout( bb );
625 void YQWizard::layoutClientArea( QWidget * parent )
627 _clientArea = new QFrame( parent );
628 YUI_CHECK_NEW( _clientArea );
629 _clientArea->setObjectName("_clientArea");
630 QVBoxLayout *layout = new QVBoxLayout( _clientArea );
631 layout->setMargin( 0 );
634 // HVCenter for wizard contents
637 _contents = new YQAlignment( this, _clientArea, YAlignCenter, YAlignCenter );
638 YUI_CHECK_NEW( _contents );
639 layout->addWidget( _contents );
640 _contents->QObject::setProperty( "class", "Contents" );
642 _contents->setStretchable( YD_HORIZ, true );
643 _contents->setStretchable( YD_VERT, true );
644 _contents->installEventFilter( this );
645 _contents->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
648 // Replace point for wizard contents
651 _contentsReplacePoint = YUI::widgetFactory()->createReplacePoint( _contents );
654 // Initial YEmpty widget contents of replace point
657 YUI::widgetFactory()->createEmpty( _contentsReplacePoint );
658 _contentsReplacePoint->showChild();
664 QLayout *YQWizard::layoutButtonBox( QWidget * parent )
667 // QHBoxLayout for the buttons
670 QHBoxLayout * hbox = new QHBoxLayout(); // parent, spacing
671 YUI_CHECK_NEW( hbox );
673 hbox->setSpacing( 0 );
674 hbox->setMargin( 0 );
676 // Help button - intentionally without keyboard shortcut
677 _helpButton = new QPushButton( _( "Help" ), parent );
678 YUI_CHECK_NEW( _helpButton );
680 connect( _helpButton, SIGNAL( clicked() ),
681 this, SLOT ( showHelp() ) );
683 hbox->addWidget( _helpButton );
685 hbox->addStretch( 10 );
691 _abortButton = new YQWizardButton( this, parent, _abortButtonLabel );
692 YUI_CHECK_NEW( _abortButton );
694 hbox->addWidget( (QWidget *) _abortButton->widgetRep() );
695 connect( _abortButton, SIGNAL( clicked() ),
696 this, SLOT ( slotAbortClicked() ) );
698 hbox->addSpacing( 10 );
704 _backButton = new YQWizardButton( this, parent, _backButtonLabel );
705 YUI_CHECK_NEW( _backButton );
707 hbox->addWidget( (QWidget *) _backButton->widgetRep() );
708 connect( _backButton, SIGNAL( clicked() ),
709 this, SLOT ( slotBackClicked() ) );
711 if ( _backButton->text().isEmpty() )
718 hbox->addSpacing( 5 );
720 _nextButton = new YQWizardButton( this, parent, _nextButtonLabel );
721 YUI_CHECK_NEW( _nextButton );
723 hbox->addWidget( (QWidget *) _nextButton->widgetRep() );
724 connect( _nextButton, SIGNAL( clicked() ),
725 this, SLOT ( slotNextClicked() ) );
730 void YQWizard::destroyButtons()
743 void YQWizard::connectNotify ( const char * signal )
745 if ( QString( signal ).contains( "nextClicked()" ) )
747 y2debug( "nextClicked connected, no longer directly sending button events" );
748 _sendButtonEvents = false;
753 void YQWizard::disconnectNotify ( const char * signal )
755 if ( QString( signal ).contains( "nextClicked()" ) )
757 y2debug( "nextClicked disconnected, directly sending button events again" );
758 _sendButtonEvents = true;
763 void YQWizard::setDialogIcon( const string & iconName )
767 if ( ! iconName.empty() )
769 QPixmap icon( iconName.c_str() );
772 y2warning( "Couldn't load dialog icon \"%s\"", iconName.c_str() );
775 _dialogIcon->setPixmap( icon );
776 topLevelWidget()->setWindowIcon( icon );
781 _dialogIcon->clear();
782 topLevelWidget()->setWindowIcon( QIcon() );
788 void YQWizard::setDialogHeading( const string & headingText )
790 if ( _dialogHeading )
792 if ( ! headingText.empty() )
793 _dialogHeading->setText( fromUTF8( headingText ) );
795 _dialogHeading->clear();
799 string YQWizard::debugLabel()
801 if ( _dialogHeading )
803 QString label = _dialogHeading->text();
804 label = label.simplified(); // Replace any embedded newline with a single blank
806 if ( ! label.isEmpty() )
808 label.prepend( "YQWizard \"" );
809 label.append( "\"" );
811 return toUTF8( label );
815 return "untitled YQWizard";
818 void YQWizard::setHelpText( const string & helpText )
820 _qHelpText = fromUTF8( helpText );
821 _qHelpText.replace( "&product;", YQUI::ui()->productName() );
825 void YQWizard::slotBackClicked()
829 if ( _sendButtonEvents )
830 YQUI::ui()->sendEvent( new YWidgetEvent( _backButton, YEvent::Activated ) );
832 _direction = YQWizard::Backward;
836 void YQWizard::slotAbortClicked()
840 if ( _sendButtonEvents )
841 YQUI::ui()->sendEvent( new YWidgetEvent( _abortButton, YEvent::Activated ) );
845 void YQWizard::slotNextClicked()
849 if ( _sendButtonEvents )
850 YQUI::ui()->sendEvent( new YWidgetEvent( _nextButton, YEvent::Activated ) );
852 _direction = YQWizard::Forward;
856 void YQWizard::showHelp()
858 QDialog helpDlg( this );
860 ui.setupUi( &helpDlg );
861 ui.textBrowser->setText( _qHelpText );
866 void YQWizard::releaseNotesClicked()
868 YQUI::ui()->sendEvent( new YWidgetEvent( _nextButton, YEvent::Activated ) );
870 if ( ! _releaseNotesButtonId.empty() )
872 y2milestone( "Release Notes button clicked" );
873 sendEvent( _releaseNotesButtonId );
878 void YQWizard::showSteps()
880 if ( _sideBar && _stepsPanel )
882 _sideBar->setCurrentWidget( _stepsPanel );
887 void YQWizard::showTree()
889 if ( _sideBar && _treePanel )
891 _sideBar->setCurrentWidget( _treePanel );
897 void YQWizard::addMenu( const string & text,
902 QMenu * menu = new QMenu( _menuBar );
903 YUI_CHECK_NEW( menu );
905 _menuIDs.insert( fromUTF8( id ), menu );
906 //FIXME _menuBar->insertItem( fromUTF8( text ), menu );
908 connect( menu, SIGNAL( activated ( int ) ),
909 this, SLOT ( sendMenuEvent( int ) ) );
916 void YQWizard::addSubMenu( const string & parentMenuID,
920 QMenu* parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
924 QMenu * menu = new QMenu( _menuBar );
925 YUI_CHECK_NEW( menu );
927 _menuIDs.insert( fromUTF8( id ), menu );
928 //FIXME parentMenu->insertItem( fromUTF8( text ), menu );
930 connect( menu, SIGNAL( activated ( int ) ),
931 this, SLOT ( sendMenuEvent( int ) ) );
935 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
940 void YQWizard::addMenuEntry( const string & parentMenuID,
942 const string & idString )
944 QMenu * parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
948 int id = _menuEntryIDs.size();
949 _menuEntryIDs.push_back( idString );
950 //FIXME parentMenu->insertItem( fromUTF8( text ), id );
954 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
959 void YQWizard::addMenuSeparator( const string & parentMenuID )
961 QMenu * parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
965 parentMenu->addSeparator();
969 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
974 void YQWizard::deleteMenus()
981 _menuEntryIDs.clear();
986 void YQWizard::sendMenuEvent( int numID )
988 if ( numID >= 0 && numID < (int) _menuEntryIDs.size() )
990 sendEvent( _menuEntryIDs[ numID ] );
994 y2error( "Invalid menu ID: %d", numID );
999 void YQWizard::sendEvent( const string & id )
1001 YQUI::ui()->sendEvent( new YMenuEvent( id ) );
1005 int YQWizard::preferredWidth()
1007 return sizeHint().width();
1011 int YQWizard::preferredHeight()
1013 return sizeHint().height();
1017 void YQWizard::setSize( int newWidth, int newHeight )
1019 resize( newWidth, newHeight );
1025 void YQWizard::resizeClientArea()
1027 y2debug( "resizing client area" );
1028 QRect contentsRect = _clientArea->contentsRect();
1029 _contents->setSize( contentsRect.width(), contentsRect.height() );
1032 bool YQWizard::eventFilter( QObject * obj, QEvent * ev )
1034 if ( ev->type() == QEvent::Resize && obj == _contents )
1037 return true; // Event handled
1040 return QWidget::eventFilter( obj, ev );
1044 void YQWizard::setButtonLabel( YPushButton * button, const string & newLabel )
1046 button->setLabel( newLabel );
1047 YDialog::currentDialog()->checkShortcuts();
1049 YQWizardButton * wizardButton = dynamic_cast<YQWizardButton *> (button);
1052 wizardButton->setVisible( !newLabel.empty() );
1056 void YQWizard::showReleaseNotesButton( const string & label, const string & id )
1058 return; // no longer supported!
1060 if ( ! _releaseNotesButton )
1062 y2error( "NULL Release Notes button" );
1064 if ( ! _stepsPanel )
1065 y2error( "This works only if there is a \"steps\" panel!" );
1070 // no way to check the shortcut, so strip it
1071 _releaseNotesButton->setText( fromUTF8( YShortcut::cleanShortcutString( label ) ) );
1072 _releaseNotesButtonId = id;
1074 _releaseNotesButton->show();
1078 void YQWizard::hideReleaseNotesButton()
1080 if ( _releaseNotesButton && !_releaseNotesButton->isHidden() )
1081 _releaseNotesButton->hide();
1085 void YQWizard::retranslateInternalButtons()
1087 YQUI::setTextdomain( TEXTDOMAIN );
1090 // "Help" button - intentionally without keyboard shortcut
1091 _helpButton->setText( _( "Help" ) );
1094 // "Steps" button - intentionally without keyboard shortcut
1095 _stepsButton->setText( _( "Steps" ) );
1098 // "Tree" button - intentionally without keyboard shortcut
1099 _treeButton->setText( _( "Tree" ) );
1102 void YQWizard::Step::setStatus( Status s )
1104 if ( !_statusLabel || !_nameLabel || _status == s )
1111 _statusLabel->setProperty( "class", "todo-step-status QLabel" );
1112 _nameLabel->setProperty( "class", "todo-step-name QLabel" );
1117 _statusLabel->setProperty( "class", "done-step-status QLabel" );
1118 _nameLabel->setProperty( "class", "done-step-name QLabel" );
1123 _statusLabel->setProperty( "class", "current-step-status QLabel" );
1124 _nameLabel->setProperty( "class", "current-step-name QLabel" );
1127 qApp->style()->polish( _statusLabel );
1128 qApp->style()->polish( _nameLabel );
1131 #include "YQWizard.moc"