26 Commits

Author SHA1 Message Date
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Nyall Dawson
44289084e9 Optimise passing of variables by ref/value 2016-10-24 10:36:23 +10:00
Denis Rouzaud
820cc560b2 remove deprecated private helpers QgsMapToolIdentify::convertMeasurement and displayUnits 2016-08-08 09:10:57 +02: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
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
Nyall Dawson
00502620c0 [FEATURE] Allow web map style shift-drag zoom
When certain map tools are active, you can hold down shift
and drag a rectangle on the map to zoom to that area. This
is enabled for the map tools which are not selection tools
(since they use shift for adding to selection), and edit
tools.

Gracias a Girona!
2016-05-30 19:39:57 +10:00
Nyall Dawson
dfdcec8922 Fix project unit confusion (pt 3): add area unit settings with a
ton of available area units (eg m2, km2, mi2, ft2, yd2, ha, ac,
etc)

Adds a new option in both the QGIS setting and project properties to
set the units used for area measurements. Just like the distance
setting, this defaults to the units set in QGIS options, but can
then be overridden for specific projects.

The setting is respected for area calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values

Also adds unit tests to ensure that area calculated by attribute table
update bar, field calculator and identify tool are consistent wrt
ellipsoidal calculations and area units.

TODO: make measure tool respect area setting

(refs #13209, #4252 and fixes #12939, #2402, #4857)
2016-02-15 12:47:36 +11:00
Nyall Dawson
ddbdcf8ab1 Fix project unit confusion (pt 2): add project distance unit setting
Adds a new option in project properties to set the units used for
distance measurements. This setting defaults to the units set in
QGIS options, but can then be overridden for specific projects.

The setting is respected for length and perimeter calculations in:
- Attribute table field update bar
- Field calculator calculations
- Identify tool derived length and perimeter values
- Default unit shown in measure dialog

Also adds unit tests to ensure that length and perimeter calculated
by attribute table update bar, field calculator and identify tool
are consistent wrt ellipsoidal calculations and distance units.

(refs #13209, #12939, #2402, #4857, #4252)
2016-02-14 21:04:41 +11:00
Nyall Dawson
f1633a1796 Change all signals to use const refs for non trivial objects 2015-10-26 22:46:25 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Matthias Kuhn
efcbbfdaeb Move maptools from app->gui 2015-09-11 12:02:25 +02:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Juergen E. Fischer
abd4a04399 sip update 2015-02-03 02:21:52 +01:00
Denis Rouzaud
1fb524f119 improved identify menu with a dedicated class 2014-09-16 11:51:18 +02:00
Denis Rouzaud
4588d9bd6c new map tool to select single feature 2014-08-19 08:34:02 +02:00
Denis Rouzaud
71d7445c83 use flag instead of enum 2014-08-14 08:33:25 +02:00
Juergen E. Fischer
45c0be1059 sip: remove enum constants 2014-06-02 21:52:02 +02:00
Juergen E. Fischer
c4c131ef75 sip sync 2014-05-27 23:32:42 +02:00
Juergen E. Fischer
d4e369414b update sip bindings 2014-01-26 18:36:29 +01:00
Denis Rouzaud
d4027bbda8 add LayerSelection idetinfy mode in SIP 2013-10-28 08:29:49 +01:00
Juergen E. Fischer
3854086d47 sip update 2013-06-23 16:00:24 +02:00
Denis Rouzaud
66696ba197 unifying identify results in a single struct 2013-02-07 11:57:54 +01:00
Denis Rouzaud
24ca94bdae return results directly from the identify method instead of using a private attribute 2013-02-07 11:57:54 +01:00
Radim Blazek
50d4bb6d4d WMS identify feature support - get vector features from GML GetFeatureInfo 2013-02-06 15:14:16 +01:00
Denis Rouzaud
7c26d701cf remove useless funcs from sip 2013-02-05 19:57:42 +10:00
Denis Rouzaud
682524ff54 MapToolIdentify moved to gui to make it accessible in python
put back convertMeasurement in gui as it is not app specific

use display settings for specific app units
2013-02-05 19:57:42 +10:00