1049 Commits

Author SHA1 Message Date
Nyall Dawson
cd5f813112 Standardise capitalisation in some QgsExpression methods 2016-08-10 17:56:01 +10:00
Nyall Dawson
a0360a6400 Remove substitution map from QgsExpression::replaceExpressionText
Since expression context variables should now be used instead. Also
remove all the deprecated methods which relied on this API.
2016-08-10 17:56:01 +10:00
Nyall Dawson
c39088bace Remove deprecated QgsAttributeAction from sip bindings 2016-08-10 17:55:06 +10:00
Nyall Dawson
7da8110536 Remove deprecated methods from QgsExpression
Now all evaluate/prepare/etc methods must be called using QgsExpressionContexts

Also remove most remaining traces of special variables. This brings some
user facing changes, such that existing expressions may need to be
updated if they used these old special variables (eg $scale,
$feature). These changes are noted in doc/qgis3_user_changes.dox
so that we can include them in the release notes.
2016-08-10 17:55:06 +10:00
Martin Dobias
b4fe9002d8 [FEATURE] API to allow drag'n'drop of custom browser items
QgsDataItem implementations may provide hasDragEnabled(), mimeUri()
and QgsCustomDropHandler implementation to deal with drop of custom items.
2016-08-09 08:49:42 +02:00
Juergen E. Fischer
1dd8cc168b fix 772f593 2016-08-09 00:17:28 +02:00
Denis Rouzaud
772f59349e rename QgsComposerLegend::modelV2() to model() 2016-08-08 09:50:33 +02:00
Denis Rouzaud
aa82141df7 remove deprecated QgisInterface::fileMenu 2016-08-08 08:34:53 +02:00
Nyall Dawson
b2cbef8b53 Merge pull request #3361 from nyalldawson/color_dialog
Remove QgsColorDialog, rename QgsColorDialogV2 to QgsColorDialog
2016-08-08 09:08:30 +10:00
Nyall Dawson
e72389601d Remove unused QgsRendererV2DataDefinedMenus
Was not exposed to python api, so not a PyQGIS api break
2016-08-07 11:19:32 +10:00
Nyall Dawson
26c1e09a58 Remove QgsColorDialog, rename QgsColorDialogV2 to QgsColorDialog
The last bits of missing functionality (handling native dialogs
and live updates) were ported across.
2016-08-06 13:24:36 +10:00
Denis Rouzaud
bbb9b5322d remove QgsLegendModel 2016-08-05 20:53:58 +02:00
Denis Rouzaud
acbf5cddb4 renamed QgsSymbologyV2Conversion to QgsSymbologyConversion 2016-08-05 08:32:13 +02:00
Denis Rouzaud
f2c3fb003e renamed QgsSymbolLevelsV2Dialog to QgsSymbolLevelsDialog 2016-08-05 08:22:43 +02:00
Denis Rouzaud
275736de92 removed V2 from QgsSymbolV2* 2016-08-05 08:22:21 +02:00
Denis Rouzaud
c16d1393a2 removed V2 from QgsSymbolLayerV2* 2016-08-05 08:18:01 +02:00
Nyall Dawson
ed4d34fdbc QgsFields returns QgsField value instead of const references
(since QgsField is implicitly shared)
2016-08-05 06:08:07 +10:00
Nyall Dawson
967d37adc7 QgsFeature::fields() returns a value, not a pointer
Also remove all other QgsFields pointers and replace with
references/values, since QgsFields objects are implicitly shared
2016-08-05 06:07:02 +10:00
Denis Rouzaud
3e197ae74a remove QgsColorButton in favor of V2 2016-08-04 14:27:31 +02:00
Matthias Kuhn
bb79d13e82 Remove deprecated Qgis::WKBType and API cleanup (#3325)
* Remove deprecated Qgis::WKBType and API cleanup

Renames QgsWKBTypes to QgsWkbTypes

Replaces usage of the enums:

* Qgis::WKBType with QgsWkbTypes::Type
* Qgis::GeometryType with QgsWkbTypes::GeometryType

Their values should be forward compatible (a fact that was already
explited up to now by casting between the types)

Renames some SSLxxx to SslXxx and URIxxx to UriXxx

* Fix build warnings and simplify type handling

* Add a fixer to rewrite imports

* The forgotten rebase conflictThe forgotten rebase conflicts

* QgsDataSourcURI > QgsDataSourceUri

* QgsWKBTypes > QgsWkbTypes

* Qgis.WKBGeom > QgsWkbTypes.Geom

* Further python fixes

* Guess what... Qgis::wkbDimensions != QgsWkbTypes::wkbDimensions

* Fix tests

* Python 3 updates

* [travis] pull request caching cannot be disabled

so at least use it in r/w mode

* Fix python3 print in plugins
2016-08-04 09:10:08 +02:00
Nyall Dawson
420917bf5b Sort api doc file by class name 2016-08-03 13:54:02 +10:00
Matthias Kuhn
8182f2970f QgsFeatureRendererV2::Capabilities to flags 2016-08-02 17:24:38 +02:00
Matthias Kuhn
2cf9243edb Split displayField into displayExpression and mapTipTemplate (#1973)
Previously there was the expressionField (a field name or an expression)
mainly used for the feature list in the form view of the dual view.
On the other hand there was the displayField which could contain either
a simple field name or a complex HTML structure with embedded expressions.
And to know what it was you could compare it's content with the field names, if
a field name matched, you used it as a displayField (original purpose) and
if not... well, you could deal with HTML if you had a use for it.

The main problem is that there are two different usages for this kind of
thing

 * plain text identifier (field or expression)
 * pretty, rich text feature info

This commit cleans up with this. You want rich text and a lot of info:
go for mapTipTemplate.
You want a plain text string to identify features: go for
the displayExpression.
2016-08-02 16:58:58 +02:00
Denis Rouzaud
f5b11d9130 Merge pull request #3352 from 3nids/rubberband_ispolygon
QgsRubberBand: remove constructor and method with bool isPolygon
2016-08-02 15:11:13 +02:00
Denis Rouzaud
b7f4fe36e7 QgsRubberBand: remove constructor and method with bool isPolygon
use methods with Qgis::GeometryType instead
2016-08-02 13:56:02 +02:00
Martin Dobias
2482a6bbd0 Small cleanup in data items 2016-08-02 13:04:45 +02:00
Martin Dobias
1a9001802c Merge duplicate sections in API breaks doc 2016-08-02 10:07:59 +02:00
Martin Dobias
9db9304627 Raster MTR improvements - part one (PR #3334) 2016-08-02 08:22:29 +02:00
Nyall Dawson
e259e62941 Merge pull request #3349 from nyalldawson/feature_geom
Mega API break - fix QgsFeature geometry getters/setters
2016-08-02 09:21:25 +10:00
Nyall Dawson
b7ca001c9c Add __nonzero__ and __bool__ methods to QgsGeometry 2016-08-02 08:39:58 +10:00
Martin Dobias
a89fea13fd Added note about api break 2016-08-01 23:08:05 +02:00
Nyall Dawson
4b78b1c208 Make all QgsGeometry methods return values, not pointers
Reduces likelihood of crashes and leaks
2016-08-01 22:41:55 +10:00
Matthias Kuhn
3e33e686c1 Rename visibility presets to map themes
Because it is not only more descriptive for what it does but also
sounds more interesting.

[needs-docs]
2016-08-01 12:23:44 +02:00
Nyall Dawson
bd7d913379 Refine QgsFeature geometry getters/setters
All pointer based methods have been removed.

Now we have only:

  void setGeometry( const QgsGeometry& geom )

and

  QgsGeometry geometry() const

Benefits include avoiding a whole lot of tricky pointer lifetime
issues, potential memory leaks, and finally closing #777, which
has survived for over 9 years!...

Impacts on PyQGIS code:
- no more need for the messy
  g = QgsGeometry( feature.geometry() )
  workaround, just use g = feature.geometry() instead
- IMPORTANT: you can no longer test whether a feature has geometry
 using `if f.geometry():`, since QgsFeature::geometry() will
 *always* return an object. Instead, use
 `if not f.geometry().isEmpty():`, or preferably the new method
 `if not f.hasGeometry():`

Fix #777
2016-08-01 16:25:46 +10:00
Nyall Dawson
aceddae65a QgsFeature cleanup, part 1
Deprecate some QgsFeature methods which take or return pointers,
update other classes as required
2016-07-31 21:23:07 +10:00
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