1165 Commits

Author SHA1 Message Date
Nyall Dawson
4318bfb8ad Merge pull request #4670 from nyalldawson/widget_action_header
New classes QgsMenuHeader, QgsMenuHeaderWidgetAction
2017-06-04 16:46:41 +10:00
Matthias Kuhn
a9d7630a69 Rename QgsPointV2 to QgsPoint and QgsPoint to QgsPointXY
Because 3D coordinates should be the default.

References https://github.com/qgis/qgis3.0_api/issues/36
2017-06-02 19:53:37 +02:00
Alessandro Pasotti
de5996c7dc [addlayerbutton] Use enum for window mode instead of booleans 2017-06-02 16:57:45 +02:00
Alessandro Pasotti
d62d444ea7 Moved support classes into own private header 2017-06-02 14:51:02 +02:00
Alessandro Pasotti
7082649778 Added docs and SIP bindings for QgsBrowserDockWidget 2017-06-02 14:51:02 +02:00
Nyall Dawson
ae8b71edeb New classes QgsMenuHeader, QgsMenuHeaderWidgetAction
Custom widgets designed for displaying subheaders within a QMenu
in a standard style (i.e. matching the subheaders shown within
the color button drop down menus)
2017-06-02 10:25:17 +10:00
Nyall Dawson
5077e1285e Merge pull request #4652 from nyalldawson/extent
[FEATURE] Add option to take extent from project map layer to QgsExtentGroupBox
2017-06-01 10:02:39 +10:00
Nyall Dawson
9e147413db Move logic for maintaining exact extent when CRS changes from
raster layer save as dialog to QgsExtentGroupBox, add tests
2017-06-01 09:10:07 +10:00
Denis Rouzaud
2148fa9287 handle protected inheritance, rename ui class to avoid class name collision 2017-05-31 14:37:30 +02:00
Denis Rouzaud
625cfc7c8f sip gui layertree and raster 2017-05-31 14:37:30 +02:00
Nyall Dawson
e2de69d32d Ensure extent is updated when QgsExtentGroupBox crs is changed 2017-05-31 21:18:44 +10:00
Nyall Dawson
f216db102c Clean up QgsExtentGroupBox API
Make protected members private, improve documentation
2017-05-31 21:05:43 +10:00
Nyall Dawson
4e4f232ad4 [FEATURE] Add option to take extent from project map layer
to QgsExtentGroupBox

This allows matching another layer's extent in the save vector/
raster layer dialog, among others

Fix #16357
2017-05-31 20:29:30 +10:00
Etienne Trimaille
6eb3570511 sipify 2017-05-31 10:48:11 +02:00
Denis Rouzaud
7e52f06ad2 sipify gui auth classes 2017-05-31 10:44:30 +02:00
Nyall Dawson
d4c87620aa Change some remaining alpha/transparency strings to opacity 2017-05-30 13:47:18 +10:00
Nyall Dawson
94829206d1 Flip 'alpha' to 'opacity' in gui API 2017-05-30 13:33:09 +10:00
Nyall Dawson
e58f25dbb9 Create new QgsOpacityWidget widget
Allows consistent behavior and appearance across all opacity controls
2017-05-30 11:36:24 +10:00
Nyall Dawson
a3262240fe Flip symbology from alpha/transparency to opacity 2017-05-30 11:07:22 +10:00
Denis Rouzaud
827c19f2e7 QgsCharacterSelectorDialog: rename file name according to class name 2017-05-24 15:22:09 +02:00
Denis Rouzaud
3f0017a46d sipify gui part 2 2017-05-24 15:22:09 +02:00
Denis Rouzaud
f5e66dd227 [sipify] handle constrained annotation 2017-05-24 14:49:28 +02:00
Denis Rouzaud
563e7c17fc sipify gui part 3 2017-05-24 14:49:28 +02:00
Denis Rouzaud
cc5e713e83 sipify gui part 4 2017-05-24 13:48:03 +02:00
Denis Rouzaud
801a0ea537 sipify gui part 5 2017-05-24 10:44:30 +02:00
Denis Rouzaud
30a7e44d57 [sip] handle Deprecated annotations
some additional fixes in headers too
2017-05-24 09:49:46 +02:00
Denis Rouzaud
694c8113e5 sipify gui part 1 2017-05-24 09:49:46 +02:00
Nyall Dawson
27077c875e Add a QgsStatusBar widget/interface for adding messages/widgets to
main window statusbar

QStatusBar gives almost no control over display and placement
of child widgets. It's not possible to subclass and reimplement
either, due to how QMainWindow works internally, and also due to
the special handling for the size grip and other platform specific
handling in QStatusBar.

Instead, we embed a single QgsStatusBar covering the whole real
status bar. All child widgets and temporary messages instead
are pushed to the QgsStatusBar instead - giving us as much control
as we desire over how these widgets are placed and their behavior.

As a result the locator widget has been moved to its logical placement
on the left of the status bar.

All plugins must ensure that they use the status bar interface
available via iface.statusBarIface() instead of directly interacting
with the status bar (e.g. iface.mainWindow().statusBar()...)
2017-05-18 10:35:33 +10:00
Nyall Dawson
8267fa3ddd Allow filters to provide configuration dialogs 2017-05-17 21:33:48 +10:00
Nyall Dawson
df9d9f6748 Invalidate current locator results when locator options are changed 2017-05-17 21:33:48 +10:00
Nyall Dawson
e8d3ae9264 Enable disabling filters via options dialog 2017-05-17 21:33:48 +10:00
Nyall Dawson
ce66393636 Add (non-functional) locator configuration dialog 2017-05-17 21:33:48 +10:00
Nyall Dawson
5a0bcf0776 Style fixes 2017-05-17 21:33:48 +10:00
Nyall Dawson
2435dbc712 Nicer results, always show an icon, show description 2017-05-17 21:33:47 +10:00
Nyall Dawson
ea86049c5e Show a list of shortcut prefixes in locator bar if no text is entered 2017-05-17 21:33:47 +10:00
Nyall Dawson
56c8baaccb Provide a standard string comparison method in QgsLocatorFilter
Subclasses should use this method instead of directly calling
QString::contains or using Python 's in search' type matches.
This ensures consistent matching behaviour across different filters.
2017-05-17 21:33:47 +10:00
Nyall Dawson
6649d2b1ed Sort filter results so closer matches appear higher
A closer match means more of the text is matched, ie
a short string inside a long string is penalised
2017-05-17 21:33:47 +10:00
Nyall Dawson
a53516d71d Only show action results when . prefix is used 2017-05-17 21:33:47 +10:00
Nyall Dawson
102a46662b Implement prefix based locator searching
Filters can indicate their preferred search prefix. Searches which
begin with this character will be restricted to the single matching
filter.

E.g. entering 'l buffer' will searching only layers containing 'buffer'

Other prefixes are:
- . search actions
- pl search print layouts
- a search algorithms

Plugins are restricted to a minimum 3 character prefix. We do this
to avoid plugins 'stealing' desirable prefixes, and instead we
want to reserve them for future core filters.
2017-05-17 21:33:47 +10:00
Nyall Dawson
b33ce0bf47 Allow speciyfing the priority for filters
Higher priority (i.e. more important) filter results get shown
first. This means filters like project layers & composers will
show above 'cruder' filters like the actions/processing filters.
2017-05-17 21:33:47 +10:00
Nyall Dawson
0f80df09a7 Show locator filter names in results, sort results and group by filter 2017-05-17 21:33:47 +10:00
Nyall Dawson
ab02f2b79c Allowing associating QgsLocatorWidget with a map canvas
This allows the widget's locator to prioritise results which
are close to the current canvas extent
2017-05-17 21:33:47 +10:00
Nyall Dawson
a7d590e041 Add a context variable for locator searches
This allows encapsulation of properties relating to the context
of a search, such as a target map extent. Locator filters could
use this to prioritise results close to the current canvas extent.
2017-05-17 21:33:47 +10:00
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
Denis Rouzaud
922b162b86 attachment widget: data defined button for document type 2017-05-15 17:57:25 +02: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
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