Skip to content

Commit

Permalink
merge from trunk r11750:11800
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/branches/symbology-ng-branch@11899 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 2, 2009
1 parent 26b12b6 commit daf2b0f
Show file tree
Hide file tree
Showing 142 changed files with 5,993 additions and 4,314 deletions.
3,657 changes: 2,313 additions & 1,344 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions mac/xcode/Qgis.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion python/core/qgsdataprovider.sip
Expand Up @@ -64,7 +64,7 @@ class QgsDataProvider : QObject
* that can be used by the data provider to create a subset.
* Must be implemented in the dataprovider.
*/
virtual void setSubsetString(QString subset);
virtual bool setSubsetString(QString subset);


/**
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgsvectordataprovider.sip
Expand Up @@ -141,10 +141,11 @@ class QgsVectorDataProvider : QgsDataProvider
* Return unique values of an attribute
* @param index the index of the attribute
* @param values reference to the list to fill
* @param limit maximum number of values to return (added in 1.4)
*
* Default implementation simply iterates the features
*/
virtual void uniqueValues(int index, QList<QVariant> &uniqueValues /Out/);
virtual void uniqueValues(int index, QList<QVariant> &uniqueValues /Out/, int limit = -1);

/**Returns the possible enum values of an attribute. Returns an empty stringlist if a provider does not support enum types
or if the given attribute is not an enum type.
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgsvectorlayer.sip
Expand Up @@ -166,8 +166,9 @@ public:
* @param subset The subset string. This may be the where clause of a sql statement
* or other defintion string specific to the underlying dataprovider
* and data store.
* @return true, when setting the string was successful, false otherwise (added in 1.4)
*/
virtual void setSubsetString(QString subset);
virtual bool setSubsetString(QString subset);

/**
* Get the string (typically sql) used to define a subset of the layer
Expand Down
5 changes: 3 additions & 2 deletions python/plugins/fTools/tools/doIntersectLines.py
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
#-----------------------------------------------------------
#
# Locate Line Intersections
Expand Down Expand Up @@ -123,11 +124,11 @@ def compute(self, line1, line2, field1, field2, outPath, progressBar):
fieldList = self.getFieldList(layer1)
index1 = provider1.fieldNameIndex(field1)
field1 = fieldList[index1]
field1.setName("1_" + unicode(field1.name()))
field1.setName(unicode(field1.name()) + "_1")
fieldList = self.getFieldList(layer2)
index2 = provider2.fieldNameIndex(field2)
field2 = fieldList[index2]
field2.setName("2_" + unicode(field2.name()))
field2.setName(unicode(field2.name()) + "_2")
fieldList = {0:field1, 1:field2}
sRs = provider1.crs()
check = QFile(self.shapefileName)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/LICENSE
@@ -1,5 +1,5 @@
Copyright (c) 2007 Matthew T. Perry
Copyright (c) 2008 Borys Jurgiel
Copyright (c) 2008-2009 Borys Jurgiel


Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/__init__.py
Expand Up @@ -14,7 +14,7 @@ def name():
return "Plugin Installer"

def version():
return "Version 1.0.3"
return "Version 1.0.5"

def description():
return "Downloads and installs QGIS python plugins"
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/plugin_installer/installer_data.py
Expand Up @@ -29,7 +29,7 @@
"valid" bool,
"QPHttp" QPHttp,
"Relay" Relay, # Relay object for transmitting signals from QPHttp with adding the repoName information
"xmlData" QDomDocument,
"xmlData" QBuffer,
"state" int, (0 - disabled, 1-loading, 2-loaded ok, 3-error (to be retried), 4-rejected)
"error" QString}}
mPlugins = dict of dicts {id : {"name" QString,
Expand Down Expand Up @@ -87,6 +87,7 @@ def setIface(qgisIface):
("Volkan Kepoglu's Repository","http://ggit.metu.edu.tr/~volkan/plugins.xml", ""),
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", ""),
("Marco Hugentobler's Repository","http://karlinapp.ethz.ch/python_plugins/python_plugins.xml", ""),
("Bob Bruce's Repository", "http://www.mappinggeek.ca/QGISPythonPlugins/Bobs-QGIS-plugins.xml", ""),
("Sourcepole Repository", "http://build.sourcepole.ch/qgis/plugins.xml", "")]


Expand Down Expand Up @@ -376,7 +377,10 @@ def requestFetching(self,key):
self.mRepositories[key]["state"] = 1
url = QUrl(self.mRepositories[key]["url"])
path = QString(url.toPercentEncoding(url.path(), "!$&'()*+,;=:@/"))
self.mRepositories[key]["QPHttp"] = QPHttp(url.host())
port = url.port()
if port < 0:
port = 80
self.mRepositories[key]["QPHttp"] = QPHttp(url.host(), port)
self.connect(self.mRepositories[key]["QPHttp"], SIGNAL("requestFinished (int, bool)"), self.xmlDownloaded)
self.connect(self.mRepositories[key]["QPHttp"], SIGNAL("stateChanged ( int )"), self.mRepositories[key]["Relay"].stateChanged)
self.connect(self.mRepositories[key]["QPHttp"], SIGNAL("dataReadProgress ( int , int )"), self.mRepositories[key]["Relay"].dataReadProgress)
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/plugin_installer/installer_gui.py
Expand Up @@ -152,7 +152,10 @@ def __init__(self, parent, plugin):
tmpDir = QDir.tempPath()
tmpPath = QDir.cleanPath(tmpDir+"/"+fileName)
self.file = QFile(tmpPath)
self.http = QPHttp(url.host())
port = url.port()
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("dataReadProgress ( int , int )"), self.readProgress)
self.connect(self.http, SIGNAL("requestFinished (int, bool)"), self.requestFinished)
Expand Down Expand Up @@ -335,7 +338,8 @@ def populateMostWidgets(self):
a.setToolTip(0,self.tr("This repository is disabled"))
else:
a.setToolTip(0,self.tr("This repository is blocked due to incompatibility with your Quantum GIS version"))
a.setDisabled(True)
for i in [0,1,2]:
a.setForeground(i,QBrush(QColor(Qt.gray)))
for i in [0,1,2]:
self.treeRepositories.resizeColumnToContents(i)
self.comboFilter1.addItem(self.tr("orphans"))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/installer_plugin.py
Expand Up @@ -187,4 +187,4 @@ def newlyReinstalledPlugins(self):
# ----------------------------------------- #
def resetNewlyProcessedPlugins(self):
""" clear the dict of newly processed plugins """
history.clear()
history.clear()
13 changes: 9 additions & 4 deletions qgis.1
Expand Up @@ -20,7 +20,10 @@ qgis \- Quantum GIS Geographic Information System
.br
See OPTIONS for a full description.
.SH DESCRIPTION
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.
Quantum GIS (QGIS) is a cross platform, Free and Open Source Geographic
Information System (GIS). Supported platforms include Linux/Unix, Mac OS X and
Microsoft Windows. QGIS supports vector, raster, and database formats. QGIS is
licensed under the GNU Public License.

Some of the major features include:

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

4 changes: 2 additions & 2 deletions src/analysis/interpolation/qgsgridfilewriter.cpp
Expand Up @@ -55,7 +55,7 @@ int QgsGridFileWriter::writeFile( bool showProgressDialog )
outStream.setRealNumberPrecision( 8 );
writeHeader( outStream );

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

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

for ( int i = 0; i < mNumRows; ++i )
{
currentXValue = mInterpolationExtent.xMinimum();
currentXValue = mInterpolationExtent.xMinimum() + mCellSizeX / 2.0; //calculate value in the center of the cell
for ( int j = 0; j < mNumColumns; ++j )
{
if ( mInterpolator->interpolatePoint( currentXValue, currentYValue, interpolatedValue ) == 0 )
Expand Down
4 changes: 3 additions & 1 deletion src/analysis/vector/qgsgeometryanalyzer.cpp
Expand Up @@ -195,6 +195,8 @@ bool QgsGeometryAnalyzer::exportGeometryInformation( QgsVectorLayer* layer,
const QString& shapefileName,
const QString& fileEncoding )
{
return false;
#if 0
QgsVectorDataProvider* provider = layer->dataProvider();
QgsAttributeList allAttrs = provider->attributeIndexes();
provider->select( allAttrs, QgsRectangle(), true );
Expand Down Expand Up @@ -223,7 +225,7 @@ bool QgsGeometryAnalyzer::exportGeometryInformation( QgsVectorLayer* layer,
writer.addFeature( outFeat );
}
return true;

#endif
}
bool QgsGeometryAnalyzer::simplifyGeometry( QgsVectorLayer* layer,
const QString shapefileName,
Expand Down
13 changes: 6 additions & 7 deletions src/app/CMakeLists.txt
Expand Up @@ -63,13 +63,14 @@ SET(QGIS_APP_SRCS
qgsprojectproperties.cpp
qgsrasterlayerproperties.cpp
qgssearchquerybuilder.cpp
qgsserversourceselect.cpp
qgswmssourceselect.cpp
qgsshortcutsmanager.cpp
qgssinglesymboldialog.cpp
qgssnappingdialog.cpp
qgsundowidget.cpp
qgsuniquevaluedialog.cpp
qgsvectorlayerproperties.cpp
qgsquerybuilder.cpp

composer/qgscomposer.cpp
composer/qgscomposeritemwidget.cpp
Expand Down Expand Up @@ -159,14 +160,15 @@ SET (QGIS_APP_MOC_HDRS
qgsprojectproperties.h
qgsrasterlayerproperties.h
qgssearchquerybuilder.h
qgsserversourceselect.h
qgswmssourceselect.h
qgssinglesymboldialog.h
qgssnappingdialog.h
qgsuniquevaluedialog.h
qgsvectorlayerproperties.h
qgsdbtablemodel.h
qgsspatialitetablemodel.h
qgsundowidget.h
qgsquerybuilder.h

composer/qgscomposer.h
composer/qgscomposeritemwidget.h
Expand All @@ -182,7 +184,6 @@ SET (QGIS_APP_MOC_HDRS
legend/qgslegendlayer.h
legend/qgslegendlayerfile.h


ogr/qgsopenvectorlayerdialog.h
ogr/qgsnewogrconnection.h

Expand All @@ -198,14 +199,12 @@ IF (POSTGRES_FOUND)
ENDIF(HAVE_PGCONFIG)

SET (QGIS_APP_SRCS ${QGIS_APP_SRCS}
qgsdbsourceselect.cpp
qgspgsourceselect.cpp
qgsnewconnection.cpp
qgspgquerybuilder.cpp
)
SET (QGIS_APP_MOC_HDRS ${QGIS_APP_MOC_HDRS}
qgsdbsourceselect.h
qgspgsourceselect.h
qgsnewconnection.h
qgspgquerybuilder.h
)
ENDIF (POSTGRES_FOUND)

Expand Down
8 changes: 4 additions & 4 deletions src/app/attributetable/qgsattributetabledelegate.cpp
Expand Up @@ -28,11 +28,11 @@

QgsVectorLayer *QgsAttributeTableDelegate::layer( const QAbstractItemModel *model ) const
{
const QgsAttributeTableModel *tm = dynamic_cast<const QgsAttributeTableModel*>( model );
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( model );
if ( tm )
return tm->layer();

const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel*>( model );
const QgsAttributeTableFilterModel *fm = dynamic_cast<const QgsAttributeTableFilterModel *>( model );
if ( fm )
return fm->layer();

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

int QgsAttributeTableDelegate::fieldIdx( const QModelIndex &index ) const
{
const QgsAttributeTableModel *tm = dynamic_cast<const QgsAttributeTableModel*>( index.model() );
const QgsAttributeTableModel *tm = qobject_cast<const QgsAttributeTableModel *>( index.model() );
if ( tm )
return tm->fieldIdx( index.column() );

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

Expand Down
2 changes: 1 addition & 1 deletion src/app/attributetable/qgsattributetabledelegate.h
Expand Up @@ -17,7 +17,7 @@
#define QGSATTRIBUTETABLEDELEGATE_H

#include <QItemDelegate>
#include "qgsvectorlayer.h"

class QPainter;
class QgsVectorLayer;

Expand Down
2 changes: 1 addition & 1 deletion src/app/attributetable/qgsattributetabledialog.cpp
Expand Up @@ -218,7 +218,7 @@ void QgsAttributeTableDialog::on_mRemoveSelectionButton_clicked()

void QgsAttributeTableDialog::on_cbxShowSelectedOnly_toggled( bool theFlag )
{
mFilterModel->mHideUnselected = theFlag;
mFilterModel->setHideUnselected( theFlag );
mFilterModel->invalidate();
//TODO: weird
//mModel->changeLayout();
Expand Down
3 changes: 0 additions & 3 deletions src/app/attributetable/qgsattributetabledialog.h
Expand Up @@ -24,9 +24,6 @@

#include "ui_qgsattributetabledialog.h"

class QgsMapLayer;
class QgsVectorLayer;

#include "qgsvectorlayer.h" //QgsFeatureIds

class QDialogButtonBox;
Expand Down
8 changes: 4 additions & 4 deletions src/app/attributetable/qgsattributetablefiltermodel.h
Expand Up @@ -20,15 +20,12 @@
#include <QSortFilterProxyModel>
#include <QModelIndex>

//QGIS Includes
#include "qgsvectorlayer.h" //QgsAttributeList

class QgsAttributeTableModel;
class QgsVectorLayer;

class QgsAttributeTableFilterModel: public QSortFilterProxyModel
{
public:
bool mHideUnselected;
/**
* Constructor
* @param theLayer initializing layer pointer
Expand All @@ -46,6 +43,8 @@ class QgsAttributeTableFilterModel: public QSortFilterProxyModel
QgsVectorLayer *layer() const { return mLayer; }
QgsAttributeTableModel *tableModel() const { return reinterpret_cast<QgsAttributeTableModel*>( sourceModel() ); }

void setHideUnselected( bool theFlag ) { mHideUnselected = theFlag; }

protected:
/**
* Returns true if the source row will be accepted
Expand All @@ -55,6 +54,7 @@ class QgsAttributeTableFilterModel: public QSortFilterProxyModel
bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
private:
QgsVectorLayer* mLayer;
bool mHideUnselected;
};

#endif

0 comments on commit daf2b0f

Please sign in to comment.