849 Commits

Author SHA1 Message Date
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
3f22a7a77f another scripts/replacev2.sh with minor manual fixes 2016-08-10 12:12:28 +02:00
Juergen E. Fischer
0688621046 scripts/replacev2.sh run 2016-08-10 12:08:52 +02: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
Denis Rouzaud
820cc560b2 remove deprecated private helpers QgsMapToolIdentify::convertMeasurement and displayUnits 2016-08-08 09:10:57 +02:00
Denis Rouzaud
6f51a13cd6 remove QgisInterface::actionLayerSelectionSaveAs
this has been deprecated since 2.4 and returns null pointer since then.
did not write this in api_break to not overload the document
2016-08-08 09:10:57 +02:00
Denis Rouzaud
aa82141df7 remove deprecated QgisInterface::fileMenu 2016-08-08 08:34:53 +02: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
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
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
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
Nyall Dawson
d075b128a8 Add missing docs 2016-08-02 07:26:11 +10: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
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
0fa6499bef Merge pull request #3329 from nyalldawson/annotations
Add an interface class for annotations, remove some hacks
2016-07-26 12:39:18 +10:00
Nyall Dawson
5ed31d887d Fix annotation position when maps are rotated, remove hacks
Adds a new interface class QgsAnnotation, and allows for removal
of a bunch of hacks in QgsComposerMap without breaking 2.x API
2016-07-26 10:18:19 +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
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
791b2c3919 Merge pull request #3324 from nyalldawson/qgis
QGis class rename and cleanup
2016-07-22 19:28:06 +10:00
Nyall Dawson
12a2147427 [FEATURE] Add an option to show user color schemes menus
This adds the ability for users to set whether a user created
color scheme should show up in the color button drop-down menus.

It's accessed through the color picker dialog, on the lists tab.
Just add a new color scheme, then from the scheme menu tick the
new "show in buttons" option.

Handy if you have sets of common palettes and want them to be
instantly available through the color menu.
2016-07-22 07:32:07 +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
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
Marco Hugentobler
4d1fbee7f0 Update sip binding 2016-07-14 17:06:22 +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
Juergen E. Fischer
e451b9ad6f indentation and spelling fixes 2016-07-08 12:59:38 +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
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
Nyall Dawson
9139872c9e Fix crash when using add circular string by radius tool 2016-07-05 11:42:59 +10:00
Nyall Dawson
a240cd8f8e Replace doxygen MapComposer group with core/gui
Since the MapComposer group doesn't actually exist
2016-07-04 19:57:13 +10:00
Martin Dobias
5f6627624e Fix incorrectly loaded sublayers if they had the same name (fixes #15168)
Use "layerid=N" instead of "layername=XYZ" for OGR sublayers
2016-06-30 14:28:06 +02:00
Nyall Dawson
19564672c2 Fix raster load min/max from extent in style dock (fix #15171) 2016-06-30 18:25:20 +10:00
Nyall Dawson
c49af32e95 Fix rule based settings not saved (fix #15146, #15147, #15148) 2016-06-27 15:56:06 +10:00
Juergen E. Fischer
92bfcd4802 update QgsAttributeTableFilterModel sip bindings 2016-06-24 01:04:10 +02:00
Matthias Kuhn
437cb85cd5 Left align mapped values
Fix #15101
2016-06-23 12:50:38 +02:00
Marco Bernasocchi
b4436271fe Fix allow clicking on a tags in maptips (#3218)
this is done by listening to the linkClicked signal
2016-06-21 18:01:49 +02:00