#include "LightApp_Application.h"
-#include <QtxColorButton.h>
-
#include <vtkTimerLog.h>
#include <QCheckBox>
aProgressLayout->setMargin( 11 );
QLabel* aBuildEntitiesLabel = new QLabel( tr( "BUILD_ENTITIES" ), myProgressBox );
- myBuildEntitiesButton = new QtxColorButton( myProgressBox );
+ myBuildEntitiesButton = new QPushButton( myProgressBox );
myBuildEntitiesButton->setEnabled( false );
myBuildEntitiesButton->setFixedSize( 30, 30 );
- //QPalette aPal = myBuildEntitiesButton->palette();
- //aPal.setColor( myBuildEntitiesButton->backgroundRole(), Qt::red );
- //myBuildEntitiesButton->setPalette( aPal );
- myBuildEntitiesButton->setColor( Qt::red );
+ QPalette aPal = myBuildEntitiesButton->palette();
+ aPal.setColor( myBuildEntitiesButton->backgroundRole(), Qt::red );
+ myBuildEntitiesButton->setPalette( aPal );
myBuildFieldsCheckBox = new QCheckBox( tr( "BUILD_FIELDS" ), myProgressBox );
myBuildFieldsCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_fields", true ) );
- myBuildFieldsButton = new QtxColorButton( myProgressBox );
+ myBuildFieldsButton = new QPushButton( myProgressBox );
myBuildFieldsButton->setEnabled( false );
myBuildFieldsButton->setFixedSize( 30, 30 );
- //aPal = myBuildFieldsButton->palette();
- //aPal.setColor( myBuildFieldsButton->backgroundRole(), Qt::red );
- //myBuildFieldsButton->setPalette( aPal );
- myBuildFieldsButton->setColor( Qt::red );
+ aPal = myBuildFieldsButton->palette();
+ aPal.setColor( myBuildFieldsButton->backgroundRole(), Qt::red );
+ myBuildFieldsButton->setPalette( aPal );
connect( myBuildFieldsCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
myBuildMinMaxCheckBox = new QCheckBox( tr( "BUILD_MINMAX" ), myProgressBox );
myBuildMinMaxCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_min_max", true ) );
- myBuildMinMaxButton = new QtxColorButton( myProgressBox );
+ myBuildMinMaxButton = new QPushButton( myProgressBox );
myBuildMinMaxButton->setEnabled( false );
myBuildMinMaxButton->setFixedSize( 30, 30 );
- //aPal = myBuildMinMaxButton->palette();
- //aPal.setColor( myBuildMinMaxButton->backgroundRole(), Qt::red );
- //myBuildMinMaxButton->setPalette( aPal );
- myBuildMinMaxButton->setColor( Qt::red );
+ aPal = myBuildMinMaxButton->palette();
+ aPal.setColor( myBuildMinMaxButton->backgroundRole(), Qt::red );
+ myBuildMinMaxButton->setPalette( aPal );
connect( myBuildMinMaxCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
myBuildGroupsCheckBox = new QCheckBox( tr( "BUILD_GROUPS" ), myProgressBox );
myBuildGroupsCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_groups", true ) );
- myBuildGroupsButton = new QtxColorButton( myProgressBox );
+ myBuildGroupsButton = new QPushButton( myProgressBox );
myBuildGroupsButton->setEnabled( false );
myBuildGroupsButton->setFixedSize( 30, 30 );
- //aPal = myBuildGroupsButton->palette();
- //aPal.setColor( myBuildGroupsButton->backgroundRole(), Qt::red );
- //myBuildGroupsButton->setPalette( aPal );
- myBuildGroupsButton->setColor( Qt::red );
+ aPal = myBuildGroupsButton->palette();
+ aPal.setColor( myBuildGroupsButton->backgroundRole(), Qt::red );
+ myBuildGroupsButton->setPalette( aPal );
connect( myBuildGroupsCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
aProgressLayout->addWidget( myBuildGroupsButton, 3, 1 );
// Time
+ myTime = QTime( 0, 0, 0, 0 );
+
myTimeBox = new QGroupBox( tr( "IMPORT_TIME" ), this );
aTopLayout->addWidget( myTimeBox );
//myTimeBox->setColumnLayout( 0, Qt::Vertical );
myTimeLCDNumber = new QLCDNumber( myTimeBox );
myTimeLCDNumber->setSegmentStyle( QLCDNumber::Filled );
- QPalette aPal = myTimeLCDNumber->palette();
- aPal.setColor( myTimeLCDNumber->backgroundRole(), Qt::black );
- aPal.setColor( myTimeLCDNumber->foregroundRole(), Qt::white );
- myTimeLCDNumber->setPalette( aPal );
+ myTimeLCDNumber->setStyleSheet( "color: white; background-color: black" );
+ //QPalette aPal = myTimeLCDNumber->palette();
+ //aPal.setColor( myTimeLCDNumber->backgroundRole(), Qt::black );
+ //aPal.setColor( myTimeLCDNumber->foregroundRole(), Qt::white );
+ //myTimeLCDNumber->setPalette( aPal );
+
myTimeLCDNumber->setNumDigits( 8 );
myTimeLCDNumber->display( myTime.toString( "hh:mm:ss.zzz" ) );
if( aBuildAtOnce )
{
+ updateButton( myBuildEntitiesButton, true );
+ updateButton( myBuildFieldsButton, true );
+ updateButton( myBuildMinMaxButton, true );
+ updateButton( myBuildGroupsButton, true );
+
QApplication::restoreOverrideCursor();
QTime aTime;
}
}
-void VisuGUI_BuildProgressDlg::updateButton( QtxColorButton* theButton, bool theIsDone )
+void VisuGUI_BuildProgressDlg::updateButton( QPushButton* theButton, bool theIsDone )
{
- //QPalette aPal = theButton->palette();
- QColor aCurrentColor = theButton->color();
+ QPalette aPal = theButton->palette();
+ QColor aCurrentColor = aPal.color( theButton->backgroundRole() );
if( aCurrentColor == Qt::gray || aCurrentColor == Qt::green )
return;
aNewColor.setRgb( 255, gNew, 0 );
}
- //aPal.setColor( theButton->backgroundRole(), aNewColor );
- theButton->setColor( aNewColor );
+ aPal.setColor( theButton->backgroundRole(), aNewColor );
+ theButton->setPalette( aPal );
}
void VisuGUI_BuildProgressDlg::done( int r )