[QGIS Commit] r9231 - in trunk/qgis: python/gui src/app
src/app/composer src/gui src/plugins/coordinate_capture
src/plugins/copyright_label src/plugins/delimited_text
src/plugins/dxf2shp_converter src/plugins/geoprocessing
src/plugins/georeferencer src/plugins/gps_importer
src/plugins/grass src/plugins/grid_maker
src/plugins/interpolation src/plugins/north_arrow
src/plugins/ogr_converter src/plugins/plugin_template
src/plugins/quick_print src/plugins/scale_bar
src/plugins/spit src/plugins/wfs
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Aug 31 12:56:09 EDT 2008
Author: timlinux
Date: 2008-08-31 12:56:09 -0400 (Sun, 31 Aug 2008)
New Revision: 9231
Modified:
trunk/qgis/python/gui/qgisinterface.sip
trunk/qgis/python/gui/qgsgenericprojectionselector.sip
trunk/qgis/python/gui/qgsprojectionselector.sip
trunk/qgis/src/app/composer/qgscomposer.cpp
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgisapp.h
trunk/qgis/src/app/qgisappinterface.cpp
trunk/qgis/src/app/qgisappinterface.h
trunk/qgis/src/app/qgsbookmarks.cpp
trunk/qgis/src/app/qgscustomprojectiondialog.cpp
trunk/qgis/src/app/qgscustomprojectiondialog.h
trunk/qgis/src/app/qgsoptions.cpp
trunk/qgis/src/app/qgsprojectproperties.cpp
trunk/qgis/src/app/qgsrasterlayerproperties.cpp
trunk/qgis/src/app/qgsserversourceselect.cpp
trunk/qgis/src/app/qgsvectorlayerproperties.cpp
trunk/qgis/src/gui/qgisinterface.h
trunk/qgis/src/gui/qgsfiledropedit.cpp
trunk/qgis/src/gui/qgsfiledropedit.h
trunk/qgis/src/gui/qgsgenericprojectionselector.cpp
trunk/qgis/src/gui/qgsgenericprojectionselector.h
trunk/qgis/src/gui/qgsprojectionselector.cpp
trunk/qgis/src/gui/qgsprojectionselector.h
trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp
trunk/qgis/src/plugins/copyright_label/plugin.cpp
trunk/qgis/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp
trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp
trunk/qgis/src/plugins/georeferencer/plugin.cpp
trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp
trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp
trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp
trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp
trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
trunk/qgis/src/plugins/grass/qgsgrasstools.cpp
trunk/qgis/src/plugins/grid_maker/plugin.cpp
trunk/qgis/src/plugins/interpolation/qgsinterpolationplugin.cpp
trunk/qgis/src/plugins/north_arrow/plugin.cpp
trunk/qgis/src/plugins/ogr_converter/plugin.cpp
trunk/qgis/src/plugins/plugin_template/plugin.cpp
trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp
trunk/qgis/src/plugins/scale_bar/plugin.cpp
trunk/qgis/src/plugins/spit/qgsspitplugin.cpp
trunk/qgis/src/plugins/wfs/qgswfsplugin.cpp
trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
Log:
Implemented more gui api cleanups and suggestions from Albert Areny to clean the api. Note this commit breaks most python plugins out there. Please refer to the plugin interface header to see what is required to (trivially) repair your plugins.
Modified: trunk/qgis/python/gui/qgisinterface.sip
===================================================================
--- trunk/qgis/python/gui/qgisinterface.sip 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/python/gui/qgisinterface.sip 2008-08-31 16:56:09 UTC (rev 9231)
@@ -72,13 +72,13 @@
virtual void openURL(QString url, bool useQgisDocDirectory=true)=0;
/** Return a pointer to the map canvas */
- virtual QgsMapCanvas * getMapCanvas()=0;
+ virtual QgsMapCanvas * mapCanvas()=0;
/** Return a pointer to the main window (instance of QgisApp in case of QGIS) */
- virtual QWidget * getMainWindow()=0;
+ virtual QWidget * mainWindow()=0;
/** Add action to the plugins menu */
- virtual void addPluginMenu(QString name, QAction* action)=0;
+ virtual void addPluginToMenu(QString name, QAction* action)=0;
/** Remove action from the plugins menu */
virtual void removePluginMenu(QString name, QAction* action)=0;
Modified: trunk/qgis/python/gui/qgsgenericprojectionselector.sip
===================================================================
--- trunk/qgis/python/gui/qgsgenericprojectionselector.sip 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/python/gui/qgsgenericprojectionselector.sip 2008-08-31 16:56:09 UTC (rev 9231)
@@ -25,12 +25,12 @@
*/
void setMessage(QString theMessage="");
- QString getSelectedProj4String();
- long getSelectedCRSID();
- long getSelectedEpsg();
+ QString selectedProj4String();
+ long selectedCrsId();
+ long selectedEpsg();
- void setSelectedCRSName(QString theName);
- void setSelectedCRSID(long theID);
+ void setSelectedCrsName(QString theName);
+ void setSelectedCrsId(long theID);
void setSelectedEpsg(long theID);
/**
Modified: trunk/qgis/python/gui/qgsprojectionselector.sip
===================================================================
--- trunk/qgis/python/gui/qgsprojectionselector.sip 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/python/gui/qgsprojectionselector.sip 2008-08-31 16:56:09 UTC (rev 9231)
@@ -28,7 +28,7 @@
*
* \todo Should this be public?
*/
- void applyUserProjList(QSet<QString> * crsFilter = 0);
+ void loadUserCrsList(QSet<QString> * crsFilter = 0);
/**
* \brief Populate the proj tree view with system projection names...
@@ -39,7 +39,7 @@
*
* \todo Should this be public?
*/
- void applyProjList(QSet<QString> * crsFilter = 0);
+ void loadCrsList(QSet<QString> * crsFilter = 0);
/*!
@@ -51,27 +51,27 @@
* \arg const QString in The input string to make safe.
* \return The string made safe for SQL statements.
*/
- const QString stringSQLSafe(const QString theSQL);
+ const QString sqlSafeString(const QString theSQL);
//! Gets the current EPSG-style projection identifier
- long getSelectedEpsg();
+ long selectedEpsg();
public slots:
- void setSelectedCRSName(QString theCRSName);
+ void setSelectedCrsName(QString theCRSName);
- QString getSelectedName();
+ QString selectedName();
- void setSelectedCRSID(long theCRSID);
+ void setSelectedCrsId(long theCRSID);
void setSelectedEpsg(long epsg);
- QString getSelectedProj4String();
+ QString selectedProj4String();
//! Gets the current PostGIS-style projection identifier
- long getSelectedSRID();
+ long selectedPostgresSrId();
//! Gets the current QGIS projection identfier
- long getSelectedCRSID();
+ long selectedCrsId();
/**
* \brief filters this widget by the given CRSs
Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -204,7 +204,7 @@
mView = new QgsComposerView( mViewFrame );
connectSlots();
- mComposition = new QgsComposition( mQgis->getMapCanvas()->mapRenderer() );
+ mComposition = new QgsComposition( mQgis->mapCanvas()->mapRenderer() );
mView->setComposition( mComposition );
QgsCompositionWidget* compositionWidget = new QgsCompositionWidget( mCompositionOptionsFrame, mComposition );
@@ -382,7 +382,7 @@
QgsMapCanvas *QgsComposer::mapCanvas( void )
{
- return mQgis->getMapCanvas();
+ return mQgis->mapCanvas();
}
QgsComposerView *QgsComposer::view( void )
@@ -1395,7 +1395,7 @@
mView = new QgsComposerView( mViewFrame );
connectSlots();
- mComposition = new QgsComposition( mQgis->getMapCanvas()->mapRenderer() );
+ mComposition = new QgsComposition( mQgis->mapCanvas()->mapRenderer() );
mComposition->readXML( compositionElem, doc );
QGridLayout *l = new QGridLayout( mViewFrame );
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgisapp.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -275,13 +275,13 @@
QgsCoordinateReferenceSystem defaultCRS;
if ( defaultCRS.createFromProj4( proj4String ) )
{
- mySelector->setSelectedCRSID( defaultCRS.srsid() );
+ mySelector->setSelectedCrsId( defaultCRS.srsid() );
}
if ( mySelector->exec() )
{
- QgsDebugMsg( "Layer srs set from dialog: " + QString::number( mySelector->getSelectedCRSID() ) );
- srs->createFromProj4( mySelector->getSelectedProj4String() );
+ QgsDebugMsg( "Layer srs set from dialog: " + QString::number( mySelector->selectedCrsId() ) );
+ srs->createFromProj4( mySelector->selectedProj4String() );
srs->debugPrint();
}
else
@@ -3506,11 +3506,11 @@
// showMaxmized() is a work-around. Turn off rendering for this as it
// would otherwise cause two re-renders of the map, which can take a
// long time.
- bool renderFlag = getMapCanvas()->renderFlag();
- getMapCanvas()->setRenderFlag( false );
+ bool renderFlag = mapCanvas()->renderFlag();
+ mapCanvas()->setRenderFlag( false );
showNormal();
showMaximized();
- getMapCanvas()->setRenderFlag( renderFlag );
+ mapCanvas()->setRenderFlag( renderFlag );
mPrevScreenModeMaximized = false;
}
else
@@ -4761,7 +4761,7 @@
return menu;
}
-void QgisApp::addPluginMenu( QString name, QAction* action )
+void QgisApp::addPluginToMenu( QString name, QAction* action )
{
QMenu* menu = getPluginMenu( name );
menu->addAction( action );
@@ -4891,8 +4891,8 @@
// coordinates with the aim of always having enough decimal places
// to show the difference in position between adjacent pixels.
// Also avoid taking the log of 0.
- if ( getMapCanvas()->mapUnitsPerPixel() != 0.0 )
- dp = static_cast<int>( ceil( -1.0 * log10( getMapCanvas()->mapUnitsPerPixel() ) ) );
+ if ( mapCanvas()->mapUnitsPerPixel() != 0.0 )
+ dp = static_cast<int>( ceil( -1.0 * log10( mapCanvas()->mapUnitsPerPixel() ) ) );
}
else
dp = QgsProject::instance()->readNumEntry( "PositionPrecision", "/DecimalPlaces" );
Modified: trunk/qgis/src/app/qgisapp.h
===================================================================
--- trunk/qgis/src/app/qgisapp.h 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgisapp.h 2008-08-31 16:56:09 UTC (rev 9231)
@@ -135,7 +135,7 @@
//!Overloaded version of the private function with same name that takes the imagename as a parameter
void saveMapAsImage( QString, QPixmap * );
/** Get the mapcanvas object from the app */
- QgsMapCanvas * getMapCanvas() { return mMapCanvas; };
+ QgsMapCanvas * mapCanvas() { return mMapCanvas; };
//! Set theme (icons)
void setTheme( QString themeName = "default" );
//! Setup the toolbar popup menus for a given theme
@@ -384,7 +384,7 @@
//! Find the QMenu with the given name (ie the user visible text on the menu item)
QMenu* getPluginMenu( QString menuName );
//! Add the action to the submenu with the given name under the plugin menu
- void addPluginMenu( QString name, QAction* action );
+ void addPluginToMenu( QString name, QAction* action );
//! Remove the action to the submenu with the given name under the plugin menu
void removePluginMenu( QString name, QAction* action );
//! Add an icon to the plugin toolbar
Modified: trunk/qgis/src/app/qgisappinterface.cpp
===================================================================
--- trunk/qgis/src/app/qgisappinterface.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgisappinterface.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -99,9 +99,9 @@
return qgis->activeLayer();
}
-void QgisAppInterface::addPluginMenu( QString name, QAction* action )
+void QgisAppInterface::addPluginToMenu( QString name, QAction* action )
{
- qgis->addPluginMenu( name, action );
+ qgis->addPluginToMenu( name, action );
}
void QgisAppInterface::removePluginMenu( QString name, QAction* action )
@@ -131,12 +131,12 @@
qgis->openURL( url, useQgisDocDirectory );
}
-QgsMapCanvas * QgisAppInterface::getMapCanvas()
+QgsMapCanvas * QgisAppInterface::mapCanvas()
{
- return qgis->getMapCanvas();
+ return qgis->mapCanvas();
}
-QWidget * QgisAppInterface::getMainWindow()
+QWidget * QgisAppInterface::mainWindow()
{
return qgis;
}
Modified: trunk/qgis/src/app/qgisappinterface.h
===================================================================
--- trunk/qgis/src/app/qgisappinterface.h 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgisappinterface.h 2008-08-31 16:56:09 UTC (rev 9231)
@@ -87,17 +87,17 @@
void openURL( QString url, bool useQgisDocDirectory = true );
/** Return a pointer to the map canvas used by qgisapp */
- QgsMapCanvas * getMapCanvas();
+ QgsMapCanvas * mapCanvas();
/** Gives access to main QgisApp object
Plugins don't need to know about QgisApp, as we pass it as QWidget,
it can be used for connecting slots and using as widget's parent
*/
- QWidget * getMainWindow();
+ QWidget * mainWindow();
/** Add action to the plugins menu */
- void addPluginMenu( QString name, QAction* action );
+ void addPluginToMenu( QString name, QAction* action );
/** Remove action from the plugins menu */
void removePluginMenu( QString name, QAction* action );
Modified: trunk/qgis/src/app/qgsbookmarks.cpp
===================================================================
--- trunk/qgis/src/app/qgsbookmarks.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgsbookmarks.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -231,7 +231,7 @@
xmax.toDouble(),
ymax.toDouble() ) );
// redraw the map
- QgisApp::instance()->getMapCanvas()->refresh();
+ QgisApp::instance()->mapCanvas()->refresh();
}
}
Modified: trunk/qgis/src/app/qgscustomprojectiondialog.cpp
===================================================================
--- trunk/qgis/src/app/qgscustomprojectiondialog.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgscustomprojectiondialog.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -800,24 +800,24 @@
{
mySql = QString( "insert into tbl_srs (srs_id,description,projection_acronym,ellipsoid_acronym,parameters,is_geo) " )
+ " values (" + QString::number( USER_PROJECTION_START_ID ) + ",'"
- + stringSQLSafe( myName ) + "','" + myProjectionAcronym
- + "','" + myEllipsoidAcronym + "','" + stringSQLSafe( myParameters )
+ + sqlSafeString( myName ) + "','" + myProjectionAcronym
+ + "','" + myEllipsoidAcronym + "','" + sqlSafeString( myParameters )
+ "',0)"; // <-- is_geo shamelessly hard coded for now
}
else
{
mySql = "insert into tbl_srs (description,projection_acronym,ellipsoid_acronym,parameters,is_geo) values ('"
- + stringSQLSafe( myName ) + "','" + myProjectionAcronym
- + "','" + myEllipsoidAcronym + "','" + stringSQLSafe( myParameters )
+ + sqlSafeString( myName ) + "','" + myProjectionAcronym
+ + "','" + myEllipsoidAcronym + "','" + sqlSafeString( myParameters )
+ "',0)"; // <-- is_geo shamelessly hard coded for now
}
}
else //user is updating an existing record
{
- mySql = "update tbl_srs set description='" + stringSQLSafe( myName )
+ mySql = "update tbl_srs set description='" + sqlSafeString( myName )
+ "',projection_acronym='" + myProjectionAcronym
+ "',ellipsoid_acronym='" + myEllipsoidAcronym
- + "',parameters='" + stringSQLSafe( myParameters ) + "' "
+ + "',parameters='" + sqlSafeString( myParameters ) + "' "
+ ",is_geo=0" // <--shamelessly hard coded for now
+ " where srs_id='" + mCurrentRecordId + "'"
;
@@ -1021,7 +1021,7 @@
* \arg const QString in The input string to make safe.
* \return The string made safe for SQL statements.
*/
-const QString QgsCustomProjectionDialog::stringSQLSafe( const QString theSQL )
+const QString QgsCustomProjectionDialog::sqlSafeString( const QString theSQL )
{
QString myRetval;
Modified: trunk/qgis/src/app/qgscustomprojectiondialog.h
===================================================================
--- trunk/qgis/src/app/qgscustomprojectiondialog.h 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgscustomprojectiondialog.h 2008-08-31 16:56:09 UTC (rev 9231)
@@ -70,7 +70,7 @@
//so that we can return to it if the record insert is aborted
long mLastRecordLong;
long mRecordCountLong;
- const QString stringSQLSafe( const QString theSQL );
+ const QString sqlSafeString( const QString theSQL );
};
Modified: trunk/qgis/src/app/qgsoptions.cpp
===================================================================
--- trunk/qgis/src/app/qgsoptions.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgsoptions.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -370,14 +370,14 @@
QgsCoordinateReferenceSystem refSys;
if ( refSys.createFromProj4( txtGlobalWKT->toPlainText() ) )
{
- mySelector->setSelectedCRSID( refSys.srsid() );
+ mySelector->setSelectedCrsId( refSys.srsid() );
}
if ( mySelector->exec() )
{
QgsDebugMsg( "------ Global Default Projection Selection Set ----------" );
//! @todo changes this control name in gui to txtGlobalProjString
- txtGlobalWKT->setText( mySelector->getSelectedProj4String() );
+ txtGlobalWKT->setText( mySelector->selectedProj4String() );
QgsDebugMsg( QString( "------ Global Default Projection now set to ----------\n%1" ).arg( mGlobalCRSID ) );
}
else
Modified: trunk/qgis/src/app/qgsprojectproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsprojectproperties.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgsprojectproperties.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -61,7 +61,7 @@
long myCRSID = myRender->destinationSrs().srsid();
QgsDebugMsg( "Read project CRSID: " + QString::number( myCRSID ) );
- projectionSelector->setSelectedCRSID( myCRSID );
+ projectionSelector->setSelectedCrsId( myCRSID );
///////////////////////////////////////////////////////////
// Properties stored in QgsProject
@@ -245,15 +245,15 @@
// selected that has an srid. This prevents error if the user
// selects a top-level node rather than an actual coordinate
// system
- long myCRSID = projectionSelector->getSelectedCRSID();
+ long myCRSID = projectionSelector->selectedCrsId();
if ( myCRSID )
{
QgsCoordinateReferenceSystem srs( myCRSID, QgsCoordinateReferenceSystem::QGIS_CRSID );
myRender->setDestinationSrs( srs );
// write the currently selected projections _proj string_ to project settings
- QgsDebugMsg( QString( "SpatialRefSys/ProjectCRSProj4String: %1" ).arg( projectionSelector->getSelectedProj4String() ) );
- QgsProject::instance()->writeEntry( "SpatialRefSys", "/ProjectCRSProj4String", projectionSelector->getSelectedProj4String() );
+ QgsDebugMsg( QString( "SpatialRefSys/ProjectCRSProj4String: %1" ).arg( projectionSelector->selectedProj4String() ) );
+ QgsProject::instance()->writeEntry( "SpatialRefSys", "/ProjectCRSProj4String", projectionSelector->selectedProj4String() );
// Set the map units to the projected coordinates if we are projecting
if ( isProjected() )
Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -1661,10 +1661,10 @@
{
QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector( this );
- mySelector->setSelectedCRSID( mRasterLayer->srs().srsid() );
+ mySelector->setSelectedCrsId( mRasterLayer->srs().srsid() );
if ( mySelector->exec() )
{
- QgsCoordinateReferenceSystem srs( mySelector->getSelectedCRSID(), QgsCoordinateReferenceSystem::QGIS_CRSID );
+ QgsCoordinateReferenceSystem srs( mySelector->selectedCrsId(), QgsCoordinateReferenceSystem::QGIS_CRSID );
mRasterLayer->setSrs( srs );
}
else
Modified: trunk/qgis/src/app/qgsserversourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsserversourceselect.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgsserversourceselect.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -392,12 +392,12 @@
QgsCoordinateReferenceSystem defaultCRS;
if ( defaultCRS.createFromProj4( myDefaultProjString ) )
{
- mySelector->setSelectedCRSID( defaultCRS.srsid() );
+ mySelector->setSelectedCrsId( defaultCRS.srsid() );
}
if ( mySelector->exec() )
{
- m_Epsg = mySelector->getSelectedEpsg();
+ m_Epsg = mySelector->selectedEpsg();
}
else
{
@@ -405,7 +405,7 @@
}
labelCoordRefSys->setText( descriptionForEpsg( m_Epsg ) );
-// labelCoordRefSys->setText( mySelector->getSelectedProj4String() );
+// labelCoordRefSys->setText( mySelector->selectedProj4String() );
delete mySelector;
Modified: trunk/qgis/src/app/qgsvectorlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/app/qgsvectorlayerproperties.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -861,10 +861,10 @@
{
QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector( this );
mySelector->setMessage();
- mySelector->setSelectedCRSID( layer->srs().srsid() );
+ mySelector->setSelectedCrsId( layer->srs().srsid() );
if ( mySelector->exec() )
{
- QgsCoordinateReferenceSystem srs( mySelector->getSelectedCRSID(), QgsCoordinateReferenceSystem::QGIS_CRSID );
+ QgsCoordinateReferenceSystem srs( mySelector->selectedCrsId(), QgsCoordinateReferenceSystem::QGIS_CRSID );
layer->setSrs( srs );
}
else
Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/gui/qgisinterface.h 2008-08-31 16:56:09 UTC (rev 9231)
@@ -105,13 +105,13 @@
virtual void openURL( QString url, bool useQgisDocDirectory = true ) = 0;
/** Return a pointer to the map canvas */
- virtual QgsMapCanvas * getMapCanvas() = 0;
+ virtual QgsMapCanvas * mapCanvas() = 0;
/** Return a pointer to the main window (instance of QgisApp in case of QGIS) */
- virtual QWidget * getMainWindow() = 0;
+ virtual QWidget * mainWindow() = 0;
/** Add action to the plugins menu */
- virtual void addPluginMenu( QString name, QAction* action ) = 0;
+ virtual void addPluginToMenu( QString name, QAction* action ) = 0;
/** Remove action from the plugins menu */
virtual void removePluginMenu( QString name, QAction* action ) = 0;
Modified: trunk/qgis/src/gui/qgsfiledropedit.cpp
===================================================================
--- trunk/qgis/src/gui/qgsfiledropedit.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/gui/qgsfiledropedit.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -45,9 +45,9 @@
/*!
Limit drops to directories.
*/
-void QgsFileDropEdit::setDirOnly( bool dirOnly )
+void QgsFileDropEdit::setDirOnly( bool isDirOnly )
{
- mDirOnly = dirOnly;
+ mDirOnly = isDirOnly;
if ( mDirOnly )
{
mFileOnly = false;
@@ -57,9 +57,9 @@
/*!
Limit drops to files.
*/
-void QgsFileDropEdit::setFileOnly( bool fileOnly )
+void QgsFileDropEdit::setFileOnly( bool isFileOnly )
{
- mFileOnly = fileOnly;
+ mFileOnly = isFileOnly;
if ( mFileOnly )
{
mDirOnly = false;
Modified: trunk/qgis/src/gui/qgsfiledropedit.h
===================================================================
--- trunk/qgis/src/gui/qgsfiledropedit.h 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/gui/qgsfiledropedit.h 2008-08-31 16:56:09 UTC (rev 9231)
@@ -28,11 +28,11 @@
QgsFileDropEdit( QWidget *parent = 0 );
virtual ~QgsFileDropEdit();
- bool dirOnly() const { return mDirOnly; }
- void setDirOnly( bool dirOnly );
+ bool isDirOnly() const { return mDirOnly; }
+ void setDirOnly( bool isDirOnly );
- bool fileOnly() const { return mFileOnly; }
- void setFileOnly( bool fileOnly );
+ bool isFileOnly() const { return mFileOnly; }
+ void setFileOnly( bool isFileOnly );
const QString& suffixFilter() const { return mSuffix; }
void setSuffixFilter( const QString& suffix );
Modified: trunk/qgis/src/gui/qgsgenericprojectionselector.cpp
===================================================================
--- trunk/qgis/src/gui/qgsgenericprojectionselector.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/gui/qgsgenericprojectionselector.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -58,14 +58,14 @@
QgsGenericProjectionSelector::~QgsGenericProjectionSelector()
{}
-void QgsGenericProjectionSelector::setSelectedCRSName( QString theName )
+void QgsGenericProjectionSelector::setSelectedCrsName( QString theName )
{
- projectionSelector->setSelectedCRSName( theName );
+ projectionSelector->setSelectedCrsName( theName );
}
-void QgsGenericProjectionSelector::setSelectedCRSID( long theID )
+void QgsGenericProjectionSelector::setSelectedCrsId( long theID )
{
- projectionSelector->setSelectedCRSID( theID );
+ projectionSelector->setSelectedCrsId( theID );
}
void QgsGenericProjectionSelector::setSelectedEpsg( long theID )
@@ -73,21 +73,21 @@
projectionSelector->setSelectedEpsg( theID );
}
-QString QgsGenericProjectionSelector::getSelectedProj4String()
+QString QgsGenericProjectionSelector::selectedProj4String()
{
//@NOTE dont use getSelectedWKT as that just returns the name part!
- return projectionSelector->getSelectedProj4String();
+ return projectionSelector->selectedProj4String();
}
-long QgsGenericProjectionSelector::getSelectedCRSID()
+long QgsGenericProjectionSelector::selectedCrsId()
{
//@NOTE dont use getSelectedWKT as that just returns the name part!
- return projectionSelector->getSelectedCRSID();
+ return projectionSelector->selectedCrsId();
}
-long QgsGenericProjectionSelector::getSelectedEpsg()
+long QgsGenericProjectionSelector::selectedEpsg()
{
- return projectionSelector->getSelectedEpsg();
+ return projectionSelector->selectedEpsg();
}
void QgsGenericProjectionSelector::setOgcWmsCrsFilter( QSet<QString> crsFilter )
Modified: trunk/qgis/src/gui/qgsgenericprojectionselector.h
===================================================================
--- trunk/qgis/src/gui/qgsgenericprojectionselector.h 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/gui/qgsgenericprojectionselector.h 2008-08-31 16:56:09 UTC (rev 9231)
@@ -31,11 +31,11 @@
* a coordinate system identifier e.g. from a plugin you might do this
* to get an epsg code:
* \code
- * QgsGenericProjectionSelector mySelector( mQGisIface->getMainWindow() );
+ * QgsGenericProjectionSelector mySelector( mQGisIface->mainWindow() );
* mySelector.setSelectedEpsg( mEpsgId );
* if ( mySelector.exec() )
* {
- * mEpsgId = mySelector.getSelectedEpsg();
+ * mEpsgId = mySelector.selectedEpsg();
* }
* \endcode
*
@@ -61,12 +61,12 @@
* 'define the CRS for this layer'.
*/
void setMessage( QString theMessage = "" );
- QString getSelectedProj4String();
- long getSelectedCRSID();
- long getSelectedEpsg();
+ QString selectedProj4String();
+ long selectedCrsId();
+ long selectedEpsg();
- void setSelectedCRSName( QString theName );
- void setSelectedCRSID( long theID );
+ void setSelectedCrsName( QString theName );
+ void setSelectedCrsId( long theID );
void setSelectedEpsg( long theID );
/**
Modified: trunk/qgis/src/gui/qgsprojectionselector.cpp
===================================================================
--- trunk/qgis/src/gui/qgsprojectionselector.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/gui/qgsprojectionselector.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -76,12 +76,12 @@
if ( !mProjListDone )
{
- applyProjList( &mCrsFilter );
+ loadCrsList( &mCrsFilter );
}
if ( !mUserProjListDone )
{
- applyUserProjList( &mCrsFilter );
+ loadUserCrsList( &mCrsFilter );
}
// check if a paricular projection is waiting
@@ -163,7 +163,7 @@
}
-void QgsProjectionSelector::setSelectedCRSName( QString theCRSName )
+void QgsProjectionSelector::setSelectedCrsName( QString theCRSName )
{
mCRSNameSelection = theCRSName;
mCRSNameSelectionPending = TRUE;
@@ -179,7 +179,7 @@
}
-void QgsProjectionSelector::setSelectedCRSID( long theCRSID )
+void QgsProjectionSelector::setSelectedCrsId( long theCRSID )
{
mCRSIDSelection = theCRSID;
mCRSIDSelectionPending = TRUE;
@@ -255,7 +255,7 @@
//note this line just returns the projection name!
-QString QgsProjectionSelector::getSelectedName()
+QString QgsProjectionSelector::selectedName()
{
// return the selected wkt name from the list view
QTreeWidgetItem *lvi = lstCoordinateSystems->currentItem();
@@ -269,7 +269,7 @@
}
}
// Returns the whole proj4 string for the selected projection node
-QString QgsProjectionSelector::getSelectedProj4String()
+QString QgsProjectionSelector::selectedProj4String()
{
// Only return the projection if there is a node in the tree
// selected that has an srid. This prevents error if the user
@@ -443,19 +443,19 @@
}
-long QgsProjectionSelector::getSelectedSRID()
+long QgsProjectionSelector::selectedPostgresSrId()
{
return getSelectedLongAttribute( "srid" );
}
-long QgsProjectionSelector::getSelectedEpsg()
+long QgsProjectionSelector::selectedEpsg()
{
return getSelectedLongAttribute( "epsg" );
}
-long QgsProjectionSelector::getSelectedCRSID()
+long QgsProjectionSelector::selectedCrsId()
{
QTreeWidgetItem* item = lstCoordinateSystems->currentItem();
@@ -479,7 +479,7 @@
}
-void QgsProjectionSelector::applyUserProjList( QSet<QString> * crsFilter )
+void QgsProjectionSelector::loadUserCrsList( QSet<QString> * crsFilter )
{
QgsDebugMsg( "Fetching user projection list..." );
@@ -554,7 +554,7 @@
mUserProjListDone = TRUE;
}
-void QgsProjectionSelector::applyProjList( QSet<QString> * crsFilter )
+void QgsProjectionSelector::loadCrsList( QSet<QString> * crsFilter )
{
// convert our Coordinate Reference System filter into the SQL expression
QString sqlFilter = ogcWmsCrsFilterAsSqlExpression( crsFilter );
@@ -710,8 +710,8 @@
{
// Found a real CRS
QString myDescription;
- emit sridSelected( QString::number( getSelectedCRSID() ) );
- QString myProjString = getSelectedProj4String();
+ emit sridSelected( QString::number( selectedCrsId() ) );
+ QString myProjString = selectedProj4String();
lstCoordinateSystems->scrollToItem( theItem );
teProjection->setText( myProjString );
}
@@ -728,7 +728,7 @@
QgsDebugMsg( "pbnFind..." );
- QString mySearchString( stringSQLSafe( leSearch->text() ) );
+ QString mySearchString( sqlSafeString( leSearch->text() ) );
// Set up the query to retreive the projection information needed to populate the list
QString mySql;
if ( radEPSGID->isChecked() )
@@ -745,7 +745,7 @@
QgsDebugMsg( QString( "Largest CRSID%1" ).arg( myLargestSrsId ) );
//a name search is ambiguous, so we find the first srsid after the current seelcted srsid
// each time the find button is pressed. This means we can loop through all matches.
- if ( myLargestSrsId <= getSelectedCRSID() )
+ if ( myLargestSrsId <= selectedCrsId() )
{
//roll search around to the beginning
mySql = "select srs_id from tbl_srs where description like '%" + mySearchString + "%'" +
@@ -755,7 +755,7 @@
{
// search ahead of the current postion
mySql = "select srs_id from tbl_srs where description like '%" + mySearchString + "%'" +
- " and srs_id > " + QString::number( getSelectedCRSID() ) + " order by srs_id limit 1";
+ " and srs_id > " + QString::number( selectedCrsId() ) + " order by srs_id limit 1";
}
}
QgsDebugMsg( QString( " Search sql: %1" ).arg( mySql ) );
@@ -788,7 +788,7 @@
if ( myResult == SQLITE_ROW )
{
QString mySrsId = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 0 ) );
- setSelectedCRSID( mySrsId.toLong() );
+ setSelectedCrsId( mySrsId.toLong() );
// close the sqlite3 statement
sqlite3_finalize( myPreparedStatement );
sqlite3_close( myDatabase );
@@ -821,7 +821,7 @@
if ( myResult == SQLITE_ROW )
{
QString mySrsId = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 0 ) );
- setSelectedCRSID( mySrsId.toLong() );
+ setSelectedCrsId( mySrsId.toLong() );
// close the sqlite3 statement
sqlite3_finalize( myPreparedStatement );
sqlite3_close( myDatabase );
@@ -914,7 +914,7 @@
* \arg const QString in The input string to make safe.
* \return The string made safe for SQL statements.
*/
-const QString QgsProjectionSelector::stringSQLSafe( const QString theSQL )
+const QString QgsProjectionSelector::sqlSafeString( const QString theSQL )
{
QString myRetval = theSQL;
myRetval.replace( "\\", "\\\\" );
Modified: trunk/qgis/src/gui/qgsprojectionselector.h
===================================================================
--- trunk/qgis/src/gui/qgsprojectionselector.h 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/gui/qgsprojectionselector.h 2008-08-31 16:56:09 UTC (rev 9231)
@@ -41,7 +41,7 @@
*
* \todo Should this be public?
*/
- void applyUserProjList( QSet<QString> * crsFilter = 0 );
+ void loadUserCrsList( QSet<QString> * crsFilter = 0 );
/**
* \brief Populate the proj tree view with system projection names...
@@ -52,7 +52,7 @@
*
* \todo Should this be public?
*/
- void applyProjList( QSet<QString> * crsFilter = 0 );
+ void loadCrsList( QSet<QString> * crsFilter = 0 );
/*!
@@ -64,27 +64,27 @@
* \arg const QString in The input string to make safe.
* \return The string made safe for SQL statements.
*/
- const QString stringSQLSafe( const QString theSQL );
+ const QString sqlSafeString( const QString theSQL );
//! Gets the current EPSG-style projection identifier
- long getSelectedEpsg();
+ long selectedEpsg();
public slots:
- void setSelectedCRSName( QString theCRSName );
+ void setSelectedCrsName( QString theCRSName );
- QString getSelectedName();
+ QString selectedName();
- void setSelectedCRSID( long theCRSID );
+ void setSelectedCrsId( long theCRSID );
void setSelectedEpsg( long epsg );
- QString getSelectedProj4String();
+ QString selectedProj4String();
//! Gets the current PostGIS-style projection identifier
- long getSelectedSRID();
+ long selectedPostgresSrId();
//! Gets the current QGIS projection identfier
- long getSelectedCRSID();
+ long selectedCrsId();
/**
* \brief filters this widget by the given CRSs
Modified: trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp
===================================================================
--- trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/coordinate_capture/coordinatecapture.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -89,10 +89,10 @@
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// Add the icon to the toolbar
mQGisIface->addToolBarIcon( mQActionPointer );
- mQGisIface->addPluginMenu( tr( "&Coordinate Capture" ), mQActionPointer );
+ mQGisIface->addPluginToMenu( tr( "&Coordinate Capture" ), mQActionPointer );
// create our map tool
- mpMapTool = new CoordinateCaptureMapTool( mQGisIface->getMapCanvas() );
+ mpMapTool = new CoordinateCaptureMapTool( mQGisIface->mapCanvas() );
connect( mpMapTool, SIGNAL( mouseMoved( QgsPoint ) ), this, SLOT( mouseMoved( QgsPoint ) ) );
connect( mpMapTool, SIGNAL( mouseClicked( QgsPoint ) ), this, SLOT( mouseClicked( QgsPoint ) ) );
@@ -139,7 +139,7 @@
//create the dock widget
- mpDockWidget = new QDockWidget( tr( "Coordinate Capture" ), mQGisIface->getMainWindow() );
+ mpDockWidget = new QDockWidget( tr( "Coordinate Capture" ), mQGisIface->mainWindow() );
mpDockWidget->setObjectName( "CoordinateCapture" );
mpDockWidget->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
mQGisIface->addDockWidget( Qt::LeftDockWidgetArea, mpDockWidget );
@@ -157,11 +157,11 @@
void CoordinateCapture::setCRS()
{
- QgsGenericProjectionSelector mySelector( mQGisIface->getMainWindow() );
+ QgsGenericProjectionSelector mySelector( mQGisIface->mainWindow() );
mySelector.setSelectedEpsg( mEpsgId );
if ( mySelector.exec() )
{
- mEpsgId = mySelector.getSelectedEpsg();
+ mEpsgId = mySelector.selectedEpsg();
}
}
@@ -186,7 +186,7 @@
//this is the coordinate resolved back to lat / lon
QgsCoordinateReferenceSystem mySrs;
mySrs.createFromEpsg( mEpsgId ); //geo lat lon
- QgsCoordinateTransform myTransform( mQGisIface->getMapCanvas()->mapRenderer()->destinationSrs(), mySrs );
+ QgsCoordinateTransform myTransform( mQGisIface->mapCanvas()->mapRenderer()->destinationSrs(), mySrs );
QgsPoint myUserCrsPoint = myTransform.transform( thePoint );
mpUserCrsEdit->setText( QString::number( myUserCrsPoint.x(), 'f', 3 ) + "," +
QString::number( myUserCrsPoint.y(), 'f', 3 ) );
@@ -220,8 +220,8 @@
// not be enough
void CoordinateCapture::run()
{
- mQGisIface->getMapCanvas()->setMapTool( mpMapTool );
- //CoordinateCaptureGui *myPluginGui=new CoordinateCaptureGui(mQGisIface->getMainWindow(), QgisGui::ModalDialogFlags);
+ mQGisIface->mapCanvas()->setMapTool( mpMapTool );
+ //CoordinateCaptureGui *myPluginGui=new CoordinateCaptureGui(mQGisIface->mainWindow(), QgisGui::ModalDialogFlags);
//myPluginGui->setAttribute(Qt::WA_DeleteOnClose);
//myPluginGui->show();
Modified: trunk/qgis/src/plugins/copyright_label/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/copyright_label/plugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/copyright_label/plugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -79,13 +79,13 @@
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
// This calls the renderer everytime the cnavas has drawn itself
- connect( qGisInterface->getMapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderLabel( QPainter * ) ) );
+ connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderLabel( QPainter * ) ) );
//this resets this plugin up if a project is loaded
- connect( qGisInterface->getMainWindow(), SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
+ connect( qGisInterface->mainWindow(), SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
// Add the icon to the toolbar
qGisInterface->addToolBarIcon( myQActionPointer );
- qGisInterface->addPluginMenu( tr( "&Decorations" ), myQActionPointer );
+ qGisInterface->addPluginToMenu( tr( "&Decorations" ), myQActionPointer );
//initialise default values in the gui
projectRead();
}
@@ -118,7 +118,7 @@
// Slot called when the buffer menu item is activated
void QgsCopyrightLabelPlugin::run()
{
- QgsCopyrightLabelPluginGui *myPluginGui = new QgsCopyrightLabelPluginGui( qGisInterface->getMainWindow(), QgisGui::ModalDialogFlags );
+ QgsCopyrightLabelPluginGui *myPluginGui = new QgsCopyrightLabelPluginGui( qGisInterface->mainWindow(), QgisGui::ModalDialogFlags );
myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
//listen for when the layer has been made so we can draw it
//connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString)));
@@ -139,7 +139,7 @@
//! Refresh the map display using the mapcanvas exported via the plugin interface
void QgsCopyrightLabelPlugin::refreshCanvas()
{
- qGisInterface->getMapCanvas()->refresh();
+ qGisInterface->mapCanvas()->refresh();
}
void QgsCopyrightLabelPlugin::renderLabel( QPainter * theQPainter )
@@ -202,7 +202,7 @@
qGisInterface->removePluginMenu( tr( "&Decorations" ), myQActionPointer );
qGisInterface->removeToolBarIcon( myQActionPointer );
// remove the copyright from the canvas
- disconnect( qGisInterface->getMapCanvas(), SIGNAL( renderComplete( QPainter * ) ),
+ disconnect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ),
this, SLOT( renderLabel( QPainter * ) ) );
refreshCanvas();
Modified: trunk/qgis/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/delimited_text/qgsdelimitedtextplugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -105,7 +105,7 @@
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
// Add the icon to the toolbar
qGisInterface->addToolBarIcon( myQActionPointer );
- qGisInterface->addPluginMenu( tr( "&Delimited text" ), myQActionPointer );
+ qGisInterface->addPluginToMenu( tr( "&Delimited text" ), myQActionPointer );
}
@@ -114,7 +114,7 @@
{
QgsDelimitedTextPluginGui *myQgsDelimitedTextPluginGui =
new QgsDelimitedTextPluginGui( qGisInterface,
- qGisInterface->getMainWindow(), QgisGui::ModalDialogFlags );
+ qGisInterface->mainWindow(), QgisGui::ModalDialogFlags );
myQgsDelimitedTextPluginGui->setAttribute( Qt::WA_DeleteOnClose );
//listen for when the layer has been made so we can draw it
connect( myQgsDelimitedTextPluginGui,
Modified: trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -77,7 +77,7 @@
// Add the icon to the toolbar
mQGisIface->addToolBarIcon( mQActionPointer );
- mQGisIface->addPluginMenu( tr( "&Dxf2Shp" ), mQActionPointer );
+ mQGisIface->addPluginToMenu( tr( "&Dxf2Shp" ), mQActionPointer );
}
//method defined in interface
@@ -93,7 +93,7 @@
void dxf2shpConverter::run()
{
dxf2shpConverterGui *myPluginGui =
- new dxf2shpConverterGui( mQGisIface->getMainWindow(), QgisGui::ModalDialogFlags );
+ new dxf2shpConverterGui( mQGisIface->mainWindow(), QgisGui::ModalDialogFlags );
myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
Modified: trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp
===================================================================
--- trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/geoprocessing/qgspggeoprocessing.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -56,7 +56,7 @@
*/
QgsPgGeoprocessing::QgsPgGeoprocessing( QgisInterface * _qI )
: QgisPlugin( name_, description_, version_, type_ ),
- qgisMainWindow( _qI->getMainWindow() ),
+ qgisMainWindow( _qI->mainWindow() ),
qI( _qI )
{
}
@@ -81,7 +81,7 @@
// Add the icon to the toolbar
qI->addToolBarIcon( bufferAction );
- qI->addPluginMenu( tr( "&Geoprocessing" ), bufferAction );
+ qI->addPluginToMenu( tr( "&Geoprocessing" ), bufferAction );
}
Modified: trunk/qgis/src/plugins/georeferencer/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/plugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/georeferencer/plugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -95,7 +95,7 @@
// Add to the toolbar & menu
mQGisIface->addToolBarIcon( mQActionPointer );
- mQGisIface->addPluginMenu( tr( "&Georeferencer" ), mQActionPointer );
+ mQGisIface->addPluginToMenu( tr( "&Georeferencer" ), mQActionPointer );
}
//method defined in interface
Modified: trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -401,7 +401,7 @@
void QgsPointDialog::showCoordDialog( QgsPoint& pixelCoords )
{
- MapCoordsDialog* mcd = new MapCoordsDialog( pixelCoords, mIface->getMapCanvas(), this );
+ MapCoordsDialog* mcd = new MapCoordsDialog( pixelCoords, mIface->mapCanvas(), this );
connect( mcd, SIGNAL( pointAdded( const QgsPoint&, const QgsPoint& ) ),
this, SLOT( addPoint( const QgsPoint&, const QgsPoint& ) ) );
mcd->show();
Modified: trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/gps_importer/qgsgpsplugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -96,8 +96,8 @@
connect( mCreateGPXAction, SIGNAL( activated() ), this, SLOT( createGPX() ) );
mQGisInterface->fileToolBar()->addAction( mQActionPointer );
- mQGisInterface->addPluginMenu( tr( "&Gps" ), mQActionPointer );
- mQGisInterface->addPluginMenu( tr( "&Gps" ), mCreateGPXAction );
+ mQGisInterface->addPluginToMenu( tr( "&Gps" ), mQActionPointer );
+ mQGisInterface->addPluginToMenu( tr( "&Gps" ), mCreateGPXAction );
}
//method defined in interface
@@ -125,7 +125,7 @@
}
QgsGPSPluginGui *myPluginGui =
- new QgsGPSPluginGui( mImporters, mDevices, gpxLayers, mQGisInterface->getMainWindow(),
+ new QgsGPSPluginGui( mImporters, mDevices, gpxLayers, mQGisInterface->mainWindow(),
QgisGui::ModalDialogFlags );
myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
//listen for when the layer has been made so we can draw it
@@ -156,7 +156,7 @@
void QgsGPSPlugin::createGPX()
{
QString fileName =
- QFileDialog::getSaveFileName( mQGisInterface->getMainWindow(),
+ QFileDialog::getSaveFileName( mQGisInterface->mainWindow(),
tr( "Save new GPX file as..." ),
".",
tr( "GPS eXchange file (*.gpx)" ) );
Modified: trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedit.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrassedit.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -132,7 +132,7 @@
mProjectionEnabled = ( QgsProject::instance()->readNumEntry( "SpatialRefSys", "/ProjectionsEnabled", 0 ) != 0 );
- mCanvas = mIface->getMapCanvas();
+ mCanvas = mIface->mapCanvas();
if ( !isEditable( layer ) ) return;
Modified: trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -103,7 +103,7 @@
}
else
{
- e->mAttributes = new QgsGrassAttributes( e, e->mProvider, line, e->mIface->getMainWindow() );
+ e->mAttributes = new QgsGrassAttributes( e, e->mProvider, line, e->mIface->mainWindow() );
}
for ( int i = 0; i < e->mCats->n_cats; i++ )
{
@@ -209,7 +209,7 @@
}
else
{
- e->mAttributes = new QgsGrassAttributes( e, e->mProvider, line, e->mIface->getMainWindow() );
+ e->mAttributes = new QgsGrassAttributes( e, e->mProvider, line, e->mIface->mainWindow() );
}
for ( int i = 0; i < e->mCats->n_cats; i++ )
{
@@ -894,7 +894,7 @@
if ( !e->mAttributes )
{
- e->mAttributes = new QgsGrassAttributes( e, e->mProvider, e->mSelectedLine, e->mIface->getMainWindow() );
+ e->mAttributes = new QgsGrassAttributes( e, e->mProvider, e->mSelectedLine, e->mIface->mainWindow() );
}
else
{
Modified: trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -866,7 +866,7 @@
mMapComboBox->clear();
mMaps.resize( 0 );
- QgsMapCanvas *canvas = mIface->getMapCanvas();
+ QgsMapCanvas *canvas = mIface->mapCanvas();
int nlayers = canvas->layerCount();
QgsDebugMsg( QString( "nlayers = %1" ).arg( nlayers ) );
Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -213,7 +213,7 @@
mPath = path;
mTools = tools;
mIface = iface;
- mCanvas = mIface->getMapCanvas();
+ mCanvas = mIface->mapCanvas();
mParent = parent;
/* Read module description and create options */
@@ -337,7 +337,7 @@
mTools = tools;
mModule = module;
mIface = iface;
- mCanvas = mIface->getMapCanvas();
+ mCanvas = mIface->mapCanvas();
}
QgsGrassModuleOptions::~QgsGrassModuleOptions()
@@ -2232,7 +2232,7 @@
//connect ( mLayerComboBox, SIGNAL( activated(int) ), this, SLOT(updateQgisLayers()) );
// Connect to canvas
- QgsMapCanvas *canvas = mModule->qgisIface()->getMapCanvas();
+ QgsMapCanvas *canvas = mModule->qgisIface()->mapCanvas();
connect( canvas, SIGNAL( layersChanged() ), this, SLOT( updateQgisLayers() ) );
connect( mLayerComboBox, SIGNAL( activated( int ) ), this, SLOT( changed( int ) ) );
@@ -2290,7 +2290,7 @@
mMapLayers.resize( 0 );
mVectorFields.resize( 0 );
- QgsMapCanvas *canvas = mModule->qgisIface()->getMapCanvas();
+ QgsMapCanvas *canvas = mModule->qgisIface()->mapCanvas();
// Find map option
QString sourceMap;
@@ -2700,7 +2700,7 @@
// connect ( mLayerComboBox, SIGNAL( activated(int) ), this, SLOT(updateQgisLayers()) );
// Connect to canvas
- QgsMapCanvas *canvas = mModule->qgisIface()->getMapCanvas();
+ QgsMapCanvas *canvas = mModule->qgisIface()->mapCanvas();
// It seems that addedLayer/removedLayer does not work
//connect ( canvas, SIGNAL(addedLayer(QgsMapLayer *)), this, SLOT(updateQgisLayers()) );
@@ -2720,7 +2720,7 @@
mUri.resize( 0 );
mOgrLayers.resize( 0 );
- QgsMapCanvas *canvas = mModule->qgisIface()->getMapCanvas();
+ QgsMapCanvas *canvas = mModule->qgisIface()->mapCanvas();
int nlayers = canvas->layerCount();
for ( int i = 0; i < nlayers; i++ )
@@ -2910,7 +2910,7 @@
QString current = mFieldComboBox->currentText();
mFieldComboBox->clear();
- //QgsMapCanvas *canvas = mModule->qgisIface()->getMapCanvas();
+ //QgsMapCanvas *canvas = mModule->qgisIface()->mapCanvas();
if ( mLayerInput == 0 ) return;
@@ -3000,7 +3000,7 @@
QgsDebugMsg( "called." );
mLineEdit->setText( "" );
- //QgsMapCanvas *canvas = mModule->qgisIface()->getMapCanvas();
+ //QgsMapCanvas *canvas = mModule->qgisIface()->mapCanvas();
if ( mLayerInput == 0 ) return;
QgsMapLayer *layer = mLayerInput->currentLayer();
Modified: trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -427,7 +427,7 @@
QgsDebugMsg( "entered." );
setError( mProjErrorLabel, "" );
- QString proj4 = mProjectionSelector->getSelectedProj4String();
+ QString proj4 = mProjectionSelector->selectedProj4String();
// Not defined
if ( mNoProjRadioButton->isChecked() )
@@ -537,11 +537,11 @@
QgsCoordinateReferenceSystem newSrs;
if ( mProjRadioButton->isChecked() )
{
- QgsDebugMsg( QString( "getSelectedCRSID() = %1" ).arg( mProjectionSelector->getSelectedCRSID() ) );
+ QgsDebugMsg( QString( "selectedCrsId() = %1" ).arg( mProjectionSelector->selectedCrsId() ) );
- if ( mProjectionSelector->getSelectedCRSID() > 0 )
+ if ( mProjectionSelector->selectedCrsId() > 0 )
{
- newSrs.createFromSrsId( mProjectionSelector->getSelectedCRSID() );
+ newSrs.createFromSrsId( mProjectionSelector->selectedCrsId() );
if ( ! newSrs.isValid() )
{
QMessageBox::warning( 0, tr( "Warning" ),
@@ -620,7 +620,7 @@
mRegionButton->show();
mSetRegionFrame->show();
- QgsRect ext = mIface->getMapCanvas()->extent();
+ QgsRect ext = mIface->mapCanvas()->extent();
if ( ext.xMin() >= ext.xMax() || ext.yMin() >= ext.yMax() )
{
@@ -645,7 +645,7 @@
QgsDebugMsg( QString( "current project srsid = %1" ).arg( srsid ) );
- QgsRect ext = mIface->getMapCanvas()->extent();
+ QgsRect ext = mIface->mapCanvas()->extent();
bool extSet = false;
if ( ext.xMin() < ext.xMax() && ext.yMin() < ext.yMax() )
{
@@ -655,7 +655,7 @@
if ( extSet &&
( mNoProjRadioButton->isChecked() ||
( mProjRadioButton->isChecked()
- && srsid == mProjectionSelector->getSelectedCRSID() )
+ && srsid == mProjectionSelector->selectedCrsId() )
)
)
{
@@ -873,7 +873,7 @@
// Warning: seems that crashes if source == dest
- if ( mProjectionSelector->getSelectedCRSID() != 2585 )
+ if ( mProjectionSelector->selectedCrsId() != 2585 )
{
// Warning: QgsCoordinateReferenceSystem::EPSG is broken (using epsg_id)
//QgsCoordinateReferenceSystem source ( 4326, QgsCoordinateReferenceSystem::EPSG );
@@ -886,7 +886,7 @@
return;
}
- QgsCoordinateReferenceSystem dest( mProjectionSelector->getSelectedCRSID(),
+ QgsCoordinateReferenceSystem dest( mProjectionSelector->selectedCrsId(),
QgsCoordinateReferenceSystem::QGIS_CRSID );
if ( !dest.isValid() )
@@ -965,7 +965,7 @@
{
QgsDebugMsg( "entered." );
- QgsRect ext = mIface->getMapCanvas()->extent();
+ QgsRect ext = mIface->mapCanvas()->extent();
int srsid = QgsProject::instance()->readNumEntry(
"SpatialRefSys", "/ProjectCRSID", 0 );
@@ -1085,9 +1085,9 @@
points.push_back( QgsPoint( points[0] ) ); // close polygon
// Warning: seems that crashes if source == dest
- if ( mProjectionSelector->getSelectedCRSID() != 2585 )
+ if ( mProjectionSelector->selectedCrsId() != 2585 )
{
- QgsCoordinateReferenceSystem source( mProjectionSelector->getSelectedCRSID(),
+ QgsCoordinateReferenceSystem source( mProjectionSelector->selectedCrsId(),
QgsCoordinateReferenceSystem::QGIS_CRSID );
if ( !source.isValid() )
@@ -1466,7 +1466,7 @@
QgsDebugMsg( QString( "srs.isValid() = %1" ).arg( srs.isValid() ) );
if ( srs.isValid() )
{
- mProjectionSelector->setSelectedCRSID( srsid );
+ mProjectionSelector->setSelectedCrsId( srsid );
mProjRadioButton->setChecked( true );
projRadioSwitched();
}
Modified: trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -133,8 +133,8 @@
QgsGrass::init();
- mCanvas = qGisInterface->getMapCanvas();
- QWidget* qgis = qGisInterface->getMainWindow();
+ mCanvas = qGisInterface->mapCanvas();
+ QWidget* qgis = qGisInterface->mainWindow();
// Connect project
connect( qgis, SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
@@ -186,16 +186,16 @@
connect( mCloseMapsetAction, SIGNAL( triggered() ), this, SLOT( closeMapset() ) );
// Add actions to a GRASS plugin menu
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mOpenMapsetAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mNewMapsetAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mCloseMapsetAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mAddVectorAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mAddRasterAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mNewVectorAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mEditAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mOpenToolsAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mRegionAction );
- qGisInterface->addPluginMenu( tr( "&GRASS" ), mEditRegionAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mOpenMapsetAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mNewMapsetAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mCloseMapsetAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mAddVectorAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mAddRasterAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mNewVectorAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mEditAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mOpenToolsAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mRegionAction );
+ qGisInterface->addPluginToMenu( tr( "&GRASS" ), mEditRegionAction );
// Add the toolbar to the main window
toolBarPointer = qGisInterface->addToolBar( tr( "GRASS" ) );
@@ -419,7 +419,7 @@
{
if ( !mTools )
{
- mTools = new QgsGrassTools( qGisInterface, qGisInterface->getMainWindow(), 0, Qt::WType_Dialog );
+ mTools = new QgsGrassTools( qGisInterface, qGisInterface->mainWindow(), 0, Qt::WType_Dialog );
connect( mTools, SIGNAL( regionChanged() ), this, SLOT( redrawRegion() ) );
}
@@ -439,7 +439,7 @@
mEditAction->setEnabled( false );
QgsGrassEdit *ed = new QgsGrassEdit( qGisInterface, qGisInterface->activeLayer(), false,
- qGisInterface->getMainWindow(), Qt::WType_Dialog );
+ qGisInterface->mainWindow(), Qt::WType_Dialog );
if ( ed->isValid() )
{
@@ -527,7 +527,7 @@
}
QgsGrassEdit *ed = new QgsGrassEdit( qGisInterface, layer, true,
- qGisInterface->getMainWindow(), Qt::WType_Dialog );
+ qGisInterface->mainWindow(), Qt::WType_Dialog );
if ( ed->isValid() )
{
@@ -636,7 +636,7 @@
}
// Warning: don't use Qt::WType_Dialog, it would ignore restorePosition
- mRegion = new QgsGrassRegion( this, qGisInterface, qGisInterface->getMainWindow(), Qt::Window );
+ mRegion = new QgsGrassRegion( this, qGisInterface, qGisInterface->mainWindow(), Qt::Window );
connect( mRegion, SIGNAL( destroyed( QObject * ) ), this, SLOT( regionClosed() ) );
@@ -709,7 +709,7 @@
if ( !QgsGrassNewMapset::isRunning() )
{
mNewMapset = new QgsGrassNewMapset( qGisInterface,
- this, qGisInterface->getMainWindow() );
+ this, qGisInterface->mainWindow() );
}
mNewMapset->show();
mNewMapset->raise();
@@ -809,7 +809,7 @@
disconnect( qGisInterface, SIGNAL( currentLayerChanged( QgsMapLayer * ) ),
this, SLOT( setEditAction() ) );
- QWidget* qgis = qGisInterface->getMainWindow();
+ QWidget* qgis = qGisInterface->mainWindow();
disconnect( qgis, SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
disconnect( qgis, SIGNAL( newProject() ), this, SLOT( newProject() ) );
}
Modified: trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -151,7 +151,7 @@
mPlugin = plugin;
mInterface = iface;
- mCanvas = mInterface->getMapCanvas();
+ mCanvas = mInterface->mapCanvas();
restorePosition();
mUpdatingGui = false;
mDisplayed = false;
Modified: trunk/qgis/src/plugins/grass/qgsgrasstools.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrasstools.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grass/qgsgrasstools.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -111,7 +111,7 @@
// setupUi(this);
mIface = iface;
- mCanvas = mIface->getMapCanvas();
+ mCanvas = mIface->mapCanvas();
connect( qApp, SIGNAL( aboutToQuit() ),
this, SLOT( closeTools() ) );
Modified: trunk/qgis/src/plugins/grid_maker/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/grid_maker/plugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/grid_maker/plugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -95,7 +95,7 @@
// Add the icon to the toolbar
qGisInterface->addToolBarIcon( myQActionPointer );
- qGisInterface->addPluginMenu( tr( "&Graticules" ), myQActionPointer );
+ qGisInterface->addPluginToMenu( tr( "&Graticules" ), myQActionPointer );
}
//method defined in interface
@@ -107,7 +107,7 @@
// Slot called when the buffer menu item is activated
void QgsGridMakerPlugin::run()
{
- QgsGridMakerPluginGui *myPluginGui = new QgsGridMakerPluginGui( qGisInterface->getMainWindow(), QgisGui::ModalDialogFlags );
+ QgsGridMakerPluginGui *myPluginGui = new QgsGridMakerPluginGui( qGisInterface->mainWindow(), QgisGui::ModalDialogFlags );
myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
//listen for when the layer has been made so we can draw it
connect( myPluginGui, SIGNAL( drawRasterLayer( QString ) ), this, SLOT( drawRasterLayer( QString ) ) );
Modified: trunk/qgis/src/plugins/interpolation/qgsinterpolationplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/interpolation/qgsinterpolationplugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/interpolation/qgsinterpolationplugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -40,7 +40,7 @@
mInterpolationAction = new QAction( QIcon( ":/interpolator/interpolation.png" ), tr( "&Interpolation" ), 0 );
QObject::connect( mInterpolationAction, SIGNAL( triggered() ), this, SLOT( showInterpolationDialog() ) );
mIface->addToolBarIcon( mInterpolationAction );
- mIface->addPluginMenu( tr( "&Interpolation" ), mInterpolationAction );
+ mIface->addPluginToMenu( tr( "&Interpolation" ), mInterpolationAction );
}
}
Modified: trunk/qgis/src/plugins/north_arrow/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/north_arrow/plugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/north_arrow/plugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -96,12 +96,12 @@
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
//render the arrow each time the map is rendered
- connect( qGisInterface->getMapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderNorthArrow( QPainter * ) ) );
+ connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderNorthArrow( QPainter * ) ) );
//this resets this plugin up if a project is loaded
- connect( qGisInterface->getMainWindow(), SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
+ connect( qGisInterface->mainWindow(), SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
// Add the icon to the toolbar & appropriate menu
qGisInterface->addToolBarIcon( myQActionPointer );
- qGisInterface->addPluginMenu( tr( "&Decorations" ), myQActionPointer );
+ qGisInterface->addPluginToMenu( tr( "&Decorations" ), myQActionPointer );
projectRead();
refreshCanvas();
@@ -127,7 +127,7 @@
// Slot called when the buffer menu item is activated
void QgsNorthArrowPlugin::run()
{
- QgsNorthArrowPluginGui *myPluginGui = new QgsNorthArrowPluginGui( qGisInterface->getMainWindow(), QgisGui::ModalDialogFlags );
+ QgsNorthArrowPluginGui *myPluginGui = new QgsNorthArrowPluginGui( qGisInterface->mainWindow(), QgisGui::ModalDialogFlags );
myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
//overides function by the same name created in .ui
myPluginGui->setRotation( mRotationInt );
@@ -148,7 +148,7 @@
//! Refresh the map display using the mapcanvas exported via the plugin interface
void QgsNorthArrowPlugin::refreshCanvas()
{
- qGisInterface->getMapCanvas()->refresh();
+ qGisInterface->mapCanvas()->refresh();
}
void QgsNorthArrowPlugin::renderNorthArrow( QPainter * theQPainter )
@@ -254,7 +254,7 @@
qGisInterface->removePluginMenu( tr( "&Decorations" ), myQActionPointer );
qGisInterface->removeToolBarIcon( myQActionPointer );
// remove the northarrow from the canvas
- disconnect( qGisInterface->getMapCanvas(), SIGNAL( renderComplete( QPainter * ) ),
+ disconnect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ),
this, SLOT( renderNorthArrow( QPainter * ) ) );
refreshCanvas();
@@ -291,7 +291,7 @@
bool QgsNorthArrowPlugin::calculateNorthDirection()
{
- QgsMapCanvas& mapCanvas = *( qGisInterface->getMapCanvas() );
+ QgsMapCanvas& mapCanvas = *( qGisInterface->mapCanvas() );
bool goodDirn = false;
Modified: trunk/qgis/src/plugins/ogr_converter/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/ogr_converter/plugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/ogr_converter/plugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -64,7 +64,7 @@
// Add the icon to the toolbar
mQGisIface->addToolBarIcon( mQActionPointer );
- mQGisIface->addPluginMenu( tr( "OG&R Converter" ), mQActionPointer );
+ mQGisIface->addPluginToMenu( tr( "OG&R Converter" ), mQActionPointer );
}
//method defined in interface
@@ -77,7 +77,7 @@
{
assert( 0 != mQGisIface );
- Dialog* ogrDialog = new Dialog( mQGisIface->getMainWindow(), QgisGui::ModalDialogFlags );
+ Dialog* ogrDialog = new Dialog( mQGisIface->mainWindow(), QgisGui::ModalDialogFlags );
ogrDialog->setAttribute( Qt::WA_DeleteOnClose );
ogrDialog->show();
}
Modified: trunk/qgis/src/plugins/plugin_template/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/plugin_template/plugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/plugin_template/plugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -77,7 +77,7 @@
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// Add the icon to the toolbar
mQGisIface->addToolBarIcon( mQActionPointer );
- mQGisIface->addPluginMenu( tr( "&[menuname]" ), mQActionPointer );
+ mQGisIface->addPluginToMenu( tr( "&[menuname]" ), mQActionPointer );
}
//method defined in interface
@@ -92,7 +92,7 @@
// not be enough
void [pluginname]::run()
{
- [pluginname]Gui *myPluginGui = new [pluginname]Gui( mQGisIface->getMainWindow(), QgisGui::ModalDialogFlags );
+ [pluginname]Gui *myPluginGui = new [pluginname]Gui( mQGisIface->mainWindow(), QgisGui::ModalDialogFlags );
myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
myPluginGui->show();
Modified: trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -56,7 +56,7 @@
QgisPlugin( sName, sDescription, sPluginVersion, sPluginType ),
mQGisIface( theQgisInterface )
{
- mpMapCanvas = mQGisIface->getMapCanvas();
+ mpMapCanvas = mQGisIface->mapCanvas();
}
QuickPrintPlugin::~QuickPrintPlugin()
@@ -79,7 +79,7 @@
connect( mQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
// Add the icon to the toolbar
mQGisIface->addToolBarIcon( mQActionPointer );
- mQGisIface->addPluginMenu( tr( "&Quick Print" ), mQActionPointer );
+ mQGisIface->addPluginToMenu( tr( "&Quick Print" ), mQActionPointer );
}
//method defined in interface
@@ -96,7 +96,7 @@
{
QuickPrintGui *mypPluginGui = new QuickPrintGui(
mpMapCanvas,
- mQGisIface->getMainWindow(),
+ mQGisIface->mainWindow(),
QgisGui::ModalDialogFlags );
mypPluginGui->setAttribute( Qt::WA_DeleteOnClose );
mypPluginGui->exec(); //gui will decide when to call print
Modified: trunk/qgis/src/plugins/scale_bar/plugin.cpp
===================================================================
--- trunk/qgis/src/plugins/scale_bar/plugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/scale_bar/plugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -102,12 +102,12 @@
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
//render the scale bar each time the map is rendered
- connect( qGisInterface->getMapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderScaleBar( QPainter * ) ) );
+ connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderScaleBar( QPainter * ) ) );
//this resets this plugin up if a project is loaded
- connect( qGisInterface->getMainWindow(), SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
+ connect( qGisInterface->mainWindow(), SIGNAL( projectRead() ), this, SLOT( projectRead() ) );
// Add the icon to the toolbar
qGisInterface->addToolBarIcon( myQActionPointer );
- qGisInterface->addPluginMenu( tr( "&Decorations" ), myQActionPointer );
+ qGisInterface->addPluginToMenu( tr( "&Decorations" ), myQActionPointer );
}
void QgsScaleBarPlugin::projectRead()
@@ -134,7 +134,7 @@
// Slot called when the menu item is activated
void QgsScaleBarPlugin::run()
{
- QgsScaleBarPluginGui *myPluginGui = new QgsScaleBarPluginGui( qGisInterface->getMainWindow(), QgisGui::ModalDialogFlags );
+ QgsScaleBarPluginGui *myPluginGui = new QgsScaleBarPluginGui( qGisInterface->mainWindow(), QgisGui::ModalDialogFlags );
myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
myPluginGui->setPreferredSize( mPreferredSize );
myPluginGui->setSnapping( mSnapping );
@@ -154,7 +154,7 @@
connect( myPluginGui, SIGNAL( refreshCanvas() ), this, SLOT( refreshCanvas() ) );
myPluginGui->show();
//set the map units in the spin box
- int myUnits = qGisInterface->getMapCanvas()->mapUnits();
+ int myUnits = qGisInterface->mapCanvas()->mapUnits();
switch ( myUnits )
{
case 0: myPluginGui->getSpinSize()->setSuffix( tr( " metres/km" ) ); break;
@@ -168,7 +168,7 @@
void QgsScaleBarPlugin::refreshCanvas()
{
- qGisInterface->getMapCanvas()->refresh();
+ qGisInterface->mapCanvas()->refresh();
}
@@ -185,10 +185,10 @@
//Get map units per pixel. This can be negative at times (to do with
//projections) and that just confuses the rest of the code in this
//function, so force to a positive number.
- double myMapUnitsPerPixelDouble = std::abs( qGisInterface->getMapCanvas()->mapUnitsPerPixel() );
+ double myMapUnitsPerPixelDouble = std::abs( qGisInterface->mapCanvas()->mapUnitsPerPixel() );
// Exit if the canvas width is 0 or layercount is 0 or QGIS will freeze
- int myLayerCount = qGisInterface->getMapCanvas()->layerCount();
+ int myLayerCount = qGisInterface->mapCanvas()->layerCount();
if ( !myLayerCount || !myCanvasWidth || !myMapUnitsPerPixelDouble ) return;
//Large if statement which determines whether to render the scale bar
@@ -230,7 +230,7 @@
}
//Get type of map units and set scale bar unit label text
- QGis::units myMapUnits = qGisInterface->getMapCanvas()->mapUnits();
+ QGis::units myMapUnits = qGisInterface->mapCanvas()->mapUnits();
QString myScaleBarUnitLabel;
switch ( myMapUnits )
{
@@ -540,7 +540,7 @@
qGisInterface->removeToolBarIcon( myQActionPointer );
// remove the northarrow from the canvas
- disconnect( qGisInterface->getMapCanvas(), SIGNAL( renderComplete( QPainter * ) ),
+ disconnect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ),
this, SLOT( renderScaleBar( QPainter * ) ) );
refreshCanvas();
Modified: trunk/qgis/src/plugins/spit/qgsspitplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/spit/qgsspitplugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/spit/qgsspitplugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -49,7 +49,7 @@
*/
QgsSpitPlugin::QgsSpitPlugin( QgisInterface * _qI )
: QgisPlugin( name_, description_, version_, type_ ),
- qgisMainWindow( _qI->getMainWindow() ),
+ qgisMainWindow( _qI->mainWindow() ),
qI( _qI )
{
}
@@ -72,7 +72,7 @@
connect( spitAction, SIGNAL( triggered() ), this, SLOT( spit() ) );
// Add the icon to the toolbar and to the plugin menu
qI->addToolBarIcon( spitAction );
- qI->addPluginMenu( tr( "&Spit" ), spitAction );
+ qI->addPluginToMenu( tr( "&Spit" ), spitAction );
}
Modified: trunk/qgis/src/plugins/wfs/qgswfsplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfsplugin.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/wfs/qgswfsplugin.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -49,7 +49,7 @@
mWfsDialogAction = new QAction( QIcon( ":/mIconAddWfsLayer.png" ), tr( "&Add WFS layer" ), 0 );
QObject::connect( mWfsDialogAction, SIGNAL( triggered() ), this, SLOT( showSourceDialog() ) );
mIface->fileToolBar()->addAction( mWfsDialogAction );
- mIface->addPluginMenu( tr( "&Add WFS layer" ), mWfsDialogAction );
+ mIface->addPluginToMenu( tr( "&Add WFS layer" ), mWfsDialogAction );
}
}
Modified: trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp 2008-08-31 15:50:23 UTC (rev 9230)
+++ trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp 2008-08-31 16:56:09 UTC (rev 9231)
@@ -355,7 +355,7 @@
QString crsString;
if ( mProjectionSelector )
{
- long epsgNr = mProjectionSelector->getSelectedEpsg();
+ long epsgNr = mProjectionSelector->selectedEpsg();
if ( epsgNr != 0 )
{
crsString = "&SRSNAME=EPSG:" + QString::number( epsgNr );
@@ -373,7 +373,7 @@
{
if ( mProjectionSelector->exec() )
{
- QString crsString = "EPSG: " + QString::number( mProjectionSelector->getSelectedEpsg() );
+ QString crsString = "EPSG: " + QString::number( mProjectionSelector->selectedEpsg() );
labelCoordRefSys->setText( crsString );
}
}
@@ -407,7 +407,7 @@
if ( preferredCRS != -1 )
{
QgsCoordinateReferenceSystem refSys( preferredCRS );
- mProjectionSelector->setSelectedCRSID( refSys.srsid() );
+ mProjectionSelector->setSelectedCrsId( refSys.srsid() );
labelCoordRefSys->setText( "EPSG: " + QString::number( preferredCRS ) );
}
More information about the QGIS-commit
mailing list