]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To improve layouting for "slider functionality"
authorapo <apo@opencascade.com>
Fri, 16 May 2008 18:01:36 +0000 (18:01 +0000)
committerapo <apo@opencascade.com>
Fri, 16 May 2008 18:01:36 +0000 (18:01 +0000)
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VisuGUI_Slider.cxx
src/VISUGUI/VisuGUI_Slider.h
src/VISUGUI/VisuGUI_Sweep.cxx

index 57f26ebcbb859307747d54d0abe5027ef40a50ba..f75d2b1b454958a8761886d850c5c3741fe16395 100644 (file)
@@ -2853,55 +2853,20 @@ Please, provide non-empty resulting presentation.</translation>
     <context>
         <name>VisuGUI_Slider</name>
 
-        <message>
-            <source>TITLE</source>
-            <translation>Slider</translation>
-        </message>
-
-        <message>
-            <source>NAVIGATION</source>
-            <translation>Navigation</translation>
-        </message>
-        <message>
-            <source>IS_CYCLED</source>
-            <translation>Is Cycled</translation>
-        </message>
+        <message><source>TITLE</source><translation>Slider</translation></message>
 
-        <message>
-            <source>SPEED</source>
-            <translation>Speed</translation>
-        </message>
+        <message><source>NAVIGATION_TAB</source><translation>Navigation</translation></message>
+        <message><source>IS_CYCLED</source><translation>Cycled</translation></message>
 
-        <message>
-            <source>MEMORY_MODE</source>
-            <translation>Mode</translation>
-        </message>
-        <message>
-            <source>MINIMAL_MEMORY</source>
-            <translation>Minimal</translation>
-        </message>
-        <message>
-            <source>LIMITED_MEMORY</source>
-            <translation>Limited</translation>
-        </message>
-        <message>
-            <source>MEMORY_UNITS</source>
-            <translation>Mb</translation>
-        </message>
+        <message><source>PROPERTIES_TAB</source><translation>Properties</translation></message>
+        <message><source>MINIMAL_MEMORY</source><translation>Minimal</translation></message>
+        <message><source>LIMITED_MEMORY</source><translation>Limited</translation></message>
+        <message><source>MEMORY_UNITS</source><translation>Mb</translation></message>
 
+        <message><source>USED_BY_CACHE</source><translation>Used:</translation></message>
+        <message><source>AVAILABLE_MEMORY</source><translation>Free:</translation></message>
 
-        <message>
-            <source>MEMORY_STATE</source>
-            <translation>State</translation>
-        </message>
-        <message>
-            <source>USED_BY_CACHE</source>
-            <translation>Used:</translation>
-        </message>
-        <message>
-            <source>AVAILABLE_MEMORY</source>
-            <translation>Free:</translation>
-        </message>
+        <message><source>SPEED</source><translation>Speed</translation></message>
 
     </context>
     <context>
index 23b380398aa4de395ac7bda36c18213d113dbc90..7715195b51a332ca9a53c6fb6a31fda162d750a7 100644 (file)
@@ -84,173 +84,173 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI* theModule,
 
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
 
-  QGridLayout *aWidgetGridLayout = new QGridLayout( this );
-
   //----------------------------------------------------------------------------
-  // Definition of the navigation group box
-  QGroupBox *aNavigationGroupBox = new QGroupBox( tr( "NAVIGATION" ), this );
-
-  QGridLayout *aNavigationGridLayout = new QGridLayout( aNavigationGroupBox );
-  aNavigationGridLayout->setHorizontalSpacing( 6 );
-  aNavigationGridLayout->setVerticalSpacing( 6 );
-  aNavigationGridLayout->setContentsMargins( 9, 9, 9, 9 );
-
-  myFirstTimeStamp = new QLabel( aNavigationGroupBox );
-  myFirstTimeStamp->setAlignment( Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter );
-  myFirstTimeStamp->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
-  aNavigationGridLayout->addWidget( myFirstTimeStamp, 0, 0, 1, 1 );
-
-  mySlider = new QSlider( aNavigationGroupBox );
-  mySlider->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
-  mySlider->setFocusPolicy( Qt::StrongFocus );
-  mySlider->setOrientation( Qt::Horizontal );
-  mySlider->setTracking( false );
-  mySlider->setMinimum( 0 );
-
-  aNavigationGridLayout->addWidget( mySlider, 0, 1, 1, 5 );
-
-  myLastTimeStamp = new QLabel( aNavigationGroupBox );
-  aNavigationGridLayout->addWidget( myLastTimeStamp, 0, 6, 1, 1 );
-
-  myTimeStampsNumber = new QLabel( aNavigationGroupBox );
-  aNavigationGridLayout->addWidget( myTimeStampsNumber, 0, 7, 1, 1 );
-
-  myIsCycled = new QCheckBox( tr( "IS_CYCLED" ), aNavigationGroupBox );
-  myIsCycled->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
-  myIsCycled->setLayoutDirection( Qt::LeftToRight );
-  myIsCycled->setEnabled( false );
-
-  aNavigationGridLayout->addWidget( myIsCycled, 1, 0, 1, 1 );
-
-  myFirstButton = new QToolButton( aNavigationGroupBox );
-  myFirstButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
-  myFirstButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
-  aNavigationGridLayout->addWidget( myFirstButton, 1, 1, 1, 1 );
-
-  myPreviousButton = new QToolButton( aNavigationGroupBox );
-  myPreviousButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
-  myPreviousButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
-  aNavigationGridLayout->addWidget( myPreviousButton, 1, 2, 1, 1 );
-
-  myPlayButton = new QToolButton( aNavigationGroupBox );
-  myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
-  myPlayButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
-  myPlayButton->setCheckable( true );
-  aNavigationGridLayout->addWidget( myPlayButton, 1, 3, 1, 1 );
-
-  myNextButton = new QToolButton( aNavigationGroupBox );
-  myNextButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
-  myNextButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
-  aNavigationGridLayout->addWidget( myNextButton, 1, 4, 1, 1 );
-
-  myLastButton = new QToolButton(aNavigationGroupBox);
-  myLastButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
-  myLastButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
-  aNavigationGridLayout->addWidget( myLastButton, 1, 5, 1, 1 );
-
-  myTimeStampStrings = new QComboBox( aNavigationGroupBox );
-  myTimeStampStrings->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
-  myTimeStampStrings->setFocusPolicy( Qt::StrongFocus );
-  aNavigationGridLayout->addWidget( myTimeStampStrings, 1, 6, 1, 1 );
-
-  myTimeStampIndexes = new QComboBox( aNavigationGroupBox );
-  myTimeStampIndexes->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
-  myTimeStampIndexes->setFocusPolicy( Qt::StrongFocus );
-  aNavigationGridLayout->addWidget( myTimeStampIndexes, 1, 7, 1, 1 );
-
-  aWidgetGridLayout->addWidget( aNavigationGroupBox, 0, 0, 1, 1 );
+  QVBoxLayout* aVBoxLayout = new QVBoxLayout( this );
 
-  //----------------------------------------------------------------------------
-  // Definition of the speed group box
-  QGroupBox* aSpeedGroupBox = new QGroupBox( tr( "SPEED" ), this );
-  {
-    QHBoxLayout* aSpeedBoxLayout = new QHBoxLayout( aSpeedGroupBox );
-    aSpeedBoxLayout->setSpacing( 6 );
-    aSpeedBoxLayout->setContentsMargins( 9, 9, 9, 9 );
-    
-    mySpeedSlider = new QSlider( aSpeedGroupBox );
-    mySpeedSlider->setLayoutDirection( Qt::RightToLeft );
-    mySpeedSlider->setMaximum( 100 );
-    mySpeedSlider->setValue( 55 );
-    mySpeedSlider->setOrientation( Qt::Vertical );
-    mySpeedSlider->setTickPosition( QSlider::TicksBothSides );
-    mySpeedSlider->setTickInterval( 20 );
-    
-    aSpeedBoxLayout->addWidget( mySpeedSlider );   
-  }
-  aWidgetGridLayout->addWidget( aSpeedGroupBox, 0, 1, 2, 1 );
+  QTabWidget* aTabWidget = new QTabWidget( this );
+  aVBoxLayout->addWidget( aTabWidget );
 
+  {
+    QWidget* aParent = new QWidget();
+    {
+      QGridLayout* aGridLayout = new QGridLayout( aParent );
+      {
+       myFirstTimeStamp = new QLabel( aParent );
+       myFirstTimeStamp->setAlignment( Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter );
+       myFirstTimeStamp->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myFirstTimeStamp, 0, 0, 1, 1 );
+       
+       mySlider = new QSlider( aParent );
+       mySlider->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       mySlider->setFocusPolicy( Qt::StrongFocus );
+       mySlider->setOrientation( Qt::Horizontal );
+       mySlider->setTracking( false );
+       mySlider->setMinimum( 0 );
+       aGridLayout->addWidget( mySlider, 0, 1, 1, 3 );
+       
+       myLastTimeStamp = new QLabel( aParent );
+       aGridLayout->addWidget( myLastTimeStamp, 0, 4, 1, 1 );
+      }     
+      {
+       myFirstButton = new QToolButton( aParent );
+       myFirstButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
+       myFirstButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myFirstButton, 1, 0, 1, 1 );
+
+       myPreviousButton = new QToolButton( aParent );
+       myPreviousButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
+       myPreviousButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myPreviousButton, 1, 1, 1, 1 );
+
+       myPlayButton = new QToolButton( aParent );
+       myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+       myPlayButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myPlayButton->setCheckable( true );
+       aGridLayout->addWidget( myPlayButton, 1, 2, 1, 1 );
+
+       myNextButton = new QToolButton( aParent );
+       myNextButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
+       myNextButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myNextButton, 1, 3, 1, 1 );
+
+       myLastButton = new QToolButton( aParent );
+       myLastButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
+       myLastButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       aGridLayout->addWidget( myLastButton, 1, 4, 1, 1 );
+      }
+      {
+       myTimeStampIndexes = new QComboBox( aParent );
+       myTimeStampIndexes->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myTimeStampIndexes->setFocusPolicy( Qt::StrongFocus );
+       aGridLayout->addWidget( myTimeStampIndexes, 2, 0, 1, 2 );
+
+       myIsCycled = new QToolButton( aParent );
+       myIsCycled->setText( tr( "IS_CYCLED" ) );
+       myIsCycled->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myIsCycled->setLayoutDirection( Qt::LeftToRight );
+       myIsCycled->setCheckable( true );
+       myIsCycled->setEnabled( false );
+       aGridLayout->addWidget( myIsCycled, 2, 2, 1, 1 );
+
+       myTimeStampStrings = new QComboBox( aParent );
+       myTimeStampStrings->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+       myTimeStampStrings->setFocusPolicy( Qt::StrongFocus );
+       aGridLayout->addWidget( myTimeStampStrings, 2, 3, 1, 2 );
+      }
+      {
+       QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );     
+       aGridLayout->addItem( aSpacerItem, 3, 0 );
+      }
+    }
 
-  //----------------------------------------------------------------------------
-  QHBoxLayout* aMemoryBoxLayout = new QHBoxLayout();
-  aMemoryBoxLayout->setSpacing( 6 );
-  aMemoryBoxLayout->setContentsMargins( 0, 0, 0, 0 );
+    aTabWidget->addTab( aParent, tr( "NAVIGATION_TAB" ) );
+  }
 
-  //----------------------------------------------------------------------------
-  // Definition of the memory mode group box
-  QGroupBox* aModeGroupBox = new QGroupBox( tr( "MEMORY_MODE" ), this );
   {
-    QHBoxLayout* aMemoryModeBoxLayout = new QHBoxLayout( aModeGroupBox );
-    aMemoryModeBoxLayout->setSpacing( 6 );
-    aMemoryModeBoxLayout->setContentsMargins( 9, 9, 9, 9 );
-    
-    myMinimalMemoryButton = new QRadioButton( tr( "MINIMAL_MEMORY" ), aModeGroupBox );
-    aMemoryModeBoxLayout->addWidget( myMinimalMemoryButton );
-    
-    QSpacerItem* aSpacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
-    aMemoryModeBoxLayout->addItem( aSpacer );
-    
-    myLimitedMemoryButton = new QRadioButton( tr( "LIMITED_MEMORY" ), aModeGroupBox );
-    myLimitedMemoryButton->setChecked( true );
-    aMemoryModeBoxLayout->addWidget( myLimitedMemoryButton );
-    
-    myLimitedMemory = new QtxDoubleSpinBox( aModeGroupBox );
-    myLimitedMemory->setMaximum( 10000 );
-    myLimitedMemory->setValue( 512 );
-    aMemoryModeBoxLayout->addWidget( myLimitedMemory );
+    QWidget* aParent = new QWidget();
+    {
+      QVBoxLayout* aVBoxLayout = new QVBoxLayout( aParent );
+      {
+       QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+       
+       myMinimalMemoryButton = new QRadioButton( tr( "MINIMAL_MEMORY" ), aParent );
+       aHBoxLayout->addWidget( myMinimalMemoryButton );        
+
+       QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );     
+       aHBoxLayout->addItem( aSpacerItem );
+
+       myLimitedMemoryButton = new QRadioButton( tr( "LIMITED_MEMORY" ), aParent );
+       myLimitedMemoryButton->setChecked( true );
+       aHBoxLayout->addWidget( myLimitedMemoryButton );
+       
+       myLimitedMemory = new QtxDoubleSpinBox( aParent );
+       myLimitedMemory->setMaximum( 10000 );
+       myLimitedMemory->setValue( 512 );
+       aHBoxLayout->addWidget( myLimitedMemory );
+       
+       QLabel* aMemoryDimensionLabel = new QLabel( aParent );
+       aMemoryDimensionLabel->setText( tr( "MEMORY_UNITS" ) );
+       aHBoxLayout->addWidget( aMemoryDimensionLabel );
+       
+       aVBoxLayout->addLayout( aHBoxLayout );
+      }
+      {
+       QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+           
+       QLabel* aUsedMemoryLabel = new QLabel( tr( "USED_BY_CACHE" ), aParent );
+       aUsedMemoryLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+       aHBoxLayout->addWidget( aUsedMemoryLabel );
+       
+       myUsedMemory = new QLineEdit( aParent );
+       myUsedMemory->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
+       myUsedMemory->setEnabled( false );
+       aHBoxLayout->addWidget( myUsedMemory );
+           
+       QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );     
+       aHBoxLayout->addItem( aSpacerItem );
+
+       QLabel* aFreeMemoryLabel = new QLabel( tr( "AVAILABLE_MEMORY" ), aParent );
+       aHBoxLayout->addWidget( aFreeMemoryLabel );
     
-    QLabel* aMemoryDimensionLabel = new QLabel( aModeGroupBox );
-    aMemoryDimensionLabel->setText( tr( "MEMORY_UNITS" ) );
-    aMemoryModeBoxLayout->addWidget( aMemoryDimensionLabel );
-  }
+       myFreeMemory = new QLineEdit( aParent );
+       myFreeMemory->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
+       myFreeMemory->setEnabled( false );
+       aHBoxLayout->addWidget( myFreeMemory );
 
-  aMemoryBoxLayout->addWidget( aModeGroupBox );
+       aVBoxLayout->addLayout( aHBoxLayout );
+      }
+      {
+       QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+       
+       QLabel* aLabel = new QLabel( tr( "SPEED" ), aParent );
+       aLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+       aHBoxLayout->addWidget( aLabel );   
+      
+       mySpeedSlider = new QSlider( aParent );
+       mySpeedSlider->setLayoutDirection( Qt::RightToLeft );
+       mySpeedSlider->setMaximum( 100 );
+       mySpeedSlider->setValue( 55 );
+       mySpeedSlider->setOrientation( Qt::Horizontal );
+       mySpeedSlider->setTickPosition( QSlider::TicksBelow );
+       mySpeedSlider->setTickInterval( 20 );    
+       aHBoxLayout->addWidget( mySpeedSlider );   
+       
+       aVBoxLayout->addLayout( aHBoxLayout );
+      }
+      {
+       QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );     
+       aVBoxLayout->addItem( aSpacerItem );
+      }
+      
+      aTabWidget->addTab( aParent, tr( "PROPERTIES_TAB" ) );
+    }
+  }
 
-  //----------------------------------------------------------------------------
-  // Definition of the memory state group box
-  QGroupBox* aStateGroupBox = new QGroupBox( tr( "MEMORY_STATE" ), this );
   {
-    QHBoxLayout* aMemoryStateBoxLayout = new QHBoxLayout( aStateGroupBox );
-    aMemoryStateBoxLayout->setSpacing( 6 );
-    aMemoryStateBoxLayout->setContentsMargins( 9, 9, 9, 9 );
-    
-    QLabel* aUsedMemoryLabel = new QLabel( tr( "USED_BY_CACHE" ), aStateGroupBox );
-    aMemoryStateBoxLayout->addWidget( aUsedMemoryLabel );
-    
-    myUsedMemory = new QLineEdit( aStateGroupBox );
-    myUsedMemory->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
-    myUsedMemory->setEnabled( false );
-    aMemoryStateBoxLayout->addWidget( myUsedMemory );
-    
-    QSpacerItem* aSpacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
-    aMemoryStateBoxLayout->addItem( aSpacer );
-    
-    QLabel* aFreeMemoryLabel = new QLabel( tr( "AVAILABLE_MEMORY" ), aStateGroupBox );
-    aMemoryStateBoxLayout->addWidget( aFreeMemoryLabel );
-    
-    myFreeMemory = new QLineEdit( aStateGroupBox );
-    myFreeMemory->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
-    myFreeMemory->setEnabled( false );
-    aMemoryStateBoxLayout->addWidget( myFreeMemory );
+    QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    aVBoxLayout->addItem( aSpacerItem );
   }
 
-  aMemoryBoxLayout->addWidget( aStateGroupBox );
-
-  aWidgetGridLayout->addLayout( aMemoryBoxLayout, 1, 0, 1, 1 );
-
-  //----------------------------------------------------------------------------
-  QSpacerItem* spacerItem1 = new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
-  aWidgetGridLayout->addItem( spacerItem1, 2, 0, 1, 1 );
 
   //----------------------------------------------------------------------------
   myTimer = new QTimer( this );
@@ -342,7 +342,6 @@ void VisuGUI_Slider::enableControls( bool on )
 
     myFirstTimeStamp->setText( aTimeStampsRange[0].myTime.in() );
     myLastTimeStamp->setText( aTimeStampsRange[aLength-1].myTime.in() );
-    myTimeStampsNumber->setText( QString("(") + QString::number( aLength ) + ")" );
 
     int aPageStep = aLength / 10;
     aPageStep = std::max(aPageStep, 1);
index ab8b5f5b5a85f59081e4b2837fd339c368d020f4..ecd4f5e177f58fae7e7dbf65e32b6a2e7c3547f2 100644 (file)
@@ -99,9 +99,8 @@ private:
   QSlider*         mySlider;
   QLabel*          myFirstTimeStamp;
   QLabel*          myLastTimeStamp;
-  QLabel*          myTimeStampsNumber;
 
-  QCheckBox*       myIsCycled;
+  QToolButton*     myIsCycled;
   QToolButton*     myFirstButton;
   QToolButton*     myPreviousButton;
   QToolButton*     myPlayButton;
index 7ae0ff2cd63d073721a50fe22ece10ae19176a88..f343ac84b35eaccef9a443f563bade451877568b 100644 (file)
@@ -164,57 +164,57 @@ VisuGUI_Sweep::VisuGUI_Sweep( VisuGUI* theModule,
   }
   {
     QWidget* aPropertiesTab = new QWidget();
-
-    QGridLayout* aGridLayout = new QGridLayout( aPropertiesTab );
-    
     {
-      QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+      QGridLayout* aGridLayout = new QGridLayout( aPropertiesTab );     
+      {
+       QHBoxLayout* aHBoxLayout = new QHBoxLayout();
+       
+       QLabel* aModeAnnotation = new QLabel( aPropertiesTab );
+       aModeAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
+       aModeAnnotation->setText( tr( "MODE" ) );
+       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 ) );
+       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 ) );
+       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 );
       
-      QLabel* aModeAnnotation = new QLabel( aPropertiesTab );
-      aModeAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
-      aModeAnnotation->setText( tr( "MODE" ) );
-      aHBoxLayout->addWidget( aModeAnnotation );
+      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 );
       
-      mySweepMode = new QComboBox( aPropertiesTab );
-      mySweepMode->insertItems( 0, QStringList() 
-                               << tr( "LINEAR" ) 
-                               << tr( "COSINUSOIDAL" ) 
-                               << tr( "SINUSOIDAL" ) );
-      mySweepMode->setCurrentIndex( aResourceMgr->integerValue( "VISU", "sweeping_modes", 0 ) );
-      aHBoxLayout->addWidget( mySweepMode );
+      QLabel* aStepDelayAnnotation = new QLabel( aPropertiesTab );
+      aStepDelayAnnotation->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
+      aStepDelayAnnotation->setText( tr( "DELAY_BETWEEN_STEPS" ) );
+      aGridLayout->addWidget( aStepDelayAnnotation, 2, 0, 1, 1 );
       
-      myIntervals = new QComboBox( aPropertiesTab );
-      myIntervals->insertItems( 0, QStringList() 
-                               << tr( "[ 0, +PI ]" ) 
-                               << tr( "[ -PI, +PI ]" ) );
-      myIntervals->setCurrentIndex( aResourceMgr->integerValue( "VISU", "sweeping_is2PI", 0 ) );
-      aHBoxLayout->addWidget( myIntervals );
+      myStepDelay = new QtxDoubleSpinBox( aPropertiesTab );
+      myStepDelay->setValue( aResourceMgr->doubleValue("VISU", "sweeping_time_step", 0.1) );
+      aGridLayout->addWidget( myStepDelay, 2, 1, 1, 1 );
       
-      aGridLayout->addLayout( aHBoxLayout, 0, 0, 1, 2 );
+      QSpacerItem* aSpacerItem = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );      
+      aGridLayout->addItem( aSpacerItem, 3, 0 );
     }
 
-    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" ) );
   }