[Marble-commits] KDE/kdeedu/marble/src/lib

Jens-Michael Hoffmann jensmh at gmx.de
Mon Apr 26 12:28:50 CEST 2010


SVN commit 1118976 by jmhoffmann:

TileLevelRangeWidget: rename spin boxes:
    minSpinBox -> topSpinBox
    maxSpinBox -> bottomSpinBox

 M  +14 -12    TileLevelRangeWidget.cpp  
 M  +3 -3      TileLevelRangeWidget.ui  


--- trunk/KDE/kdeedu/marble/src/lib/TileLevelRangeWidget.cpp #1118975:1118976
@@ -35,11 +35,11 @@
       d( new Private( this ))
 {
     // FIXME: rename min -> topLevel, max -> bottomLevel
-    connect( d->m_ui.minSpinBox, SIGNAL( valueChanged( int )), SIGNAL( topLevelChanged( int )));
-    connect( d->m_ui.maxSpinBox, SIGNAL( valueChanged( int )), SIGNAL( bottomLevelChanged( int )));
+    connect( d->m_ui.topSpinBox, SIGNAL( valueChanged( int )), SIGNAL( topLevelChanged( int )));
+    connect( d->m_ui.bottomSpinBox, SIGNAL( valueChanged( int )), SIGNAL( bottomLevelChanged( int )));
 
-    connect( d->m_ui.minSpinBox, SIGNAL( valueChanged( int )), SLOT( setMinimumBottomLevel( int )));
-    connect( d->m_ui.maxSpinBox, SIGNAL( valueChanged( int )), SLOT( setMaximumTopLevel( int )));
+    connect( d->m_ui.topSpinBox, SIGNAL( valueChanged( int )), SLOT( setMinimumBottomLevel( int )));
+    connect( d->m_ui.bottomSpinBox, SIGNAL( valueChanged( int )), SLOT( setMaximumTopLevel( int )));
 }
 
 TileLevelRangeWidget::~TileLevelRangeWidget()
@@ -49,34 +49,36 @@
 
 void TileLevelRangeWidget::setAllowedLevelRange( int const minimumLevel, int const maximumLevel )
 {
-    d->m_ui.minSpinBox->setRange( minimumLevel, qMin( d->m_ui.maxSpinBox->value(), maximumLevel ));
-    d->m_ui.maxSpinBox->setRange( qMax( d->m_ui.minSpinBox->value(), minimumLevel ), maximumLevel );
+    d->m_ui.topSpinBox->setRange( minimumLevel, qMin( d->m_ui.bottomSpinBox->value(),
+                                                      maximumLevel ));
+    d->m_ui.bottomSpinBox->setRange( qMax( d->m_ui.topSpinBox->value(), minimumLevel ),
+                                     maximumLevel );
 }
 
 void TileLevelRangeWidget::setDefaultLevel( int const level )
 {
-    d->m_ui.minSpinBox->setValue( level );
-    d->m_ui.maxSpinBox->setValue( level );
+    d->m_ui.topSpinBox->setValue( level );
+    d->m_ui.bottomSpinBox->setValue( level );
 }
 
 int TileLevelRangeWidget::bottomLevel() const
 {
-    return d->m_ui.maxSpinBox->value();
+    return d->m_ui.bottomSpinBox->value();
 }
 
 int TileLevelRangeWidget::topLevel() const
 {
-    return d->m_ui.minSpinBox->value();
+    return d->m_ui.topSpinBox->value();
 }
 
 void TileLevelRangeWidget::setMaximumTopLevel( int const level )
 {
-    d->m_ui.minSpinBox->setMaximum( level );
+    d->m_ui.topSpinBox->setMaximum( level );
 }
 
 void TileLevelRangeWidget::setMinimumBottomLevel( int const level )
 {
-    d->m_ui.maxSpinBox->setMinimum( level );
+    d->m_ui.bottomSpinBox->setMinimum( level );
 }
 
 }
--- trunk/KDE/kdeedu/marble/src/lib/TileLevelRangeWidget.ui #1118975:1118976
@@ -34,12 +34,12 @@
          <string>&amp;Tile Level Range:</string>
         </property>
         <property name="buddy">
-         <cstring>minSpinBox</cstring>
+         <cstring>topSpinBox</cstring>
         </property>
        </widget>
       </item>
       <item>
-       <widget class="QSpinBox" name="minSpinBox">
+       <widget class="QSpinBox" name="topSpinBox">
         <property name="toolTip">
          <string>Minimum Tile Level</string>
         </property>
@@ -62,7 +62,7 @@
        </widget>
       </item>
       <item>
-       <widget class="QSpinBox" name="maxSpinBox">
+       <widget class="QSpinBox" name="bottomSpinBox">
         <property name="toolTip">
          <string>Maximum Tile Level</string>
         </property>


More information about the Marble-commits mailing list