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( spacePressed ( QTreeWidgetItem * ) ),
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 QVBoxLayout *layout = new QVBoxLayout( _clientArea );
630 // _clientArea->layout()->setMargin( 4 );
633 // HVCenter for wizard contents
636 _contents = new YQAlignment( this, _clientArea, YAlignCenter, YAlignCenter );
637 YUI_CHECK_NEW( _contents );
638 layout->addWidget( _contents );
639 _contents->QObject::setProperty( "class", "Contents" );
641 _contents->setStretchable( YD_HORIZ, true );
642 _contents->setStretchable( YD_VERT, true );
643 _contents->installEventFilter( this );
644 _contents->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert
647 // Replace point for wizard contents
650 _contentsReplacePoint = YUI::widgetFactory()->createReplacePoint( _contents );
653 // Initial YEmpty widget contents of replace point
656 YUI::widgetFactory()->createEmpty( _contentsReplacePoint );
657 _contentsReplacePoint->showChild();
663 QLayout *YQWizard::layoutButtonBox( QWidget * parent )
666 // QHBoxLayout for the buttons
669 QHBoxLayout * hbox = new QHBoxLayout(); // parent, spacing
670 YUI_CHECK_NEW( hbox );
672 hbox->setSpacing( 0 );
673 hbox->setMargin( 0 );
675 // Help button - intentionally without keyboard shortcut
676 _helpButton = new QPushButton( _( "Help" ), parent );
677 YUI_CHECK_NEW( _helpButton );
679 connect( _helpButton, SIGNAL( clicked() ),
680 this, SLOT ( showHelp() ) );
682 hbox->addWidget( _helpButton );
684 hbox->addStretch( 10 );
690 _abortButton = new YQWizardButton( this, parent, _abortButtonLabel );
691 YUI_CHECK_NEW( _abortButton );
693 hbox->addWidget( (QWidget *) _abortButton->widgetRep() );
694 connect( _abortButton, SIGNAL( clicked() ),
695 this, SLOT ( slotAbortClicked() ) );
697 hbox->addSpacing( 10 );
703 _backButton = new YQWizardButton( this, parent, _backButtonLabel );
704 YUI_CHECK_NEW( _backButton );
706 hbox->addWidget( (QWidget *) _backButton->widgetRep() );
707 connect( _backButton, SIGNAL( clicked() ),
708 this, SLOT ( slotBackClicked() ) );
710 if ( _backButton->text().isEmpty() )
717 hbox->addSpacing( 5 );
719 _nextButton = new YQWizardButton( this, parent, _nextButtonLabel );
720 YUI_CHECK_NEW( _nextButton );
722 hbox->addWidget( (QWidget *) _nextButton->widgetRep() );
723 connect( _nextButton, SIGNAL( clicked() ),
724 this, SLOT ( slotNextClicked() ) );
729 void YQWizard::destroyButtons()
742 void YQWizard::connectNotify ( const char * signal )
744 if ( QString( signal ).contains( "nextClicked()" ) )
746 y2debug( "nextClicked connected, no longer directly sending button events" );
747 _sendButtonEvents = false;
752 void YQWizard::disconnectNotify ( const char * signal )
754 if ( QString( signal ).contains( "nextClicked()" ) )
756 y2debug( "nextClicked disconnected, directly sending button events again" );
757 _sendButtonEvents = true;
762 void YQWizard::setDialogIcon( const string & iconName )
766 if ( ! iconName.empty() )
768 QPixmap icon( iconName.c_str() );
771 y2warning( "Couldn't load dialog icon \"%s\"", iconName.c_str() );
774 _dialogIcon->setPixmap( icon );
775 topLevelWidget()->setWindowIcon( icon );
780 _dialogIcon->clear();
781 topLevelWidget()->setWindowIcon( QIcon() );
787 void YQWizard::setDialogHeading( const string & headingText )
789 if ( _dialogHeading )
791 if ( ! headingText.empty() )
792 _dialogHeading->setText( fromUTF8( headingText ) );
794 _dialogHeading->clear();
798 string YQWizard::debugLabel()
800 if ( _dialogHeading )
802 QString label = _dialogHeading->text();
803 label = label.simplified(); // Replace any embedded newline with a single blank
805 if ( ! label.isEmpty() )
807 label.prepend( "YQWizard \"" );
808 label.append( "\"" );
810 return toUTF8( label );
814 return "untitled YQWizard";
817 void YQWizard::setHelpText( const string & helpText )
819 _qHelpText = fromUTF8( helpText );
820 _qHelpText.replace( "&product;", YQUI::ui()->productName() );
824 void YQWizard::slotBackClicked()
828 if ( _sendButtonEvents )
829 YQUI::ui()->sendEvent( new YWidgetEvent( _backButton, YEvent::Activated ) );
831 _direction = YQWizard::Backward;
835 void YQWizard::slotAbortClicked()
839 if ( _sendButtonEvents )
840 YQUI::ui()->sendEvent( new YWidgetEvent( _abortButton, YEvent::Activated ) );
844 void YQWizard::slotNextClicked()
848 if ( _sendButtonEvents )
849 YQUI::ui()->sendEvent( new YWidgetEvent( _nextButton, YEvent::Activated ) );
851 _direction = YQWizard::Forward;
855 void YQWizard::showHelp()
857 QDialog helpDlg( this );
859 ui.setupUi( &helpDlg );
860 ui.textBrowser->setText( _qHelpText );
865 void YQWizard::releaseNotesClicked()
867 YQUI::ui()->sendEvent( new YWidgetEvent( _nextButton, YEvent::Activated ) );
869 if ( ! _releaseNotesButtonId.empty() )
871 y2milestone( "Release Notes button clicked" );
872 sendEvent( _releaseNotesButtonId );
877 void YQWizard::showSteps()
879 if ( _sideBar && _stepsPanel )
881 _sideBar->setCurrentWidget( _stepsPanel );
886 void YQWizard::showTree()
888 if ( _sideBar && _treePanel )
890 _sideBar->setCurrentWidget( _treePanel );
896 void YQWizard::addMenu( const string & text,
901 QMenu * menu = new QMenu( _menuBar );
902 YUI_CHECK_NEW( menu );
904 _menuIDs.insert( fromUTF8( id ), menu );
905 //FIXME _menuBar->insertItem( fromUTF8( text ), menu );
907 connect( menu, SIGNAL( activated ( int ) ),
908 this, SLOT ( sendMenuEvent( int ) ) );
915 void YQWizard::addSubMenu( const string & parentMenuID,
919 QMenu* parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
923 QMenu * menu = new QMenu( _menuBar );
924 YUI_CHECK_NEW( menu );
926 _menuIDs.insert( fromUTF8( id ), menu );
927 //FIXME parentMenu->insertItem( fromUTF8( text ), menu );
929 connect( menu, SIGNAL( activated ( int ) ),
930 this, SLOT ( sendMenuEvent( int ) ) );
934 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
939 void YQWizard::addMenuEntry( const string & parentMenuID,
941 const string & idString )
943 QMenu * parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
947 int id = _menuEntryIDs.size();
948 _menuEntryIDs.push_back( idString );
949 //FIXME parentMenu->insertItem( fromUTF8( text ), id );
953 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
958 void YQWizard::addMenuSeparator( const string & parentMenuID )
960 QMenu * parentMenu = _menuIDs[ fromUTF8( parentMenuID ) ];
964 parentMenu->addSeparator();
968 y2error( "Can't find menu with ID %s", parentMenuID.c_str() );
973 void YQWizard::deleteMenus()
980 _menuEntryIDs.clear();
985 void YQWizard::sendMenuEvent( int numID )
987 if ( numID >= 0 && numID < (int) _menuEntryIDs.size() )
989 sendEvent( _menuEntryIDs[ numID ] );
993 y2error( "Invalid menu ID: %d", numID );
998 void YQWizard::sendEvent( const string & id )
1000 YQUI::ui()->sendEvent( new YMenuEvent( id ) );
1004 int YQWizard::preferredWidth()
1006 return sizeHint().width();
1010 int YQWizard::preferredHeight()
1012 return sizeHint().height();
1016 void YQWizard::setSize( int newWidth, int newHeight )
1018 resize( newWidth, newHeight );
1024 void YQWizard::resizeClientArea()
1026 y2debug( "resizing client area" );
1027 QRect contentsRect = _clientArea->contentsRect();
1028 _contents->setSize( contentsRect.width(), contentsRect.height() );
1031 bool YQWizard::eventFilter( QObject * obj, QEvent * ev )
1033 if ( ev->type() == QEvent::Resize && obj == _contents )
1036 return true; // Event handled
1039 return QWidget::eventFilter( obj, ev );
1043 void YQWizard::setButtonLabel( YPushButton * button, const string & newLabel )
1045 button->setLabel( newLabel );
1046 YDialog::currentDialog()->checkShortcuts();
1048 YQWizardButton * wizardButton = dynamic_cast<YQWizardButton *> (button);
1051 wizardButton->setVisible( !newLabel.empty() );
1055 void YQWizard::showReleaseNotesButton( const string & label, const string & id )
1057 return; // no longer supported!
1059 if ( ! _releaseNotesButton )
1061 y2error( "NULL Release Notes button" );
1063 if ( ! _stepsPanel )
1064 y2error( "This works only if there is a \"steps\" panel!" );
1069 // no way to check the shortcut, so strip it
1070 _releaseNotesButton->setText( fromUTF8( YShortcut::cleanShortcutString( label ) ) );
1071 _releaseNotesButtonId = id;
1073 _releaseNotesButton->show();
1077 void YQWizard::hideReleaseNotesButton()
1079 if ( _releaseNotesButton && !_releaseNotesButton->isHidden() )
1080 _releaseNotesButton->hide();
1084 void YQWizard::retranslateInternalButtons()
1086 YQUI::setTextdomain( TEXTDOMAIN );
1089 // "Help" button - intentionally without keyboard shortcut
1090 _helpButton->setText( _( "Help" ) );
1093 // "Steps" button - intentionally without keyboard shortcut
1094 _stepsButton->setText( _( "Steps" ) );
1097 // "Tree" button - intentionally without keyboard shortcut
1098 _treeButton->setText( _( "Tree" ) );
1101 void YQWizard::Step::setStatus( Status s )
1103 if ( !_statusLabel || !_nameLabel || _status == s )
1110 _statusLabel->setProperty( "class", "todo-step-status QLabel" );
1111 _nameLabel->setProperty( "class", "todo-step-name QLabel" );
1116 _statusLabel->setProperty( "class", "done-step-status QLabel" );
1117 _nameLabel->setProperty( "class", "done-step-name QLabel" );
1122 _statusLabel->setProperty( "class", "current-step-status QLabel" );
1123 _nameLabel->setProperty( "class", "current-step-name QLabel" );
1126 qApp->style()->polish( _statusLabel );
1127 qApp->style()->polish( _nameLabel );
1130 #include "YQWizard.moc"