|
165 | 165 | #include "qgssnappingdialog.h" |
166 | 166 | #include "qgssponsors.h" |
167 | 167 | #include "qgstextannotationitem.h" |
168 | | -#include "qgstilescalewidget.h" |
169 | 168 | #include "qgstipgui.h" |
170 | 169 | #include "qgsundowidget.h" |
171 | 170 | #include "qgsvectordataprovider.h" |
@@ -407,7 +406,6 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent, |
407 | 406 | , mSplash( splash ) |
408 | 407 | , mShowProjectionTab( false ) |
409 | 408 | , mPythonUtils( NULL ) |
410 | | - , mpTileScaleWidget( NULL ) |
411 | 409 | #ifdef Q_OS_WIN |
412 | 410 | , mSkipNextContextMenuEvent( 0 ) |
413 | 411 | #endif |
@@ -655,6 +653,8 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent, |
655 | 653 | // request notification of FileOpen events (double clicking a file icon in Mac OS X Finder) |
656 | 654 | QgsApplication::setFileOpenEventReceiver( this ); |
657 | 655 |
|
| 656 | + QgsProviderRegistry::instance()->registerGuis( this ); |
| 657 | + |
658 | 658 | // update windows |
659 | 659 | qApp->processEvents(); |
660 | 660 |
|
@@ -792,12 +792,6 @@ void QgisApp::readSettings() |
792 | 792 |
|
793 | 793 | // Add the recently accessed project file paths to the File menu |
794 | 794 | mRecentProjectPaths = settings.value( "/UI/recentProjectsList" ).toStringList(); |
795 | | - |
796 | | - // Restore state of tile scale widget |
797 | | - if ( settings.value( "/UI/tileScaleEnabled", false ).toBool() ) |
798 | | - { |
799 | | - showTileScale(); |
800 | | - } |
801 | 795 | } |
802 | 796 |
|
803 | 797 |
|
@@ -903,7 +897,6 @@ void QgisApp::createActions() |
903 | 897 | connect( mActionRemoveLayer, SIGNAL( triggered() ), this, SLOT( removeLayer() ) ); |
904 | 898 | connect( mActionSetLayerCRS, SIGNAL( triggered() ), this, SLOT( setLayerCRS() ) ); |
905 | 899 | connect( mActionSetProjectCRSFromLayer, SIGNAL( triggered() ), this, SLOT( setProjectCRSFromLayer() ) ); |
906 | | - connect( mActionTileScale, SIGNAL( triggered() ), this, SLOT( showTileScale() ) ); |
907 | 900 | connect( mActionLayerProperties, SIGNAL( triggered() ), this, SLOT( layerProperties() ) ); |
908 | 901 | connect( mActionLayerSubsetString, SIGNAL( triggered() ), this, SLOT( layerSubsetString() ) ); |
909 | 902 | connect( mActionAddToOverview, SIGNAL( triggered() ), this, SLOT( isInOverview() ) ); |
@@ -2085,17 +2078,6 @@ void QgisApp::saveWindowState() |
2085 | 2078 | // store window geometry |
2086 | 2079 | settings.setValue( "/UI/geometry", saveGeometry() ); |
2087 | 2080 |
|
2088 | | - // Persist state of tile scale slider |
2089 | | - if ( mpTileScaleWidget ) |
2090 | | - { |
2091 | | - settings.setValue( "/UI/tileScaleEnabled", true ); |
2092 | | - delete mpTileScaleWidget; |
2093 | | - } |
2094 | | - else |
2095 | | - { |
2096 | | - settings.setValue( "/UI/tileScaleEnabled", false ); |
2097 | | - } |
2098 | | - |
2099 | 2081 | QgsPluginRegistry::instance()->unloadAll(); |
2100 | 2082 | } |
2101 | 2083 |
|
@@ -4867,32 +4849,6 @@ void QgisApp::setProjectCRSFromLayer() |
4867 | 4849 | mMapCanvas->refresh(); |
4868 | 4850 | } |
4869 | 4851 |
|
4870 | | -void QgisApp::showTileScale() |
4871 | | -{ |
4872 | | - if ( !mpTileScaleWidget ) |
4873 | | - { |
4874 | | - mpTileScaleWidget = new QgsTileScaleWidget( mMapCanvas ); |
4875 | | - //create the dock widget |
4876 | | - mpTileScaleDock = new QDockWidget( tr( "Tile scale" ), this ); |
4877 | | - mpTileScaleDock->setObjectName( "TileScale" ); |
4878 | | - mpTileScaleDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea ); |
4879 | | - addDockWidget( Qt::RightDockWidgetArea, mpTileScaleDock ); |
4880 | | - // add to the Panel submenu |
4881 | | - mPanelMenu->addAction( mpTileScaleDock->toggleViewAction() ); |
4882 | | - // now add our widget to the dock - ownership of the widget is passed to the dock |
4883 | | - mpTileScaleDock->setWidget( mpTileScaleWidget ); |
4884 | | - mpTileScaleDock->show(); |
4885 | | - |
4886 | | - connect( mMapLegend, SIGNAL( currentLayerChanged( QgsMapLayer* ) ), |
4887 | | - mpTileScaleWidget, SLOT( layerChanged( QgsMapLayer* ) ) ); |
4888 | | - |
4889 | | - } |
4890 | | - else |
4891 | | - { |
4892 | | - mpTileScaleDock->setVisible( mpTileScaleDock->isHidden() ); |
4893 | | - } |
4894 | | -} |
4895 | | - |
4896 | 4852 | void QgisApp::zoomToLayerExtent() |
4897 | 4853 | { |
4898 | 4854 | mMapLegend->legendLayerZoom(); |
|
0 commit comments