Skip to content

Commit daf2b0f

Browse files
author
wonder
committed
merge from trunk r11750:11800
git-svn-id: http://svn.osgeo.org/qgis/branches/symbology-ng-branch@11899 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 26b12b6 commit daf2b0f

File tree

142 files changed

+5993
-4314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+5993
-4314
lines changed

i18n/qgis_de.ts

Lines changed: 2313 additions & 1344 deletions
Large diffs are not rendered by default.

mac/xcode/Qgis.xcodeproj/project.pbxproj

Lines changed: 30 additions & 30 deletions
Large diffs are not rendered by default.

python/core/qgsdataprovider.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class QgsDataProvider : QObject
6464
* that can be used by the data provider to create a subset.
6565
* Must be implemented in the dataprovider.
6666
*/
67-
virtual void setSubsetString(QString subset);
67+
virtual bool setSubsetString(QString subset);
6868

6969

7070
/**

python/core/qgsvectordataprovider.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ class QgsVectorDataProvider : QgsDataProvider
141141
* Return unique values of an attribute
142142
* @param index the index of the attribute
143143
* @param values reference to the list to fill
144+
* @param limit maximum number of values to return (added in 1.4)
144145
*
145146
* Default implementation simply iterates the features
146147
*/
147-
virtual void uniqueValues(int index, QList<QVariant> &uniqueValues /Out/);
148+
virtual void uniqueValues(int index, QList<QVariant> &uniqueValues /Out/, int limit = -1);
148149

149150
/**Returns the possible enum values of an attribute. Returns an empty stringlist if a provider does not support enum types
150151
or if the given attribute is not an enum type.

python/core/qgsvectorlayer.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ public:
166166
* @param subset The subset string. This may be the where clause of a sql statement
167167
* or other defintion string specific to the underlying dataprovider
168168
* and data store.
169+
* @return true, when setting the string was successful, false otherwise (added in 1.4)
169170
*/
170-
virtual void setSubsetString(QString subset);
171+
virtual bool setSubsetString(QString subset);
171172

172173
/**
173174
* Get the string (typically sql) used to define a subset of the layer

python/plugins/fTools/tools/doIntersectLines.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
#-----------------------------------------------------------
23
#
34
# Locate Line Intersections
@@ -123,11 +124,11 @@ def compute(self, line1, line2, field1, field2, outPath, progressBar):
123124
fieldList = self.getFieldList(layer1)
124125
index1 = provider1.fieldNameIndex(field1)
125126
field1 = fieldList[index1]
126-
field1.setName("1_" + unicode(field1.name()))
127+
field1.setName(unicode(field1.name()) + "_1")
127128
fieldList = self.getFieldList(layer2)
128129
index2 = provider2.fieldNameIndex(field2)
129130
field2 = fieldList[index2]
130-
field2.setName("2_" + unicode(field2.name()))
131+
field2.setName(unicode(field2.name()) + "_2")
131132
fieldList = {0:field1, 1:field2}
132133
sRs = provider1.crs()
133134
check = QFile(self.shapefileName)

python/plugins/plugin_installer/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Copyright (c) 2007 Matthew T. Perry
2-
Copyright (c) 2008 Borys Jurgiel
2+
Copyright (c) 2008-2009 Borys Jurgiel
33

44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of

python/plugins/plugin_installer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def name():
1414
return "Plugin Installer"
1515

1616
def version():
17-
return "Version 1.0.3"
17+
return "Version 1.0.5"
1818

1919
def description():
2020
return "Downloads and installs QGIS python plugins"

python/plugins/plugin_installer/installer_data.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"valid" bool,
3030
"QPHttp" QPHttp,
3131
"Relay" Relay, # Relay object for transmitting signals from QPHttp with adding the repoName information
32-
"xmlData" QDomDocument,
32+
"xmlData" QBuffer,
3333
"state" int, (0 - disabled, 1-loading, 2-loaded ok, 3-error (to be retried), 4-rejected)
3434
"error" QString}}
3535
mPlugins = dict of dicts {id : {"name" QString,
@@ -87,6 +87,7 @@ def setIface(qgisIface):
8787
("Volkan Kepoglu's Repository","http://ggit.metu.edu.tr/~volkan/plugins.xml", ""),
8888
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", ""),
8989
("Marco Hugentobler's Repository","http://karlinapp.ethz.ch/python_plugins/python_plugins.xml", ""),
90+
("Bob Bruce's Repository", "http://www.mappinggeek.ca/QGISPythonPlugins/Bobs-QGIS-plugins.xml", ""),
9091
("Sourcepole Repository", "http://build.sourcepole.ch/qgis/plugins.xml", "")]
9192

9293

@@ -376,7 +377,10 @@ def requestFetching(self,key):
376377
self.mRepositories[key]["state"] = 1
377378
url = QUrl(self.mRepositories[key]["url"])
378379
path = QString(url.toPercentEncoding(url.path(), "!$&'()*+,;=:@/"))
379-
self.mRepositories[key]["QPHttp"] = QPHttp(url.host())
380+
port = url.port()
381+
if port < 0:
382+
port = 80
383+
self.mRepositories[key]["QPHttp"] = QPHttp(url.host(), port)
380384
self.connect(self.mRepositories[key]["QPHttp"], SIGNAL("requestFinished (int, bool)"), self.xmlDownloaded)
381385
self.connect(self.mRepositories[key]["QPHttp"], SIGNAL("stateChanged ( int )"), self.mRepositories[key]["Relay"].stateChanged)
382386
self.connect(self.mRepositories[key]["QPHttp"], SIGNAL("dataReadProgress ( int , int )"), self.mRepositories[key]["Relay"].dataReadProgress)

python/plugins/plugin_installer/installer_gui.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ def __init__(self, parent, plugin):
152152
tmpDir = QDir.tempPath()
153153
tmpPath = QDir.cleanPath(tmpDir+"/"+fileName)
154154
self.file = QFile(tmpPath)
155-
self.http = QPHttp(url.host())
155+
port = url.port()
156+
if port < 0:
157+
port = 80
158+
self.http = QPHttp(url.host(), port)
156159
self.connect(self.http, SIGNAL("stateChanged ( int )"), self.stateChanged)
157160
self.connect(self.http, SIGNAL("dataReadProgress ( int , int )"), self.readProgress)
158161
self.connect(self.http, SIGNAL("requestFinished (int, bool)"), self.requestFinished)
@@ -335,7 +338,8 @@ def populateMostWidgets(self):
335338
a.setToolTip(0,self.tr("This repository is disabled"))
336339
else:
337340
a.setToolTip(0,self.tr("This repository is blocked due to incompatibility with your Quantum GIS version"))
338-
a.setDisabled(True)
341+
for i in [0,1,2]:
342+
a.setForeground(i,QBrush(QColor(Qt.gray)))
339343
for i in [0,1,2]:
340344
self.treeRepositories.resizeColumnToContents(i)
341345
self.comboFilter1.addItem(self.tr("orphans"))

python/plugins/plugin_installer/installer_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ def newlyReinstalledPlugins(self):
187187
# ----------------------------------------- #
188188
def resetNewlyProcessedPlugins(self):
189189
""" clear the dict of newly processed plugins """
190-
history.clear()
190+
history.clear()

qgis.1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ qgis \- Quantum GIS Geographic Information System
2020
.br
2121
See OPTIONS for a full description.
2222
.SH DESCRIPTION
23-
Quantum GIS (QGIS) is a Geographic Information System (GIS) built for Linux/Unix. QGIS supports vector, raster, and database formats. QGIS is licensed under the GNU Public License.
23+
Quantum GIS (QGIS) is a cross platform, Free and Open Source Geographic
24+
Information System (GIS). Supported platforms include Linux/Unix, Mac OS X and
25+
Microsoft Windows. QGIS supports vector, raster, and database formats. QGIS is
26+
licensed under the GNU Public License.
2427

2528
Some of the major features include:
2629

@@ -48,8 +51,9 @@ Create a snapshot image from the specified layers and save it to filename. The
4851
snapshot is saved in PNG format.
4952
.TP
5053
.B \--lang language
51-
Set the language used by QGIS. Language is specified using the locale string that
52-
matches one of the translations supported by QGIS. For example, to use the German translation, specify
54+
Set the language used by QGIS. Language is specified using the locale string
55+
that matches one of the translations supported by QGIS. For example, to use the
56+
German translation, specify
5357
.B --lang de
5458
.TP
5559
.B \--project filename
@@ -78,7 +82,8 @@ layers in a PostgreSQL database and GRASS vector/raster data.
7882
QGIS preferences file. This file stores windows size/location, loaded plugins,
7983
user options, and other application settings.
8084
.SH BUGS
81-
See the QGIS home page (http://qgis.org) for a list of known issues with the latest release.
85+
See the QGIS home page (http://qgis.org) for a list of known issues with the
86+
latest release.
8287
.SH AUTHOR
8388
Gary Sherman <sherman at mrcc.com>
8489

src/analysis/interpolation/qgsgridfilewriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog )
5555
outStream.setRealNumberPrecision( 8 );
5656
writeHeader( outStream );
5757

58-
double currentYValue = mInterpolationExtent.yMaximum();
58+
double currentYValue = mInterpolationExtent.yMaximum() - mCellSizeY / 2.0; //calculate value in the center of the cell
5959
double currentXValue;
6060
double interpolatedValue;
6161

@@ -68,7 +68,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog )
6868

6969
for ( int i = 0; i < mNumRows; ++i )
7070
{
71-
currentXValue = mInterpolationExtent.xMinimum();
71+
currentXValue = mInterpolationExtent.xMinimum() + mCellSizeX / 2.0; //calculate value in the center of the cell
7272
for ( int j = 0; j < mNumColumns; ++j )
7373
{
7474
if ( mInterpolator->interpolatePoint( currentXValue, currentYValue, interpolatedValue ) == 0 )

src/analysis/vector/qgsgeometryanalyzer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ bool QgsGeometryAnalyzer::exportGeometryInformation( QgsVectorLayer* layer,
195195
const QString& shapefileName,
196196
const QString& fileEncoding )
197197
{
198+
return false;
199+
#if 0
198200
QgsVectorDataProvider* provider = layer->dataProvider();
199201
QgsAttributeList allAttrs = provider->attributeIndexes();
200202
provider->select( allAttrs, QgsRectangle(), true );
@@ -223,7 +225,7 @@ bool QgsGeometryAnalyzer::exportGeometryInformation( QgsVectorLayer* layer,
223225
writer.addFeature( outFeat );
224226
}
225227
return true;
226-
228+
#endif
227229
}
228230
bool QgsGeometryAnalyzer::simplifyGeometry( QgsVectorLayer* layer,
229231
const QString shapefileName,

src/app/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ SET(QGIS_APP_SRCS
6363
qgsprojectproperties.cpp
6464
qgsrasterlayerproperties.cpp
6565
qgssearchquerybuilder.cpp
66-
qgsserversourceselect.cpp
66+
qgswmssourceselect.cpp
6767
qgsshortcutsmanager.cpp
6868
qgssinglesymboldialog.cpp
6969
qgssnappingdialog.cpp
7070
qgsundowidget.cpp
7171
qgsuniquevaluedialog.cpp
7272
qgsvectorlayerproperties.cpp
73+
qgsquerybuilder.cpp
7374

7475
composer/qgscomposer.cpp
7576
composer/qgscomposeritemwidget.cpp
@@ -159,14 +160,15 @@ SET (QGIS_APP_MOC_HDRS
159160
qgsprojectproperties.h
160161
qgsrasterlayerproperties.h
161162
qgssearchquerybuilder.h
162-
qgsserversourceselect.h
163+
qgswmssourceselect.h
163164
qgssinglesymboldialog.h
164165
qgssnappingdialog.h
165166
qgsuniquevaluedialog.h
166167
qgsvectorlayerproperties.h
167168
qgsdbtablemodel.h
168169
qgsspatialitetablemodel.h
169170
qgsundowidget.h
171+
qgsquerybuilder.h
170172

171173
composer/qgscomposer.h
172174
composer/qgscomposeritemwidget.h
@@ -182,7 +184,6 @@ SET (QGIS_APP_MOC_HDRS
182184
legend/qgslegendlayer.h
183185
legend/qgslegendlayerfile.h
184186

185-
186187
ogr/qgsopenvectorlayerdialog.h
187188
ogr/qgsnewogrconnection.h
188189

@@ -198,14 +199,12 @@ IF (POSTGRES_FOUND)
198199
ENDIF(HAVE_PGCONFIG)
199200

200201
SET (QGIS_APP_SRCS ${QGIS_APP_SRCS}
201-
qgsdbsourceselect.cpp
202+
qgspgsourceselect.cpp
202203
qgsnewconnection.cpp
203-
qgspgquerybuilder.cpp
204204
)
205205
SET (QGIS_APP_MOC_HDRS ${QGIS_APP_MOC_HDRS}
206-
qgsdbsourceselect.h
206+
qgspgsourceselect.h
207207
qgsnewconnection.h
208-
qgspgquerybuilder.h
209208
)
210209
ENDIF (POSTGRES_FOUND)
211210

src/app/attributetable/qgsattributetabledelegate.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
QgsVectorLayer *QgsAttributeTableDelegate::layer( const QAbstractItemModel *model ) const
3030
{
31-
const QgsAttributeTableModel *tm = dynamic_cast<const QgsAttributeTableModel*>( model );
31+
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( model );
3232
if ( tm )
3333
return tm->layer();
3434

35-
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel*>( model );
35+
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel *>( model );
3636
if ( fm )
3737
return fm->layer();
3838

@@ -41,11 +41,11 @@ QgsVectorLayer *QgsAttributeTableDelegate::layer( const QAbstractItemModel *mode
4141

4242
int QgsAttributeTableDelegate::fieldIdx( const QModelIndex &index ) const
4343
{
44-
const QgsAttributeTableModel *tm = dynamic_cast<const QgsAttributeTableModel*>( index.model() );
44+
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( index.model() );
4545
if ( tm )
4646
return tm->fieldIdx( index.column() );
4747

48-
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel*>( index.model() );
48+
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel *>( index.model() );
4949
if ( fm )
5050
return fm->tableModel()->fieldIdx( index.column() );
5151

src/app/attributetable/qgsattributetabledelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define QGSATTRIBUTETABLEDELEGATE_H
1818

1919
#include <QItemDelegate>
20-
#include "qgsvectorlayer.h"
20+
2121
class QPainter;
2222
class QgsVectorLayer;
2323

src/app/attributetable/qgsattributetabledialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void QgsAttributeTableDialog::on_mRemoveSelectionButton_clicked()
218218

219219
void QgsAttributeTableDialog::on_cbxShowSelectedOnly_toggled( bool theFlag )
220220
{
221-
mFilterModel->mHideUnselected = theFlag;
221+
mFilterModel->setHideUnselected( theFlag );
222222
mFilterModel->invalidate();
223223
//TODO: weird
224224
//mModel->changeLayout();

src/app/attributetable/qgsattributetabledialog.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
#include "ui_qgsattributetabledialog.h"
2626

27-
class QgsMapLayer;
28-
class QgsVectorLayer;
29-
3027
#include "qgsvectorlayer.h" //QgsFeatureIds
3128

3229
class QDialogButtonBox;

src/app/attributetable/qgsattributetablefiltermodel.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@
2020
#include <QSortFilterProxyModel>
2121
#include <QModelIndex>
2222

23-
//QGIS Includes
24-
#include "qgsvectorlayer.h" //QgsAttributeList
25-
2623
class QgsAttributeTableModel;
24+
class QgsVectorLayer;
2725

2826
class QgsAttributeTableFilterModel: public QSortFilterProxyModel
2927
{
3028
public:
31-
bool mHideUnselected;
3229
/**
3330
* Constructor
3431
* @param theLayer initializing layer pointer
@@ -46,6 +43,8 @@ class QgsAttributeTableFilterModel: public QSortFilterProxyModel
4643
QgsVectorLayer *layer() const { return mLayer; }
4744
QgsAttributeTableModel *tableModel() const { return reinterpret_cast<QgsAttributeTableModel*>( sourceModel() ); }
4845

46+
void setHideUnselected( bool theFlag ) { mHideUnselected = theFlag; }
47+
4948
protected:
5049
/**
5150
* Returns true if the source row will be accepted
@@ -55,6 +54,7 @@ class QgsAttributeTableFilterModel: public QSortFilterProxyModel
5554
bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
5655
private:
5756
QgsVectorLayer* mLayer;
57+
bool mHideUnselected;
5858
};
5959

6060
#endif

0 commit comments

Comments
 (0)