37681 Commits

Author SHA1 Message Date
Nyall Dawson
9cba265876 Better handling of composer map forced refreshes 2017-03-21 12:32:19 +10:00
Nyall Dawson
7f1a07487a Fix missing initial render of composer maps 2017-03-21 11:51:34 +10:00
Nyall Dawson
a1160e9e36 Fix Windows build 2017-03-21 11:51:22 +10:00
Nyall Dawson
77706a6447 Avoid multiple map/legend renders while loading compositions 2017-03-21 10:32:53 +10:00
Nyall Dawson
ce3c854fd2 Remove hack to get composer maps to follow canvas 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
8d01573168 Add/refine test masks for server test 2017-03-21 10:32:53 +10:00
Nyall Dawson
c9b87387fa Fix restoration of compositions from legacy projects 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
c66026886e Don't use combobox of existing composer names in new composer title dialog
It's odd UX - selecting any of these results in an error message,
so giving them as choices is misleading.

Fix #12673 (indirectly)
2017-03-21 10:32:53 +10:00
Nyall Dawson
4a993de579 Fix crash when reopening composers 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
dbf0160327 Rework atlas layer action to handle temporary composer windows 2017-03-21 10:32:53 +10:00
Nyall Dawson
2e94f7de4c Remove another use of old iface methods 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
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
ce7180ca64 [processing] Default to current layer in layer selection combos
Makes things easier for large projects and avoids scrolling through
a large list of layers
2017-03-21 10:26:58 +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
Nyall Dawson
2a80d287ac [processing] Sync features in Select by Expression with Select by Attribute
Adds new stuff like "is null"/"is not null"/"does not contain"
to the Select By Attribute algorithm.
2017-03-21 09:09:26 +10:00
Nyall Dawson
954ee20389 [FEATURE][processing] Add 'does not contain' to Extract By Attribute 2017-03-21 08:58:36 +10:00
Nyall Dawson
ecb233b792 Add custom widget plugin for QgsScrollArea 2017-03-21 08:57:44 +10:00
Nyall Dawson
8e6d792710 Swap all QScrollAreas to QgsScrollAreas 2017-03-21 08:46:41 +10:00
Nyall Dawson
907ad02af8 Avoid accidental child widget value changes when scrolling scroll areas
This adds a new QgsScrollArea widget which is a subclass of QScrollArea.
QgsScrollArea has extra logic which temporarily blocks wheel events
from hitting child widgets for a short period following a scroll
of the area. This means that when scrolling a scroll area using the
mouse wheel, values won't be accidentally changed if the mouse
cursor momentarily lands on top of a widget.

QScrollArea should no longer be used in any QGIS code or plugins,
instead use QgsScrollArea to benefit from this fix.
2017-03-21 08:46:41 +10:00
Tim Sutton
d2b29a3e06 Fixed build due to missing image resource reference. 2017-03-20 23:46:15 +02:00
Tim Sutton
623681054b More images cleanups: Removed the developers folder as it is not maintained. Removed some XCF files since we dont really need them with the switch to SVG. Updated QGIS mime icon. 2017-03-20 23:46:15 +02:00
Tim Sutton
eb0841251f Update logos to use new QGIS logo 2017-03-20 23:46:15 +02:00
Tim Sutton
9ac4f7c40a In progress migration to new QGIS icon 2017-03-20 23:46:15 +02: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
f3e1772bb9 Remove QgsFeatureRequest::FilterRect
This enum value has not been in use since filter rects were
separated from other filter types. Leaving it in API is confusing
and leads to incorrect use.
2017-03-20 15:03:10 +10:00
Nyall Dawson
603d02d45e Fix incorrect results when using QgsFeatureRequest.acceptFeature with filter rect 2017-03-20 14:34:21 +10: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