9164 Commits

Author SHA1 Message Date
Nyall Dawson
376d6b3d08 Add missing docs, sip bindings 2017-05-17 21:33:47 +10:00
Nyall Dawson
1174b335dc Add inbuilt filters for project layers and compositions
The project layer filter allows you to quickly select a layer
from the current project and highlight it in the layer tree.
It's useful for complex project with lots of groups, where
it's easy to "lose" layers somewhere in the tree...

The composition filter allows searching for and opening
compositions from the current project
2017-05-17 21:33:47 +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
Alexander Bruy
49a7158a9f Merge pull request #4565 from alexbruy/processing-single2multi
[processing] handle NULL values in the single to multi algorithm (fix #15822)
2017-05-17 13:37:06 +03: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
84871ce00d [processing] temporarily disable singleparts to multiparts test 2017-05-17 08:26:47 +03:00
Alexander Bruy
fe7c981aea [processing] handle NULL values in the single to multi algorithm (fix #15822) 2017-05-16 13:43:42 +03:00
Alexander Bruy
11475c621d Revert "Merge pull request #4562 from alexbruy/processing-singletomulti-3"
This reverts commit e3d79a1fe940b5d813b5f79c51b43393d085bb16, reversing
changes made to 3f7f95ee262ea3646d61600c21faed0866bc70b0.

Reverting again, as Travis started failing after merging PR (with all
test passed) into master branch
2017-05-16 13:42:47 +03:00
Alessandro Pasotti
cbef51cc0a [server] Sipify QgsRequestHandler 2017-05-16 11:57:28 +02:00
Alexander Bruy
e3d79a1fe9 Merge pull request #4562 from alexbruy/processing-singletomulti-3
[processing] handle NULL values in the single to multi algorithm (fix #15822)
2017-05-16 11:59:51 +03:00
Juergen E. Fischer
3f7f95ee26 db_manager versioning: add RETURNING to INSERT rule (fixes #16083) 2017-05-16 10:34:59 +02:00
Alexander Bruy
b56e46dad4 [processing] handle NULL values in the single to multi algorithm (fix #15822) 2017-05-16 10:06:26 +03:00
Juergen E. Fischer
2f70b426e9 sip bindings: exclude QgsCompositionChecker when not building tests 2017-05-16 09:04:08 +02: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
bfdc84fc69 Fixes to unit tests 2017-05-16 14:25:32 +08:00
Martin Dobias
ee9fabbec1 Fix for style loading and clean up of used labeling custom properties 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
Denis Rouzaud
e455b157b5 [sipify] do not comment global operators
fix class/struct level detection
sipify qgsmargins.qgs
2017-05-15 21:55:10 +02:00
Matthias Kuhn
3f85b050dc fix bad copy paste 2017-05-15 21:55:10 +02:00
Matthias Kuhn
d15bd8dd22 No docstrings for out-of-class functions 2017-05-15 21:55:10 +02:00
Matthias Kuhn
5c2deb4010 Doxymentation 2017-05-15 21:55:10 +02:00
Matthias Kuhn
d4edbc0fdb Unsipify QgsMargins 2017-05-15 21:55:10 +02:00
Matthias Kuhn
7ac276e713 No copy of QgsLabelSearchTree is allowed 2017-05-15 21:55:10 +02:00
Matthias Kuhn
df6d60fcc1 Fix sip errors 2017-05-15 21:55:10 +02:00
Matthias Kuhn
9e059ed77e Fix sip errors 2017-05-15 21:55:10 +02:00
Matthias Kuhn
2abb1465c4 [sipify] Another batch of sip 2017-05-15 21:55:10 +02:00
Denis Rouzaud
922b162b86 attachment widget: data defined button for document type 2017-05-15 17:57:25 +02:00
Nyall Dawson
87052a7712 Merge pull request #4558 from nyalldawson/native-lib-mac
Add OS native interface lib, with objective-c++ interface to Mac Cocoa libraries, v3
2017-05-15 18:24:26 +10:00
Nyall Dawson
ae97c333d6 Revert "Port algorithm countVisibleParameters to c++"
This reverts commit c3c694f8ccfbe0b64df14365f950f5895968a66a.
2017-05-15 10:24:38 +10:00
Nyall Dawson
6efe160a65 Move QgsNative instance from app->QgsGui singleton
This allows gui widgets to utilise native platform interfaces.
Additionally attaching the instance to QgsGui allows QgsNative
to become a QObject in future if required and for use
of signals/slots in the native interfaces.
2017-05-15 09:56:52 +10:00
Nyall Dawson
f8f7d60cf0 Merge pull request #4514 from nyalldawson/gui_instance
Make a new global QgsGui singleton
2017-05-15 09:03:55 +10:00
Nyall Dawson
c3c694f8cc Port algorithm countVisibleParameters to c++ 2017-05-15 08:44:28 +10:00
Nyall Dawson
14882058ba Sipify update 2017-05-15 07:34:14 +10: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
Nyall Dawson
280ca31972 Merge pull request #4401 from nyalldawson/processing_params
c++ framework for parameters and running algorithms
2017-05-15 07:08:07 +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
Martin Dobias
8ffd91ea90 Propagate path resolver through renderers, annotations, diagrams
This is necessary in order to be able to correctly translate between absolute and relative paths
deeper in the code - e.g. paths to SVG files used in marker or fill symbols.

Until now, relative paths were translated to absolute paths on the fly.
This is now changed - paths to files should be always absolute within QGIS objects - and paths
only get turned into relative when saving projects. When loading a project, relative paths
are translated to absolute paths immediately.

This should lower the overall confusion about relative/absolute paths within QGIS, and also
allow having different base directories for relative paths (e.g. QML or QPT files may use relative paths
to their directory - rather than to the project directory)
2017-05-13 18:02:19 +08:00
Alexander Bruy
6fe459de14 [processing] remove extra quotes when restoring batch process from file
(fix #16309)
2017-05-13 11:14:17 +03:00
lbartoletti
bc0c3a22b0 Add inclination method for QgsPointV2 (#4536) 2017-05-13 17:29:50 +10:00
Alexander Bruy
c620c7c306 [processing] stop algorithm execution if geometry/feature error occured
(fix #11986)
2017-05-13 09:45:37 +03:00
Alexander Bruy
e01b7ef60a [processing] take in account file extension when loading Processing
results (fix #16486)
2017-05-12 17:28:41 +03:00
Alessandro Pasotti
3f9c4e5fa7 Merge pull request #4535 from boundlessgeo/attributetable-fixes-16492
Attributetable fixes  crash #16492
2017-05-12 14:51:28 +02:00