1538 Commits

Author SHA1 Message Date
Nyall Dawson
1be5fbda96 More consistency across scale API
Use a real scale widget for point displacement label scale
2017-06-09 10:26:01 +10:00
Nyall Dawson
b07726592c Flip remaining scale API from real to denominators 2017-06-09 09:12:42 +10:00
Nyall Dawson
08a9bcba0a Unify scale widgets API
Flip all scale based widgets to use scale denominators instead
of actual scales (ie 100.0 instead of 0.01 for 1:100).

This is done for consistency with the rest of the API, which
predominantly uses scale denominators. It also helps
precision loss as a result of multiple 1.0 / scale conversions
throughout the code.

Refs #15337
2017-06-09 09:11:10 +10:00
Nyall Dawson
9f71156a13 Merge pull request #4678 from nyalldawson/layer_scale
Swap QgsMapLayer min/max scale API definitions (unify scale api, pt 2)
2017-06-09 07:44:01 +10:00
Martin Dobias
2964c33d63 Reshape tool: use default Z value for 3D geometries 2017-06-08 21:56:21 +02:00
Martin Dobias
9cd3ef02ac Use invalid CRS as default in map settings
I have got caught by the default set to WGS 84 when I loaded a layer
in projected CRS, set extent to layer's extent and... nothing got rendered
because map renderer was reprojecting to WGS 84.

This default is closer to the default in 2.x where reprojection is turned off.
2017-06-06 15:06:01 +02:00
Denis Rouzaud
fa5bd491fc run code_layout build from top CMakeLists
instead of adding an extra CMakeLists in .ci/travis/code_layout to build API doc, astyle and run tests (indentation, spelling, sip, doc coverage), the top CMakeLists has been adapted to allow not building core libraries and possibly just the static code layout
* astyle has been moved from /src/astyle to /lib/astyle (I would propose to move all external libraries, and possibly add git submodules)
2017-06-05 22:19:20 +02:00
Denis Rouzaud
281daee0ba run Doxygen and doc coverage test on static Travis config 2017-06-05 22:19:20 +02:00
Nyall Dawson
3388857526 Move uniqueValues to QgsFeatureSource
Also change signature of QgsVectorLayer/QgsVectorDataProvider
uniqueValues method to match (and improve API)
2017-06-05 16:59:08 +10:00
Nyall Dawson
a9a7d3c3d9 Swap QgsMapLayer min/max scale API definitions
setMaximumScale() and setMinimumScale(), maximumScale() and
minimumScale() had the opposite meaning to other min/max scales
in the API, and were the opposite to how these settings were
exposed in the GUI. This lead to very confusing API!!

Their definitions have now been swapped. setMaximumScale
now sets the maximum (i.e. largest scale, or most zoomed in)
at which the layer will appear, and setMinimumScale now sets
the minimum (i.e. smallest scale, or most zoomed out) at
which the layer will appear. The same is true for the
maximumScale and minimumScale getters.
2017-06-04 09:31:10 +10:00
Matthias Kuhn
bf9021ae92 Document API change 2017-06-02 19:53:37 +02:00
Nyall Dawson
d8d17524b2 Make QgsSpatialIndex protected members private
The class is not designed to be subclassed
2017-06-01 10:09:09 +10:00
Nyall Dawson
77fd7e63ea Merge pull request #4646 from nyalldawson/rotation
Unify UX behavior, pt 2: rotation
2017-05-31 12:54:35 +10:00
Alexander Bruy
a468abbdcd fix icon loading in the nohelp.html file 2017-05-30 17:22:38 +03:00
Nyall Dawson
21a4ac4d3a Unify label rotation with other rotation settings
Label rotation is now specified in degrees clockwise, just like
symbol rotation, map rotation, etc.

Fix #4518
2017-05-30 17:23:24 +10:00
Nyall Dawson
d705642fb3 Update diagram renderer to use rotation in degrees clockwise 2017-05-30 17:19:25 +10:00
Nyall Dawson
94829206d1 Flip 'alpha' to 'opacity' in gui API 2017-05-30 13:33:09 +10:00
Nyall Dawson
a3262240fe Flip symbology from alpha/transparency to opacity 2017-05-30 11:07:22 +10:00
Nyall Dawson
bcf4026f9d Flip QgsVectorLayer from transparency to opacity 2017-05-30 08:48:55 +10:00
Nyall Dawson
052b5d321c Flip QgsDiagramSettings from transparency to opacity 2017-05-30 08:48:55 +10:00
Nyall Dawson
ac3932073b Flip QgsShadowEffect from transparency to opacity 2017-05-30 08:48:55 +10:00
Nyall Dawson
6f4c5496c7 Flip QgsDrawSourceEffect from transparency to opacity 2017-05-30 08:48:55 +10:00
Nyall Dawson
89c2e85aa9 Flip QgsGlowEffect from transparency to opacity 2017-05-30 08:48:55 +10:00
Nyall Dawson
a6d636447d Flip QgsColorEffect from transparency to opacity 2017-05-30 08:48:55 +10:00
Nyall Dawson
59cc09b4c4 Change QgsBlurEffect to use opacity instead of transparency 2017-05-30 08:48:55 +10:00
Nyall Dawson
39146517d2 Change QgsComposerItem to use opacity instead of transparency 2017-05-30 08:48:54 +10:00
Nyall Dawson
48db8ecfac Merge pull request #4601 from timlinux/contributors
Added Ismail Sunni and Etienne Trimaille to contributors list
2017-05-29 09:53:43 +10:00
Nyall Dawson
5b0bc93834 Rename QgsJSONExporter/Utils to QgsJsonExporter/Utils
Follows proper QGIS/Qt capitalization convention
2017-05-25 07:43:03 +10:00
Tim Sutton
14fcddb6e7 Added Ismail Sunni and Etienne Trimaille to contributors list 2017-05-22 06:34:45 +07:00
Matthias Kuhn
a2d70f3dd1 Document API changes 2017-05-19 07:13:11 +02:00
Matthias Kuhn
95ac7d0f7b Merge pull request #4567 from pblottiere/clone
Add clone() methods for layers
2017-05-19 07:10:49 +02:00
Alexander Bruy
b8d369a79a Merge pull request #4575 from alexbruy/qgis-sponsors
remove QgsSponsors widget. Instead open sponsors page in the webbrowser (fix #16169)
2017-05-18 13:05:15 +03:00
Blottiere Paul
8f50b9e83c Add note in api break doc for plugin layers 2017-05-18 11:09:43 +02:00
Nyall Dawson
27077c875e Add a QgsStatusBar widget/interface for adding messages/widgets to
main window statusbar

QStatusBar gives almost no control over display and placement
of child widgets. It's not possible to subclass and reimplement
either, due to how QMainWindow works internally, and also due to
the special handling for the size grip and other platform specific
handling in QStatusBar.

Instead, we embed a single QgsStatusBar covering the whole real
status bar. All child widgets and temporary messages instead
are pushed to the QgsStatusBar instead - giving us as much control
as we desire over how these widgets are placed and their behavior.

As a result the locator widget has been moved to its logical placement
on the left of the status bar.

All plugins must ensure that they use the status bar interface
available via iface.statusBarIface() instead of directly interacting
with the status bar (e.g. iface.mainWindow().statusBar()...)
2017-05-18 10:35:33 +10:00
Nyall Dawson
71f7872251 [FEATURE] Implement a QtCreator style locator bar in the QGIS status bar
This adds a new "locator" bar to the QGIS status bar. If you're not
familiar with QtCreator's locator, it's a quick search bar
(activated by Ctrl+K) which displays matching search results
from any number of registered search filters.

Search filters are subclassed from QgsLocatorFilter, and
added to the app's locator via iface.registerLocatorFilter(...)

Searching is handled using threads, so that results always
become available as quickly as possible, regardless of whether
any slow search filters may be installed. They also appear
as soon as each result is encountered by each filter, which means
that e.g. a file search filter will show results one by one
as the file tree is scanned. This ensures that the UI is always
responsive even if a very slow search filter is present (e.g.
one which uses an online service).

This framework is designed to be extended by plugins, such as
OSM nominatim searches, direct database searching (i.e. Discovery
plugin), layer catalog searches, etc...
2017-05-17 21:33:47 +10:00
Martin Dobias
591c3ab995 Remove QgsPoint::onSegment() method
This is a completely wrong use of an algorithm that is meant to be used with *integer* values,
e.g. when dealing with pixels on screen, but not for coordinates that are floating point numbers.
The algorithm has a fixed tolerance of 1 unit.

QgsPoint(5,0.9).onSegment(QgsPoint(0,0), QgsPoint(10,0)) would return 2 (i.e. point is on line segment)

See the original code: https://github.com/erich666/GraphicsGems/blob/master/gems/PntOnLine.c
2017-05-17 17:38:29 +08:00
Alexander Bruy
5112a0dc88 remove QgsSponsors widget. Instead open sponsors page in the webbrowser
(fix #16169)
2017-05-17 12:06:20 +03:00
Martin Dobias
f153e19168 Fix saving of "obstacle only" state + misc fixes to unit tests 2017-05-16 14:25:32 +08:00
Martin Dobias
828bd384c5 Convert remaining bits where labeling was configured using setCustomProperty() 2017-05-16 14:25:32 +08:00
Martin Dobias
21f03bc11c Clean up reading/writing of labeling configuration in vector layers
Historically the configuration used to be stored in layer's custom properties, but that does not scale
beyond simple rendering and so rule-based labeling introduced storage of configuration natively in XML elements.
That left us with two different ways of reading/writing labeling configurations. This work makes all configuration
to use native XML elements.

To keep compatibility of 2.x projects, reading of configuration from custom properties is preserved.

This commit also adds Python APIs for direct manipulation of labeling configuration through vector layer's
setLabeling() and labeling() calls.
2017-05-16 14:25:32 +08:00
Nyall Dawson
ac94345331 Rename QgisGui to QgsGuiUtils
Better reflects what this namespace contains, and replaces the
non-standard Qgis prefix with the Qgs standard
2017-05-15 07:33:52 +10:00
Nyall Dawson
436844b205 QgsMapLayerActionRegistry is no longer a singleton
Moved the global instance to QgsGui::QgsMapLayerActionRegistry()
2017-05-15 07:32:38 +10:00
Nyall Dawson
a86b93e957 QgsLayerTreeEmbeddedWidgetRegistry is no longer a singleton
Moved the global instance to QgsGui::layerTreeEmbeddedWidgetRegistry()
2017-05-15 07:32:01 +10:00
Nyall Dawson
711f6dcc50 QgsShortcutsManager is no longer a singleton
Move the global instance to QgsGui::shortcutsManager()
2017-05-15 07:32:01 +10:00
Nyall Dawson
4a5c9a7ba3 Make a new global QgsGui singleton
Move QgsEditorWidgetRegistry from being a singleton itself to
instead being a member of the QgsGui singleton
2017-05-15 07:32:01 +10:00
Martin Dobias
24e06a4941 Remove unused mAnnotationForm member + getter/setter from QgsVectorLayer 2017-05-14 17:41:14 +08:00
Martin Dobias
0ccaba7a70 Path resolver instead of project singleton in edit form config and svg annotation 2017-05-14 10:34:01 +08:00
Martin Dobias
c882f88c1d Remove "relative path" checkbox from svg selector widget
It is decided on different level whether files are saved with relative paths
and internally now QGIS always uses absolute paths to SVG files.
2017-05-13 19:43:47 +08:00
Martin Dobias
5bdae75156 API break update + read/write context in labeling and text renderer
This enables correct loading/saving of relative paths of SVG files for background of labels
2017-05-13 18:12:04 +08:00
Martin Dobias
23a7bd0fd9 Introduce QgsReadWriteContext that encapsulates QgsPathResolver
This should make the read/write methods more flexible if we need to give them extra context.
2017-05-13 18:09:26 +08:00