394 changes: 197 additions & 197 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

915 changes: 483 additions & 432 deletions i18n/qgis_et_EE.ts

Large diffs are not rendered by default.

749 changes: 401 additions & 348 deletions i18n/qgis_nl.ts

Large diffs are not rendered by default.

322 changes: 171 additions & 151 deletions i18n/qgis_pl_PL.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion python/plugins/fTools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def category():
return "Vector"

def version():
return "0.6.1"
return "0.6.2"

def qgisMinimumVersion():
return "1.4"
Expand Down
101 changes: 42 additions & 59 deletions python/plugins/plugin_installer/installer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,27 @@ def setIface(qgisIface):


# Repositories: (name, url, possible depreciated url)
officialRepo = ("QGIS Official Repository", "http://pyqgis.org/repo/official","")
officialRepo2 = ("QGIS Official Repository 2", "http://plugins.qgis.org/plugins/plugins.xml","http://plugins.qgis.org/plugins")
contribRepo = ("QGIS Contributed Repository", "http://pyqgis.org/repo/contributed","")
authorRepos = [("Aaron Racicot's Repository", "http://qgisplugins.z-pulley.com", ""),
("Barry Rowlingson's Repository", "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml", ""),
# depreciated: ("Bob Bruce's Repository", "http://www.mappinggeek.ca/QGISPythonPlugins/Bobs-QGIS-plugins.xml", ""),
# depreciated: ("Borys Jurgiel's Repository", "http://bwj.aster.net.pl/qgis/plugins.xml", "http://bwj.aster.net.pl/qgis-oldapi/plugins.xml"),
("Carson Farmer's Repository", "http://www.ftools.ca/cfarmerQgisRepo.xml", "http://www.ftools.ca/cfarmerQgisRepo_0.xx.xml"),
("CatAIS Repository", "http://www.catais.org/qgis/plugins.xml", ""),
("Faunalia Repository", "http://www.faunalia.it/qgis/plugins.xml", "http://faunalia.it/qgis/plugins.xml"),
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", ""),
("Kappasys Repository", "http://www.kappasys.org/qgis/plugins.xml", ""),
("Martin Dobias' Sandbox", "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml", ""),
("Marco Hugentobler's Repository","http://karlinapp.ethz.ch/python_plugins/python_plugins.xml", ""),
("Sourcepole Repository", "http://build.sourcepole.ch/qgis/plugins.xml", ""),
#("Volkan Kepoglu's Repository","http://ggit.metu.edu.tr/~volkan/plugins.xml", "")
]
officialRepo = ("QGIS Official Repository", "http://plugins.qgis.org/plugins/plugins.xml","http://plugins.qgis.org/plugins")
depreciatedRepos = [
("Old QGIS Official Repository", "http://pyqgis.org/repo/official"),
("Old QGIS Contributed Repository","http://pyqgis.org/repo/contributed"),
("Aaron Racicot's Repository", "http://qgisplugins.z-pulley.com"),
("Barry Rowlingson's Repository", "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml"),
("Bob Bruce's Repository", "http://www.mappinggeek.ca/QGISPythonPlugins/Bobs-QGIS-plugins.xml"),
("Borys Jurgiel's Repository", "http://bwj.aster.net.pl/qgis/plugins.xml"),
("Borys Jurgiel's Repository 2", "http://bwj.aster.net.pl/qgis-oldapi/plugins.xml"),
("Carson Farmer's Repository", "http://www.ftools.ca/cfarmerQgisRepo.xml"),
("Carson Farmer's Repository 2", "http://www.ftools.ca/cfarmerQgisRepo_0.xx.xml"),
("CatAIS Repository", "http://www.catais.org/qgis/plugins.xml"),
("Faunalia Repository", "http://www.faunalia.it/qgis/plugins.xml"),
("Faunalia Repository 2", "http://faunalia.it/qgis/plugins.xml"),
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml"),
("Kappasys Repository", "http://www.kappasys.org/qgis/plugins.xml"),
("Martin Dobias' Sandbox", "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml"),
("Marco Hugentobler's Repository", "http://karlinapp.ethz.ch/python_plugins/python_plugins.xml"),
("Sourcepole Repository", "http://build.sourcepole.ch/qgis/plugins.xml"),
("Volkan Kepoglu's Repository", "http://ggit.metu.edu.tr/~volkan/plugins.xml")
]



Expand Down Expand Up @@ -189,32 +193,27 @@ def __init__(self):
self.httpId = {} # {httpId : repoName}


# ----------------------------------------- #
def addKnownRepos(self):
""" add known 3rd party repositories to QSettings """
presentURLs = []
for i in self.all().values():
presentURLs += [QString(i["url"])]
settings = QSettings()
settings.beginGroup(reposGroup)
# add the central repositories
if presentURLs.count(officialRepo[1]) == 0:
settings.setValue(officialRepo[0]+"/url", QVariant(officialRepo[1]))
settings.setValue(officialRepo[0]+"/enabled", QVariant(True))
if presentURLs.count(officialRepo2[1]) == 0:
settings.setValue(officialRepo2[0]+"/url", QVariant(officialRepo2[1]))
settings.setValue(officialRepo2[0]+"/enabled", QVariant(True))
if presentURLs.count(contribRepo[1]) == 0:
settings.setValue(contribRepo[0]+"/url", QVariant(contribRepo[1]))
settings.setValue(contribRepo[0]+"/enabled", QVariant(True))
# add author repositories
for i in authorRepos:
if i[1] and presentURLs.count(i[1]) == 0:
repoName = QString(i[0])
if self.all().has_key(repoName):
repoName = repoName + " (original)"
settings.setValue(repoName+"/url", QVariant(i[1]))
settings.setValue(repoName+"/enabled", QVariant(True))
## depreciated in qgis 1.8 until we use 3rd party repos again
## ----------------------------------------- #
#def addKnownRepos(self):
#""" add known 3rd party repositories to QSettings """
#presentURLs = []
#for i in self.all().values():
#presentURLs += [QString(i["url"])]
#settings = QSettings()
#settings.beginGroup(reposGroup)
## add the official repository
#if presentURLs.count(officialRepo[1]) == 0:
#settings.setValue(officialRepo[0]+"/url", QVariant(officialRepo[1]))
#settings.setValue(officialRepo[0]+"/enabled", QVariant(True))
## add author repositories
#for i in authorRepos:
#if i[1] and presentURLs.count(i[1]) == 0:
#repoName = QString(i[0])
#if self.all().has_key(repoName):
#repoName = repoName + " (original)"
#settings.setValue(repoName+"/url", QVariant(i[1]))
#settings.setValue(repoName+"/enabled", QVariant(True))


# ----------------------------------------- #
Expand Down Expand Up @@ -328,31 +327,15 @@ def load(self):
settings.beginGroup(reposGroup)
# first, update repositories in QSettings if needed
officialRepoPresent = False
officialRepo2Present = False
for key in settings.childGroups():
url = settings.value(key+"/url", QVariant()).toString()
if url == contribRepo[1]:
settings.setValue(key+"/valid", QVariant(True)) # unlock the contrib repo in qgis 1.x
else:
settings.setValue(key+"/valid", QVariant(True)) # unlock any other repo
if url == officialRepo[1]:
officialRepoPresent = True
if url == officialRepo2[1]:
officialRepoPresent2 = True
if url == officialRepo[2]:
settings.setValue(key+"/url", QVariant(officialRepo[1])) # correct a depreciated url
officialRepoPresent = True
if url == officialRepo2[2]:
settings.setValue(key+"/url", QVariant(officialRepo2[1])) # correct a depreciated url
officialRepoPresent2 = True
for authorRepo in authorRepos:
if url == authorRepo[2]:
settings.setValue(key+"/url", QVariant(authorRepo[1])) # correct a depreciated url
if not officialRepoPresent:
settings.setValue(officialRepo[0]+"/url", QVariant(officialRepo[1]))
if not officialRepo2Present:
settings.setValue(officialRepo2[0]+"/url", QVariant(officialRepo2[1]))


for key in settings.childGroups():
self.mRepositories[key] = {}
Expand Down
54 changes: 23 additions & 31 deletions python/plugins/plugin_installer/installer_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def __init__(self, parent, plugin):
if port < 0:
port = 80
self.http = QPHttp(url.host(), port)
self.connect(self.http, SIGNAL("stateChanged ( int )"), self.stateChanged)
self.connect(self.http, SIGNAL("stateChanged ( int )"), self.stateChanged)
self.connect(self.http, SIGNAL("dataReadProgress ( int , int )"), self.readProgress)
self.connect(self.http, SIGNAL("requestFinished (int, bool)"), self.requestFinished)
self.httpGetId = self.http.get(path, self.file)
Expand Down Expand Up @@ -269,7 +269,7 @@ def __init__(self, parent):
self.connect(self.buttonHelp, SIGNAL("clicked()"), self.runHelp)
# repositories handling
self.connect(self.treeRepositories, SIGNAL("doubleClicked(QModelIndex)"), self.editRepository)
self.connect(self.buttonFetchRepositories, SIGNAL("clicked()"), self.addKnownRepositories)
#self.connect(self.buttonFetchRepositories, SIGNAL("clicked()"), self.addKnownRepositories)
self.connect(self.buttonAddRep, SIGNAL("clicked()"), self.addRepository)
self.connect(self.buttonEditRep, SIGNAL("clicked()"), self.editRepository)
self.connect(self.buttonDeleteRep, SIGNAL("clicked()"), self.deleteRepository)
Expand Down Expand Up @@ -360,23 +360,14 @@ def populateMostWidgets(self):
self.comboFilter2.addItem(self.tr("installed", "plural"))
if plugins.isThereAnythingNew():
self.comboFilter2.addItem(self.tr("upgradeable and news"))
#set configuration widgets (dependent on the repository list)
if len(repositories.all()) == 1:
self.radioPluginType0.setEnabled(False)
self.radioPluginType1.setEnabled(False)
self.radioPluginType2.setEnabled(False)
else:
self.radioPluginType0.setEnabled(True)
self.radioPluginType1.setEnabled(True)
self.radioPluginType2.setEnabled(True)
settings = QSettings()
(i, ok) = settings.value(settingsGroup+"/allowedPluginType", QVariant(2)).toInt()
if i == 1 or len(repositories.all()) == 1:
(i, ok) = settings.value(settingsGroup+"/allowedPluginType", QVariant(1)).toInt()
if i == 1:
self.radioPluginType0.setChecked(Qt.Checked)
elif i == 3:
self.radioPluginType2.setChecked(Qt.Checked)
else:
elif i == 2:
self.radioPluginType1.setChecked(Qt.Checked)
else:
self.radioPluginType2.setChecked(Qt.Checked)


# ----------------------------------------- #
Expand Down Expand Up @@ -531,7 +522,7 @@ def addItem(p):

# initially, keep insert order
self.treePlugins.sortItems(100,Qt.AscendingOrder)

# resize the columns
for i in [0,1,2,3,4,5]:
self.treePlugins.resizeColumnToContents(i)
Expand Down Expand Up @@ -605,7 +596,7 @@ def installPlugin(self, key, quiet=False):
if plugin["status"] == "newer" and not plugin["error"]: # ask for confirmation if user downgrades an usable plugin
if QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Are you sure you want to downgrade the plugin to the latest available version? The installed one is newer!"), QMessageBox.Yes, QMessageBox.No) == QMessageBox.No:
return

dlg = QgsPluginInstallerInstallingDialog(self,plugin)
dlg.exec_()

Expand Down Expand Up @@ -795,19 +786,20 @@ def changePluginPolicy(self, state):
self.populatePluginTree()


## depreciated in qgis 1.8 until we use 3rd party repos again
# ----------------------------------------- #
def addKnownRepositories(self):
""" update list of known repositories - in the future it will be replaced with an online fetching """
message = self.tr("You are about to add several plugin repositories that are neither authorized nor supported by the Quantum GIS team. Plugin authors generally make efforts to ensure that their work is useful and safe, however, we can assume no responsibility for them.")
if QMessageBox.question(self, self.tr("QGIS Python Plugin Installer"), message, QMessageBox.Ok, QMessageBox.Abort) == QMessageBox.Ok:
repositories.addKnownRepos()
# refresh lists and populate widgets
QApplication.setOverrideCursor(Qt.WaitCursor)
self.getAllAvailablePlugins()
plugins.rebuild()
self.populateMostWidgets()
self.populatePluginTree()
QApplication.restoreOverrideCursor()
#def addKnownRepositories(self):
#""" update list of known repositories - in the future it will be replaced with an online fetching """
#message = self.tr("You are about to add several plugin repositories that are neither authorized nor supported by the Quantum GIS team. Plugin authors generally make efforts to ensure that their work is useful and safe, however, we can assume no responsibility for them.")
#if QMessageBox.question(self, self.tr("QGIS Python Plugin Installer"), message, QMessageBox.Ok, QMessageBox.Abort) == QMessageBox.Ok:
#repositories.addKnownRepos()
## refresh lists and populate widgets
#QApplication.setOverrideCursor(Qt.WaitCursor)
#self.getAllAvailablePlugins()
#plugins.rebuild()
#self.populateMostWidgets()
#self.populatePluginTree()
#QApplication.restoreOverrideCursor()


# ----------------------------------------- #
Expand Down Expand Up @@ -854,7 +846,7 @@ def editRepository(self):
dlg.checkBoxEnabled.setCheckState(checkState[repositories.all()[reposName]["enabled"]])
if repositories.all()[reposName]["valid"]:
dlg.checkBoxEnabled.setEnabled(True)
dlg.labelInfo.setText("")
dlg.labelInfo.setText("")
else:
dlg.checkBoxEnabled.setEnabled(False)
dlg.labelInfo.setText(self.tr("This repository is blocked due to incompatibility with your Quantum GIS version"))
Expand Down
53 changes: 10 additions & 43 deletions python/plugins/plugin_installer/qgsplugininstallerbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
<string>List of plugin repositories</string>
</attribute>
<layout class="QGridLayout">
<item row="0" column="0" colspan="9">
<item row="0" column="0" colspan="7">
<widget class="QTreeWidget" name="treeRepositories">
<property name="rootIsDecorated">
<bool>false</bool>
Expand All @@ -335,39 +335,7 @@
</column>
</widget>
</item>
<item row="1" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="buttonFetchRepositories">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Add third party plugin repositories to the list</string>
</property>
<property name="whatsThis">
<string>Add third party plugin repositories to the list</string>
</property>
<property name="text">
<string>Add 3rd party repositories</string>
</property>
</widget>
</item>
<item row="1" column="5">
<item row="1" column="3">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand All @@ -380,7 +348,7 @@
</property>
</spacer>
</item>
<item row="1" column="6">
<item row="1" column="4">
<widget class="QPushButton" name="buttonAddRep">
<property name="toolTip">
<string>Add a new plugin repository</string>
Expand All @@ -393,7 +361,7 @@
</property>
</widget>
</item>
<item row="1" column="7">
<item row="1" column="5">
<widget class="QPushButton" name="buttonEditRep">
<property name="toolTip">
<string>Edit the selected repository</string>
Expand All @@ -406,7 +374,7 @@
</property>
</widget>
</item>
<item row="1" column="8">
<item row="1" column="6">
<widget class="QPushButton" name="buttonDeleteRep">
<property name="toolTip">
<string>Remove the selected repository</string>
Expand All @@ -419,7 +387,7 @@
</property>
</widget>
</item>
<item row="1" column="3">
<item row="1" column="1">
<widget class="QPushButton" name="buttonAddContributedRepository">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
Expand Down Expand Up @@ -450,7 +418,7 @@
</property>
</widget>
</item>
<item row="1" column="4">
<item row="1" column="2">
<widget class="QPushButton" name="buttonDeleteDepreciatedRepos">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
Expand Down Expand Up @@ -594,7 +562,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="0">
<widget class="QRadioButton" name="radioPluginType0">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="text">
<string>Only show plugins from the official repository</string>
Expand All @@ -607,7 +575,7 @@ p, li { white-space: pre-wrap; }
<item row="1" column="0">
<widget class="QRadioButton" name="radioPluginType1">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="text">
<string>Show all plugins except those marked as experimental</string>
Expand All @@ -620,7 +588,7 @@ p, li { white-space: pre-wrap; }
<item row="2" column="0">
<widget class="QRadioButton" name="radioPluginType2">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="text">
<string>Show all plugins, even those marked as experimental</string>
Expand Down Expand Up @@ -679,7 +647,6 @@ p, li { white-space: pre-wrap; }
<tabstop>buttonClose</tabstop>
<tabstop>buttonHelp</tabstop>
<tabstop>treeRepositories</tabstop>
<tabstop>buttonFetchRepositories</tabstop>
<tabstop>buttonAddContributedRepository</tabstop>
<tabstop>buttonDeleteDepreciatedRepos</tabstop>
<tabstop>buttonAddRep</tabstop>
Expand Down
2 changes: 1 addition & 1 deletion resources/customization.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@
<widget class="QWidget" label="" objectName="QgsProjectionSelectorBase">
<widget class="QLabel" label="Filter" objectName="label_5"/>
<widget class="QLineEdit" label="" objectName="leSearch"/>
<widget class="QLabel" label="Recently used coordinate references systems" objectName="label_3"/>
<widget class="QLabel" label="Recently used coordinate reference systems" objectName="label_3"/>
<widget class="QTextEdit" label="" objectName="teProjection">
<widget class="QWidget" label="" objectName="qt_scrollarea_viewport"/>
<widget class="QWidget" label="" objectName="qt_scrollarea_hcontainer"/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/ogr/qgsogrhelperfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ QString createDatabaseURI( QString connectionType, QString host, QString databas
uri += QString( " pass=%1" ).arg( password );
}
}
else if ( connectionType == "INGRES" )
else if ( connectionType == "Ingres" )
{
//not tested
uri = "@driver=ingres,dbname=" + database;
Expand Down
20 changes: 12 additions & 8 deletions src/app/qgsmergeattributesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ QComboBox* QgsMergeAttributesDialog::createMergeComboBox( QVariant::Type columnT
{
newComboBox->addItem( tr( "Concatenation" ) );
}
if ( columnType == QVariant::Double )
else if ( columnType == QVariant::Double )
{
newComboBox->addItem( tr( "Mean" ) );
}

newComboBox->addItem( tr( "Skip attribute" ) );

QObject::connect( newComboBox, SIGNAL( currentIndexChanged( const QString& ) ),
this, SLOT( comboValueChanged( const QString& ) ) );
return newComboBox;
Expand Down Expand Up @@ -228,13 +230,7 @@ void QgsMergeAttributesDialog::selectedRowChanged()

void QgsMergeAttributesDialog::refreshMergedValue( int col )
{
//get QComboBox
QWidget* cellWidget = mTableWidget->cellWidget( 0, col );
if ( !cellWidget )
{
return;
}
QComboBox* comboBox = qobject_cast<QComboBox *>( cellWidget );
QComboBox* comboBox = qobject_cast<QComboBox *>( mTableWidget->cellWidget( 0, col ) );
if ( !comboBox )
{
return;
Expand Down Expand Up @@ -267,6 +263,10 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col )
{
evalText = concatenationAttributeString( col );
}
else if ( mergeBehaviourString == tr( "Skip attribute" ) )
{
evalText = tr( "Skipped" );
}
else //an existing feature value
{
int featureId = mergeBehaviourString.split( " " ).at( 1 ).toInt(); //probably not very robust for translations...
Expand Down Expand Up @@ -562,6 +562,10 @@ QgsAttributeMap QgsMergeAttributesDialog::mergedAttributesMap() const
{
int idx = mTableWidget->horizontalHeaderItem( i )->data( Qt::UserRole ).toInt();

QComboBox* comboBox = qobject_cast<QComboBox *>( mTableWidget->cellWidget( 0, i ) );
if ( comboBox && comboBox->currentText() == tr( "Skip attribute" ) )
continue;

QTableWidgetItem* currentItem = mTableWidget->item( mFeatureList.size() + 1, i );
if ( !currentItem )
continue;
Expand Down
12 changes: 6 additions & 6 deletions src/core/composer/qgscomposerarrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ void QgsComposerArrow::adaptItemSceneRect()
bool QgsComposerArrow::writeXML( QDomElement& elem, QDomDocument & doc ) const
{
QDomElement composerArrowElem = doc.createElement( "ComposerArrow" );
composerArrowElem.setAttribute( "outlineWidth", outlineWidth() );
composerArrowElem.setAttribute( "arrowHeadWidth", mArrowHeadWidth );
composerArrowElem.setAttribute( "outlineWidth", QString::number( outlineWidth() ) );
composerArrowElem.setAttribute( "arrowHeadWidth", QString::number( mArrowHeadWidth ) );
composerArrowElem.setAttribute( "markerMode", mMarkerMode );
composerArrowElem.setAttribute( "startMarkerFile", mStartMarkerFile );
composerArrowElem.setAttribute( "endMarkerFile", mEndMarkerFile );
Expand All @@ -300,14 +300,14 @@ bool QgsComposerArrow::writeXML( QDomElement& elem, QDomDocument & doc ) const

//start point
QDomElement startPointElem = doc.createElement( "StartPoint" );
startPointElem.setAttribute( "x", mStartPoint.x() );
startPointElem.setAttribute( "y", mStartPoint.y() );
startPointElem.setAttribute( "x", QString::number( mStartPoint.x() ) );
startPointElem.setAttribute( "y", QString::number( mStartPoint.y() ) );
composerArrowElem.appendChild( startPointElem );

//stop point
QDomElement stopPointElem = doc.createElement( "StopPoint" );
stopPointElem.setAttribute( "x", mStopPoint.x() );
stopPointElem.setAttribute( "y", mStopPoint.y() );
stopPointElem.setAttribute( "x", QString::number( mStopPoint.x() ) );
stopPointElem.setAttribute( "y", QString::number( mStopPoint.y() ) );
composerArrowElem.appendChild( stopPointElem );

elem.appendChild( composerArrowElem );
Expand Down
12 changes: 6 additions & 6 deletions src/core/composer/qgscomposeritem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ bool QgsComposerItem::_writeXML( QDomElement& itemElem, QDomDocument& doc ) cons
}

//scene rect
composerItemElem.setAttribute( "x", transform().dx() );
composerItemElem.setAttribute( "y", transform().dy() );
composerItemElem.setAttribute( "width", rect().width() );
composerItemElem.setAttribute( "height", rect().height() );
composerItemElem.setAttribute( "x", QString::number( transform().dx() ) );
composerItemElem.setAttribute( "y", QString::number( transform().dy() ) );
composerItemElem.setAttribute( "width", QString::number( rect().width() ) );
composerItemElem.setAttribute( "height", QString::number( rect().height() ) );
composerItemElem.setAttribute( "zValue", QString::number( zValue() ) );
composerItemElem.setAttribute( "outlineWidth", QString::number( pen().widthF() ) );
composerItemElem.setAttribute( "rotation", mRotation );
composerItemElem.setAttribute( "rotation", QString::number( mRotation ) );
composerItemElem.setAttribute( "id", mId );
//position lock for mouse moves/resizes
if ( mItemPositionLocked )
Expand All @@ -142,7 +142,7 @@ bool QgsComposerItem::_writeXML( QDomElement& itemElem, QDomDocument& doc ) cons
composerItemElem.setAttribute( "positionLock", "false" );
}

composerItemElem.setAttribute( "lastValidViewScaleFactor", mLastValidViewScaleFactor );
composerItemElem.setAttribute( "lastValidViewScaleFactor", QString::number( mLastValidViewScaleFactor ) );


//frame color
Expand Down
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposerlegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ bool QgsComposerLegend::writeXML( QDomElement& elem, QDomDocument & doc ) const
composerLegendElem.setAttribute( "layerSpace", QString::number( mLayerSpace ) );
composerLegendElem.setAttribute( "symbolSpace", QString::number( mSymbolSpace ) );
composerLegendElem.setAttribute( "iconLabelSpace", QString::number( mIconLabelSpace ) );
composerLegendElem.setAttribute( "symbolWidth", mSymbolWidth );
composerLegendElem.setAttribute( "symbolHeight", mSymbolHeight );
composerLegendElem.setAttribute( "symbolWidth", QString::number( mSymbolWidth ) );
composerLegendElem.setAttribute( "symbolHeight", QString::number( mSymbolHeight ) );
composerLegendElem.setAttribute( "wrapChar", mWrapChar );

if ( mComposerMap )
Expand Down
22 changes: 11 additions & 11 deletions src/core/composer/qgscomposermap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const

//extent
QDomElement extentElem = doc.createElement( "Extent" );
extentElem.setAttribute( "xmin", mExtent.xMinimum() );
extentElem.setAttribute( "xmax", mExtent.xMaximum() );
extentElem.setAttribute( "ymin", mExtent.yMinimum() );
extentElem.setAttribute( "ymax", mExtent.yMaximum() );
extentElem.setAttribute( "xmin", QString::number( mExtent.xMinimum() ) );
extentElem.setAttribute( "xmax", QString::number( mExtent.xMaximum() ) );
extentElem.setAttribute( "ymin", QString::number( mExtent.yMinimum() ) );
extentElem.setAttribute( "ymax", QString::number( mExtent.yMaximum() ) );
composerMapElem.appendChild( extentElem );

//layer set
Expand All @@ -681,21 +681,21 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const
QDomElement gridElem = doc.createElement( "Grid" );
gridElem.setAttribute( "show", mGridEnabled );
gridElem.setAttribute( "gridStyle", mGridStyle );
gridElem.setAttribute( "intervalX", mGridIntervalX );
gridElem.setAttribute( "intervalY", mGridIntervalY );
gridElem.setAttribute( "offsetX", mGridOffsetX );
gridElem.setAttribute( "offsetY", mGridOffsetY );
gridElem.setAttribute( "penWidth", mGridPen.widthF() );
gridElem.setAttribute( "intervalX", QString::number( mGridIntervalX ) );
gridElem.setAttribute( "intervalY", QString::number( mGridIntervalY ) );
gridElem.setAttribute( "offsetX", QString::number( mGridOffsetX ) );
gridElem.setAttribute( "offsetY", QString::number( mGridOffsetY ) );
gridElem.setAttribute( "penWidth", QString::number( mGridPen.widthF() ) );
gridElem.setAttribute( "penColorRed", mGridPen.color().red() );
gridElem.setAttribute( "penColorGreen", mGridPen.color().green() );
gridElem.setAttribute( "penColorBlue", mGridPen.color().blue() );
gridElem.setAttribute( "crossLength", mCrossLength );
gridElem.setAttribute( "crossLength", QString::number( mCrossLength ) );

//grid annotation
QDomElement annotationElem = doc.createElement( "Annotation" );
annotationElem.setAttribute( "show", mShowGridAnnotation );
annotationElem.setAttribute( "position", mGridAnnotationPosition );
annotationElem.setAttribute( "frameDistance", mAnnotationFrameDistance );
annotationElem.setAttribute( "frameDistance", QString::number( mAnnotationFrameDistance ) );
annotationElem.setAttribute( "direction", mGridAnnotationDirection );
annotationElem.setAttribute( "font", mGridAnnotationFont.toString() );
annotationElem.setAttribute( "precision", mGridAnnotationPrecision );
Expand Down
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposerpicture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ bool QgsComposerPicture::writeXML( QDomElement& elem, QDomDocument & doc ) const
}
QDomElement composerPictureElem = doc.createElement( "ComposerPicture" );
composerPictureElem.setAttribute( "file", QgsProject::instance()->writePath( mSourceFile.fileName() ) );
composerPictureElem.setAttribute( "pictureWidth", mPictureWidth );
composerPictureElem.setAttribute( "pictureHeight", mPictureHeight );
composerPictureElem.setAttribute( "pictureWidth", QString::number( mPictureWidth ) );
composerPictureElem.setAttribute( "pictureHeight", QString::number( mPictureHeight ) );
if ( !mRotationMap )
{
composerPictureElem.setAttribute( "mapId", -1 );
Expand Down
14 changes: 7 additions & 7 deletions src/core/composer/qgscomposerscalebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,16 @@ bool QgsComposerScaleBar::writeXML( QDomElement& elem, QDomDocument & doc ) cons
}

QDomElement composerScaleBarElem = doc.createElement( "ComposerScaleBar" );
composerScaleBarElem.setAttribute( "height", mHeight );
composerScaleBarElem.setAttribute( "labelBarSpace", mLabelBarSpace );
composerScaleBarElem.setAttribute( "boxContentSpace", mBoxContentSpace );
composerScaleBarElem.setAttribute( "height", QString::number( mHeight ) );
composerScaleBarElem.setAttribute( "labelBarSpace", QString::number( mLabelBarSpace ) );
composerScaleBarElem.setAttribute( "boxContentSpace", QString::number( mBoxContentSpace ) );
composerScaleBarElem.setAttribute( "numSegments", mNumSegments );
composerScaleBarElem.setAttribute( "numSegmentsLeft", mNumSegmentsLeft );
composerScaleBarElem.setAttribute( "numUnitsPerSegment", mNumUnitsPerSegment );
composerScaleBarElem.setAttribute( "segmentMillimeters", mSegmentMillimeters );
composerScaleBarElem.setAttribute( "numMapUnitsPerScaleBarUnit", mNumMapUnitsPerScaleBarUnit );
composerScaleBarElem.setAttribute( "numUnitsPerSegment", QString::number( mNumUnitsPerSegment ) );
composerScaleBarElem.setAttribute( "segmentMillimeters", QString::number( mSegmentMillimeters ) );
composerScaleBarElem.setAttribute( "numMapUnitsPerScaleBarUnit", QString::number( mNumMapUnitsPerScaleBarUnit ) );
composerScaleBarElem.setAttribute( "font", mFont.toString() );
composerScaleBarElem.setAttribute( "outlineWidth", mPen.widthF() );
composerScaleBarElem.setAttribute( "outlineWidth", QString::number( mPen.widthF() ) );
composerScaleBarElem.setAttribute( "unitLabel", mUnitLabeling );

//style
Expand Down
6 changes: 3 additions & 3 deletions src/core/composer/qgscomposershape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ bool QgsComposerShape::writeXML( QDomElement& elem, QDomDocument & doc ) const
{
QDomElement composerShapeElem = doc.createElement( "ComposerShape" );
composerShapeElem.setAttribute( "shapeType", mShape );
composerShapeElem.setAttribute( "outlineWidth", mPen.widthF() );
composerShapeElem.setAttribute( "outlineWidth", QString::number( mPen.widthF() ) );
composerShapeElem.setAttribute( "transparentFill", mBrush.style() == Qt::NoBrush );
composerShapeElem.setAttribute( "shapeWidth", mShapeWidth );
composerShapeElem.setAttribute( "shapeHeight", mShapeHeight );
composerShapeElem.setAttribute( "shapeWidth", QString::number( mShapeWidth ) );
composerShapeElem.setAttribute( "shapeHeight", QString::number( mShapeHeight ) );
QDomElement outlineColorElem = doc.createElement( "OutlineColor" );
outlineColorElem.setAttribute( "red", mPen.color().red() );
outlineColorElem.setAttribute( "green", mPen.color().green() );
Expand Down
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposertable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ void QgsComposerTable::adjustFrameToSize()

bool QgsComposerTable::tableWriteXML( QDomElement& elem, QDomDocument & doc ) const
{
elem.setAttribute( "lineTextDist", mLineTextDistance );
elem.setAttribute( "lineTextDist", QString::number( mLineTextDistance ) );
elem.setAttribute( "headerFont", mHeaderFont.toString() );
elem.setAttribute( "contentFont", mContentFont.toString() );
elem.setAttribute( "gridStrokeWidth", mGridStrokeWidth );
elem.setAttribute( "gridStrokeWidth", QString::number( mGridStrokeWidth ) );
elem.setAttribute( "gridColorRed", mGridColor.red() );
elem.setAttribute( "gridColorGreen", mGridColor.green() );
elem.setAttribute( "gridColorBlue", mGridColor.blue() );
Expand Down
10 changes: 5 additions & 5 deletions src/core/composer/qgscomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ bool QgsComposition::writeXML( QDomElement& composerElem, QDomDocument& doc )
QDomElement compositionElem = doc.createElement( "Composition" );
if ( mPaperItem )
{
compositionElem.setAttribute( "paperWidth", mPaperItem->rect().width() );
compositionElem.setAttribute( "paperHeight", mPaperItem->rect().height() );
compositionElem.setAttribute( "paperWidth", QString::number( mPaperItem->rect().width() ) );
compositionElem.setAttribute( "paperHeight", QString::number( mPaperItem->rect().height() ) );
}

//snapping
Expand All @@ -202,9 +202,9 @@ bool QgsComposition::writeXML( QDomElement& composerElem, QDomDocument& doc )
{
compositionElem.setAttribute( "snapping", "0" );
}
compositionElem.setAttribute( "snapGridResolution", mSnapGridResolution );
compositionElem.setAttribute( "snapGridOffsetX", mSnapGridOffsetX );
compositionElem.setAttribute( "snapGridOffsetY", mSnapGridOffsetY );
compositionElem.setAttribute( "snapGridResolution", QString::number( mSnapGridResolution ) );
compositionElem.setAttribute( "snapGridOffsetX", QString::number( mSnapGridOffsetX ) );
compositionElem.setAttribute( "snapGridOffsetY", QString::number( mSnapGridOffsetY ) );

compositionElem.setAttribute( "printResolution", mPrintResolution );
compositionElem.setAttribute( "printAsRaster", mPrintAsRaster );
Expand Down
3 changes: 1 addition & 2 deletions src/core/pal/costcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ namespace pal
delete pCost;
}


int CostCalculator::finalizeCandidatesCosts( Feats* feat, int max_p, RTree <PointSet*, double, 2, double> *obstacles, double bbx[4], double bby[4] )
{
// If candidates list is smaller than expected
Expand Down Expand Up @@ -191,7 +190,7 @@ namespace pal
max_p = stop;

#ifdef _DEBUG_FULL_
std::cout << "Nblabel kept for feat " << feat->feature->uid << "/" << feat->feature->layer->name << ": " << max_p << "/" << feat->nblp << std::endl;
std::cout << "Nblabel kept for feat " << feat->feature->getUID() << "/" << feat->feature->getLayer()->getName() << ": " << max_p << "/" << feat->nblp << std::endl;
#endif

// Sets costs for candidates of polygon
Expand Down
3 changes: 1 addition & 2 deletions src/core/pal/feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,6 @@ namespace pal
flags = FLAG_ON_LINE; // default flag

// generate curved labels
std::cerr << "------" << std::endl;
for ( int i = 0; i*delta < total_distance; i++ )
{
LabelPosition* slp = curvedPlacementAtOffset( mapShape, path_distances, 0, 1, i * delta );
Expand All @@ -914,7 +913,7 @@ namespace pal
tmp = tmp->getNextPart();
}

double angle_diff_avg = angle_diff / ( f->labelInfo->char_num - 1 ); // <0, pi> but pi/8 is much already
double angle_diff_avg = f->labelInfo->char_num > 1 ? (angle_diff / ( f->labelInfo->char_num - 1 )) : 0; // <0, pi> but pi/8 is much already
double cost = angle_diff_avg / 100; // <0, 0.031 > but usually <0, 0.003 >
if ( cost < 0.0001 ) cost = 0.0001;

Expand Down
8 changes: 4 additions & 4 deletions src/core/pal/pal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ namespace pal


#ifdef _DEBUG_FULL_
std::cout << "extract feat : " << ft_ptr->layer->name << "/" << ft_ptr->uid << std::endl;
std::cout << "extract feat : " << ft_ptr->getLayer()->getName() << "/" << ft_ptr->getUID() << std::endl;
#endif

// all feature which are obstacle will be inserted into obstacles
Expand Down Expand Up @@ -513,7 +513,7 @@ namespace pal
{
feat = fFeats->pop_front();
#ifdef _DEBUG_FULL_
std::cout << "Feature:" << feat->feature->layer->name << "/" << feat->feature->uid << std::endl;
std::cout << "Feature:" << feat->feature->getLayer()->getName() << "/" << feat->feature->getUID() << " candidates " << feat->nblp << std::endl;
#endif
prob->featStartId[i] = idlp;
prob->inactiveCost[i] = pow( 2, 10 - 10 * feat->priority );
Expand All @@ -535,7 +535,7 @@ namespace pal
max_p = CostCalculator::finalizeCandidatesCosts( feat, max_p, obstacles, bbx, bby );

#ifdef _DEBUG_FULL_
std::cout << "All Cost are setted" << std::endl;
std::cout << "All costs are set" << std::endl;
#endif
// only keep the 'max_p' best candidates
for ( j = max_p; j < feat->nblp; j++ )
Expand Down Expand Up @@ -597,7 +597,7 @@ namespace pal

nbOverlaps += lp->getNumOverlaps();
#ifdef _DEBUG_FULL_
std::cout << "Nb overlap for " << idlp << "/" << prob->nblp - 1 << " : " << lp->nbOverlap << std::endl;
std::cout << "Nb overlap for " << idlp << "/" << prob->nblp - 1 << " : " << lp->getNumOverlaps() << std::endl;
#endif
}
j++;
Expand Down
24 changes: 12 additions & 12 deletions src/core/qgsdiagramrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void QgsDiagramLayerSettings::writeXML( QDomElement& layerElem, QDomDocument& do
diagramLayerElem.setAttribute( "linePlacementFlags", placementFlags );
diagramLayerElem.setAttribute( "priority", priority );
diagramLayerElem.setAttribute( "obstacle", obstacle );
diagramLayerElem.setAttribute( "dist", dist );
diagramLayerElem.setAttribute( "dist", QString::number( dist ) );
diagramLayerElem.setAttribute( "xPosColumn", xPosColumn );
diagramLayerElem.setAttribute( "yPosColumn", yPosColumn );
layerElem.appendChild( diagramLayerElem );
Expand Down Expand Up @@ -90,12 +90,12 @@ void QgsDiagramSettings::writeXML( QDomElement& rendererElem, QDomDocument& doc
categoryElem.setAttribute( "font", font.toString() );
categoryElem.setAttribute( "backgroundColor", backgroundColor.name() );
categoryElem.setAttribute( "backgroundAlpha", backgroundColor.alpha() );
categoryElem.setAttribute( "width", size.width() );
categoryElem.setAttribute( "height", size.height() );
categoryElem.setAttribute( "width", QString::number( size.width() ) );
categoryElem.setAttribute( "height", QString::number( size.height() ) );
categoryElem.setAttribute( "penColor", penColor.name() );
categoryElem.setAttribute( "penWidth", penWidth );
categoryElem.setAttribute( "minScaleDenominator", minScaleDenominator );
categoryElem.setAttribute( "maxScaleDenominator", maxScaleDenominator );
categoryElem.setAttribute( "penWidth", QString::number( penWidth ) );
categoryElem.setAttribute( "minScaleDenominator", QString::number( minScaleDenominator ) );
categoryElem.setAttribute( "maxScaleDenominator", QString::number( maxScaleDenominator ) );
if ( sizeType == MM )
{
categoryElem.setAttribute( "sizeType", "MM" );
Expand Down Expand Up @@ -346,12 +346,12 @@ void QgsLinearlyInterpolatedDiagramRenderer::readXML( const QDomElement& elem )
void QgsLinearlyInterpolatedDiagramRenderer::writeXML( QDomElement& layerElem, QDomDocument& doc ) const
{
QDomElement rendererElem = doc.createElement( "LinearlyInterpolatedDiagramRenderer" );
rendererElem.setAttribute( "lowerValue", mLowerValue );
rendererElem.setAttribute( "upperValue", mUpperValue );
rendererElem.setAttribute( "lowerWidth", mLowerSize.width() );
rendererElem.setAttribute( "lowerHeight", mLowerSize.height() );
rendererElem.setAttribute( "upperWidth", mUpperSize.width() );
rendererElem.setAttribute( "upperHeight", mUpperSize.height() );
rendererElem.setAttribute( "lowerValue", QString::number( mLowerValue ) );
rendererElem.setAttribute( "upperValue", QString::number( mUpperValue ) );
rendererElem.setAttribute( "lowerWidth", QString::number( mLowerSize.width() ) );
rendererElem.setAttribute( "lowerHeight", QString::number( mLowerSize.height() ) );
rendererElem.setAttribute( "upperWidth", QString::number( mUpperSize.width() ) );
rendererElem.setAttribute( "upperHeight", QString::number( mUpperSize.height() ) );
rendererElem.setAttribute( "classificationAttribute", mClassificationAttribute );
mSettings.writeXML( rendererElem, doc );
_writeXML( rendererElem, doc );
Expand Down
10 changes: 5 additions & 5 deletions src/core/qgslabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const

// size and units
QDomElement size = document.createElement( "size" );
size.setAttribute( "value", mLabelAttributes->size() );
size.setAttribute( "value", QString::number( mLabelAttributes->size() ) );
if ( mLabelAttributes->sizeIsSet() )
{
if ( mLabelFieldIdx[Size] != -1 )
Expand Down Expand Up @@ -1244,9 +1244,9 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const
{
QDomElement offset = document.createElement( "offset" );
offset.setAttribute( "units", QgsLabelAttributes::unitsName( mLabelAttributes->offsetType() ) );
offset.setAttribute( "x", mLabelAttributes->xOffset() );
offset.setAttribute( "x", QString::number( mLabelAttributes->xOffset() ) );
offset.setAttribute( "xfieldname", labelField( XOffset ) );
offset.setAttribute( "y", mLabelAttributes->yOffset() );
offset.setAttribute( "y", QString::number( mLabelAttributes->yOffset() ) );
offset.setAttribute( "yfieldname", labelField( YOffset ) );
labelattributes.appendChild( offset );
}
Expand All @@ -1255,7 +1255,7 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const
QDomElement angle = document.createElement( "angle" );
if ( mLabelAttributes->angleIsSet() )
{
angle.setAttribute( "value", mLabelAttributes->angle() );
angle.setAttribute( "value", QString::number( mLabelAttributes->angle() ) );
if ( mLabelFieldIdx[Angle] != -1 )
{
angle.setAttribute( "fieldname", labelField( Angle ) );
Expand Down Expand Up @@ -1311,7 +1311,7 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const
QDomElement buffersize = document.createElement( "buffersize" );
if ( mLabelAttributes->bufferSizeIsSet() )
{
buffersize.setAttribute( "value", mLabelAttributes->bufferSize() );
buffersize.setAttribute( "value", QString::number( mLabelAttributes->bufferSize() ) );
buffersize.setAttribute( "units", QgsLabelAttributes::unitsName( mLabelAttributes->bufferSizeType() ) );
if ( mLabelFieldIdx[BufferSize] != -1 )
{
Expand Down
8 changes: 4 additions & 4 deletions src/core/qgsmaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ bool QgsMapLayer::writeXML( QDomNode & layer_node, QDomDocument & document )

// use scale dependent visibility flag
maplayer.setAttribute( "hasScaleBasedVisibilityFlag", hasScaleBasedVisibility() ? 1 : 0 );
maplayer.setAttribute( "minimumScale", minimumScale() );
maplayer.setAttribute( "maximumScale", maximumScale() );
maplayer.setAttribute( "minimumScale", QString::number( minimumScale() ) );
maplayer.setAttribute( "maximumScale", QString::number( maximumScale() ) );

// ID
QDomElement layerId = document.createElement( "id" );
Expand Down Expand Up @@ -745,8 +745,8 @@ QString QgsMapLayer::saveNamedStyle( const QString theURI, bool & theResultFlag

// use scale dependent visibility flag
myRootNode.setAttribute( "hasScaleBasedVisibilityFlag", hasScaleBasedVisibility() ? 1 : 0 );
myRootNode.setAttribute( "minimumScale", minimumScale() );
myRootNode.setAttribute( "maximumScale", maximumScale() );
myRootNode.setAttribute( "minimumScale", QString::number( minimumScale() ) );
myRootNode.setAttribute( "maximumScale", QString::number( maximumScale() ) );

// <transparencyLevelInt>
QDomElement transparencyLevelIntElement = myDocument.createElement( "transparencyLevelInt" );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3219,8 +3219,8 @@ bool QgsVectorLayer::writeSymbology( QDomNode& node, QDomDocument& doc, QString&
{
// use scale dependent visibility flag
mapLayerNode.setAttribute( "scaleBasedLabelVisibilityFlag", mLabel->scaleBasedVisibility() ? 1 : 0 );
mapLayerNode.setAttribute( "minLabelScale", mLabel->minScale() );
mapLayerNode.setAttribute( "maxLabelScale", mLabel->maxScale() );
mapLayerNode.setAttribute( "minLabelScale", QString::number( mLabel->minScale() ) );
mapLayerNode.setAttribute( "maxLabelScale", QString::number( mLabel->maxScale() ) );

//classification field(s)
QgsAttributeList attributes = mRenderer->classificationAttributes();
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,8 @@ QDomElement QgsGraduatedSymbolRendererV2::save( QDomDocument& doc )
symbols.insert( symbolName, range.symbol() );

QDomElement rangeElem = doc.createElement( "range" );
rangeElem.setAttribute( "lower", range.lowerValue() );
rangeElem.setAttribute( "upper", range.upperValue() );
rangeElem.setAttribute( "lower", QString::number( range.lowerValue() ) );
rangeElem.setAttribute( "upper", QString::number( range.upperValue() ) );
rangeElem.setAttribute( "symbol", symbolName );
rangeElem.setAttribute( "label", range.label() );
rangesElem.appendChild( rangeElem );
Expand Down
6 changes: 3 additions & 3 deletions src/core/symbology-ng/qgspointdisplacementrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@ QDomElement QgsPointDisplacementRenderer::save( QDomDocument& doc )
rendererElement.setAttribute( "type", "pointDisplacement" );
rendererElement.setAttribute( "labelAttributeName", mLabelAttributeName );
rendererElement.setAttribute( "labelFont", mLabelFont.toString() );
rendererElement.setAttribute( "circleWidth", mCircleWidth );
rendererElement.setAttribute( "circleWidth", QString::number( mCircleWidth ) );
rendererElement.setAttribute( "circleColor", QgsSymbolLayerV2Utils::encodeColor( mCircleColor ) );
rendererElement.setAttribute( "labelColor", QgsSymbolLayerV2Utils::encodeColor( mLabelColor ) );
rendererElement.setAttribute( "circleRadiusAddition", mCircleRadiusAddition );
rendererElement.setAttribute( "maxLabelScaleDenominator", mMaxLabelScaleDenominator );
rendererElement.setAttribute( "circleRadiusAddition", QString::number( mCircleRadiusAddition ) );
rendererElement.setAttribute( "maxLabelScaleDenominator", QString::number( mMaxLabelScaleDenominator ) );

if ( mRenderer )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgssymbollayerv2utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ QDomElement QgsSymbolLayerV2Utils::saveSymbol( QString name, QgsSymbolV2* symbol
symEl.setAttribute( "type", _nameForSymbolType( symbol->type() ) );
symEl.setAttribute( "name", name );
symEl.setAttribute( "outputUnit", encodeOutputUnit( symbol->outputUnit() ) );
symEl.setAttribute( "alpha", symbol->alpha() );
symEl.setAttribute( "alpha", QString::number( symbol->alpha() ) );
QgsDebugMsg( "num layers " + QString::number( symbol->symbolLayerCount() ) );
for ( int i = 0; i < symbol->symbolLayerCount(); i++ )
{
Expand Down
18 changes: 9 additions & 9 deletions src/gui/qgsannotationitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,16 @@ void QgsAnnotationItem::_writeXML( QDomDocument& doc, QDomElement& itemElem ) co
}
QDomElement annotationElem = doc.createElement( "AnnotationItem" );
annotationElem.setAttribute( "mapPositionFixed", mMapPositionFixed );
annotationElem.setAttribute( "mapPosX", mMapPosition.x() );
annotationElem.setAttribute( "mapPosY", mMapPosition.y() );
annotationElem.setAttribute( "offsetX", mOffsetFromReferencePoint.x() );
annotationElem.setAttribute( "offsetY", mOffsetFromReferencePoint.y() );
annotationElem.setAttribute( "frameWidth", mFrameSize.width() );
annotationElem.setAttribute( "frameHeight", mFrameSize.height() );
annotationElem.setAttribute( "mapPosX", QString::number( mMapPosition.x() ) );
annotationElem.setAttribute( "mapPosY", QString::number( mMapPosition.y() ) );
annotationElem.setAttribute( "offsetX", QString::number( mOffsetFromReferencePoint.x() ) );
annotationElem.setAttribute( "offsetY", QString::number( mOffsetFromReferencePoint.y() ) );
annotationElem.setAttribute( "frameWidth", QString::number( mFrameSize.width() ) );
annotationElem.setAttribute( "frameHeight", QString::number( mFrameSize.height() ) );
QPointF canvasPos = pos();
annotationElem.setAttribute( "canvasPosX", canvasPos.x() );
annotationElem.setAttribute( "canvasPosY", canvasPos.y() );
annotationElem.setAttribute( "frameBorderWidth", mFrameBorderWidth );
annotationElem.setAttribute( "canvasPosX", QString::number( canvasPos.x() ) );
annotationElem.setAttribute( "canvasPosY", QString::number( canvasPos.y() ) );
annotationElem.setAttribute( "frameBorderWidth", QString::number( mFrameBorderWidth ) );
annotationElem.setAttribute( "frameColor", mFrameColor.name() );
annotationElem.setAttribute( "frameBackgroundColor", mFrameBackgroundColor.name() );
annotationElem.setAttribute( "frameBackgroundColorAlpha", mFrameBackgroundColor.alpha() );
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsprojectionselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ void QgsProjectionSelector::applySelection( int column, QString value )
// invoked deferred selection
column = mSearchColumn;
value = mSearchValue;

mSearchColumn = NONE;
mSearchValue.clear();
}

if ( column == NONE )
Expand Down
16 changes: 8 additions & 8 deletions src/mapserver/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,10 +923,10 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
{
QDomElement bBoxElem = result.createElement( "BoundingBox" );
bBoxElem.setAttribute( "CRS", mMapRenderer->destinationCrs().authid() );
bBoxElem.setAttribute( "minx", featuresRect->xMinimum() );
bBoxElem.setAttribute( "maxx", featuresRect->xMaximum() );
bBoxElem.setAttribute( "miny", featuresRect->yMinimum() );
bBoxElem.setAttribute( "maxy", featuresRect->yMaximum() );
bBoxElem.setAttribute( "minx", QString::number( featuresRect->xMinimum() ) );
bBoxElem.setAttribute( "maxx", QString::number( featuresRect->xMaximum() ) );
bBoxElem.setAttribute( "miny", QString::number( featuresRect->yMinimum() ) );
bBoxElem.setAttribute( "maxy", QString::number( featuresRect->yMaximum() ) );
getFeatureInfoElement.insertBefore( bBoxElem, QDomNode() ); //insert as first child
}

Expand Down Expand Up @@ -1382,10 +1382,10 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
//append feature bounding box to feature info xml
QDomElement bBoxElem = infoDocument.createElement( "BoundingBox" );
bBoxElem.setAttribute( version == "1.1.1" ? "SRS" : "CRS", mapRender->destinationCrs().authid() );
bBoxElem.setAttribute( "minx", box.xMinimum() );
bBoxElem.setAttribute( "maxx", box.xMaximum() );
bBoxElem.setAttribute( "miny", box.yMinimum() );
bBoxElem.setAttribute( "maxy", box.yMaximum() );
bBoxElem.setAttribute( "minx", QString::number( box.xMinimum() ) );
bBoxElem.setAttribute( "maxx", QString::number( box.xMaximum() ) );
bBoxElem.setAttribute( "miny", QString::number( box.yMinimum() ) );
bBoxElem.setAttribute( "maxy", QString::number( box.yMaximum() ) );
featureElement.appendChild( bBoxElem );
}
}
Expand Down
234 changes: 110 additions & 124 deletions src/plugins/heatmap/heatmapguibase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<height>380</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>430</width>
<height>380</height>
</size>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Heatmap Plugin</string>
Expand Down Expand Up @@ -132,130 +132,116 @@
<property name="checked">
<bool>false</bool>
</property>
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>391</width>
<height>61</height>
</rect>
</property>
<layout class="QGridLayout" name="advancedGrid">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="rowLabel">
<property name="text">
<string>Row</string>
</property>
<property name="buddy">
<cstring>rowLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="cellsizeXLabel">
<property name="text">
<string>Cell Size X</string>
</property>
<property name="buddy">
<cstring>cellXLineEdit</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="columnLabel">
<property name="text">
<string>Column</string>
</property>
<property name="buddy">
<cstring>columnLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="cellsizeYLabel">
<property name="text">
<string>Cell Size Y</string>
</property>
<property name="buddy">
<cstring>cellYLineEdit</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="rowLineEdit"/>
</item>
<item row="0" column="3">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QGridLayout" name="advancedGrid">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="rowLabel">
<property name="text">
<string>Row</string>
</property>
<property name="buddy">
<cstring>rowLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="cellsizeXLabel">
<property name="text">
<string>Cell Size X</string>
</property>
<property name="buddy">
<cstring>cellXLineEdit</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="columnLabel">
<property name="text">
<string>Column</string>
</property>
<property name="buddy">
<cstring>columnLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="cellsizeYLabel">
<property name="text">
<string>Cell Size Y</string>
</property>
<property name="buddy">
<cstring>cellYLineEdit</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="rowLineEdit"/>
</item>
<item row="0" column="3">
<widget class="QLineEdit" name="columnLineEdit"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="cellXLineEdit"/>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="cellYLineEdit"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="gridLayoutWidget_4">
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>391</width>
<height>61</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="useRadius">
<property name="text">
<string>Use Radius from field</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="radiusFieldCombo">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="radiusFieldUnitCombo">
<property name="enabled">
<bool>false</bool>
</property>
<item>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="cellXLineEdit"/>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="cellYLineEdit"/>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="useRadius">
<property name="text">
<string>meters</string>
<string>Use Radius from field</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="radiusFieldCombo">
<property name="enabled">
<bool>false</bool>
</property>
</item>
<item>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="radiusFieldUnitCombo">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>meters</string>
</property>
</item>
<item>
<property name="text">
<string>map units</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="useWeight">
<property name="text">
<string>map units</string>
<string>Use Weight from field</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="weightFieldCombo">
<property name="enabled">
<bool>false</bool>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="useWeight">
<property name="text">
<string>Use Weight from field</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="weightFieldCombo">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ void QgsRasterTerrainAnalysisDialog::on_mExportColorsButton_clicked()
for ( ; rColorsIt != rColors.constEnd(); ++rColorsIt )
{
QDomElement classElem = doc.createElement( "ReliefColor" );
classElem.setAttribute( "MinElevation", rColorsIt->minElevation );
classElem.setAttribute( "MaxElevation", rColorsIt->maxElevation );
classElem.setAttribute( "MinElevation", QString::number( rColorsIt->minElevation ) );
classElem.setAttribute( "MaxElevation", QString::number( rColorsIt->maxElevation ) );
classElem.setAttribute( "red", QString::number( rColorsIt->color.red() ) );
classElem.setAttribute( "green", QString::number( rColorsIt->color.green() ) );
classElem.setAttribute( "blue", QString::number( rColorsIt->color.blue() ) );
Expand Down
12 changes: 12 additions & 0 deletions src/providers/wfs/qgswfsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ QgsWFSProvider::QgsWFSProvider( const QString& uri )
return;
}

//Failed to detect feature type from describeFeatureType -> get first feature from layer to detect type
if ( mWKBType == QGis::WKBUnknown )
{
QString bkUri = dataSourceUri();
QUrl typeDetectionUri( uri );
typeDetectionUri.removeQueryItem( "BBOX" );
typeDetectionUri.addQueryItem( "MAXFEATURES", "1" );
setDataSourceUri( typeDetectionUri.toString() );
reloadData();
setDataSourceUri( bkUri );
}

if ( ! uri.contains( "BBOX" ) )
{ //"Cache Features" option; get all features in layer immediately
reloadData();
Expand Down