42 Commits

Author SHA1 Message Date
Nyall Dawson
429fe2d4ce Merge pull request #3335 from nyalldawson/vector_layer
QgsVectorDataProvider::Capability improvements
2016-07-29 05:10:37 +10:00
Nyall Dawson
26160c95c6 Merge pull request #3332 from nyalldawson/transform2
Remove the extra QgsCoordinateTransform constructors
2016-07-27 08:14:29 +10:00
Nyall Dawson
6c0d97a06b Merge pull request #3337 from nyalldawson/remove_psuedo_shader
Remove the broken, unused QgsPseudoColorShader class
2016-07-27 07:11:55 +10:00
Nyall Dawson
4a3924ca3f Remove the extra QgsCoordinateTransform constructors
...and leave only:

QgsCoordinateTransform( const QgsCoordinateReferenceSystem& source,
                        const QgsCoordinateReferenceSystem& destination );

The other constructors were not used anyway in QGIS code,
had awkward/confusing API, and no unit tests.
2016-07-27 07:10:46 +10:00
Nyall Dawson
68b621ace6 Merge pull request #3314 from nyalldawson/units
Consolidate unit handling in QgsUnitTypes
2016-07-26 11:14:35 +10:00
Nyall Dawson
ba26bc887a Remove the broken, unused QgsPseudoColorShader class 2016-07-26 10:11:57 +10:00
Nyall Dawson
f6b09eaee1 Add Distance*, Area*, Angle* prefixes to QgsUnitTypes enum values 2016-07-26 08:29:24 +10:00
Nyall Dawson
503d0941ee Add missing docs 2016-07-25 15:22:36 +10:00
Nyall Dawson
0324de3bf5 Remove QgsSymbolLayerV2Utils::encodeOutputUnit() and decodeOutputUnit()
QgsUnitTypes::encodeUnit() and QgsUnitTypes::decodeRenderUnit() should
be used instead.
2016-07-25 15:22:36 +10:00
Nyall Dawson
ce6bd6c973 Move QgsSymbolV2::OutputUnit enum to QgsUnitTypes
And rename to QgsUnitTypes::RenderUnits. This enum is used in
much more contexts than just symbols, so QgsUnitTypes is a
better fit for it.

All methods which previously accepted QgsSymbolV2::OutputUnit
parameters or QgsSymbolV2::OutputUnitList parameters now take
QgsUnitTypes::RenderUnit or QgsUnitTypes::RenderUnitList
parameters respectively.
2016-07-25 15:22:12 +10:00
Nyall Dawson
f6f5010131 Move QGis::UnitType to QgsUnitTypes::DistanceUnit
This change consolidates more unit handling and conversion into
QgsUnitTypes.

Additionally, UnknownUnit was renamed to UnknownDistanceUnit.
All methods which accepted QGis::UnitType parameters have been
updated to take QgsUnitTypes::DistanceUnit instead.

ALso remove the unit handling methods toLiteral, fromLiteral, tr,
fromTr, and fromUnitToUnitFactor from QGis. Their corresponding
counterparts in QgsUnitTypes should be used instead.
2016-07-25 14:47:16 +10:00
Nyall Dawson
59aed7b231 Remove deprecated units from QGis
- DecimalDegrees
- DegreesMinutesSeconds
- DegreesDecimalMinutes

all these were replaced long ago by QGis::Degrees
2016-07-25 13:00:46 +10:00
Nyall Dawson
58856fe82f Remove some deprecated QgsVectorDataProvider::Capabilities
Also make capabilities() return a QFlags
QgsVectorDataProvider::Capabilities, rather than an integer
value (for type safety)
2016-07-25 12:14:00 +10:00
Nyall Dawson
bb36c6048d Remove QgsCRSCache
No longer required now that QgsCoordinateReferenceSystem
internally uses caches for CRS initialization.
2016-07-25 10:15:46 +10:00
Nyall Dawson
ac36cb5dd2 Make QgsCoordinateReferenceSystem use an internal cache
for initializing CRS objects.

This avoids the need for the separate QgsCRSCache class,
and means that the caching benefits are available without the
need for calling methods from QgsCrsCache.
2016-07-25 10:14:19 +10:00
Nyall Dawson
ee62bdeeb4 Rename some QgsCoordinateReferenceSystem methods
- geographicFlag() -> isGeographic()
- axisInverted() -> hasAxisInverted()
2016-07-25 10:14:19 +10:00
Martin Dobias
ab4a83b49b Goodbye to QgsMapRenderer (#3333)
For the time being the class is kept in the server code while it is still being used there.
2016-07-24 22:40:52 +02:00
Nyall Dawson
8f203c9a87 Remove some unused constants 2016-07-22 05:35:26 +10:00
Nyall Dawson
713e22a9f5 Move some methods out of Qgis class 2016-07-21 22:14:46 +10:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Nyall Dawson
44c8680b00 Remove canvas rotation option + API, now always enabled 2016-07-20 21:25:44 +10:00
Nyall Dawson
185ad05102 Remove deprecated QgsDataDefinedSymbolDialog class (#3315)
It's not used anymore, and QgsDataDefinedButton should be used
in its place.
2016-07-20 21:18:20 +10:00
Martin Dobias
31c75ef22e Remove QgsLabel and QgsLabelAttributes + remove QgsPalLabeling from renderer jobs 2016-07-20 18:35:20 +08: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
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
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
Martin Dobias
34e6a71327 Add note about QgsMapCanvas::refresh() behavior 2014-11-15 11:55:47 +07:00
Martin Dobias
c4546171ff Start of doxygen page about API breaks 2014-09-06 14:06:48 +07:00