9104 Commits

Author SHA1 Message Date
Nyall Dawson
384369c3c4 Rename QgsVectorLayerImport to QgsVectorLayerExporter
Since the majority of users of this class will be exporting
an existing map layer to a data provider, the QgsVectorLayerImport
name is misleading and suggests that this class is designed
just to bring layers "into" QGIS.

Explicitly naming the class "Exporter" should help API users
discover this class.

Also cleanup API and improve docs
2017-05-12 08:02:51 +10:00
Matthias Kuhn
eaabce28e9 Doxyfication 2017-05-11 12:42:26 +02:00
Matthias Kuhn
2474498979 Allow specifying expression context for feature count 2017-05-11 12:42:26 +02:00
Matthias Kuhn
ed747edc94 Improve docs and python bindings for feature count 2017-05-11 12:42:26 +02:00
Matthias Kuhn
52676774ba Sipify QgsTask[Manager] 2017-05-11 12:42:26 +02:00
Matthias Kuhn
05a713f444 Fix compatibility with older sip versions 2017-05-11 12:42:26 +02:00
Matthias Kuhn
964d9ac70a Send feature counting to background task 2017-05-11 12:42:26 +02:00
Matthias Kuhn
f264370130 Make fields() available in QgsVectorLayerFeatureSource 2017-05-11 12:42:25 +02:00
Denis Rouzaud
5888d22c07 fix sip bindings documentation 2017-05-11 12:00:06 +02:00
Alexander Bruy
abc74b4262 [processing] don't apply -te and -te_srs if not requested (fix #16519) 2017-05-10 15:47:29 +03:00
Denis Rouzaud
883e4f3619 minor cleaning of python/CMakeLists.txt 2017-05-10 14:40:31 +02:00
Denis Rouzaud
97866f4a20 [sip] add missing ConvertToClassCode
This was causing an issue if you tried to access widgets in a form using findChildren
widgets could not be casted to QGIs native types

also sipify QgsFilterLineEdit and QgsRelationEditorWidget
2017-05-10 14:40:31 +02:00
lbartoletti
13c1318a5f New geometry class: QgsRegularPolygon (#4502) 2017-05-10 22:23:28 +10:00
Matthias Kuhn
aa021bef0c Merge pull request #4307 from ghtmtt/proc_tests
[processing] other qgis test, clean commit
2017-05-10 09:07:59 +02:00
Nyall Dawson
a4e3c8336e Merge pull request #4520 from nyalldawson/raster_combo_box
QgsRasterBandComboBox
2017-05-09 20:36:33 +10:00
Nyall Dawson
c9bfb9f2a1 Add a "not set" option to QgsRasterBandComboBox 2017-05-09 19:23:08 +10:00
Nyall Dawson
a32314d8b5 Add a new QgsRasterBandComboBox widget
And use wherever custom widgets were being created. Reduces
duplicate code and allows specialised handling for raster
band display/selection to be centralized.
2017-05-09 19:23:08 +10:00
Denis Rouzaud
0824280296 sipify gui editor widgets 2017-05-09 08:59:07 +02:00
Nyall Dawson
6aa10c6817 [processing] Cleanup some layer/writer related handling
Ensure that layers created by QgsProcessingUtils::createFeatureSink
can always be retrieved using QgsProcessingUtils::mapLayerFromString
2017-05-09 15:29:41 +10:00
Nyall Dawson
3cd3e5d378 Allow storing QgsProperty in QVariant 2017-05-09 12:22:30 +10:00
Nyall Dawson
ac7cc12ca7 Merge pull request #4511 from nyalldawson/composer_async
Asyncronously render composer map previews
2017-05-08 20:18:16 +10:00
Nyall Dawson
29c87de679 [needs-docs][composer] Remove Render/Cache modes from composer maps
Make maps invalidate cache whenever layer order changes. Cache mode
is now identical to Render mode, so  all mode switching has been
removed from composer maps. This should greatly simplify the learning
curve and usability of composer maps.
2017-05-08 19:31:55 +10:00
Nyall Dawson
5e3b903955 [needs-docs][composer] Remove Rectangle mode from composer maps
No longer required - the Cache mode is now performant enough
that we don't have to rely on the old rectangle preview
when desiring responsive composers
2017-05-08 17:10:07 +10:00
Nyall Dawson
491abc2b66 sipify QgsComposerMap 2017-05-08 17:10:02 +10:00
Nyall Dawson
abe8ead1a5 Rework how composer map cache is invalidated
Avoids unnecessary redraws and defers cache update until
when item is actually visible
2017-05-08 17:10:02 +10:00
Denis Rouzaud
bfb62c4be9 [sipify] fix Abstract class
unblacklist qgstransaction.sip
(followup 931bf32a9fe46570ac80d947552d46c9f427457)
also fix method declaration with private only inheritance
2017-05-08 08:45:11 +02:00
Mathieu Pellerin
a88cf7ad31 [FEATURE] Save map/canvas as PDF (#4516) 2017-05-08 13:03:39 +07:00
Juergen E. Fischer
4160e19bdc fix windows build 2017-05-07 01:49:33 +02:00
Nyall Dawson
06c4dea7ff [processing] Remove vector.createVectorWriter
Use QgsProcessingUtils.createFeatureSink instead
2017-05-07 08:02:54 +10:00
Nyall Dawson
a8a3cc82ed [processing] Port vector.createVectorWriter to c++
This implements an improved version of vector.createVectorWriter
in QgsProcessingUtils. The improved version relies on the
core class QgsVectorLayerImport to create empty layers,
which:
- reduces duplicate code and reuses the mature QgsVectorLayerImport
routines
- avoids manual conversion of field types to destination provider
field types
- potentially allows any writable provider to be used as a feature
sink for algorithms (e.g. output direct to MSSQL/Oracle/db2). This
should work now - it just needs exposing via UI.
2017-05-07 08:02:53 +10:00
Martin Dobias
040c4b32f9 Small cleanup of QgsAbstractGeometry header 2017-05-06 20:33:46 +08:00
Nyall Dawson
1033c7b3bd Remove unused argument 2017-05-06 14:59:56 +10:00
Nyall Dawson
80d22406c9 Make QgsVectorLayerImport protected members private
This class isn't designed to be subclassed
2017-05-06 14:15:13 +10:00
Nyall Dawson
83baf9eae6 Sipify QgsVectorLayerImport 2017-05-06 14:15:13 +10:00
Nyall Dawson
46ff65275e QgsVectorLayerImport is a QgsFeatureSink 2017-05-06 14:15:13 +10:00
Nyall Dawson
8d03642387 Merge pull request #4487 from nyalldawson/memory
Move memory provider to core
2017-05-06 14:13:15 +10:00
Nathan Woodrow
df679a2d56 Set paths in qgis python module based on osgeo4w env file 2017-05-06 13:31:06 +10:00
Nyall Dawson
b5ae888b60 Merge pull request #4478 from nyalldawson/layer_store
Split off map layer storage handling from QgsProject to QgsMapLayerStore
2017-05-06 13:00:05 +10:00
Martin Dobias
0a0c33dcf2 Remove QgsGeometryCache class
The geometry cache was only used for few geometry editing operations anyway. In earlier versions
of QGIS the geometry cache was also used by old snapping classes which have been replaced
by QgsPointLocator that also keeps a spatial index of geometries and it is not rebuilt on every re-render.

Reasons for removal:
- geometry cache was repopulated on every redraw of layers in editing mode, slowing down rendering
- data structure for the cache was a simple map with features accessed by their ID (no spatial index)
- the cache was only getting refreshed for the current view of the main map canvas (not a generic cache)
- not used for snapping anymore where caching was important to avoid roundtrips to data provider
2017-05-06 10:34:23 +08:00
Nyall Dawson
ba2fdf00ab Rename some QgsProviderRegistry methods to clarify that they are factories
- provider() was renamed to createProvider()
- selectWidget() was renamed to createSelectionWidget()
- providerLibrary() was renamed to createProviderLibrary()
2017-05-06 12:28:06 +10:00
Nyall Dawson
6502864c69 Add missing /Factory/ annotations to QgsProviderMetadata
Also sipify QgsProviderMetadata and QgsProviderRegistry
2017-05-06 12:20:59 +10:00
Nyall Dawson
767cb12c2a Add QgsMemoryProviderUtils.createMemoryLayer for easy creation
of new memory layers from QgsFields/QgsCoordinateReferenceSystem/etc

Since memory provider cannot use QgsVectorLayerImport we need
another centeralized function for creating new memory layers
without the need to manually create the uri string.
2017-05-06 12:05:12 +10:00
Nyall Dawson
5511b07e40 Move memory provider to core
This commit introduces basic support for non-library based
data providers, and moves the memory provider from a library
based provider to a core provider.

The memory provider is used so frequently throughout QGIS that
it has become integral to QGIS functionality and must be
available wherever the QGIS core library is used.

The changes here (while not exposed yet to Python) could potentially
be built on to allow creation of pure Python data providers.
2017-05-06 12:05:12 +10:00
Matthias Kuhn
931bf32a9f Doxymentation for QgsTransaction 2017-05-05 15:39:29 +02:00
Matthias Kuhn
fd25288a64 Documentation for custom functions 2017-05-05 15:39:29 +02:00
Matthias Kuhn
5f7a2912f6 Expose "context" to expression functions 2017-05-05 15:39:29 +02:00
Alexander Bruy
9c88faf416 Merge pull request #4499 from alexbruy/processing-fieldcalc
[processing] reset variables list in field calculator on layer change  (fix #15633)
2017-05-05 15:16:22 +03:00
Nyall Dawson
67e1558fcf Remove unused symbols from qgis.h
Also slow down @NathanW2's build
2017-05-05 20:38:36 +10:00
Nyall Dawson
02e96a2d80 Partially revert 636a37f
Fix processing modeler error on startup
2017-05-05 07:00:36 +10:00
Denis Rouzaud
cc887c631b [sipify] use a distinct header to simplify includes
there was an issue in libdxf which includes qgslogger in debug mode
and qgsdebug.h includes qgis.h include qgswkbtypes.h (which geometry directory was not listed in libdxrw included paths)
2017-05-04 10:49:17 +02:00