#include <qlayout.h>
#include <qhbox.h>
#include <qpushbutton.h>
+#include <qtoolbutton.h>
#include <qslider.h>
#include <qspinbox.h>
#include <qtimer.h>
if(!CORBA::is_nil(aView.in()))
myView3D = VISU::View3D::_narrow(aView);
- //SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
setHorizontallyStretchable( true );
myMoreButton->setEnabled( false );
aButtonsLayout->addWidget( myMoreButton );
- aButtonsLayout->addItem( new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ aButtonsLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
- myFirstButton = new QPushButton( tr( "|<<" ), aWidget );
- myFirstButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ myFirstButton = new QToolButton( aWidget );
+ myFirstButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
+ //myFirstButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
aButtonsLayout->addWidget( myFirstButton );
- myPreviousButton = new QPushButton( tr( "<<" ), aWidget );
- myPreviousButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ myPreviousButton = new QToolButton( aWidget );
+ myPreviousButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
+ //myPreviousButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
aButtonsLayout->addWidget( myPreviousButton );
- myPlayButton = new QPushButton( tr( ">" ), aWidget );
- myPlayButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ myPlayButton = new QToolButton( aWidget );
+ myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+ //myPlayButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myPlayButton->setToggleButton( true );
aButtonsLayout->addWidget( myPlayButton );
- myNextButton = new QPushButton( tr( ">>" ), aWidget );
- myNextButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ myNextButton = new QToolButton( aWidget );
+ myNextButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
+ //myNextButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
aButtonsLayout->addWidget( myNextButton );
- myLastButton = new QPushButton( tr( ">>|" ), aWidget );
- myLastButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ myLastButton = new QToolButton( aWidget );
+ myLastButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
+ //myLastButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
aButtonsLayout->addWidget( myLastButton );
- aButtonsLayout->addItem( new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ aButtonsLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
QLabel* aSpeedLabel = new QLabel( tr( "SPEED" ), aWidget );
aSpeedLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
void VisuGUI_Slider::onPlay( bool on )
{
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
if( on )
{
- myPlayButton->setText( "||" );
+ myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PAUSE" ) ) );
int delay = int(5000.0 / double(mySpeedBox->value()));
myTimer->start( delay );
else
{
myTimer->stop();
- myPlayButton->setText( ">" );
+ myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
}
}