139 changes: 96 additions & 43 deletions python/plugins/fTools/tools/doGeoprocessing.py

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions python/plugins/fTools/tools/doRandPoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def __init__(self, iface):

def populateLayers( self ):
layers = ftools_utils.getLayerNames([QGis.Polygon, "Raster"])
QObject.disconnect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.update)
self.inShape.blockSignals(True)
self.inShape.clear()
self.inShape.blockSignals(False)
self.inShape.addItems(layers)
QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.update)

# If input layer is changed, update field list
# If input layer is changed, update field list
def update(self, inputLayer):
self.cmbField.clear()
changedLayer = ftools_utils.getMapLayerByName(unicode(inputLayer))
Expand All @@ -67,6 +67,7 @@ def update(self, inputLayer):
changedLayer = ftools_utils.getVectorLayerByName(inputLayer)
changedFields = ftools_utils.getFieldList(changedLayer)
for i in changedFields:
if changedFields[i].typeName() == "Integer":
self.cmbField.addItem(unicode(changedFields[i].name()))
else:
self.rdoUnstratified.setChecked(True)
Expand All @@ -78,7 +79,7 @@ def update(self, inputLayer):
self.cmbField.setEnabled(False)
self.label_4.setEnabled(False)

# when 'OK' button is pressed, gather required inputs, and initiate random points generation
# when 'OK' button is pressed, gather required inputs, and initiate random points generation
def accept(self):
self.buttonOk.setEnabled( False )
if self.inShape.currentText() == "":
Expand All @@ -99,7 +100,7 @@ def accept(self):
self.progressBar.setValue(5)
mLayer = ftools_utils.getMapLayerByName(unicode(inName))
if mLayer.type() == mLayer.VectorLayer:
inLayer = QgsVectorLayer(unicode(mLayer.source()), unicode(mLayer.name()), unicode(mLayer.dataProvider().name()))
inLayer = ftools_utils.getVectorLayerByName(unicode(inName))
if self.rdoUnstratified.isChecked():
design = self.tr("unstratified")
value = self.spnUnstratified.value()
Expand All @@ -113,7 +114,7 @@ def accept(self):
design = self.tr("field")
value = unicode(self.cmbField.currentText())
elif mLayer.type() == mLayer.RasterLayer:
inLayer = QgsRasterLayer(unicode(mLayer.source()), unicode(mLayer.name()))
inLayer = ftools_utils.getRasterLayerByName(unicode(inName))
design = self.tr("unstratified")
value = self.spnUnstratified.value()
else:
Expand Down
76 changes: 49 additions & 27 deletions python/plugins/fTools/tools/doValidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@ def __createMarker(self, point):
self.__marker.setIconType(gui.QgsVertexMarker.ICON_X)
self.__marker.setPenWidth(3)

def setGeom(self, x, y):
def setGeom(self, p):
if not self.__marker is None:
self.reset()
point = QgsPoint(x, y)
if self.__marker is None:
self.__createMarker(point)
self.__createMarker(p)
else:
self.__marker.setCenter(point)
self.__marker.setCenter(p)

def reset(self):
if not self.__marker is None:
Expand Down Expand Up @@ -93,6 +92,15 @@ def __init__(self, iface):
self.storedScale = self.iface.mapCanvas().scale()
# create marker for error
self.marker = MarkerErrorGeometry(self.iface.mapCanvas())

settings = QSettings()
self.restoreGeometry( settings.value("/fTools/ValidateDialog/geometry").toByteArray() )

def closeEvent(self, e):
settings = QSettings()
settings.setValue( "/fTools/ValidateDialog/geometry", QVariant(self.saveGeometry()) )
QMainWindow.closeEvent(self, e)
del self.marker

def keyPressEvent( self, e ):
if ( e.modifiers() == Qt.ControlModifier or \
Expand All @@ -115,34 +123,50 @@ def accept( self ):
elif self.cmbField.isVisible() and self.cmbField.currentText() == "":
QMessageBox.information( self, self.tr("Error!"), self.tr( "Please specify input field" ) )
else:
self.validate( self.inShape.currentText(), self.useSelected.checkState() )
self.vlayer = ftools_utils.getVectorLayerByName( self.inShape.currentText() )
self.validate( self.useSelected.checkState() )

def zoomToError(self, curr, prev):
if curr is None:
return
row = curr.row() # if we clicked in the first column, we want the second
item = self.tblUnique.item(row, 1)
if not item.data(Qt.UserRole) is None:
mc = self.iface.mapCanvas()
x = item.data(Qt.UserRole).toPyObject().x()
y = item.data(Qt.UserRole).toPyObject().y()
self.marker.setGeom(x, y) # Set Marker
mc.zoomToPreviousExtent()
scale = mc.scale()
rect = QgsRectangle(float(x)-(4.0/scale),float(y)-(4.0/scale),
float(x)+(4.0/scale),float(y)+(4.0/scale))
# Set the extent to our new rectangle
mc.setExtent(rect)
# Refresh the map
mc.refresh()

def validate( self, myLayer, mySelection ):
vlayer = ftools_utils.getVectorLayerByName( myLayer )

mc = self.iface.mapCanvas()
mc.zoomToPreviousExtent()

e = item.data(Qt.UserRole).toPyObject()

if type(e)==QgsPoint:
e = mc.mapRenderer().layerToMapCoordinates( self.vlayer, e )

self.marker.setGeom(e)

rect = mc.extent()
rect.expand( 0.25, e )

else:
self.marker.reset()

ft = QgsFeature()
(fid,ok) = self.tblUnique.item(row, 0).text().toInt()
if not ok or not self.vlayer.featureAtId( fid, ft, True):
return

rect = mc.mapRenderer().layerExtentToOutputExtent( self.vlayer, ft.geometry().boundingBox() )
rect.expand(1.05)

# Set the extent to our new rectangle
mc.setExtent(rect)
# Refresh the map
mc.refresh()

def validate( self, mySelection ):
self.tblUnique.clearContents()
self.tblUnique.setRowCount( 0 )
self.lstCount.clear()
self.buttonOk.setEnabled( False )
self.testThread = validateThread( self.iface.mainWindow(), self, vlayer, mySelection )
self.testThread = validateThread( self.iface.mainWindow(), self, self.vlayer, mySelection )
QObject.connect( self.testThread, SIGNAL( "runFinished(PyQt_PyObject)" ), self.runFinishedFromThread )
QObject.connect( self.testThread, SIGNAL( "runStatus(PyQt_PyObject)" ), self.runStatusFromThread )
QObject.connect( self.testThread, SIGNAL( "runRange(PyQt_PyObject)" ), self.runRangeFromThread )
Expand Down Expand Up @@ -176,11 +200,10 @@ def runFinishedFromThread( self, output ):
self.tblUnique.insertRow(count)
fidItem = QTableWidgetItem( str(rec[0]) )
self.tblUnique.setItem( count, 0, fidItem )
if err.hasWhere(): # if there is a location associated with the error
where = err.where()
message = err.what()
errItem = QTableWidgetItem( message )
errItem.setData(Qt.UserRole, QVariant(where))
if err.hasWhere(): # if there is a location associated with the error
errItem.setData(Qt.UserRole, QVariant(err.where()))
self.tblUnique.setItem( count, 1, errItem )
count += 1
self.tblUnique.setHorizontalHeaderLabels( [ self.tr("Feature"), self.tr("Error(s)") ] )
Expand Down Expand Up @@ -211,7 +234,6 @@ def run( self ):
self.running = True
output = self.check_geometry( self.vlayer )
self.emit( SIGNAL( "runFinished(PyQt_PyObject)" ), output )
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), 100 )

def stop(self):
self.running = False
Expand Down Expand Up @@ -240,7 +262,7 @@ def check_geometry( self, vlayer ):
self.emit(SIGNAL("runStatus(PyQt_PyObject)"), nElement)
nElement += 1
# Check Add error
if not (geom.isGeosEmpty() or geom.isGeosValid() ) :
if not geom.isGeosEmpty():
lstErrors.append((feat.id(), list(geom.validateGeometry())))
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nFeat )
return lstErrors
10 changes: 4 additions & 6 deletions python/plugins/fTools/tools/doVectorGrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def accept(self):
self.buttonOk.setEnabled( True )

def compute( self, bound, xOffset, yOffset, polygon ):
crs = self.iface.mapCanvas().mapRenderer().destinationSrs()
crs = ftools_utils.getMapLayerByName(unicode(self.inShape.currentText())).crs()
if not crs.isValid(): crs = None
if polygon:
fields = {0:QgsField("ID", QVariant.Int), 1:QgsField("XMIN", QVariant.Double), 2:QgsField("XMAX", QVariant.Double),
Expand All @@ -163,15 +163,13 @@ def compute( self, bound, xOffset, yOffset, polygon ):
if not QgsVectorFileWriter.deleteShapeFile(self.shapefileName):
return
writer = QgsVectorFileWriter(self.shapefileName, self.encoding, fields, QGis.WKBPolygon, crs)
#writer = QgsVectorFileWriter(outPath, "CP1250", fields, QGis.WKBPolygon, None)
else:
fields = {0:QgsField("ID", QVariant.Int), 1:QgsField("COORD", QVariant.Double)}
check = QFile(self.shapefileName)
if check.exists():
if not QgsVectorFileWriter.deleteShapeFile(self.shapefileName):
return
writer = QgsVectorFileWriter(self.shapefileName, self.encoding, fields, QGis.WKBLineString, crs)
#writer = QgsVectorFileWriter(unicode(outPath), "CP1250", fields, QGis.WKBLineString, None)
outFeat = QgsFeature()
outGeom = QgsGeometry()
idVar = 0
Expand Down Expand Up @@ -279,16 +277,16 @@ def getClosestPixel(self, startVal, targetVal, step, isMin ):
while foundVal is None:
if tmpVal <= targetVal:
if backOneStep:
tmpVal -= step
tmpVal -= step
foundVal = tmpVal
tmpVal += step
else:
backOneStep = isMin
while foundVal is None:
if tmpVal >= targetVal:
if backOneStep:
tmpVal -= step
tmpVal -= step
foundVal = tmpVal
tmpVal += step
return foundVal
return foundVal

145 changes: 68 additions & 77 deletions python/plugins/fTools/tools/frmSpatialJoin.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="3">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="label_3">
Expand All @@ -34,7 +34,7 @@
</item>
</layout>
</item>
<item row="1" column="0" colspan="3">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="label">
Expand All @@ -48,28 +48,24 @@
</item>
</layout>
</item>
<item row="2" column="0" colspan="3">
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Attribute Summary</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0" colspan="7">
<widget class="QRadioButton" name="rdoFirst">
<property name="text">
<string>Take attributes of first located feature</string>
</property>
<property name="checked">
<bool>true</bool>
<item row="2" column="6">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="0" colspan="7">
<widget class="QRadioButton" name="rdoSummary">
<property name="text">
<string>Take summary of intersecting features</string>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="2" column="0">
<spacer>
Expand Down Expand Up @@ -97,23 +93,20 @@
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="chkMin">
<property name="enabled">
<bool>false</bool>
</property>
<item row="1" column="0" colspan="7">
<widget class="QRadioButton" name="rdoSummary">
<property name="text">
<string>Min</string>
<string>Take summary of intersecting features</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QCheckBox" name="chkMax">
<item row="2" column="2">
<widget class="QCheckBox" name="chkMin">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Max</string>
<string>Min</string>
</property>
</widget>
</item>
Expand All @@ -127,19 +120,6 @@
</property>
</widget>
</item>
<item row="2" column="6">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="5">
<widget class="QCheckBox" name="chkMedian">
<property name="enabled">
Expand All @@ -150,10 +130,30 @@
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QCheckBox" name="chkMax">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Max</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="7">
<widget class="QRadioButton" name="rdoFirst">
<property name="text">
<string>Take attributes of first located feature</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="3">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="label_2">
Expand Down Expand Up @@ -182,7 +182,7 @@
</item>
</layout>
</item>
<item row="4" column="0" colspan="3">
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Output table</string>
Expand All @@ -208,41 +208,32 @@
</layout>
</widget>
</item>
<item row="5" column="0" rowspan="3" colspan="3">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>359</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="1">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>24</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="textVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="2" rowspan="2">
<widget class="QDialogButtonBox" name="buttonBox_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property>
</widget>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>24</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="textVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
Expand Down
131 changes: 66 additions & 65 deletions python/plugins/fTools/tools/frmVectorSplit.ui
Original file line number Diff line number Diff line change
@@ -1,105 +1,106 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog" >
<property name="windowModality" >
<widget class="QDialog" name="Dialog">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="geometry" >
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>374</width>
<height>306</height>
<width>378</width>
<height>239</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Vector Split</string>
</property>
<property name="sizeGripEnabled" >
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" colspan="2" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Input vector layer</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QComboBox" name="inShape" />
</item>
<item row="2" column="0" colspan="2" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Unique ID field</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QComboBox" name="inField" />
</item>
<item row="4" column="0" colspan="2" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Output folder</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2" >
<layout class="QHBoxLayout" >
<layout class="QGridLayout" name="gridLayout">
<item row="5" column="0" colspan="2">
<layout class="QHBoxLayout">
<item>
<widget class="QLineEdit" name="outShape" >
<property name="readOnly" >
<widget class="QLineEdit" name="outShape">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolOut" >
<property name="text" >
<widget class="QToolButton" name="toolOut">
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Unique ID field</string>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QComboBox" name="inField"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QComboBox" name="inShape"/>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Output folder</string>
</property>
</spacer>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Input vector layer</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QProgressBar" name="progressBar" >
<property name="value" >
<item row="7" column="0">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>0</number>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="textVisible" >
<property name="textVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QDialogButtonBox" name="buttonBox_2" >
<property name="orientation" >
<item row="7" column="1">
<widget class="QDialogButtonBox" name="buttonBox_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="6" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
Expand All @@ -110,11 +111,11 @@
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>124</x>
<y>355</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>215</x>
<y>290</y>
</hint>
Expand All @@ -126,11 +127,11 @@
<receiver>Dialog</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>50</x>
<y>350</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>132</x>
<y>239</y>
</hint>
Expand Down
10 changes: 10 additions & 0 deletions python/plugins/fTools/tools/ftools_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ def getVectorLayerByName( myName ):
else:
return None

# Return QgsRasterLayer from a layer name ( as string )
def getRasterLayerByName( myName ):
layermap = QgsMapLayerRegistry.instance().mapLayers()
for name, layer in layermap.iteritems():
if layer.type() == QgsMapLayer.RasterLayer and layer.name() == myName:
if layer.isValid():
return layer
else:
return None

# Return QgsMapLayer from a layer name ( as string )
def getMapLayerByName( myName ):
layermap = QgsMapLayerRegistry.instance().mapLayers()
Expand Down
961 changes: 634 additions & 327 deletions resources/customization.xml

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions scripts/addcopyright.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash
# licensecheck -r src

for i in $(<files); do
author=
authordate=
eval $(git log --reverse --pretty="export author='%an' authordate=\"\$(date --date='%ai' +'%%B %Y')\"" $i | head -1)
basename=$(basename $i)
authoryear=${authordate#* }
case $author in
wonder|"Martin Dobias")
authorname="Martin Dobias"
authoremail="wonder.sk at gmail.com"
;;

"Marco Hugentobler"|mhugent)
authorname="Marco Hugentobler"
authoremail="marco dot hugentobler at sourcepole dot ch"
;;

"Pirmin Kalberer")
authorname="Pirmin Kalberer"
authoremail="pka at sourcepole dot ch"
;;

rblazek)
authorname="Radim Blazek"
authoremail="radim dot blazek at gmail dot com"
;;

timlinux)
authorname="Tim Sutton"
authoremail="tim dot linfiniti at com"
;;

*)
echo "Author $author not found."
exit 1
;;
esac

src=$i
if [ -f "$i.nocopyright" ]; then
src=$i.nocopyright
fi

cat - $src >/tmp/new <<EOF
/***************************************************************************
$basename
---------------------
begin : $authordate
copyright : (C) $authoryear by $authorname
email : $authoremail
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
EOF
[ -f $i.nocopyright ] || mv $i $i.nocopyright
cp /tmp/new $i
done
214 changes: 119 additions & 95 deletions scripts/tsstat.pl
Original file line number Diff line number Diff line change
Expand Up @@ -20,113 +20,137 @@

# translator names here as a hash where the key is the lang_country code used for the ts file name
my $translators= {
af => 'Hendrik Bosman',
ar => 'Assem Kamal, Latif Jalil',
bg => 'Захари Савов, Jordan Tzvetkov',
ca_ES => 'Xavi',
cs_CZ => 'Martin Landa, Peter Antolik, Martin Dzurov, Jan Helebrant',
da_DK => 'Henriette Roued',
de => 'Jürgen E. Fischer, Stephan Holl, Otto Dassau, Werner Macho',
es => 'Carlos Dávila, Javier César Aldariz, Gabriela Awad, Edwin Amado, Mayeul Kauffmann',
el_GR => 'Evripidis Argyropoulos, Mike Pegnigiannis, Nikos Ves',
et_EE => 'Veiko Viil',
fa => 'Mola Pahnadayan',
fi => 'Marko Jarvenpaa',
fr => 'Eve Rousseau, Marc Monnerat, Lionel Roubeyrie, Jean Roc Morreale, Benjamin Bohard, Jeremy Garniaux, Yves Jacolin, Benjamin Lerre, Stéphane Morel, Marie Silvestre, Tahir Tamba, Xavier M, Mayeul Kauffmann, Mehdi Semchaoui',
gl_ES => 'Xan Vieiro',
hu => 'Zoltan Siki',
hr_HR => 'Zoran Jankovic',
is => 'Thordur Ivarsson',
id => 'Januar V. Simarmata, I Made Anombawa',
it => 'Paolo Cavallini, Flavio Rigolon, Maurizio Napolitano, Roberto Angeletti, Alessandro Fanna, Michele Beneventi, Marco Braida, Luca Casagrande, Luca Delucchi, Anne Gishla',
ja => 'BABA Yoshihiko, Yoichi Kayama',
ka_GE => 'Shota Murtskhvaladze, George Machitidze',
ko_KR => 'BJ Jang',
lo => 'Anousak Souphavanh',
lv => 'Maris Nartiss, Pēteris Brūns',
lt => 'Kestas M',
nl => 'Richard Duivenvoorde, Raymond Nijssen, Carlo van Rijswijk',
mn => 'Bayarmaa Enkhtur',
pl_PL => 'Robert Szczepanek, Milena Nowotarska, Borys Jurgiel, Mateusz Loskot, Tomasz Paul, Andrzej Swiader ',
pt_BR => 'Arthur Nanni, Christian Ferreira, Leandro Kaut',
pt_PT => 'Giovanni Manghi, Joana Simoes, Duarte Carreira, Alexandre Neto, Pedro Pereira',
ro => 'Lonut Losifescu-Enescu',
ru => 'Artem Popov',
sk => 'Lubos Balazovic',
sl_SI => 'Jože Detečnik, Dejan Gregor',
sv => 'Lars Luthman, Magnus Homann',
sq_AL => '',
th => 'Man Chao',
tr => 'Osman Yilmaz',
uk => 'Сергей Якунин',
vi => 'Bùi Hữu Mạnh',
zh_CN => 'Zhang Jun',
zh_TW => 'Nungyao Lin',
af => 'Hendrik Bosman',
ar => 'Assem Kamal, Latif Jalil',
bg => 'Захари Савов, Jordan Tzvetkov',
ca_ES => 'Xavi',
cs_CZ => 'Martin Landa, Peter Antolik, Martin Dzurov, Jan Helebrant',
da_DK => 'Henriette Roued',
de => 'Jürgen E. Fischer, Stephan Holl, Otto Dassau, Werner Macho',
es => 'Carlos Dávila, Javier César Aldariz, Gabriela Awad, Edwin Amado, Mayeul Kauffmann',
el_GR => 'Evripidis Argyropoulos, Mike Pegnigiannis, Nikos Ves',
et_EE => 'Veiko Viil',
fa => 'Mola Pahnadayan',
fi => 'Marko Jarvenpaa',
fr => 'Eve Rousseau, Marc Monnerat, Lionel Roubeyrie, Jean Roc Morreale, Benjamin Bohard, Jeremy Garniaux, Yves Jacolin, Benjamin Lerre, Stéphane Morel, Marie Silvestre, Tahir Tamba, Xavier M, Mayeul Kauffmann, Mehdi Semchaoui',
gl_ES => 'Xan Vieiro',
hu => 'Zoltan Siki',
hr_HR => 'Zoran Jankovic',
is => 'Thordur Ivarsson',
id => 'Januar V. Simarmata, I Made Anombawa',
it => 'Paolo Cavallini, Flavio Rigolon, Maurizio Napolitano, Roberto Angeletti, Alessandro Fanna, Michele Beneventi, Marco Braida, Luca Casagrande, Luca Delucchi, Anne Gishla',
ja => 'BABA Yoshihiko, Yoichi Kayama',
ka_GE => 'Shota Murtskhvaladze, George Machitidze',
ko_KR => 'BJ Jang',
lo => 'Anousak Souphavanh',
lv => 'Maris Nartiss, Pēteris Brūns',
lt => 'Kestas M',
nl => 'Richard Duivenvoorde, Raymond Nijssen, Carlo van Rijswijk',
mn => 'Bayarmaa Enkhtur',
pl_PL => 'Robert Szczepanek, Milena Nowotarska, Borys Jurgiel, Mateusz Loskot, Tomasz Paul, Andrzej Swiader ',
pt_BR => 'Arthur Nanni, Christian Ferreira, Leandro Kaut',
pt_PT => 'Giovanni Manghi, Joana Simoes, Duarte Carreira, Alexandre Neto, Pedro Pereira',
ro => 'Lonut Losifescu-Enescu',
ru => 'Artem Popov',
sk => 'Lubos Balazovic',
sl_SI => 'Jože Detečnik, Dejan Gregor',
sv => 'Lars Luthman, Magnus Homann',
sq_AL => '',
th => 'Man Chao',
tr => 'Osman Yilmaz',
uk => 'Сергей Якунин',
vi => 'Bùi Hữu Mạnh',
zh_CN => 'Zhang Jun',
zh_TW => 'Nungyao Lin',
};

my $maxn;

for my $i (<i18n/qgis_*.ts>) {
my ($langcode) = $i =~ /i18n\/qgis_(.*).ts/;
my ($langcode) = $i =~ /i18n\/qgis_(.*).ts/;

my $name;
if($langcode =~ /(.*)_(.*)/) {
my $lang = code2language(lc $1);
my $country = code2country(lc $2);
$name = "$lang ($country)";
} else {
$name = code2language(lc $langcode);
}
my $name;
if($langcode =~ /(.*)_(.*)/) {
my $lang = code2language(lc $1);
my $country = code2country(lc $2);
$name = "$lang ($country)";
} else {
$name = code2language(lc $langcode);
}


open F, "lrelease $i|";
open F, "lrelease $i|";

my($translations,$finished,$unfinished,$untranslated);
my($translations,$finished,$unfinished,$untranslated);

while(<F>) {
if(/Generated (\d+) translation\(s\) \((\d+) finished and (\d+) unfinished\)/) {
$translations=$1;
$finished=$2;
$unfinished=$3;
} elsif(/Ignored (\d+) untranslated source text\(s\)/) {
$untranslated=$1;
}
}
while(<F>) {
if(/Generated (\d+) translation\(s\) \((\d+) finished and (\d+) unfinished\)/) {
$translations=$1;
$finished=$2;
$unfinished=$3;
} elsif(/Ignored (\d+) untranslated source text\(s\)/) {
$untranslated=$1;
}
}

close F;
close F;

my $n = $translations+$untranslated;
my $n = $translations+$untranslated;
$maxn = $n unless defined $maxn && $maxn>$n;

push @lang, { code=>$langcode, name=>$name, n=>$n, translations=>$translations, finished=>$finished, unfinished=>$unfinished, untranslated=>$untranslated, percentage=>($n-$untranslated)/$n*100 };
push @lang, { code=>$langcode, name=>$name, n=>$n, translations=>$translations, finished=>$finished, unfinished=>$unfinished, untranslated=>$untranslated, };
}

if ($ARGV[0] eq "site"){
print "<html><body>";
print "<head>";
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>";
print "<style>";
print "body{font-family:sans-serif;}";
print "table {font-size:80%;border-collapse: collapse;}";
print "td {border-left:solid 1px #aaaaaa;border-right:solid 1px #aaaaaa;padding:1px 10px;}";
print ".bartodo{ background-color:red;width:100px;height:20px;}";
print ".bardone{ background-color:green;width:80px;height:20px;font-size:80%;text-align:center;padding-top:4px;height:16px;color:white;}";
print "</style></head>";
print "<table>";
print "<tr><td colspan=\"2\" style=\"width:250px;\">Language</td><td>Count</td><td>Finished</td><td>Unfinished</td><td>Untranslated</td><td>Percentage</td><td>Translators</td></tr>\n";
for my $l (sort { $b->{percentage} <=> $a->{percentage} } @lang) {
print "\n<tr><td><img src=\"flags/", $l->{code}, ".png\">", "</td><td>", $l->{name}, "</td><td>", join("</td><td>", $l->{n}, $l->{finished}, $l->{unfinished}, $l->{untranslated}, sprintf("<div class=\"bartodo\"><div class=\"bardone\" style=\"width:%.1fpx\">%.1f</div></div>", ($l->{percentage}, $l->{percentage})) ), "</td><td>", $translators->{$l->{code}} ,"</tr></tr>";
}
print "</table></body></html>";
foreach my $l (@lang) {
$l->{diff} = $l->{n}-$maxn;
$l->{percentage} = ($l->{finished}+$l->{unfinished})/$maxn*100;
}
else {
print "<style>";
print "table {font-size:80%;}";
print "th {text-align:left; }";
print ".bartodo{ background-color:red;width:100px;height:20px;}";
print ".bardone{ background-color:green;width:80px;height:20px;font-size:80%;text-align:center;padding-top:4px;height:16px;color:white;}";
print "</style>";
print "<table>";
print "<tr><th colspan=\"2\" style=\"width:250px;\">Language</th><th>Finished %</th><th>Translators</th></tr>\n";
for my $l (sort { $b->{percentage} <=> $a->{percentage} } @lang) {
print "\n<tr><td><img src=\"qrc:/images/flags/", $l->{code}, ".png\">", "</td><td>", $l->{name}, "</td><td>", join("</td><td>", sprintf("<div class=\"bartodo\"><div class=\"bardone\" style=\"width:%.1fpx\">%.1f</div></div>", ($l->{percentage}, $l->{percentage})) ), "</td><td>", $translators->{$l->{code}} ,"</tr></tr>";
}
print "</table>";

if ($ARGV[0] eq "site") {
print "<html><body>";
print "<head>";
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>";
print "<style>";
print "body{font-family:sans-serif;}";
print "table {font-size:80%;border-collapse: collapse;}";
print "td {border-left:solid 1px #aaaaaa;border-right:solid 1px #aaaaaa;padding:1px 10px;}";
print ".bartodo{ background-color:red;width:100px;height:20px;}";
print ".bardone{ background-color:green;width:80px;height:20px;font-size:80%;text-align:center;padding-top:4px;height:16px;color:white;}";
print "</style></head>";
print "<table>";
print "<tr><td colspan=\"2\" style=\"width:250px;\">Language</td><td>Count</td><td>Finished</td><td>Unfinished</td><td>Untranslated</td><td>Percentage</td><td>Translators</td></tr>\n";
for my $l (sort { $b->{percentage} <=> $a->{percentage} } @lang) {
printf "\n<tr>"
. '<td><img src="flags/%s.png"></td><td nowrap>%s</td>'
. '<td nowrap>%s</td><td>%d</td><td>%d</td><td>%d</td>'
. '<td><div class="bartodo"><div class="bardone" style="width:%dpx">%.1f</div></div></td>'
. '<td>%s</td>'
. '</tr>',
$l->{code}, $l->{name},
$l->{diff}==0 ? $l->{n} : "$l->{n} ($l->{diff})",
$l->{finished}, $l->{unfinished}, $l->{untranslated},
$l->{percentage}, $l->{percentage},
$translators->{$l->{code}};
}
print "</table></body></html>\n";
} else {
print "<style>";
print "table {font-size:80%;}";
print "th {text-align:left; }";
print ".bartodo{ background-color:red;width:100px;height:20px;}";
print ".bardone{ background-color:green;width:80px;height:20px;font-size:80%;text-align:center;padding-top:4px;height:16px;color:white;}";
print "</style>";
print "<table>";
print "<tr><th colspan=\"2\" style=\"width:250px;\">Language</th><th>Finished %</th><th>Translators</th></tr>\n";
for my $l (sort { $b->{percentage} <=> $a->{percentage} } @lang) {
printf "\n<tr>"
. '<td><img src="qrc:/images/flags/%s.png"></td><td>%s</td>'
. '<td><div class="bartodo"><div class="bardone" style="width:%dpx">%.1f</div></div></td>'
. '<td>%s</td>'
. '</tr>',
$l->{code}, $l->{name},
$l->{percentage}, $l->{percentage},
$translators->{$l->{code}};
}
print "</table>\n";
}
5 changes: 5 additions & 0 deletions scripts/update_ts_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ cleanup() {
do
[ -f "$i.save" ] && mv "$i.save" "$i"
done

trap "" EXIT
}

trap cleanup EXIT
Expand Down Expand Up @@ -110,6 +112,9 @@ if [ -n "$add" ]; then
fi
echo Updating translations
$LUPDATE$opts -verbose qgis_ts.pro

cleanup

echo Updating TRANSLATORS File
./scripts/tsstat.pl > doc/TRANSLATORS

Expand Down
14 changes: 14 additions & 0 deletions src/analysis/interpolation/HalfEdge.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
HalfEdge.cc
---------------------
begin : September 2009
copyright : (C) 2009 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "HalfEdge.h"

//empty file, all methods are inline
14 changes: 14 additions & 0 deletions src/analysis/interpolation/TriangleInterpolator.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
TriangleInterpolator.cc
---------------------
begin : September 2009
copyright : (C) 2009 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "TriangleInterpolator.h"

//empty file, all methods are inline
14 changes: 14 additions & 0 deletions src/analysis/interpolation/Triangulation.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
Triangulation.cc
---------------------
begin : September 2009
copyright : (C) 2009 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "Triangulation.h"

//empty file (abstract class)
14 changes: 14 additions & 0 deletions src/analysis/raster/qgsrastercalcnode.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsrastercalcnode.cpp
---------------------
begin : October 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsrastercalcnode.h"
#include <cfloat>

Expand Down
12 changes: 6 additions & 6 deletions src/app/composer/qgscomposerlegendlayersdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/***************************************************************************
qgscomposerlegendlayersdialog.cpp
-------------------------------
***************************************************************************/

/***************************************************************************
qgscomposerlegendlayersdialog.cpp
---------------------
begin : December 2010
copyright : (C) 2010 by Tim Sutton
email : tim dot linfiniti at com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgscomposerlegendlayersdialog.h"

#include <QStandardItem>
Expand Down
12 changes: 6 additions & 6 deletions src/app/composer/qgscomposerlegendlayersdialog.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/***************************************************************************
qgscomposerlegenditemdialog.h
-----------------------------
***************************************************************************/

/***************************************************************************
qgscomposerlegendlayersdialog.h
---------------------
begin : December 2010
copyright : (C) 2010 by Tim Sutton
email : tim dot linfiniti at com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#ifndef QGSCOMPOSERLEGENDLAYERSDIALOG_H
#define QGSCOMPOSERLEGENDLAYERSDIALOG_H

Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendgroup.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendgroup.cpp
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "qgsapplication.h"
#include "qgisapp.h"
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendgroup.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendgroup.h
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QGSLEGENDGROUP_H
#define QGSLEGENDGROUP_H
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegenditem.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegenditem.cpp
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "qgslegenditem.h"
#include <QCoreApplication>
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegenditem.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegenditem.h
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QGSLEGENDITEM_H
#define QGSLEGENDITEM_H
Expand Down
18 changes: 6 additions & 12 deletions src/app/legend/qgslegendlayer.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendlayer.cpp
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

#include "qgsapplication.h"
#include "qgisapp.h"
#include "qgslegend.h"
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendlayer.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendlayer.h
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QGSLEGENDLAYER_H
#define QGSLEGENDLAYER_H
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendpropertygroup.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendpropertygroup.cpp
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "qgsapplication.h"
#include "qgisapp.h"
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendpropertygroup.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendpropertygroup.h
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QGSLEGENDPROPERTYGROUP_H
#define QGSLEGENDPROPERTYGROUP_H
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendpropertyitem.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendpropertyitem.cpp
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "qgslegendpropertyitem.h"
#include "qgsapplication.h"
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendpropertyitem.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendpropertyitem.h
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QGSLEGENDPROPERTYITEM_H
#define QGSLEGENDPROPERTYITEM_H
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendsymbologygroup.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendsymbologygroup.cpp
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "qgsapplication.h"
#include "qgisapp.h"
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendsymbologygroup.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendsymbologygroup.h
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QGSLEGENDSYMBOLOGYGROUP_H
#define QGSLEGENDSYMBOLOGYGROUP_H
Expand Down
18 changes: 6 additions & 12 deletions src/app/legend/qgslegendsymbologyitem.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendsymbologyitem.cpp
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

#include "qgslegendsymbologyitem.h"

QgsLegendSymbologyItem::QgsLegendSymbologyItem( QTreeWidgetItem * theItem, QString theString, int pixmapWidth, int pixmapHeight )
Expand Down
17 changes: 6 additions & 11 deletions src/app/legend/qgslegendsymbologyitem.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2005 by Tim Sutton *
* aps02ts@macbuntu *
qgslegendsymbologyitem.h
---------------------
begin : January 2007
copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QGSLEGENDSYMBOLOGYITEM_H
#define QGSLEGENDSYMBOLOGYITEM_H
Expand Down
1 change: 0 additions & 1 deletion src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ int main( int argc, char *argv[] )
else if ( i + 1 < argc && ( arg == "--configpath" || arg == "-c" ) )
{
configpath = argv[++i];
QSettings::setPath( QSettings::IniFormat, QSettings::UserScope, configpath );
}
else
{
Expand Down
10 changes: 6 additions & 4 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include <QToolButton>
#include <QVBoxLayout>
#include <QWhatsThis>
#include <QThread>

#include <qgsnetworkaccessmanager.h>

Expand Down Expand Up @@ -318,7 +319,10 @@ static void setTitleBarText_( QWidget & qgisApp )
*/
static QgsMessageOutput *messageOutputViewer_()
{
return new QgsMessageViewer( QgisApp::instance() );
if ( QThread::currentThread() == QApplication::instance()->thread() )
return new QgsMessageViewer( QgisApp::instance() );
else
return new QgsMessageOutputConsole();
}

static void customSrsValidation_( QgsCoordinateReferenceSystem* srs )
Expand Down Expand Up @@ -6172,10 +6176,9 @@ void QgisApp::showStatusMessage( QString theMessage )
statusBar()->showMessage( theMessage );
}

// Show the maptip using tooltip
void QgisApp::showMapTip()

{
/* Show the maptip using tooltip */
// Stop the timer while we look for a maptip
mpMapTipsTimer->stop();

Expand All @@ -6185,7 +6188,6 @@ void QgisApp::showMapTip()
QPoint myPointerPos = mMapCanvas->mouseLastXY();

// Make sure there is an active layer before proceeding

QgsMapLayer* mypLayer = mMapCanvas->currentLayer();
if ( mypLayer )
{
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsbrowserdockwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsbrowserdockwidget.cpp
---------------------
begin : July 2011
copyright : (C) 2011 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsbrowserdockwidget.h"

#include <QHeaderView>
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsbrowserdockwidget.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsbrowserdockwidget.h
---------------------
begin : July 2011
copyright : (C) 2011 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSBROWSERDOCKWIDGET_H
#define QGSBROWSERDOCKWIDGET_H

Expand Down
18 changes: 9 additions & 9 deletions src/app/qgscustomprojectiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ long QgsCustomProjectionDialog::getRecordCount()
int myResult;
long myRecordCount = 0;
//check the db is available
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -198,7 +198,7 @@ QString QgsCustomProjectionDialog::getProjectionFamilyName( QString theProjectio
int myResult;
QString myName;
//check the db is available
myResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -229,7 +229,7 @@ QString QgsCustomProjectionDialog::getEllipsoidName( QString theEllipsoidAcronym
int myResult;
QString myName;
//check the db is available
myResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -260,7 +260,7 @@ QString QgsCustomProjectionDialog::getProjectionFamilyAcronym( QString theProjec
int myResult;
QString myName;
//check the db is available
myResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -291,7 +291,7 @@ QString QgsCustomProjectionDialog::getEllipsoidAcronym( QString theEllipsoidName
int myResult;
QString myName;
//check the db is available
myResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -323,7 +323,7 @@ void QgsCustomProjectionDialog::on_pbnFirst_clicked()
sqlite3_stmt *myPreparedStatement;
int myResult;
//check the db is available
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -395,7 +395,7 @@ void QgsCustomProjectionDialog::on_pbnPrevious_clicked()
sqlite3_stmt *myPreparedStatement;
int myResult;
//check the db is available
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -468,7 +468,7 @@ void QgsCustomProjectionDialog::on_pbnNext_clicked()
sqlite3_stmt *myPreparedStatement;
int myResult;
//check the db is available
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -537,7 +537,7 @@ void QgsCustomProjectionDialog::on_pbnLast_clicked()
sqlite3_stmt *myPreparedStatement;
int myResult;
//check the db is available
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsembedlayerdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsembedlayerdialog.cpp
---------------------
begin : June 2011
copyright : (C) 2011 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsembedlayerdialog.h"
#include "qgsproject.h"
#include "qgisapp.h"
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsembedlayerdialog.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsembedlayerdialog.h
---------------------
begin : June 2011
copyright : (C) 2011 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSEMBEDLAYERSDIALOG_H
#define QGSEMBEDLAYERSDIALOG_H

Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsformannotationdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsformannotationdialog.cpp
---------------------
begin : March 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsformannotationdialog.h"
#include "qgsannotationwidget.h"
#include "qgsvectorlayer.h"
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsformannotationdialog.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsformannotationdialog.h
---------------------
begin : March 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSFORMANNOTATIONDIALOG_H
#define QGSFORMANNOTATIONDIALOG_H

Expand Down
14 changes: 14 additions & 0 deletions src/app/qgslabelengineconfigdialog.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgslabelengineconfigdialog.cpp
---------------------
begin : May 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgslabelengineconfigdialog.h"

#include "qgspallabeling.h"
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgslabelengineconfigdialog.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgslabelengineconfigdialog.h
---------------------
begin : May 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSLABELENGINECONFIGDIALOG_H
#define QGSLABELENGINECONFIGDIALOG_H

Expand Down
14 changes: 14 additions & 0 deletions src/app/qgslabelpreview.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgslabelpreview.cpp
---------------------
begin : May 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgslabelpreview.h"

#include <QPainter>
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgslabelpreview.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgslabelpreview.h
---------------------
begin : May 2010
copyright : (C) 2010 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSLABELPREVIEW_H
#define QGSLABELPREVIEW_H

Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ void QgsOptions::getEllipsoidList()

cmbEllipsoid->addItem( ELLIPS_FLAT_DESC );
//check the db is available
myResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -1015,7 +1015,7 @@ QString QgsOptions::getEllipsoidAcronym( QString theEllipsoidName )
int myResult;
QString myName( ELLIPS_FLAT );
//check the db is available
myResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down Expand Up @@ -1047,7 +1047,7 @@ QString QgsOptions::getEllipsoidName( QString theEllipsoidAcronym )
int myResult;
QString myName( ELLIPS_FLAT_DESC );
//check the db is available
myResult = sqlite3_open( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase );
myResult = sqlite3_open_v2( QgsApplication::srsDbFilePath().toUtf8().data(), &myDatabase, SQLITE_OPEN_READONLY, NULL );
if ( myResult )
{
QgsDebugMsg( QString( "Can't open database: %1" ).arg( sqlite3_errmsg( myDatabase ) ) );
Expand Down
18 changes: 6 additions & 12 deletions src/app/qgstip.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
/***************************************************************************
* Copyright (C) 2007 by Tim Sutton *
* tim@linfiniti.com *
qgstip.h
---------------------
begin : February 2011
copyright : (C) 2011 by Tim Sutton
email : tim dot linfiniti at com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

#ifndef QGSTIP
#define QGSTIP

Expand Down
18 changes: 6 additions & 12 deletions src/app/qgstipfactory.cpp
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
/***************************************************************************
* Copyright (C) 2007 by Tim Sutton *
* tim@linfiniti.com *
qgstipfactory.cpp
---------------------
begin : February 2011
copyright : (C) 2007 by Tim Sutton
email : tim at linfiniti dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/


#include "qgstipfactory.h"
#include <QTime>
//for rand & srand
Expand Down
17 changes: 6 additions & 11 deletions src/app/qgstipfactory.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/***************************************************************************
* Copyright (C) 2007 by Tim Sutton *
* tim@linfiniti.com *
qgstipfactory.h
---------------------
begin : February 2011
copyright : (C) 2011 by Tim Sutton
email : tim at linfiniti dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

#ifndef QGSTIPFACTORY
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsundowidget.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsundowidget.cpp
---------------------
begin : June 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsundowidget.h"

#include "qgsmaplayer.h"
Expand Down
14 changes: 14 additions & 0 deletions src/app/qgsundowidget.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsundowidget.h
---------------------
begin : June 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSUNDOWIDGET_H
#define QGSUNDOWIDGET_H

Expand Down
14 changes: 14 additions & 0 deletions src/core/pal/costcalculator.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
costcalculator.cpp
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include <iostream>
#include <fstream>
Expand Down
14 changes: 14 additions & 0 deletions src/core/pal/costcalculator.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
costcalculator.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef COSTCALCULATOR_H
#define COSTCALCULATOR_H

Expand Down
4 changes: 3 additions & 1 deletion src/core/qgsapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ bool QgsApplication::event( QEvent * event )
bool QgsApplication::notify( QObject * receiver, QEvent * event )
{
bool done = false;
emit preNotify( receiver, event, &done );
// Crashes in customization (especially on Mac), if we're not in the main/UI thread, see #5597
if ( thread() == receiver->thread() )
emit preNotify( receiver, event, &done );

if ( done )
return true;
Expand Down
14 changes: 14 additions & 0 deletions src/core/qgsbrowsermodel.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsbrowsermodel.cpp
---------------------
begin : July 2011
copyright : (C) 2011 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <QDir>
#include <QApplication>
#include <QStyle>
Expand Down
14 changes: 14 additions & 0 deletions src/core/qgsbrowsermodel.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/***************************************************************************
qgsbrowsermodel.h
---------------------
begin : July 2011
copyright : (C) 2011 by Martin Dobias
email : wonder.sk at gmail.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSBROWSERMODEL_H
#define QGSBROWSERMODEL_H

Expand Down
Loading