Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:qgis/Quantum-GIS

  • Loading branch information
timlinux committed Sep 24, 2011
2 parents 93a190a + a0f8294 commit 602419242ed16af6c9b22af803105280f7ff4ffa
Showing with 3,464 additions and 1,315 deletions.
  1. +2 −1 debian/changelog
  2. +1 −1 debian/watch
  3. +1,544 −1,038 i18n/qgis_de.ts
  4. +4 −4 i18n/qgis_it.ts
  5. +1 −0 python/core/core.sip
  6. +0 −2 python/core/qgsproviderregistry.sip
  7. +65 −0 python/core/qgsvectorlayerimport.sip
  8. +3 −0 python/plugins/GdalTools/tools/widgetBuildVRT.ui
  9. +7 −4 python/plugins/GdalTools/tools/widgetClipper.ui
  10. +8 −5 python/plugins/GdalTools/tools/widgetGrid.ui
  11. +3 −0 python/plugins/GdalTools/tools/widgetMerge.ui
  12. +3 −0 python/plugins/GdalTools/tools/widgetProximity.ui
  13. +8 −12 python/plugins/osm/OsmAddRelationDlg.py
  14. +3 −6 python/plugins/osm/OsmDownloadDlg.py
  15. +7 −9 python/plugins/osm/OsmFeatureDW.py
  16. +3 −4 python/plugins/osm/OsmImportDlg.py
  17. +11 −13 python/plugins/osm/OsmLoadDlg.py
  18. +31 −28 python/plugins/osm/OsmPlugin.py
  19. +1 −4 python/plugins/osm/OsmSaveDlg.py
  20. +0 −2 python/plugins/osm/OsmUndoRedoDW.py
  21. +17 −17 python/plugins/osm/OsmUploadDlg.py
  22. +1 −1 src/app/qgisapp.cpp
  23. +12 −0 src/app/qgscustomization.cpp
  24. +21 −0 src/app/qgsmergeattributesdialog.cpp
  25. +2 −0 src/app/qgsmergeattributesdialog.h
  26. +2 −0 src/core/CMakeLists.txt
  27. +11 −1 src/core/composer/qgscomposermap.cpp
  28. +2 −1 src/core/qgsproviderregistry.cpp
  29. +3 −2 src/core/qgsproviderregistry.h
  30. +2 −0 src/core/qgsvectorfilewriter.h
  31. +324 −0 src/core/qgsvectorlayerimport.cpp
  32. +104 −0 src/core/qgsvectorlayerimport.h
  33. +14 −5 src/core/symbology-ng/qgsellipsesymbollayerv2.cpp
  34. +1 −1 src/plugins/grass/modules-6.3/default.qgc
  35. +1 −1 src/plugins/grass/modules-6.4/default.qgc
  36. +0 −1 src/plugins/grass/modules-common/v.generalize.qgm
  37. +131 −2 src/providers/ogr/qgsogrprovider.cpp
  38. +18 −1 src/providers/ogr/qgsogrprovider.h
  39. +410 −4 src/providers/postgres/qgspostgresprovider.cpp
  40. +28 −2 src/providers/postgres/qgspostgresprovider.h
  41. +413 −28 src/providers/spatialite/qgsspatialiteprovider.cpp
  42. +44 −2 src/providers/spatialite/qgsspatialiteprovider.h
  43. +194 −112 src/providers/wms/qgswmsprovider.cpp
  44. +3 −0 src/providers/wms/qgswmsprovider.h
  45. +1 −1 src/ui/qgsattributetabledialog.ui
@@ -6,8 +6,9 @@ qgis (1.8.0) UNRELEASED; urgency=low
* migrate unstable package to dh_python2
* add ubuntu oneiric
* include internal pyspatialite in python-qgis
* update watch

-- Jürgen E. Fischer <jef@norbit.de> Thu, 01 Sep 2011 23:20:25 +0200
-- Jürgen E. Fischer <jef@norbit.de> Wed, 07 Sep 2011 22:23:41 +0200

qgis (1.7.0) UNRELEASED; urgency=low

@@ -1,2 +1,2 @@
version=3
http://download.osgeo.org/qgis/src/qgis_(.*).tar.gz
http://qgis.org/downloads/qgis-(.*).tar.bz2

Large diffs are not rendered by default.

<message>
<location filename="../src/ui/qgscomposermapwidgetbase.ui" line="443"/>
<source>Annotation position</source>
<translation>Posizione dell&apos;annotazione</translation>
<translation>Posizione delle coordinate</translation>
</message>
<message>
<location filename="../src/ui/qgscomposermapwidgetbase.ui" line="462"/>
<source>Annotation direction</source>
<translation>Direzione dell&apos;annotazione</translation>
<translation>Direzione delle coordinate</translation>
</message>
<message>
<location filename="../src/ui/qgscomposermapwidgetbase.ui" line="596"/>
<location filename="../src/plugins/interpolation/qgsinterpolationdialog.cpp" line="165"/>
<location filename="../src/plugins/interpolation/qgsinterpolationdialog.cpp" line="275"/>
<source>Break lines</source>
<translation>Spezza linee</translation>
<translation>Linee di interruzione</translation>
</message>
<message>
<location filename="../src/plugins/interpolation/qgsinterpolationdialog.cpp" line="169"/>
<message>
<location filename="../python/plugins/mapserver_export/qgsmapserverexportbase.ui" line="24"/>
<source>Use current project</source>
<translation>Usa proiezione corrente</translation>
<translation>Usa progetto corrente</translation>
</message>
<message>
<location filename="../python/plugins/mapserver_export/qgsmapserverexportbase.ui" line="87"/>
@@ -84,6 +84,7 @@
%Include qgsvectordataprovider.sip
%Include qgsvectorfilewriter.sip
%Include qgsvectorlayer.sip
%Include qgsvectorlayerimport.sip
%Include qgsvectoroverlay.sip

%Include qgsnetworkaccessmanager.sip
@@ -60,8 +60,6 @@ class QgsProviderRegistry
* @note this method was added in QGIS 1.1
*/
virtual QString protocolDrivers() const;



private:

@@ -0,0 +1,65 @@

/**
There are two possibilities how to use this class:
1. static call to QgsVectorLayerImport::importLayer(...) which saves the whole vector layer
2. create an instance of the class and issue calls to addFeature(...)
*/
class QgsVectorLayerImport
{
%TypeHeaderCode
#include <qgsvectorlayerimport.h>
#include <qgsfield.h>
%End

public:

enum ImportError
{
NoError = 0,
ErrDriverNotFound,
ErrCreateDataSource,
ErrCreateLayer,
ErrAttributeTypeUnsupported,
ErrAttributeCreationFailed,
ErrProjection,
ErrFeatureWriteFailed,
ErrInvalidLayer,
ErrInvalidProvider,
ErrProviderUnsupportedFeature,
ErrConnectionFailed
};

/** Write contents of vector layer to a different datasource */
static ImportError importLayer( QgsVectorLayer* layer,
const QString& uri,
const QString& providerKey,
const QgsCoordinateReferenceSystem *destCRS,
bool onlySelected = FALSE,
QString *errorMessage /Out/ = 0,
bool skipAttributeCreation = FALSE,
QMap<QString, QVariant> *options = 0
);

/** create a empty layer and add fields to it */
QgsVectorLayerImport( const QString &uri,
const QString &provider,
const QgsFieldMap& fields,
QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem* crs,
bool overwrite = false,
const QMap<QString, QVariant> *options = 0
);

/** checks whether there were any errors */
ImportError hasError();

/** retrieves error message */
QString errorMessage();

/** add feature to the new created layer */
bool addFeature( QgsFeature& feature );

/** close the new created layer */
~QgsVectorLayerImport();
};

@@ -103,6 +103,9 @@
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="srcNoDataSpin">
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>65000</number>
</property>
@@ -41,6 +41,9 @@
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="noDataSpin">
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>65000</number>
</property>
@@ -148,15 +151,15 @@
</widget>
<customwidgets>
<customwidget>
<class>GdalToolsExtentSelector</class>
<class>GdalToolsInOutSelector</class>
<extends>QWidget</extends>
<header>extentSelector</header>
<header>inOutSelector</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GdalToolsInOutSelector</class>
<class>GdalToolsExtentSelector</class>
<extends>QWidget</extends>
<header>inOutSelector</header>
<header>extentSelector</header>
<container>1</container>
</customwidget>
</customwidgets>
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>777</width>
<height>342</height>
<height>348</height>
</rect>
</property>
<property name="sizePolicy">
@@ -289,6 +289,9 @@
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>65000.000000000000000</double>
</property>
@@ -817,15 +820,15 @@
</widget>
<customwidgets>
<customwidget>
<class>GdalToolsExtentSelector</class>
<class>GdalToolsInOutSelector</class>
<extends>QWidget</extends>
<header>extentSelector</header>
<header>inOutSelector</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GdalToolsInOutSelector</class>
<class>GdalToolsExtentSelector</class>
<extends>QWidget</extends>
<header>inOutSelector</header>
<header>extentSelector</header>
<container>1</container>
</customwidget>
</customwidgets>
@@ -51,6 +51,9 @@
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="noDataSpin">
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>65000</number>
</property>
@@ -96,6 +96,9 @@
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="noDataSpin">
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>65000</number>
</property>
@@ -61,8 +61,8 @@ def __init__(self, plugin, newRelationFirstMember=None, relationToEdit=None):
# we are editing existing relation
self.editing = True
self.relId = relationToEdit
self.createRelButton.setText("Save")
self.setWindowTitle("Edit OSM relation")
self.createRelButton.setText( self.tr("Save") )
self.setWindowTitle( self.tr("Edit OSM relation") )
else:
self.editing = False
# we are adding new relation
@@ -790,18 +790,14 @@ def __showTypeInfo(self):
info = ""

if typeName=="boundary":
info = "for grouping boundaries and marking enclaves / exclaves"
info = QCoreApplication.translate( "OsmAddRelationDlg", "for grouping boundaries and marking enclaves / exclaves" )
elif typeName=="multipolygon":
info = "to put holes into areas (might have to be renamed, see article)"
info = QCoreApplication.translate( "OsmAddRelationDlg", "to put holes into areas (might have to be renamed, see article)" )
elif typeName=="restriction":
info = "any kind of turn restriction"
info = QCoreApplication.translate( "OsmAddRelationDlg", "any kind of turn restriction" )
elif typeName=="route":
info = "like bus routes, cycle routes and numbered highways"
info = QCoreApplication.translate( "OsmAddRelationDlg", "like bus routes, cycle routes and numbered highways" )
elif typeName=="enforcement":
info = "traffic enforcement devices; speed cameras, redlight cameras, weight checks, ..."

QMessageBox.information(self, self.tr("OSM Information")
,self.tr(info))


info = QCoreApplication.translate( "OsmAddRelationDlg", "traffic enforcement devices; speed cameras, redlight cameras, weight checks, ..." )

QMessageBox.information(self, self.tr("OSM Information"), info)
@@ -262,7 +262,7 @@ def httpDone(self,error):
# and tell user (if the download wasn't cancelled by user)
if self.errMessage != "__cancel__":
if self.errMessage==None:
self.errMessage="Check your internet connection"
self.errMessage=QCoreApplication.translate( "OsmDownloadDlg", "Check your internet connection" )
QMessageBox.information(self, self.tr("OSM Download Error")
,self.tr("Download failed: %1.").arg(self.errMessage))
return
@@ -302,7 +302,7 @@ def showChooseDirectoryDialog(self):
"""

# display file open dialog and get absolute path to selected directory
fileSelected = QFileDialog.getSaveFileName(self, "Choose file to save","download.osm", "OSM Files (*.osm)");
fileSelected = QFileDialog.getSaveFileName(self, self.tr("Choose file to save"),"download.osm", self.tr("OSM Files (*.osm)") );
# insert selected directory path into line edit control
if not fileSelected.isNull():
self.destdirLineEdit.setText(fileSelected)
@@ -339,7 +339,7 @@ def autoLoadClicked(self):

def showExtentHelp(self):
"""Function is called after clicking on Help button.
It shows basic information on downloading.
It shows basic information on downloading.
"""

mb=QMessageBox()
@@ -464,6 +464,3 @@ def disconnectDlgSignals(self):
self.disconnect(self.downloadButton, SIGNAL("clicked()"), self.downloadFile)
self.disconnect(self.choosedirButton, SIGNAL("clicked()"), self.showChooseDirectoryDialog)
self.disconnect(self.autoLoadCheckBox, SIGNAL("clicked()"), self.autoLoadClicked)



@@ -622,7 +622,7 @@ def __startMovingFeature(self):

# clear dockwidget
self.clear()
self.plugin.iface.mainWindow().statusBar().showMessage("Snapping ON. Hold Ctrl to disable it.")
self.plugin.iface.mainWindow().statusBar().showMessage(self.tr("Snapping ON. Hold Ctrl to disable it."))

self.mapTool=OsmMoveMT(self.plugin)
self.plugin.canvas.setMapTool(self.mapTool)
@@ -639,7 +639,7 @@ def __startPointCreation(self):
if self.activeEditButton==self.createPointButton:
return

self.plugin.iface.mainWindow().statusBar().showMessage("Snapping ON. Hold Ctrl to disable it.")
self.plugin.iface.mainWindow().statusBar().showMessage(self.tr("Snapping ON. Hold Ctrl to disable it."))

self.mapTool=OsmCreatePointMT(self.plugin)
self.plugin.canvas.setMapTool(self.mapTool)
@@ -656,7 +656,7 @@ def __startLineCreation(self):
if self.activeEditButton==self.createLineButton:
return

self.plugin.iface.mainWindow().statusBar().showMessage("Snapping ON. Hold Ctrl to disable it.")
self.plugin.iface.mainWindow().statusBar().showMessage(self.tr("Snapping ON. Hold Ctrl to disable it."))

self.mapTool=OsmCreateLineMT(self.plugin)
self.plugin.canvas.setMapTool(self.mapTool)
@@ -673,7 +673,7 @@ def __startPolygonCreation(self):
if self.activeEditButton==self.createPolygonButton:
return

self.plugin.iface.mainWindow().statusBar().showMessage("Snapping ON. Hold Ctrl to disable it.")
self.plugin.iface.mainWindow().statusBar().showMessage(self.tr("Snapping ON. Hold Ctrl to disable it."))

self.mapTool=OsmCreatePolygonMT(self.plugin)
self.plugin.canvas.setMapTool(self.mapTool)
@@ -770,7 +770,7 @@ def removeSelectedTags(self):
elif self.featureType=='Relation':
self.plugin.dbm.changeRelationStatus(self.feature.id(),'N','U')

# perform tag removing
# perform tag removing
self.plugin.dbm.removeTag(self.feature.id(),self.featureType,key.toAscii().data())

self.tagTable.removeRow(ix)
@@ -1254,9 +1254,7 @@ def __urDetailsChecked(self):

if self.urDetailsButton.isChecked():
self.plugin.undoredo.show()
self.urDetailsButton.setToolTip("Hide OSM Edit History")
self.urDetailsButton.setToolTip(self.tr("Hide OSM Edit History"))
else:
self.plugin.undoredo.hide()
self.urDetailsButton.setToolTip("Show OSM Edit History")


self.urDetailsButton.setToolTip(self.tr("Show OSM Edit History"))
@@ -101,10 +101,10 @@ def onOK(self):

layer = QgsMapLayerRegistry.instance().mapLayer(layerId)
if layer is None:
QMessageBox.warning(self, "Layer doesn't exist", "The selected layer doesn't exist anymore!")
QMessageBox.warning(self, self.tr("Layer doesn't exist"), self.tr("The selected layer doesn't exist anymore!"))
return

self.progress = QProgressDialog("Importing features...", "Cancel", 0, 100, self)
self.progress = QProgressDialog(self.tr("Importing features..."), self.tr("Cancel"), 0, 100, self)
self.progress.setWindowModality(Qt.WindowModal)

self.nodes = { }
@@ -135,7 +135,7 @@ def onOK(self):
self.dbm.recacheAffectedNow(self.affected)
self.plugin.canvas.refresh()

QMessageBox.information(self, "Import", "Import has been completed.")
QMessageBox.information(self, self.tr("Import"), self.tr("Import has been completed."))
self.accept()


@@ -249,4 +249,3 @@ def extractPolygon(self, polygon):
dp = dummyPoint(p[0])
self.nodes[dp] = dummyFeat(nodeId)
nodeId -= 1

0 comments on commit 6024192

Please sign in to comment.
You can’t perform that action at this time.