1064 Commits

Author SHA1 Message Date
Nyall Dawson
e0229ad8c7 Merge pull request #3423 from nyalldawson/remove_deprecated
Remove unused QgsProvider(Count|ExtentCalc)Event classes
2016-08-24 06:59:41 +10:00
Denis Rouzaud
579ec8b18e remove bitmap cursors
use window system cursors instead
followup 3624d7b4d818628b7d7d446ff642f5be1cc16773
2016-08-23 15:42:53 +02:00
Denis Rouzaud
f5aa28bb32 rename QgsFieldProxyModel::Filter All to AllTypes 2016-08-23 15:42:37 +02:00
Denis Rouzaud
bd887bac7b sort api_break document 2016-08-23 15:31:33 +02:00
Denis Rouzaud
7fdade1a3a remove some deprecated methods, rename QgsAnnotation::mapPositionFixed() to hasFixedMapPosition() 2016-08-23 15:00:56 +02:00
Nyall Dawson
cb313761ca Remove unused QgsProvider(Count|ExtentCalc)Event classes 2016-08-23 10:03:52 +10:00
Matthias Kuhn
5c20f0782a Cleanup QgsEditFormConfig
* It's now implicitly shared, meaning that changes to the config
   can be supervised and a signal is sent from QgsVectorLayer and
   there is no risk of elements suddenly being deleted.
 * Remove a bunch of methods that were in QgsVectorLayer for legacy
   reasons.
2016-08-19 09:03:07 +02:00
Denis Rouzaud
af1fee525a Move feature now benefits from Advanced Digitizing
QgsMapToolMoveFeature now inherits QgsMapToolAdvancedDigitizing
this allows to specify distance, angles, complex and multiple moves at once
it is now a click and click operation (similarly to the rotate feature map tool): so it can be cancelled once enabled with the right click
2016-08-11 08:06:43 +02:00
Matthias Kuhn
7ee55a78f1 [pyqt5] Aliases for indistinguishable method overloads (#3099)
See
https://www.riverbankcomputing.com/pipermail/pyqt/2016-May/037500.html
2016-08-10 20:58:39 +02:00
Matthias Kuhn
58ea21124e Streamline expression context generation (#3350)
* Save more data to QML

 * Virtual fields
 * Map tips
 * Display expression
 * Read only flag

* Streamline expression context generation

Whenever an object is able to generate an expression context it
implements the method createExpressionContext() declared in
QgsExpressionContextGenerator.

This makes a cleaner API and allows using QgsFieldExpressionWidget and
QgsDataDefinedButton from python because standard OO programming
approaches are used instead of callbacks and void pointers.

* Colorize output of doc and sip tests

* Fix build

* Fix sip complaints

* Fix rebase problems

* Workaround failing bindings test
2016-08-10 19:44:30 +02:00
Juergen E. Fischer
eeebf4be08 rename QgsComposerSymbolItem::symbolV2() to symbol() 2016-08-10 12:12:28 +02:00
Juergen E. Fischer
4e8635b517 rename QgsVectorLayerEditUtils::deleteVertexV2 2016-08-10 12:12:28 +02:00
Juergen E. Fischer
39c4409c6a remove deprecated stuff from QgsVectorLayer and editor widgets 2016-08-10 12:12:28 +02:00
Juergen E. Fischer
20c803b5bd document api breaks by scripts/replacev2.sh 2016-08-10 12:12:28 +02:00
Nyall Dawson
b2cfb19720 Fix doxygen warnings 2016-08-10 17:56:01 +10:00
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