Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:qgis/Quantum-GIS
  • Loading branch information
timlinux committed Sep 24, 2011
2 parents 93a190a + a0f8294 commit 6024192
Show file tree
Hide file tree
Showing 45 changed files with 3,464 additions and 1,315 deletions.
3 changes: 2 additions & 1 deletion debian/changelog
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion debian/watch
@@ -1,2 +1,2 @@
version=3
http://download.osgeo.org/qgis/src/qgis_(.*).tar.gz
http://qgis.org/downloads/qgis-(.*).tar.bz2
2,582 changes: 1,544 additions & 1,038 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions i18n/qgis_it.ts
Expand Up @@ -12842,12 +12842,12 @@ Should the existing classes be deleted before classification?</source>
<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"/>
Expand Down Expand Up @@ -20394,7 +20394,7 @@ Può essere o un problema della propria connessione di rete o sul lato del serve
<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"/>
Expand Down Expand Up @@ -22616,7 +22616,7 @@ Può essere o un problema della propria connessione di rete o sul lato del serve
<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"/>
Expand Down
1 change: 1 addition & 0 deletions python/core/core.sip
Expand Up @@ -84,6 +84,7 @@
%Include qgsvectordataprovider.sip
%Include qgsvectorfilewriter.sip
%Include qgsvectorlayer.sip
%Include qgsvectorlayerimport.sip
%Include qgsvectoroverlay.sip

%Include qgsnetworkaccessmanager.sip
Expand Down
2 changes: 0 additions & 2 deletions python/core/qgsproviderregistry.sip
Expand Up @@ -60,8 +60,6 @@ class QgsProviderRegistry
* @note this method was added in QGIS 1.1
*/
virtual QString protocolDrivers() const;



private:

Expand Down
65 changes: 65 additions & 0 deletions python/core/qgsvectorlayerimport.sip
@@ -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();
};

3 changes: 3 additions & 0 deletions python/plugins/GdalTools/tools/widgetBuildVRT.ui
Expand Up @@ -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>
Expand Down
11 changes: 7 additions & 4 deletions python/plugins/GdalTools/tools/widgetClipper.ui
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
13 changes: 8 additions & 5 deletions python/plugins/GdalTools/tools/widgetGrid.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>777</width>
<height>342</height>
<height>348</height>
</rect>
</property>
<property name="sizePolicy">
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions python/plugins/GdalTools/tools/widgetMerge.ui
Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions python/plugins/GdalTools/tools/widgetProximity.ui
Expand Up @@ -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>
Expand Down
20 changes: 8 additions & 12 deletions python/plugins/osm/OsmAddRelationDlg.py
Expand Up @@ -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
Expand Down Expand Up @@ -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)
9 changes: 3 additions & 6 deletions python/plugins/osm/OsmDownloadDlg.py
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)



16 changes: 7 additions & 9 deletions python/plugins/osm/OsmFeatureDW.py
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"))
7 changes: 3 additions & 4 deletions python/plugins/osm/OsmImportDlg.py
Expand Up @@ -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 = { }
Expand Down Expand Up @@ -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()


Expand Down Expand Up @@ -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.