// Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
// Project : SALOME
// Module : Installation Wizard
-// Copyright : 2002-2006 CEA
+// Copyright : 2002-2012 CEA
#include "SALOME_ProgressView.hxx"
// ================================================================
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 );
}
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;
}
int align )
{
QColorGroup acg( cg );
- if ( column == 2 ) {
+ if ( column == 1 ) {
switch ( myStatus ) {
case Waiting:
acg.setColor( QColorGroup::Text, ( ( ProgressView* )listView() )->getWaitingColor() ); break;
// ================================================================
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 );
* 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;
}
// ================================================================
/*!
}
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();
+}