#include <qslider.h>
#include <qspinbox.h>
#include <qtimer.h>
+#include <qfont.h>
/*!
Constructor
aTopBox->setSpacing( 6 );
myFirstTimeStamp = new QLabel( aTopBox );
- myFirstTimeStamp->setMinimumWidth( 50 );
+ myFirstTimeStamp->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myFirstTimeStamp->setText( "" );
mySlider = new QSlider( 0, 1, 1, 0, Qt::Horizontal, aTopBox );
//mySlider->setTickmarks( QSlider::Below );
+ mySlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
mySlider->setTracking( false );
myLastTimeStamp = new QLabel( aTopBox );
- myLastTimeStamp->setMinimumWidth( 50 );
+ myLastTimeStamp->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myLastTimeStamp->setText( "" );
myTimeStampsNumber = new QLabel( aTopBox );
- myTimeStampsNumber->setMinimumWidth( 50 );
+ myTimeStampsNumber->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myTimeStampsNumber->setText( "" );
myTimeStampStrings = new QComboBox( aTopBox );
- myTimeStampStrings->setFixedWidth( 120 );
+ myTimeStampStrings->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myTimeStampIndices = new QComboBox( aTopBox );
- myTimeStampIndices->setFixedWidth( 50 );
+ myTimeStampIndices->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
// Buttons
QHBox* aBottomBox = new QHBox( aWidget );
aBottomBox->setSpacing( 6 );
myMoreButton = new QPushButton( tr( "MORE" ), aBottomBox );
- myMoreButton->setMaximumWidth( 100 );
+ myMoreButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myMoreButton->setToggleButton( true );
myMoreButton->setEnabled( false );
myFirstButton = new QPushButton( tr( "|<<" ), aBottomBox );
- myFirstButton->setMaximumWidth( 100 );
+ myFirstButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myPreviousButton = new QPushButton( tr( "<<" ), aBottomBox );
- myPreviousButton->setMaximumWidth( 100 );
+ myPreviousButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myPlayButton = new QPushButton( tr( ">" ), aBottomBox );
- myPlayButton->setMaximumWidth( 100 );
+ myPlayButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myPlayButton->setToggleButton( true );
myNextButton = new QPushButton( tr( ">>" ), aBottomBox );
- myNextButton->setMaximumWidth( 100 );
+ myNextButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myLastButton = new QPushButton( tr( ">>|" ), aBottomBox );
- myLastButton->setMaximumWidth( 100 );
+ myLastButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
new QLabel( tr( "SPEED" ), aBottomBox );
mySpeedBox = new QSpinBox( 1, 100, 1, aBottomBox );
+ mySpeedBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
mySpeedBox->setValue( 50 );
myAVIBox = new QCheckBox( tr( "AVI" ), aBottomBox );
+ myAVIBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
myAVIBox->setEnabled( false );
myTimer = new QTimer( this );
myPlayButton->setOn( false );
}
+ myTimeStampStrings->setFont(myTimeStampStrings->font());
+ myTimeStampStrings->updateGeometry();
+
+ myTimeStampIndices->setFont(myTimeStampStrings->font());
+ myTimeStampIndices->updateGeometry();
+
widget()->setEnabled( on );
}
if( myPrsList.size() == 0 )
return;
- myTimeStampStrings->setCurrentItem( value );
- myTimeStampIndices->setCurrentItem( value );
-
VISU::ColoredPrs3d_i* aPrs = myPrsList[0];
VISU::ColoredPrs3d::TimeStampsRange_var aTimeStampsRange = aPrs->GetTimeStampsRange();
+ CORBA::Long aLength = aTimeStampsRange->length();
+ if(value < 0 || aLength <= value)
+ return;
+
CORBA::Long aNumber = aTimeStampsRange[ value ].myNumber;
for( int i = 0, n = myPrsList.size(); i < n; i++ )
aPrs->Apply();
}
+ myTimeStampStrings->setCurrentItem( value );
+ myTimeStampIndices->setCurrentItem( value );
+
myMainWindow->Repaint();
}