148 Commits

Author SHA1 Message Date
Nyall Dawson
6a54130f0b [layout] Add layout measurement and size classes
These classes are used for storing measurements for a layout
(QgsLayoutMeasurement), sizes for a layout (QgsLayoutSize)
and points in a layout (QgsLayoutPoint)

They support storing a measurement unit alongside a measurement
length/size. A new class QgsLayoutMeasurementConverter handles
conversion between different units, including converting to and
from pixels via a specified DPI property.
2017-06-23 18:00:17 +10:00
Matthias Kuhn
b0bb873360 Fix build 2017-05-19 07:16:03 +02:00
Matthias Kuhn
82455588c8 General include cleanup
This unifies the way the include directories are handled in the
CMakeLists.txt files.
Paths are now normally relative to the root of the source- or build dir.
They may still be relative for paths withing a plugin subdirectory but
should no longer be relative to paths outside of the current source- or
build-directory.

The previous approach had resultet in many different styles which are
hard to wrap ones head around if new to the build system.
It sometimes defined includes twice
By using relative paths, it was not possible to copy paste the paths
between different files.
2017-05-19 07:13:11 +02: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
Juergen E. Fischer
2f70b426e9 sip bindings: exclude QgsCompositionChecker when not building tests 2017-05-16 09:04:08 +02:00
Denis Rouzaud
883e4f3619 minor cleaning of python/CMakeLists.txt 2017-05-10 14:40:31 +02:00
Nyall Dawson
767cb12c2a Add QgsMemoryProviderUtils.createMemoryLayer for easy creation
of new memory layers from QgsFields/QgsCoordinateReferenceSystem/etc

Since memory provider cannot use QgsVectorLayerImport we need
another centeralized function for creating new memory layers
without the need to manually create the uri string.
2017-05-06 12:05:12 +10:00
Nyall Dawson
18478ab6a4 Remove duplicate gui/effects include 2017-05-04 07:29:56 +10:00
Nyall Dawson
998ca4a8ce Preparation for metadata directory 2017-05-04 07:29:56 +10:00
Nyall Dawson
b40bc0c1f7 Refactor scale bar rendering
Move all scalebar rendering code out of composer and ensure that
all scalebar rendering is done independant of QgsComposerScaleBar

This allows scalebar rendering code to be reused by plugins
and by non-composer code.

Also rename QgsScaleBarStyle -> QgsScaleBarRenderer, (and all
subclasses too). This name better reflects what these classes do.
2017-04-26 11:46:51 +10:00
Alessandro Pasotti
090d5305e5 [feature][needs-docs] Master Password integration with OS password manager
This PR adds (optional) synchronization of the master password
with the OS password manager (AKA wallet/keychain).

A set of new menu items has been added in the options ->
authentication -> utilities to manage the new behavior.

Notifications are handled by the message bar unless the
password r/w operation is triggered from a modal dialog,
in this case the notifications will be routed through
the recently exposed QgisApp::showSystemNotification
that uses the OS tray notifications.

This new feature requires libqt5keychain, and was tested
with v. 0.5+
2017-04-11 15:00:29 +02:00
Nyall Dawson
c26ed69c6b Rework map touch tool
Qt5 allows runtime detection of touch devices. This commit reworks
the current touch map tool by pulling its behavior into the normal
pan tool when a touch device is detected.

It avoids the need for a seperate map tool for touch interaction,
and also avoids having this tool always appear on the Windows
builds (regardless of the presence of a touch device)
2017-02-12 15:06:24 +10:00
Nyall Dawson
c853f4fe89 Refactor annotations
Splits the rendering component of annotations out from map
canvas item component.

A new core abstract base class QgsAnnotation handles the
management of the common properties associated with an
annotation, and handles rendering the annotation onto a
QgsRenderContext destination.

Existing annotation classes have been ported to this, and
with the exception of the form annotation moved into core.
Form annotations are dependant on editor widgets and must
remain in GUI.

A new QgsMapCanvasAnnotationItem item class implements
a QgsMapCanvasItem which draws an annotation inside the
canvas, and handles synchronising the position and size
of the canvas item with the QgsAnnotation position/size.

This allows annotations to be safely used in a multi-canvas
environment, with a single QgsAnnotation being displayed
in multiple canvases (even if the canvases have different
extent/crs/etc).

Additionally it allows annotations to be directly rendered
to a map (eg in composer) without going through the
gui based Qt graphics scene framework.

Also removes lots of duplicate code, and adds some basic
unit tests for annotations.
2017-01-30 08:36:19 +10:00
Juergen E. Fischer
6a56cb0dd0 updates and fixes for windows qt5/py3 build 2017-01-24 01:25:59 +01:00
Nyall Dawson
bb24dfe245 [processing] c++ base class for providers
Nothing particularly exciting here yet, but this commit
moves the definition of the provider base class to a c++
QgsProcessingProvider abstract base class.

As part of this some existing python methods were renamed
to make their use clearer and to fit with the QGIS c++
api conventions:

- getName was renamed to id
- getDescription was renamed to name
- getIcon was renamed to icon

These API breaks are documented
2017-01-11 10:55:15 +10:00
Matthias Kuhn
d006784ded Add qgis_analysis.h with ANALYSIS_EXPORT macro 2017-01-05 00:12:11 +01:00
Matthias Kuhn
0302719cf0 Add qgis_core.h to with CORE_EXPORT macro
This removes complexity from the compiler flags because defines
happen in a file.
2017-01-05 00:12:11 +01:00
Matthias Kuhn
22c492e6e5 Rename QgsFieldKit to QgsFieldFormatter 2016-12-20 01:20:08 +01:00
Matthias Kuhn
82d1871f8c Put field kit into use 2016-12-20 01:20:08 +01:00
Alexander Bruy
14c930a5a8 [API][network analysis] move network analysis into analysis library to
be consistent with other analysis stuff
2016-11-21 16:47:24 +02:00
Nyall Dawson
88e4410af1 Require Qt >= 5.5 2016-09-21 09:12:54 +10:00
Nyall Dawson
4da6588494 Temporarily revert "add sip bindings to webkit stubs"
This reverts commit dd69a5965589c8a27f2388e6ecad02b223392704.

The commit was causing build failures on Travis
2016-05-28 07:18:34 +10:00
Juergen E. Fischer
dd69a59655 add sip bindings to webkit stubs 2016-05-27 19:30:35 +02:00
Matthias Kuhn
7dfc69657f Migrate provider test to python 3 2016-05-13 22:23:03 +02:00
Matthias Kuhn
89b7a4aaa2 Introduce NULL QVariant to PyQt5 2016-05-13 22:23:03 +02:00
Matthias Kuhn
cacf79cd96 Improve PORT_PLUGINS cmake code 2016-04-15 09:20:40 +02:00
Juergen E. Fischer
063d80d196 fix windows build 2016-04-13 16:12:46 +02:00
Matthias Kuhn
30df95aba6 Add new target port-plugins to run 2to3 on plugins as build step 2016-04-12 14:48:20 +02:00
Even Rouault
9fcc246cf7 Add missing SQLITE3_INCLUDE_DIR in a few components
Those components depend on sqlite3.h, but fails to add
explictly its paths, relying on it to be present in the other used
included paths, which may be not always the case in some setups.

This is a follow-up of 455a473a287ef278bbd7d91d13313cf43710c1da on
a clean build.
2016-03-21 18:36:51 +01:00
Juergen E. Fischer
fb3fcfa3a0 Python3/Qt5/2to3 updates:
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
2016-03-14 20:38:20 +01:00
Matthias Kuhn
c21889f945 Add qgis.testing module for generic qgis test helpers 2016-02-04 13:36:13 +01:00
Nyall Dawson
87c58f4541 Mark more includes as system includes 2016-01-08 16:43:27 +11:00
Nyall Dawson
881074b194 Boost coverage of SIP bindings
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.

Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
2016-01-05 11:16:15 +11:00
Juergen E. Fischer
1675703ddb qt5 fixes 2015-11-17 01:00:08 +01:00
Matthias Kuhn
313c34ce22 [py3] Updates to sip files 2015-11-16 07:42:48 +01:00
Matthias Kuhn
47543d940e [py3] Add PyQt5/PyQt4 compatibility layer 2015-11-16 07:42:48 +01:00
Matthias Kuhn
0b6dd352c9 [py3] CMake updates to support Python3 and PyQt5 2015-11-16 07:42:47 +01:00
Larry Shaffer
e65aa99ae7 [FEATURE] Authentication configuration system with master password
- Main C++ core and gui classes and desktop app integration
- Support for authentication method plugins
- Does not contain any integration with service connections
2015-09-21 08:51:18 -06:00
elpaso
00fa63618b [SERVER] Server refactoring and Python bindings/tests
This is a refactoring of the server component, the
server is now wrapped into a new QgsServer class with
python bindings and an examples python test.
2015-06-29 12:49:43 +02:00
Marco Hugentobler
68fe5f5791 [FEATURE:] New geometry classes 2015-05-25 08:53:49 +02:00
Nyall Dawson
742f3233ee [FEATURE] Paint effects for layers and symbol layers
This commit adds a new framework for implementing paint effects, which
modify the results of QPainter operations to apply visual effects
such as drop shadows and blurs.

The initial implementation allows for effects to be applied to entire
layers and individual symbol layers.

Included are a drop shadow, inner shadow, blur, inner glow, outer glow,
colorise and transform effect. A "stack" effect is also implemented
which allows other paint effects to be combined in various ways.

Sponsored by hundreds of generous kickstarter contributors!
2015-03-28 20:04:50 +11:00
Nyall Dawson
be2d6d1a70 New QgsImageOperation class for operations that modify QImages
Contains framework for multithreaded operations on QImages, and
numerous operations such as grayscale, hue/saturation, brightness/
contrast modification, flip, blur, distance transform, alpha
modification and color overlays.
2015-01-21 18:58:10 +11:00
Juergen E. Fischer
93e22264c3 header install update 2015-01-16 15:49:24 +01:00
Nathan Woodrow
59162bc178 [FEATURE] Function editor for expression widget.
Allows for adding on the fly functions to the expression engine.
Functions are saved in qgis2\python\expressions.

New qgis.user module in Python.

The qgis.user.expressions package points to the qgis2\python\expressions
package in the users home
2015-01-16 19:43:47 +10:00
Juergen E. Fischer
841af773e3 remove (outdated) internal spatialite 2015-01-04 16:18:01 +01:00
Larry Shaffer
a4aaff5d53 Fix CMake policy warnings/changes introduced in 3.0.0 and higher 2014-12-22 17:06:13 -07:00
Juergen E. Fischer
6a1e1bb668 * fix server plugin build on windows
* move src/mapserver to src/server (IMHO better name and in sync with
  python/server)
* rename cmake option WITH_MAPSERVER to WITH_SERVER
* rename define MAPSERVER_HAVE_PYTHON_PLUGINS to HAVE_SERVER_PYTHON_PLUGINS
2014-11-28 16:46:29 +01:00
Juergen E. Fischer
8b65ebdeca don't build server plugins if server isn't built 2014-11-28 12:22:44 +01:00
elpaso
98cab97409 Added python server plugins 2014-11-26 16:02:32 +01:00
Juergen E. Fischer
51e01d6d1c add QScintilla2 include directory to python bindings and oracle provider
(fixes #11528)
2014-11-02 20:51:40 +01:00