{
QWidget* aPropertiesTab = new QWidget();
- QVBoxLayout* aVBoxLayout = new QVBoxLayout( aPropertiesTab );
+ QGridLayout* aGridLayout = new QGridLayout( aPropertiesTab );
+
{
- QGridLayout* aGridLayout = new QGridLayout( aPropertiesTab );
-
+ QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+
QLabel* aModeAnnotation = new QLabel( aPropertiesTab );
aModeAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
aModeAnnotation->setText( tr( "MODE" ) );
- aGridLayout->addWidget( aModeAnnotation, 0, 0 );
-
+ aHBoxLayout->addWidget( aModeAnnotation );
+
mySweepMode = new QComboBox( aPropertiesTab );
mySweepMode->insertItems( 0, QStringList()
<< tr( "LINEAR" )
<< tr( "COSINUSOIDAL" )
<< tr( "SINUSOIDAL" ) );
mySweepMode->setCurrentIndex( aResourceMgr->integerValue( "VISU", "sweeping_modes", 0 ) );
- aGridLayout->addWidget( mySweepMode, 0, 1 );
-
+ aHBoxLayout->addWidget( mySweepMode );
+
myIntervals = new QComboBox( aPropertiesTab );
myIntervals->insertItems( 0, QStringList()
<< tr( "[ 0, +PI ]" )
<< tr( "[ -PI, +PI ]" ) );
myIntervals->setCurrentIndex( aResourceMgr->integerValue( "VISU", "sweeping_is2PI", 0 ) );
- aGridLayout->addWidget( myIntervals, 0, 2 );
-
- QLabel* aNumberOfStepsAnnotation = new QLabel( aPropertiesTab );
- aNumberOfStepsAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
- aNumberOfStepsAnnotation->setText( tr( "NUMBER_OF_STEPS" ) );
- aGridLayout->addWidget( aNumberOfStepsAnnotation, 1, 0 );
-
- myNumberOfSteps = new QtxIntSpinBox( aPropertiesTab );
- connect( myNumberOfSteps, SIGNAL( valueChanged( int ) ), SLOT( onNumberOfStepsChanged( int ) ) );
- myNumberOfSteps->setValue( aResourceMgr->integerValue( "VISU", "sweeping_number_steps", 40 ) );
- aGridLayout->addWidget( myNumberOfSteps, 1, 1, 1, 2 );
-
- QLabel* aStepDelayAnnotation = new QLabel( aPropertiesTab );
- aStepDelayAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
- aStepDelayAnnotation->setText( tr( "DELAY_BETWEEN_STEPS" ) );
- aGridLayout->addWidget( aStepDelayAnnotation, 2, 0 );
-
- myStepDelay = new QtxDoubleSpinBox( aPropertiesTab );
- myStepDelay->setValue( aResourceMgr->doubleValue("VISU", "sweeping_time_step", 0.1) );
- aGridLayout->addWidget( myStepDelay, 2, 1, 1, 2 );
-
- QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- aGridLayout->addItem( aSpacerItem, 3, 0 );
-
- aVBoxLayout->addLayout( aGridLayout );
+ aHBoxLayout->addWidget( myIntervals );
+
+ aGridLayout->addLayout( aHBoxLayout, 0, 0, 1, 2 );
}
+ QLabel* aNumberOfStepsAnnotation = new QLabel( aPropertiesTab );
+ aNumberOfStepsAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
+ aNumberOfStepsAnnotation->setText( tr( "NUMBER_OF_STEPS" ) );
+ aGridLayout->addWidget( aNumberOfStepsAnnotation, 1, 0, 1, 1 );
+
+ myNumberOfSteps = new QtxIntSpinBox( aPropertiesTab );
+ connect( myNumberOfSteps, SIGNAL( valueChanged( int ) ), SLOT( onNumberOfStepsChanged( int ) ) );
+ myNumberOfSteps->setValue( aResourceMgr->integerValue( "VISU", "sweeping_number_steps", 40 ) );
+ aGridLayout->addWidget( myNumberOfSteps, 1, 1, 1, 1 );
+
+ QLabel* aStepDelayAnnotation = new QLabel( aPropertiesTab );
+ aStepDelayAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
+ aStepDelayAnnotation->setText( tr( "DELAY_BETWEEN_STEPS" ) );
+ aGridLayout->addWidget( aStepDelayAnnotation, 2, 0, 1, 1 );
+
+ myStepDelay = new QtxDoubleSpinBox( aPropertiesTab );
+ myStepDelay->setValue( aResourceMgr->doubleValue("VISU", "sweeping_time_step", 0.1) );
+ aGridLayout->addWidget( myStepDelay, 2, 1, 1, 1 );
+
+ QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ aGridLayout->addItem( aSpacerItem, 3, 0 );
+
aTabWidget->addTab( aPropertiesTab, tr( "PROPERTIES_TAB" ) );
}
int anOldNumberOfSteps = mySweepSlider->maximum();
mySweepSlider->setMaximum( value );
- double aNewSweepValue = value / anOldNumberOfSteps * mySweepSlider->value();
- mySweepSlider->setValue( int( aNewSweepValue ) );
+ double aValue = double( value );
+
+ double aNewSweepValue = aValue / anOldNumberOfSteps * mySweepSlider->value();
+ mySweepSlider->setValue( int( aNewSweepValue + 1 ) );
- double aNewPageStep = value / anOldNumberOfSteps * mySweepSlider->pageStep();
- mySweepSlider->setPageStep( int( aNewPageStep ) );
+ double aNewPageStep = aValue / 10;
+ mySweepSlider->setPageStep( int( aNewPageStep + 1 ) );
}