X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOME_ProgressView.cxx;h=5f992fb244373141e28b999fa0fae7788417d8b4;hb=260bf6b42efe9e30501c4e6e99b013da3fe34f77;hp=1387c9cc79f9f178c752d24573e21951283832f5;hpb=b2f455f9c32667f9adee3ae066a51d85fb94ea04;p=tools%2Finstall.git diff --git a/src/SALOME_ProgressView.cxx b/src/SALOME_ProgressView.cxx index 1387c9c..5f992fb 100644 --- a/src/SALOME_ProgressView.cxx +++ b/src/SALOME_ProgressView.cxx @@ -1,9 +1,9 @@ // File : SALOME_ProgressView.cxx // Created : Thu Dec 18 12:01:00 2002 -// Author : Vadim SANDLER +// Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) // Project : SALOME // Module : Installation Wizard -// Copyright : 2004-2005 CEA +// Copyright : 2002-2010 CEA #include "SALOME_ProgressView.hxx" @@ -21,10 +21,9 @@ // ================================================================ ProgressViewItem::ProgressViewItem( ProgressView* parent, QString productName, - const QString installType, const QString scriptName, Status status ) - : QListViewItem( parent, productName, installType ), myScript( scriptName ) + : QListViewItem( parent, productName ), myScript( scriptName ) { setStatus( status ); } @@ -39,13 +38,13 @@ void ProgressViewItem::setStatus( Status status ) myStatus = status; switch ( myStatus ) { case Waiting: - setText( 2, ProgressView::tr( "Waiting" ) ); break; + setText( 1, ProgressView::tr( "Waiting" ) ); break; case Processing: - setText( 2, ProgressView::tr( "Processing" ) ); break; + setText( 1, ProgressView::tr( "Processing" ) ); break; case Completed: - setText( 2, ProgressView::tr( "Completed" ) ); break; + setText( 1, ProgressView::tr( "Completed" ) ); break; case Aborted: - setText( 2, ProgressView::tr( "Aborted" ) ); break; + setText( 1, ProgressView::tr( "Aborted" ) ); break; default: break; } @@ -64,7 +63,7 @@ void ProgressViewItem::paintCell( QPainter* painter, int align ) { QColorGroup acg( cg ); - if ( column == 2 ) { + if ( column == 1 ) { switch ( myStatus ) { case Waiting: acg.setColor( QColorGroup::Text, ( ( ProgressView* )listView() )->getWaitingColor() ); break; @@ -90,7 +89,7 @@ void ProgressViewItem::paintCell( QPainter* painter, // ================================================================ ProgressView::ProgressView( QWidget* parent ) : QListView( parent ) { - addColumn( tr( "Product" ) ); addColumn( tr( "Type" ) ); addColumn( tr( "Status" ) ); + addColumn( tr( "Product" ) ); addColumn( tr( "Status" ) ); header()->hide(); setSelectionMode( QListView::NoSelection ); setSorting( -1 ); @@ -116,11 +115,12 @@ void ProgressView::setColors( QColor wColor, QColor pColor, QColor cColor ) { * Adds product item */ // ================================================================ -void ProgressView::addProduct( const QString product, const QString type, const QString script ) { +ProgressViewItem* ProgressView::addProduct( const QString product, const QString script ) { QListViewItem* lastItem = this->lastItem(); - ProgressViewItem* newItem = new ProgressViewItem( this, product, type, script ); + ProgressViewItem* newItem = new ProgressViewItem( this, product, script ); if ( lastItem ) newItem->moveItem( lastItem ); + return newItem; } // ================================================================ /*! @@ -183,4 +183,10 @@ QString ProgressView::getScript( const QString product ) { } return QString::null; } +/*! + To get visibility status of an item in the progress list view +*/ +bool ProgressView::isVisible( const QString product ) { + return findItem( product )->isVisible(); +}