1122 Commits

Author SHA1 Message Date
Matthias Kuhn
b1448233e9 Move QgsMapLayerProxyModel and QgsMapLayerProxyModel to core
Because it's also useful for non-widget applications
2016-08-29 18:43:20 +02:00
Matthias Kuhn
bbafbf4887 Merge pull request #3338 from pvalsecc/editor_widgets_selection
Smarter default edit widgets with plugins to pick them
2016-08-29 17:14:14 +02:00
Patrick Valsecchi
24bde35ce6 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-08-29 07:42:50 +02:00
Patrick Valsecchi
db91330b66 Avoid back and forth with WKB in rendering 2016-08-29 06:55:52 +02:00
Nyall Dawson
b7716aa7fb Docs + cleanups for color ramp dialogs 2016-08-24 21:01:03 +10:00
Nyall Dawson
cf9292cc6d Color ramp dialogs no longer edit ramps in place
Now the dialogs use a copy of the ramp, and the edited
ramp is retrieved by calling ramp() on the dialog after
it is executed.

Avoids pointer lifetime issues by storing and working
on a ramp pointer which the dialog does not have ownership
on.

Also fix a bunch of leaks relating to cloning color ramps.
2016-08-24 21:01:03 +10:00
Nyall Dawson
7413db79b0 Rename color ramp dialogs to match new ramp class names 2016-08-24 21:01:03 +10:00
Nyall Dawson
932e469e5f Rename color ramp classes to more sensible names
QgsVectorColorRamp -> QgsColorRamp
QgsVectorGradientColorRamp -> QgsGradientColorRamp
QgsRandomColors -> QgsRandomColorRamp
QgsRandomColorRamp -> QgsLimitedRandomColorRamp
QgsVectorColorBrewerColorRamp -> QgsColorBrewerColorRamp

These color ramps are used throughout all of QGIS (not
just in vector symbology) and the current names are
misleading.
2016-08-24 21:01:03 +10:00
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