6927 Commits

Author SHA1 Message Date
Matthias Kuhn
d91a45ceaf Add shorthands to get features by fid, fids and expression
Adds new methods overloads to QgsVectorLayer

  getFeatures( expression )
  getFeatures( ids )
  getFeature( id )

These three methods to query features are by far the most used ones
and with this patch it is much easier to write and read code.
2016-07-19 10:37:09 +02:00
Nyall Dawson
c7ffdfa5e9 Make sure variable editor widgets always show current variables
On behalf of Faunalia, sponsored by ENEL
2016-07-19 12:00:35 +10:00
Nyall Dawson
39b3e721bb Replace QgsNumericSortTreeWidgetItem with upgraded QgsTreeWidgetItem
QgsNumericSortTreeWidgetItem had a giant TODO saying "make it work".
This makes it work, and adds some other useful features like
being able to specify custom sort value and force items to always
sort on top.
2016-07-19 09:30:23 +10:00
Martin Dobias
1444398208 Improve QgsCoordinateReferenceSystem API documentation (#3311) 2016-07-19 01:05:16 +08:00
Akbar Gumbira
20a2a20025 [processing] Fix add script from file. 2016-07-18 13:11:54 +02:00
volaya
a0bfc4c99e [processing] do not remove menus when exiting config dialog 2016-07-18 09:07:05 +02:00
Nyall Dawson
e6df492fdb Add missing docs, refine docs for QgsCoordinateTransform 2016-07-17 16:38:28 +10:00
Nyall Dawson
adafeda82a Avoid all use of QgsCoordinateTransform pointers, replace with
copies or references

Makes the code more robust, fixes leaks and avoids potential
null pointer dereferencing
2016-07-16 20:36:45 +10:00
Nyall Dawson
ffa9b9b676 API breaks and cleanups for QgsCoordinateTransform
- isInitialised() has been renamed to isValid()
- theCRS parameter in setSourceCrs has been renamed to 'crs'
- setDestCRS() has been renamed to setDestinationCrs() for consistency
- destCRS() has been renamed to destinationCrs() for consistency
- theSource, theDest, theSourceSrsId, theDestSrsId, theSourceWkt,
theDestWkt, theSourceCRSType parameters in the QgsCoordinateTransform
constructors have been renamed to source, destination, sourceSrsId,
destinationSrsId, sourceWkt, destinationWkt, sourceCrsType respectively
- 'p' argument in transform() has been renamed to 'point', 'theRect' to
'rectangle', 'poly' to 'polygon'
- setDestCRSID has been removed, use setDestinationCrs() instead
- 'theNode', 'theDoc' parameters in readXML and writeXML have been
renamed to 'node' and 'document' respectively
- readXML() and writeXML() have been renamed to readXml() and writeXml()
for consistency
2016-07-16 16:33:04 +10:00
Nyall Dawson
b18fcc0ddf Remove QgsCoordinateTransform::clone()
Just use direct copies instead
2016-07-16 14:16:00 +10:00
Nyall Dawson
736aab195f Make QgsCoordinateTransform implicitly shared, no longer a QObject
There was no code in core using the signals/slots associated with
QgsCoordinateTransform, and little reason to keep the class a
QObject. Making it not a QObject simplifies code and allows
QgsCoordinateTransform objects to be easily copied and passed
around without complication.
2016-07-16 10:07:10 +10:00
mhugent
da74b184f2 Merge pull request #3308 from mhugent/pan_to_feature
[FEATURE]: pan to current feature in attribute table
2016-07-15 09:36:48 +02:00
Nyall Dawson
21eab8c2ea Add missing docs 2016-07-15 08:08:24 +10:00
Nyall Dawson
0736bf726d Rename edit buffer methods to is..., add tests 2016-07-15 07:58:21 +10:00
Nyall Dawson
2d50895d04 Const correctness for QgsVectorLayer methods 2016-07-15 06:07:52 +10:00
Nyall Dawson
0d84ca74c5 Make QgsMapLayer::metadata() const 2016-07-15 06:07:08 +10:00
Nyall Dawson
0935b58fef Cleanup QgsMapLayer for 3.0
- implement QGIS 3.0 TODOs
- mark methods as const correct
- rename 'the...' parameters to remove 'the'
- mark QgsVectorLayer::getFeatures as const
2016-07-15 06:07:00 +10:00
Nyall Dawson
fe4fa419f8 Make QgsVectorLayerEditBuffer methods const correct
Also add some optimisations to avoid iterations over all
contents of the buffers
2016-07-15 06:06:14 +10:00
Nyall Dawson
6c6f3c1e34 Remove deprecated members from QgsMapLayer 2016-07-15 06:02:45 +10:00
Nyall Dawson
7d2027faa9 Fix most remaining methods which return a reference to
QgsCoordinateReferenceSystem or which take a pointer to a
CRS
2016-07-15 06:01:39 +10:00
Nyall Dawson
726569c6bc QgsMapLayer::crs() now returns a copy, not a reference
(desirable because QgsCoordinateReferenceSystem is implicitly shared)
2016-07-15 06:00:51 +10:00
Nyall Dawson
a2efab0485 Make QgsVectorLayerImport use QgsCoordinateReferenceSystem
references, not pointers
2016-07-15 06:00:11 +10:00
Nyall Dawson
e683101b10 Make QgsVectorDataProvider::fields() return a copy
Implements a QGIS 3.0 TODO
2016-07-15 05:59:02 +10:00
Nyall Dawson
1bafa80089 Const correctness for numerous data provider methods 2016-07-15 05:57:57 +10:00
Nyall Dawson
fd42ed3145 Use reference rather than pointer for crs in QgsVectorFileWriter
Since QgsCoordinateReferenceSystem is implicitly shared, it's a
safer approach
2016-07-15 05:57:03 +10:00
Marco Hugentobler
4d1fbee7f0 Update sip binding 2016-07-14 17:06:22 +02:00
Nyall Dawson
2db7fca7a6 [processing] Add tests for clip algorithm 2016-07-14 08:05:59 +10:00
Nyall Dawson
258c8999ef Merge pull request #3303 from nyalldawson/identify_url
Make links in identify results clickable
2016-07-14 07:17:01 +10:00
Nyall Dawson
2f8c6f5207 [composer] Add a checkbox for legends to prevent automatic resizing
A new checkbox has been added to the legend settings to control
whether or not a legend should be automatically resized to fit
its contents.

If unchecked, then the legend will never resize and instead just
stick to whatever size the user has set. Any content which
doesn't fit the size is cropped out.

Refs #10556

On behalf of Faunalia, sponsored by ENEL
2016-07-13 17:35:44 +10:00
Nyall Dawson
05ced6797d Followups and fixes to identify results linking 2016-07-13 16:01:57 +10:00
Nyall Dawson
9e1ddcb54d [processing] Allow modification of feature request when using
vector.features

Allows for optimising the request through subsets of attributes
or no geometry fetching
2016-07-13 12:06:41 +10:00
Matthias Kuhn
ae3db0a1bf Fix single process build
A race condition triggered that sometimes the file
output/python/qgis/__init__.py was not created before a python uic
compiler started and therefore the required module could not be
imported.

This leads to errors like

[ 82%] Generating ui_dialogAbout.py
Traceback (most recent call last):
  File "../../../../../scripts/pyuic-wrapper.py", line 26, in <module>
    import qgis.PyQt.uic.pyuic
ImportError: No module named qgis.PyQt.uic.pyuic
python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:117:
recipe for target 'python/plugins/GdalTools/tools/ui_dialogAbout.py'
failed
make[2]: *** [python/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
CMakeFiles/Makefile2:5074: recipe for target
'python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all'
failed
make[1]: ***
[python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all]
Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
2016-07-12 11:40:00 +02:00
Martin Dobias
c5d8cc7fbc Added missing & in setTitle in SIP 2016-07-11 12:46:17 +02:00
Nyall Dawson
d3582abbf6 [FEATURE] Mouse wheel over sliders in color dialog to change value by
increments
2016-07-11 10:27:16 +10:00
Nyall Dawson
4145e337ab Add missing SIP bindings 2016-07-11 08:42:52 +10:00
Juergen E. Fischer
2eee2e5c9c fix typos and debian/copyright 2016-07-10 14:20:07 +02:00
Juergen E. Fischer
daea10c126 support utf-8 encoded release names
(cherry picked from commit c9838ccea481c8ca87c4e1647099cfe78777e795)
2016-07-10 12:09:29 +02:00
Juergen E. Fischer
e451b9ad6f indentation and spelling fixes 2016-07-08 12:59:38 +02:00
Salvatore Larosa
43334df6d8 [pyqgis-console] APIs file updated 2016-07-08 12:23:51 +02:00
Nathan Woodrow
b1de246e84 const fixes 2016-07-08 10:54:58 +10:00
Nathan
e4080edaa7 Streamline QgsMapLayerConfigWidgetFactory interface 2016-07-08 08:19:15 +10:00
Matthias Kuhn
b83aab7d74 Save attribute table sort order persistently
Fix #15235
2016-07-07 17:35:55 +02:00
Matthias Kuhn
febcabb0da Make using recent expressions API simpler and add doxygen comment 2016-07-07 16:39:13 +02:00
Matthias Kuhn
56a0af5bd8 Sort attribute table by representation value where useful
Fix #15096
And aligns some edge-cases of sort behavior
2016-07-07 16:39:13 +02:00
Martin Dobias
cca79aa2f4 Fix loss of transparency information in style dock (fixes #15229) 2016-07-07 14:01:28 +02:00
Nathan
e097443771 Fix globe plugin 2016-07-07 10:27:04 +10:00
Martin Dobias
1c91ae7733 Show breadcrumb and back button for rule based labeling (fixes #15153)
Following the way how rule based rendering widget was adjusted...
2016-07-06 21:48:39 +02:00
Nathan
fdf16e3c92 Rename QgsLayerStylingPanelFactory to QgsMapLayerConfigWidgetFactory
- Move QgsMapLayerPropertiesFactory into single factory object for
  dock and properties
2016-07-06 23:03:43 +10:00
Martin Dobias
47eae5865a [processing] Fix preconfigured alg creation (fixes #15100) 2016-07-05 19:32:33 +02:00
Nyall Dawson
fd88d91bde Use QgsCRSCache in more places 2016-07-05 15:59:15 +10:00