Another bit to make core library independent from QgsProject::instance().
Until now labeling engine configuration was taken from project singleton.
Removed legacy methods from QgsPalLabeling - the class now does not have
any more member variables/methods, it is just a bunch of helper functions.
(PR #4384)
In a post-OTF-disabled world these are no longer required. The
map units are dictated by the map units for the destination
CRS.
It's dangerous to separate these two properties as setting
the incorrect map units for a given CRS will result in
incorrect scale calculations.
Because
- OTF reprojection is mature and stable
- Should be no cost when not required - transforms are shortcut
when not required
- Reduces code complexity
- Canvas OTF support was being incorrectly used as a flag for
whether measurements should be made in ellipsoidal mode. Instead
the project's ellipsoid setting should be checked for this.
- Should simplify behavior for new users
Qt5 allows runtime detection of touch devices. This commit reworks
the current touch map tool by pulling its behavior into the normal
pan tool when a touch device is detected.
It avoids the need for a seperate map tool for touch interaction,
and also avoids having this tool always appear on the Windows
builds (regardless of the presence of a touch device)
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.
* Switch QgsMapCanvas zoomIn and zoomOut to slots
* Change shortcuts to zoom in/out tool to Ctrl+Alt +/-, and
make Ctrl + and Ctrl - trigger an immediate zoom in/out
Having Ctrl +/- perform an immediate zoom in/out is standard
across almost all apps with a zoom facility, so we should
respect that same behaviour.
This change also helps bring canvas and composer behaviour
closer together.
(fix#1824)
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.
Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.
It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.
Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
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!