Skip to content
Permalink
Browse files
[FEATURE] WMTS
  • Loading branch information
jef-n committed May 13, 2012
1 parent 27fc1d0 commit 2130b02c20ed66095f448cb16a4e9ec2459da9e7
@@ -33,11 +33,11 @@ fi

# save original changes
if [ -d .svn ]; then
REV=$(svn info | sed -ne "s/Revision: //p")
svn diff >r$REV.diff
REV=r$(svn info | sed -ne "s/Revision: //p")
svn diff >rev-$REV.diff
elif [ -d .git ]; then
REV=$(git svn info | sed -ne "s/Revision: //p")
git diff >r$REV.diff
REV=$(git log -n1 --pretty=%H)
git diff >sha-$REV.diff
fi

ASTYLEDIFF=astyle.r$REV.diff
@@ -85,7 +85,6 @@ SET(QGIS_APP_SRCS
qgssinglesymboldialog.cpp
qgssnappingdialog.cpp
qgsundowidget.cpp
qgstilescalewidget.cpp
qgstipgui.cpp
qgstipfactory.cpp
qgsuniquevaluedialog.cpp
@@ -212,7 +211,6 @@ SET (QGIS_APP_MOC_HDRS
qgssnappingdialog.h
qgssponsors.h
qgstextannotationdialog.h
qgstilescalewidget.h
qgstipgui.h
qgstipfactory.h
qgsundowidget.h
@@ -155,7 +155,6 @@
#include "qgssnappingdialog.h"
#include "qgssponsors.h"
#include "qgstextannotationitem.h"
#include "qgstilescalewidget.h"
#include "qgstipgui.h"
#include "qgsundowidget.h"
#include "qgsvectordataprovider.h"
@@ -375,7 +374,6 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
, mSplash( splash )
, mShowProjectionTab( false )
, mPythonUtils( NULL )
, mpTileScaleWidget( NULL )
#ifdef Q_OS_WIN
, mSkipNextContextMenuEvent( 0 )
#endif
@@ -577,6 +575,8 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
// request notification of FileOpen events (double clicking a file icon in Mac OS X Finder)
QgsApplication::setFileOpenEventReceiver( this );

QgsProviderRegistry::instance()->registerGuis( this );

// update windows
qApp->processEvents();

@@ -694,11 +694,6 @@ void QgisApp::readSettings()
// Add the recently accessed project file paths to the File menu
mRecentProjectPaths = settings.value( "/UI/recentProjectsList" ).toStringList();

// Restore state of tile scale widget
if ( settings.value( "/UI/tileScaleEnabled", false ).toBool() )
{
showTileScale();
}
// Restore state of GPS Tracker
if ( settings.value( "/gps/widgetEnabled", false ).toBool() )
{
@@ -800,7 +795,6 @@ void QgisApp::createActions()
connect( mActionRemoveLayer, SIGNAL( triggered() ), this, SLOT( removeLayer() ) );
connect( mActionSetLayerCRS, SIGNAL( triggered() ), this, SLOT( setLayerCRS() ) );
connect( mActionSetProjectCRSFromLayer, SIGNAL( triggered() ), this, SLOT( setProjectCRSFromLayer() ) );
connect( mActionTileScale, SIGNAL( triggered() ), this, SLOT( showTileScale() ) );
connect( mActionGpsTool, SIGNAL( triggered() ), this, SLOT( showGpsTool() ) );
connect( mActionLayerProperties, SIGNAL( triggered() ), this, SLOT( layerProperties() ) );
connect( mActionLayerSubsetString, SIGNAL( triggered() ), this, SLOT( layerSubsetString() ) );
@@ -1850,17 +1844,6 @@ void QgisApp::saveWindowState()
// store window geometry
settings.setValue( "/UI/geometry", saveGeometry() );

// Persist state of tile scale slider
if ( mpTileScaleWidget )
{
settings.setValue( "/UI/tileScaleEnabled", true );
delete mpTileScaleWidget;
}
else
{
settings.setValue( "/UI/tileScaleEnabled", false );
}

// Persist state of GPS Tracker
if ( mpGpsWidget )
{
@@ -4503,32 +4486,6 @@ void QgisApp::showGpsTool()
}
}

void QgisApp::showTileScale()
{
if ( !mpTileScaleWidget )
{
mpTileScaleWidget = new QgsTileScaleWidget( mMapCanvas );
//create the dock widget
mpTileScaleDock = new QDockWidget( tr( "Tile scale" ), this );
mpTileScaleDock->setObjectName( "TileScale" );
mpTileScaleDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
addDockWidget( Qt::RightDockWidgetArea, mpTileScaleDock );
// add to the Panel submenu
mPanelMenu->addAction( mpTileScaleDock->toggleViewAction() );
// now add our widget to the dock - ownership of the widget is passed to the dock
mpTileScaleDock->setWidget( mpTileScaleWidget );
mpTileScaleDock->show();

connect( mMapLegend, SIGNAL( currentLayerChanged( QgsMapLayer* ) ),
mpTileScaleWidget, SLOT( layerChanged( QgsMapLayer* ) ) );

}
else
{
mpTileScaleDock->setVisible( mpTileScaleDock->isHidden() );
}
}

void QgisApp::zoomToLayerExtent()
{
mMapLegend->legendLayerZoom();
@@ -59,7 +59,6 @@ class QgsRasterLayer;
class QgsRectangle;
class QgsUndoWidget;
class QgsVectorLayer;
class QgsTileScaleWidget;

class QDomDocument;
class QNetworkReply;
@@ -277,7 +276,6 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionRemoveLayer() { return mActionRemoveLayer; }
QAction *actionSetLayerCRS() { return mActionSetLayerCRS; }
QAction *actionSetProjectCRSFromLayer() { return mActionSetProjectCRSFromLayer; }
QAction *actionTileScale() { return mActionTileScale; }
QAction *actionGpsTool() { return mActionGpsTool; }
QAction *actionLayerProperties() { return mActionLayerProperties; }
QAction *actionLayerSubsetString() { return mActionLayerSubsetString; }
@@ -487,8 +485,6 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
void setProjectCRSFromLayer();
//! Show GPS tool
void showGpsTool();
//! Show tile scale slider
void showTileScale();
//! zoom to extent of layer
void zoomToLayerExtent();
//! zoom to actual size of raster layer
@@ -904,7 +900,6 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
// docks ------------------------------------------
QDockWidget *mLegendDock;
QDockWidget *mOverviewDock;
QDockWidget *mpTileScaleDock;
QDockWidget *mpGpsDock;


@@ -1063,9 +1058,6 @@ class QgisApp : public QMainWindow, private Ui::MainWindow

QgsSnappingDialog* mSnappingDialog;

//! Persistent tile scale slider
QgsTileScaleWidget * mpTileScaleWidget;

int mLastComposerId;

#ifdef Q_OS_WIN
@@ -128,16 +128,25 @@ bool QgsCoordinateReferenceSystem::createFromString( const QString theDefinition

bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( QString theCrs )
{
QRegExp re( "(user|custom|qgis):(\\d+)", Qt::CaseInsensitive );
if ( re.exactMatch( theCrs ) && createFromSrsId( re.cap( 2 ).toInt() ) )
QRegExp re( "urn:ogc:def:crs:([^:]+).+([^:]+)", Qt::CaseInsensitive );
if ( re.exactMatch( theCrs ) )
{
return true;
theCrs = re.cap( 1 ) + ":" + re.cap( 2 );
}
else
{
re.setPattern( "(user|custom|qgis):(\\d+)" );
if ( re.exactMatch( theCrs ) && createFromSrsId( re.cap( 2 ).toInt() ) )
{
return true;
}
}

if ( loadFromDb( QgsApplication::srsDbFilePath(), "lower(auth_name||':'||auth_id)", theCrs.toLower() ) )
return true;

if ( theCrs.compare( "CRS:84", Qt::CaseInsensitive ) == 0 )
if ( theCrs.compare( "CRS:84", Qt::CaseInsensitive ) == 0 ||
theCrs.compare( "OGC:CRS84", Qt::CaseInsensitive ) == 0 )
{
createFromSrsId( GEOCRS_ID );
return true;
@@ -126,6 +126,8 @@ class CORE_EXPORT QgsProviderRegistry
/** type for data provider metadata associative container */
typedef std::map<QString, QgsProviderMetadata*> Providers;

void registerGuis( QWidget *widget );

private:

/** ctor private since instance() creates it */
@@ -84,6 +84,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
, mPainting( false )
, mAntiAliasing( false )
{
setObjectName( name );
//disable the update that leads to the resize crash
if ( viewport() )
{
@@ -1,6 +1,19 @@

SET (WMS_SRCS qgswmsprovider.cpp)
SET (WMS_MOC_HDRS qgswmsprovider.h)
SET (WMS_SRCS
qgswmsprovider.cpp
qgswmssourceselect.cpp
qgswmsconnection.cpp
qgswmsdataitems.cpp
qgstilescalewidget.cpp
qgswmtsdimensions.cpp
)
SET (WMS_MOC_HDRS
qgswmsprovider.h
qgswmssourceselect.h
qgswmsconnection.h
qgswmsdataitems.h
qgstilescalewidget.h
qgswmtsdimensions.h
)

QT4_WRAP_CPP (WMS_MOC_SRCS ${WMS_MOC_HDRS})

Loading

0 comments on commit 2130b02

Please sign in to comment.