8587 Commits

Author SHA1 Message Date
Nyall Dawson
aad182fdc0 Merge pull request #4274 from nyalldawson/scroll_timer
A different approach to avoiding accidently scroll changes
2017-03-22 06:23:55 +10:00
lbartoletti
fb3d07f3f5 [FEATURE] New class for triangle
Adds a new geometry class for Triangle geometries

Methods include orthocenter, bisectors, medians, medial, circumscribed (center,
radius), inscribed (center, radius)

Also adds make_triangle expression function for creating triangles
2017-03-21 18:50:47 +10:00
jdugge
45f2cd5583 Fix duplicate QgsRectangle.toString methods
Condenses the 2 duplicate methods to a single method which is usable from the Python bindings.
2017-03-21 15:58:39 +10:00
Nyall Dawson
b54fe1e3a5 Use a clearer marker for main canvas position in view windows 2017-03-21 15:49:42 +10:00
Nyall Dawson
77706a6447 Avoid multiple map/legend renders while loading compositions 2017-03-21 10:32:53 +10:00
Nyall Dawson
041129d507 Fix loading composition triggers render of all composer maps
Also cleanup some more unused API methods
2017-03-21 10:32:53 +10:00
Nyall Dawson
54d1a93c17 Add missing TransferThis annotation 2017-03-21 10:32:53 +10:00
Nyall Dawson
885269ee78 Only create composer item config widgets on demand
Instead of creating them for all items when composer window
is opened, instead just create and destroy them when
required. None are too heavy to have a noticable delay
when selecting items, but in contrast keeping them around
forever is wasteful on memory.

Also clean up a lot of duplicate composer/composition
code and remove unnecessary signals from api (use a single
itemAdded signal instead of multiple signals for every
item type)
2017-03-21 10:32:53 +10:00
Nyall Dawson
53160c7b21 [composer] Port composer manager to layout manager
Also switch to using a proper model to show/edit compositions
in the dialog.
2017-03-21 10:32:53 +10:00
Nyall Dawson
3aef32a191 [composer] Rework interface composer methods
Since composer windows are now only created on demand, and
destroyed when the window is closed, the old interface methods
no longer apply. The new interface methods openComposers(),
openComposer(), closeComposer(), composerOpened(),
composerWillBeClosed() and composerClosed() are similar, but
only apply to composer windows when they are exist (i.e.
are currently open).

To access all compositions from a project, the project's
layoutManager() should be used instead.

Additionally, the new interface methods work with
QgsComposerInterface objects instead of QgsComposerView
objects. This should allow future hooks for plugins to interact
with open composer windows in a more useful way.
2017-03-21 10:32:53 +10:00
Nyall Dawson
b408952815 Add a basic interface for composer windows
Not much there yet, but it adds an interface with stable API
which can be used by plugins and scripts to interact with
composer windows.

Could be expanded in future to add hooks for toolbars, menus,
etc, allowing plugins to extend composer functionality.
2017-03-21 10:32:53 +10:00
Nyall Dawson
148e2bcf52 Better method to autogenerate composer names 2017-03-21 10:32:53 +10:00
Nyall Dawson
b6c76186b4 Restore opening existing composers 2017-03-21 10:32:53 +10:00
Nyall Dawson
8c8ac61512 Port composer template saving and duplicating to layout manager 2017-03-21 10:32:52 +10:00
Nyall Dawson
3a1ac1a995 [composer] Attach compositions to QgsProject
This adds a new QgsLayoutManager class which is used for
storage and serializing/deserializing of compositions.

A QgsLayoutManager is attached to QgsProject. This allows
core code to access the compositions attached to a project.
The intention is to move all handling of compositions from
app to core, making it easy for server to access project
compositions without resorting to fragile xml parsing.
2017-03-21 10:32:52 +10:00
Nyall Dawson
8e6d792710 Swap all QScrollAreas to QgsScrollAreas 2017-03-21 08:46:41 +10:00
Alessandro Pasotti
5adbc641d4 QgsSettings: added Auth, App and Providers sections
That should be all we need for namespaced settings.
2017-03-20 16:09:34 +01:00
Matthias Kuhn
6f430a60a7 Move QgsAnimatedIcon to a generic implementation (#4272) 2017-03-19 12:52:35 +01:00
Larry Shaffer
921a0c75e3 Updates to QgsPasswordLineEdit
- Add public func to set password visibility (instead of exposing slot)
- Add initial password visibility param; default to obfuscated (false)
- Fix bug where initial visibility was true, but show/hide was opposite
- Add generic tool tips to show/hide action
2017-03-17 16:33:40 -06:00
Etienne Trimaille
24e3214eda add checkbox to open sublayers in a group 2017-03-17 17:19:51 +01:00
Nyall Dawson
e5f581405e Allow clicking mouse back button on stacked panel widgets
Only works if click occurs outside of widgets - we probably should
start ignoring clicks which aren't left/middle/right in any
mouse event handlers
2017-03-17 13:57:53 +10:00
Alexander Bruy
e1b1465bb6 move select by attribute script test to QGIS tests 2017-03-16 17:49:40 +02:00
Alexander Bruy
c4052e6ec4 added sample test script which calls two algorithms 2017-03-16 17:48:39 +02:00
Alexander Bruy
a70e73cd74 minor script fixes 2017-03-16 17:48:39 +02:00
Alexander Bruy
394b4f1a87 fix typo 2017-03-16 17:48:39 +02:00
Alexander Bruy
efa9935c5d missed file 2017-03-16 17:48:39 +02:00
Alexander Bruy
911fc924dd add note about scripts tests to the README 2017-03-16 17:48:39 +02:00
Alexander Bruy
c603df1aa8 [processing] allow tests for scripts 2017-03-16 17:48:39 +02:00
Matteo Ghetta
3bcf287a7e Processing tests (#4259)
* [processing] qgis regular points test

* [processing] qgis shape buffer variable tests

* [processing] qgis create grid lines test

* [processing] qgis convert geometry test

* [processing] qgis extract by location test

* [processing] qgis add field test

* [processing] trying to fix travis failing

* [processing] trying to fix travis failing/2

* trying to fix travis failing/3

* [processing] Add new default option "ProjectCrs" to ParameterCrs

* [processing] RegularPoints tests shouldn't rely on iface

* [processing] Fix regular points test

* [processing] RandmPointsExtent new CRS parameter

* [processing] qgis random point in extent test

* [processing] qgis random point in extent test/2

* [processing] remove qgis random point in extent test

* no output random points in extent test

* remove useless output
2017-03-16 16:42:53 +01:00
Nyall Dawson
b0dc9f8517 [processing] Fix error when opening modeler (fix #16270) 2017-03-16 12:56:42 +10:00
rldhont
eb2231925f [BUGFIX][Processing] Vector tools -- add next methods for features iterator 2017-03-15 21:01:21 +01:00
Denis Rouzaud
e2d7181289 spelling 2017-03-15 08:23:05 +01:00
Nyall Dawson
ae45d8d490 Move composer title to composition name
Allows the name to be retrieved from core code
2017-03-15 15:19:13 +10:00
Nyall Dawson
738f4415d9 Merge pull request #4253 from nyalldawson/multi_canvas2
[FEATURE] Multi canvas/additional map views
2017-03-15 10:06:39 +10:00
Alexander Bruy
a537c0c052 add SIP bindings 2017-03-14 12:42:30 +02:00
Nyall Dawson
1e5f64919d Fix some use of direct project key read when getter should be used 2017-03-14 19:14:56 +10:00
Nyall Dawson
2d37ca9bd9 Add method to interface to close map canvases 2017-03-14 12:20:58 +10:00
Nyall Dawson
ea10cc68f0 Allow annotations to be toggled in additional map views 2017-03-14 09:28:34 +10:00
Nyall Dawson
29d77b0ce1 [FEATURE] Shell functionality for creating new canvases
Allows new "map views" to be created in the main QGIS interface.
These are map canvases, but with limited functionality (ie
no use of map tools beyond pan tool).
2017-03-14 09:28:33 +10:00
Juergen E. Fischer
8bea742216 fix flake8 warnings 2017-03-13 20:13:51 +01:00
Nyall Dawson
2cba52846e If no project layer order set, use layer tree layer order
for QgsMapThemeCollection::masterVisibleLayers()
2017-03-13 14:42:22 +10:00
Nyall Dawson
452abb2484 Add method to QgsMapThemeCollection to retrieve ordered list of
visible layers for the project
2017-03-13 13:40:48 +10:00
Nyall Dawson
5eccaf6020 Project layer order returns all layers in order, not just visible ones
Otherwise map themes with different visible layers cannot be
correctly ordered
2017-03-13 12:52:55 +10:00
Nyall Dawson
9faa628f8b Layer order in map themes must always respect project layer order 2017-03-13 12:52:55 +10:00
Nyall Dawson
6cfc6a1b98 Allow retrieval of project layer order through QgsProject
Previously this was only accessible through app
2017-03-13 12:52:55 +10:00
Nyall Dawson
9842fcbfc7 Add convience method to block while canvas is rendering
NOT to be called from anything but unit tests and standalone
scripts!!
2017-03-13 10:00:36 +10:00
Nyall Dawson
af532ecdf3 Improved docs for QgsMapCanvas::setTheme, handle setLayers and
setLayerStyleOverrides when canvas is following a map theme
2017-03-13 09:53:09 +10:00
Nyall Dawson
1e6bffe414 Allow setting map canvases to auto follow a map theme 2017-03-13 08:39:37 +10:00
Nyall Dawson
c11ef583ce Generalise editor widget config saving/restoring props from gui 2017-03-10 11:02:16 +01:00
Tom Kralidis
5a7e1fb25d Merge pull request #4243 from tomkralidis/metasearch-add-data-dropdown
MetaSearch: consolidate "Add WxS" buttons into single dropdown button
2017-03-09 19:28:42 -05:00