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

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


SVN commit 1118975 by jmhoffmann:

TileLevelRangeWidget: improve API consistency.

As this is a TileLevelRangeWidget it is not necessary to prefix level
with tile. The levels this widget deals with are inherently tile levels.
The methods topLevel and bottomLevel already reflect this.

So following methods were renamed:
    setAllowedTileLevelRange -> setAllowedLevelRange
    setDefaultTileLevel -> setDefaultLevel

 M  +3 -3      DownloadRegionDialog.cpp  
 M  +6 -9      TileLevelRangeWidget.cpp  
 M  +3 -3      TileLevelRangeWidget.h  


--- trunk/KDE/kdeedu/marble/src/lib/DownloadRegionDialog.cpp #1118974:1118975
@@ -84,7 +84,7 @@
 {
     m_latLonBoxWidget->setEnabled( false );
     m_latLonBoxWidget->setLatLonBox( m_visibleRegion );
-    m_tileLevelRangeWidget->setDefaultTileLevel( m_originatingTileLevel );
+    m_tileLevelRangeWidget->setDefaultLevel( m_originatingTileLevel );
 }
 
 QGroupBox * DownloadRegionDialog::Private::createSelectionMethodBox()
@@ -183,13 +183,13 @@
 {
     d->m_minimumAllowedTileLevel = minimumTileLevel;
     d->m_maximumAllowedTileLevel = maximumTileLevel;
-    d->m_tileLevelRangeWidget->setAllowedTileLevelRange( minimumTileLevel, maximumTileLevel );
+    d->m_tileLevelRangeWidget->setAllowedLevelRange( minimumTileLevel, maximumTileLevel );
 }
 
 void DownloadRegionDialog::setOriginatingTileLevel( int const tileLevel )
 {
     d->m_originatingTileLevel = tileLevel;
-    d->m_tileLevelRangeWidget->setDefaultTileLevel( tileLevel );
+    d->m_tileLevelRangeWidget->setDefaultLevel( tileLevel );
 }
 
 TileCoordsPyramid DownloadRegionDialog::region() const
--- trunk/KDE/kdeedu/marble/src/lib/TileLevelRangeWidget.cpp #1118974:1118975
@@ -47,19 +47,16 @@
     delete d;
 }
 
-void TileLevelRangeWidget::setAllowedTileLevelRange( int const minimumTileLevel,
-                                                     int const maximumTileLevel )
+void TileLevelRangeWidget::setAllowedLevelRange( int const minimumLevel, int const maximumLevel )
 {
-    d->m_ui.minSpinBox->setRange( minimumTileLevel, qMin( d->m_ui.maxSpinBox->value(),
-                                                          maximumTileLevel ));
-    d->m_ui.maxSpinBox->setRange( qMax( d->m_ui.minSpinBox->value(), minimumTileLevel ),
-                                  maximumTileLevel );
+    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 );
 }
 
-void TileLevelRangeWidget::setDefaultTileLevel( int const tileLevel )
+void TileLevelRangeWidget::setDefaultLevel( int const level )
 {
-    d->m_ui.minSpinBox->setValue( tileLevel );
-    d->m_ui.maxSpinBox->setValue( tileLevel );
+    d->m_ui.minSpinBox->setValue( level );
+    d->m_ui.maxSpinBox->setValue( level );
 }
 
 int TileLevelRangeWidget::bottomLevel() const
--- trunk/KDE/kdeedu/marble/src/lib/TileLevelRangeWidget.h #1118974:1118975
@@ -29,9 +29,9 @@
     explicit TileLevelRangeWidget( QWidget * const parent = 0, Qt::WindowFlags const f = 0 );
     ~TileLevelRangeWidget();
 
-    void setAllowedTileLevelRange( int const minimumTileLevel,
-                                   int const maximumTileLevel );
-    void setDefaultTileLevel( int const );
+    void setAllowedLevelRange( int const minimumLevel,
+                               int const maximumLevel );
+    void setDefaultLevel( int const );
 
     int topLevel() const;
     int bottomLevel() const;


More information about the Marble-commits mailing list