37504 Commits

Author SHA1 Message Date
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
79a11dcdfe Extend layout manager tests 2017-03-21 10:32:52 +10:00
Nyall Dawson
5722f15a6e Remove more ununused composer code, fix updating existing
compositions when settings change
2017-03-21 10:32:52 +10:00
Nyall Dawson
8c8ac61512 Port composer template saving and duplicating to layout manager 2017-03-21 10:32:52 +10:00
Nyall Dawson
8478b7abdf [composer] Allow floating docks
Now that composer windows are deleted on close, we no longer
suffer from the Qt bug which keeps floating docks open when
the window is hidden
2017-03-21 10:32:52 +10:00
Nyall Dawson
9be22e1938 Remove more unneeded composer window code 2017-03-21 10:32:52 +10:00
Nyall Dawson
c60a73cb9a [composer] Composer windows are created on demand and destroyed on close
Avoids having to create a window and all widgets for every
composition when loading a project. Speeds up loading
projects.

Fix #15193
2017-03-21 10:32:52 +10:00
Nyall Dawson
bfb15da416 Use layout manager when testing for unique composer names 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
63f7bee62f Followup setting composition name 2017-03-21 10:32:52 +10:00
Nyall Dawson
c412596b64 Better saving/restoring of map view dock position
Inspired by Sourcepole's kadas-albireo
2017-03-21 10:12:56 +10:00
Alessandro Pasotti
f60dc81102 Wrap and expose system tray notifications (#4286)
* Wrap and expose system tray notifications

* System tray notifications: renamed to showSystemNotification and const
2017-03-20 17:01:42 +01: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
Nyall Dawson
4b041d6f9e Improve docs 2017-03-20 12:26:22 +10:00
Nyall Dawson
0ed1414885 Fix map not refreshed when deselecting/inverting selection (fix #16365) 2017-03-20 10:45:38 +10:00
Nyall Dawson
0d3cf57483 Revert "[FEATURE] Allow using secondary zoom wheel on mouse to magnify canvas"
This reverts commit ecc49256a37d4333d9cefdeefff1f3fd7a38d893.

Works very badly for touchpads, where horizontal movement is interpreted
as a magnify request
2017-03-20 08:16:09 +10:00
Matthias Kuhn
6f430a60a7 Move QgsAnimatedIcon to a generic implementation (#4272) 2017-03-19 12:52:35 +01:00
Matthias Kuhn
616b4dd987 Set feature valid on setId 2017-03-18 12:11:52 +01:00
Matthias Kuhn
babab3da01 Fix failing test 2017-03-18 12:11:52 +01:00
Matthias Kuhn
255eb98be6 Make features valid on setAttribute and setGeometry
Implements https://github.com/qgis/qgis3.0_api/issues/75
2017-03-18 12:11:52 +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
Larry Shaffer
16cf3665e1 Add version parsing to FindQGIS CMake module 2017-03-17 16:14:21 -06:00
Etienne Trimaille
24e3214eda add checkbox to open sublayers in a group 2017-03-17 17:19:51 +01:00
Even Rouault
ed1b0a2e74 Merge pull request #4270 from rouault/wfs_outputformat
[WFS provider] Select GML3 output format for WFS 1.0 when available
2017-03-17 13:48:28 +01:00
Nyall Dawson
1337ee3866 [composer] Smooth scrolling for touchpads 2017-03-17 20:55:04 +10:00
Mathieu Pellerin
25fe2b07b9 [labelling] fix font size @value variable (fixes #16362) (#4273) 2017-03-17 15:00:22 +07: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
Nyall Dawson
7aff3e784c Flip panel connects to new style 2017-03-17 13:55:26 +10:00
Nyall Dawson
ecc49256a3 [FEATURE] Allow using secondary zoom wheel on mouse to magnify canvas 2017-03-17 13:00:29 +10:00
Nyall Dawson
1a50352cf7 [FEATURE] Allow navigating back/forward through canvas view history
with back/forward mouse buttons
2017-03-17 12:35:35 +10:00
Nyall Dawson
fa22fabec8 Merge pull request #4266 from nyalldawson/raster_proj
Avoid getting stuck in raster projector loop for long times
2017-03-17 12:28:34 +10:00
Nyall Dawson
2dbb128dd9 Make raster engine safer with memory usage 2017-03-17 12:10:16 +10:00
Nyall Dawson
68ec95df6d Avoid getting stuck in raster projector loop for long times 2017-03-17 11:02:37 +10:00
Juergen E. Fischer
9887734a1f don't crash on late update timeouts
(cherry picked from commit 5541ad0c06e298c9df804b2236ff660f129db3e6)
2017-03-16 18:41:24 +01:00
Alexander Bruy
e950b7b54d Merge pull request #4268 from alexbruy/scripts-tests
[processing] support for scripts in the test suite
2017-03-16 18:24:47 +02: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
Even Rouault
852f01b0f9 [WFS provider] Select GML3 output format for WFS 1.0 when available
Some WFS servers like QGIS servers can expose GML3 output format for GetFeature
requests, which enable to retrieve curve geometries, instead of linearized ones
with the default GML2 output format. So use GML3 when advertized, and that
no explicit outputFormat is passed in the URI.
2017-03-16 13:32:39 +01:00
Alexander Bruy
56e67522be add aux files generated by tests to .gitignore 2017-03-16 13:24:17 +02:00
Nyall Dawson
47a71135a4 Fix some suffixes for spin boxes 2017-03-16 14:23:53 +10:00