[Kde-bindings] [marble] src/lib: MarbleThemeSelectView, MapViewWidget: more Qt-like signal/slot names
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Mon Nov 21 14:23:50 UTC 2011
Git commit 5e0f862d8609dc52a0eccf1796807577c5179eb7 by Bernhard Beschow.
Committed on 21/11/2011 at 13:40.
Pushed by beschow into branch 'master'.
MarbleThemeSelectView, MapViewWidget: more Qt-like signal/slot names
CCMAIL: kde-bindings at kde.org
M +11 -11 src/lib/MapViewWidget.cpp
M +4 -4 src/lib/MapViewWidget.h
M +1 -1 src/lib/MarbleThemeSelectView.cpp
M +1 -1 src/lib/MarbleThemeSelectView.h
http://commits.kde.org/marble/5e0f862d8609dc52a0eccf1796807577c5179eb7
diff --git a/src/lib/MapViewWidget.cpp b/src/lib/MapViewWidget.cpp
index 85a9bd9..1b044f7 100644
--- a/src/lib/MapViewWidget.cpp
+++ b/src/lib/MapViewWidget.cpp
@@ -92,8 +92,8 @@ MapViewWidget::MapViewWidget( QWidget *parent, Qt::WindowFlags f )
d->m_mapSortProxy = new MapThemeSortFilterProxyModel( this );
d->m_mapThemeModel = 0;
- connect( d->m_mapViewUi.marbleThemeSelectView, SIGNAL( selectMapTheme( const QString& ) ),
- this, SIGNAL( selectMapTheme( const QString& ) ) );
+ connect( d->m_mapViewUi.marbleThemeSelectView, SIGNAL( mapThemeIdChanged( const QString& ) ),
+ this, SIGNAL( mapThemeIdChanged( const QString& ) ) );
connect( d->m_mapViewUi.projectionComboBox, SIGNAL( activated( int ) ),
this, SLOT( projectionSelected( int ) ) );
@@ -138,17 +138,17 @@ void MapViewWidget::setMarbleWidget( MarbleWidget *widget )
{
d->m_widget = widget;
- connect( this, SIGNAL( projectionSelected( Projection ) ),
+ connect( this, SIGNAL( projectionChanged( Projection ) ),
d->m_widget, SLOT( setProjection( Projection ) ) );
connect( d->m_widget, SIGNAL( themeChanged( QString ) ),
- this, SLOT( selectTheme( QString ) ) );
+ this, SLOT( setMapThemeId( QString ) ) );
connect( d->m_widget, SIGNAL( projectionChanged( Projection ) ),
- this, SLOT( selectProjection( Projection ) ) );
- selectProjection( d->m_widget->projection() );
+ this, SLOT( setProjection( Projection ) ) );
+ setProjection( d->m_widget->projection() );
- connect( this, SIGNAL( selectMapTheme( const QString& ) ),
+ connect( this, SIGNAL( mapThemeIdChanged( const QString& ) ),
d->m_widget, SLOT( setMapThemeId( const QString& ) ) );
d->setMapThemeModel( widget->model()->mapThemeManager()->mapThemeModel() );
@@ -162,11 +162,11 @@ void MapViewWidget::updateMapThemeView()
if ( d->m_widget ) {
QString mapThemeId = d->m_widget->mapThemeId();
if ( !mapThemeId.isEmpty() )
- selectTheme( mapThemeId );
+ setMapThemeId( mapThemeId );
}
}
-void MapViewWidget::selectTheme( const QString &theme )
+void MapViewWidget::setMapThemeId( const QString &theme )
{
if ( !d->m_mapSortProxy || !d->m_widget )
return;
@@ -212,7 +212,7 @@ void MapViewWidget::selectTheme( const QString &theme )
}
}
-void MapViewWidget::selectProjection( Projection projection )
+void MapViewWidget::setProjection( Projection projection )
{
if ( (int)projection != d->m_mapViewUi.projectionComboBox->currentIndex() )
d->m_mapViewUi.projectionComboBox->setCurrentIndex( (int) projection );
@@ -251,7 +251,7 @@ void MapViewWidget::selectCurrentMapTheme( const QString& celestialBodyId )
// Relay a signal and convert the parameter from an int to a Projection.
void MapViewWidget::projectionSelected( int projectionIndex )
{
- emit projectionSelected( (Projection) projectionIndex );
+ emit projectionChanged( (Projection) projectionIndex );
}
}
diff --git a/src/lib/MapViewWidget.h b/src/lib/MapViewWidget.h
index 9d78793..21f6057 100644
--- a/src/lib/MapViewWidget.h
+++ b/src/lib/MapViewWidget.h
@@ -47,9 +47,9 @@ class MARBLE_EXPORT MapViewWidget : public QWidget
void updateCelestialModel();
public Q_SLOTS:
- void selectTheme( const QString & );
+ void setMapThemeId( const QString & );
- void selectProjection( Projection projection );
+ void setProjection( Projection projection );
void selectCurrentMapTheme( const QString& );
@@ -59,8 +59,8 @@ class MARBLE_EXPORT MapViewWidget : public QWidget
void projectionSelected( int projectionIndex );
Q_SIGNALS:
- void selectMapTheme( const QString& );
- void projectionSelected( Projection );
+ void mapThemeIdChanged( const QString& );
+ void projectionChanged( Projection );
void showMapWizard();
void showUploadDialog();
diff --git a/src/lib/MarbleThemeSelectView.cpp b/src/lib/MarbleThemeSelectView.cpp
index ad57c96..1e62571 100644
--- a/src/lib/MarbleThemeSelectView.cpp
+++ b/src/lib/MarbleThemeSelectView.cpp
@@ -155,7 +155,7 @@ void MarbleThemeSelectView::selectedMapTheme( QModelIndex index )
QModelIndex columnIndex = model->index( index.row(), 1, QModelIndex() );
QString currentmaptheme = ( model->data( columnIndex )).toString();
mDebug() << currentmaptheme;
- emit selectMapTheme( currentmaptheme );
+ emit mapThemeIdChanged( currentmaptheme );
}
void MarbleThemeSelectView::mapWizard()
diff --git a/src/lib/MarbleThemeSelectView.h b/src/lib/MarbleThemeSelectView.h
index d296c0f..a79b656 100644
--- a/src/lib/MarbleThemeSelectView.h
+++ b/src/lib/MarbleThemeSelectView.h
@@ -50,7 +50,7 @@ class MARBLE_EXPORT MarbleThemeSelectView : public QListView
void toggleFavorite();
Q_SIGNALS:
- void selectMapTheme( const QString& );
+ void mapThemeIdChanged( const QString& );
void showMapWizard();
void showUploadDialog();
//void
More information about the Kde-bindings
mailing list