1237 Commits

Author SHA1 Message Date
Nyall Dawson
1b93cdae71 Spelling update 2017-07-11 14:24:14 +10:00
Nyall Dawson
28cd9addab Restore rulers in layout designer 2017-07-11 14:21:35 +10:00
Nyall Dawson
c25aab16b0 Port display of cursor location from composer 2017-07-11 12:57:38 +10:00
Nyall Dawson
02d0a046f8 Add some shortcuts to zoom to layout/layout width in status bar combobox 2017-07-11 12:23:30 +10:00
Nyall Dawson
e27a32d41c Add status bar zoom control to layout designer 2017-07-11 11:48:22 +10:00
Nyall Dawson
ac83093570 Port zoom actions from composer to layout designer 2017-07-11 11:06:36 +10:00
Nyall Dawson
cf488d34a4 Split layout item registry into two separate registries
Instead of relying on forward declared c++ classes from
gui in QgsLayoutItemRegistry, instead create a
QgsLayoutItemGuiRegistry which handles registration
of all the GUI specific behavior relating to layout items.

Remove all GUI related code from QgsLayoutItemRegistry.

This creates a cleaner split between core/gui code, and
given that there'll be a lot of gui specific behavior
which needs to be handled by a registry it makes sense
to keep this isolated in gui.

It also plays nicer with the sip bindings, which can't
handle forward declared gui classes in core.
2017-07-11 11:06:36 +10:00
Nyall Dawson
0307cac325 Port ability to pan layouts with middle mouse button depressed 2017-07-11 11:06:36 +10:00
Nyall Dawson
b9bbd91754 Port ability to navigate layouts using space-pan and ctrl-space zoom 2017-07-11 11:06:36 +10:00
Nyall Dawson
20ca51b59c Port ability to wheel zoom into/out of layout designer 2017-07-11 11:06:36 +10:00
Nyall Dawson
4065a7ff67 Add shell for non-functional layout select tool 2017-07-11 11:06:36 +10:00
Nyall Dawson
dc0425abee Update cursor on alt press/release for zoom tool 2017-07-11 11:06:36 +10:00
Nyall Dawson
7974597c08 Add a zoom tool to designer dialog 2017-07-11 11:06:36 +10:00
Nyall Dawson
41b98aa23c Add layout zoom tool 2017-07-11 11:06:36 +10:00
Nyall Dawson
867bdb6117 Move click-and-drag detection to QgsLayoutViewTool 2017-07-11 11:06:36 +10:00
Nyall Dawson
5cac2f71f0 Allow setting pen/brush for QgsLayoutViewRubberBand 2017-07-11 11:06:36 +10:00
Nyall Dawson
a346736df2 Handle tool changes mid press-release operation
Because it's possible for users to change the tool while a
press release operation is mid-way, e.g. by pressing a tool
shortcut key.
2017-07-11 11:06:36 +10:00
Nyall Dawson
3f66520828 Add layout panning tool 2017-07-11 11:06:36 +10:00
Nyall Dawson
db62a745eb Add a temporary layout item type for testing 2017-07-11 11:06:36 +10:00
Nyall Dawson
86bc8af216 Add some unit tests 2017-07-11 11:06:36 +10:00
Nyall Dawson
3843b5ef37 Create rubber band classes for layout views
c++ QgsLayoutItem metadata classes can directly register
a function which creates a QgsLayoutViewRubberBand for the item
subclass.

Python code cannot utilise this shortcut (due to inaccessibility
of forward declared gui classes from core Python classes), so
there's a separate gui registry utility class added for registering
prototypes for rubber bands for already registered item types.
2017-07-11 11:06:36 +10:00
Nyall Dawson
4ebea75e6a Subclass QMouseEvent to QgsLayoutViewMouseEvent
For easy access to mouse event coordinates in layout coordinate
space (and future use with snapped item coordinates)
2017-07-11 11:06:35 +10:00
Nyall Dawson
a6ccd63bc8 Start implementing an add item tool 2017-07-11 11:06:35 +10:00
Nyall Dawson
25034979e3 Add some unit tests for layout tools 2017-07-11 11:06:35 +10:00
Nyall Dawson
99f34300b9 Add shell classes for layout view tools
Copy the same model as QgsMapCanvas uses, with separate
classes for individual interaction tools instead of keeping
all the logic in the QGraphicsView subclass (as is done
with composer)
2017-07-11 11:06:35 +10:00
Nyall Dawson
4c2447fd89 Add shell for QgsLayoutView 2017-07-11 11:06:35 +10:00
Matthias Kuhn
e2c84f1a50 Merge pull request #4669 from nyalldawson/spinbox_ctrl
When holding ctrl while mouse wheeling on spin box, increase in smaller amounts
2017-07-08 10:37:00 +02:00
Matthias Kuhn
875a5d6d9d Merge pull request #4818 from DelazJ/spelling
Fix some spelling issues
2017-07-08 10:20:40 +02:00
Matthias Kuhn
9581fe0a10 [FEATURE] Add snapping results to default value calculation
... as @snapping_results variable
2017-07-07 12:58:55 +02:00
Nyall Dawson
eb8f91a556 Fix some button sizes on hidpi displays 2017-07-07 18:17:40 +10:00
Nyall Dawson
0802586a13 Fix minimum height of font buttons on non-Windows platforms 2017-07-07 16:50:27 +10:00
Matthias Kuhn
632eca6079 Merge pull request #4795 from pblottiere/dynamicform
[FEATURE] Dynamic form for joined fields
2017-07-07 08:22:18 +02:00
Harrissou Sant-anna
0d1c4cdc59 Running check_spelling.sh 2017-07-07 06:55:06 +02:00
Harrissou Sant-anna
0c967927ef Replace "drop down" and some dropdown by drop-down 2017-07-07 01:26:38 +02:00
Harrissou Sant-anna
15be88918f Replace "double click" and "doubleclick" by double-click 2017-07-07 01:26:38 +02:00
Nyall Dawson
603168e8fa Update sip 2017-07-07 08:54:00 +10:00
Blottiere Paul
e5eda5f889 Add a hint on widgets for non existent joined features 2017-07-06 21:27:37 +02:00
Nyall Dawson
e95b65ef48 [needs-docs] Mouse wheeling over font buttons can change font size
With ctrl+mouse wheel changing in smaller size increments
2017-07-06 19:56:39 +10:00
Nyall Dawson
0fd1f8e563 Fix size hint for font button 2017-07-06 19:56:39 +10:00
Nyall Dawson
99855ea35a Add method to use QgsFontButton in cut down mode for QFont settings only
The button can now be used in two different modes. The default behavior
is to include all settings used for configuring
QgsTextFormat/QgsTextRenderer classes. A cut down mode (without settings
for color/buffer/drop shadow/etc) is also available when the resultant
font is to be used only in a QFont object.
2017-07-06 19:56:39 +10:00
Nyall Dawson
0b9fb5d6e1 [needs-docs] New gui widget QgsFontButton
A standard widget for configuring text format properties for use
with QgsTextRenderer/QgsTextFormat.

It's modelled heavily off QgsColorButton, and supports lots of nice
things like dragging formats between buttons, copying and pasting
format settings, dropping colors from color buttons, dragging colors
from font buttons to color buttons, directly setting font size
and opacity/color without having to open a dialog.
2017-07-06 19:56:39 +10:00
Nyall Dawson
ddf5acebe7 Merge pull request #4807 from nyalldawson/layout_item_registry
Create a layout item registry for item types
2017-07-06 19:12:43 +10:00
Nyall Dawson
1fc81d6f98 Fix typo (coordiantes) 2017-07-04 14:33:11 +10:00
Harrissou Sant-anna
59e9f79658 ok is spelled OK 2017-07-03 08:49:50 +02:00
Nyall Dawson
7972092311 Update docs, sip 2017-07-03 14:21:40 +10:00
Nyall Dawson
4f21afac0f Shell layout designer dialog 2017-07-03 12:14:56 +10:00
Harrissou Sant-anna
35cbfa0087 Replace check box by checkbox 2017-07-02 23:25:40 +02:00
Denis Rouzaud
54c6291378 script to write include SIP files 2017-06-28 10:45:51 +02:00
Juergen E. Fischer
51fde8e08f spelling fixes 2017-06-27 10:34:12 +02:00
Nyall Dawson
2b7b0db747 Allow keyword arguments for all arguments in PyQGIS bindings
Previously this was only enabled for optional arguments (i.e.
those with default values). Enabling them for all arguments
allows for more readable PyQGIS code, and there seems no
downside given that we already have this support partly enabled.

The consequence of this change is that when 3.0 API is frozen
the freeze must also include the naming of function arguments,
since that's effectively now part of public API.
2017-06-25 20:07:14 +10:00