1989 Commits

Author SHA1 Message Date
Nyall Dawson
78b834c5b0 Fix missing Q_OBJECT macros
Thanks to Clazy
2017-08-29 18:03:41 +10:00
Nyall Dawson
21a3b8a4f3 Use QGSCOMPARENEAR instead of QVERIFY( qgsDoubleNear(... ) )
QGSCOMPARENEAR gives better debugging output when the
test fails
2017-08-29 12:39:59 +10:00
Nyall Dawson
2af10cb2ca Fix C4566 warning on Windows build 2017-08-29 12:11:07 +10:00
Nyall Dawson
029f741cfa Add qgsAsConst(...)
This is the equivalent of std::as_const (which requires c++17) or
qAsConst (which requires Qt 5.7), neither of which we have
as minimum dependancies.

By wrapping implicitly shared Qt containers in qgsAsConst we can
safely use c++ for ranged loops instead of Q_FOREACH. (Since
Q_FOREACH's future is shaky)

See https://www.kdab.com/goodbye-q_foreach/ for further details
on why for causes a detach for Qt containers and why Q_FOREACH
is being removed from Qt.
2017-08-29 03:18:37 +10:00
Sandro Santilli
650cf6a3fd Remove line segmentation test checking for control point containement
There are more tests in dedicated file (testqgscurve.cpp)
2017-08-25 23:06:52 +02:00
Sandro Santilli
c51db212ee Do not expect forced control point in output 2017-08-25 23:06:52 +02:00
Sandro Santilli
cf5a439feb Update expected results now that we're forcing control point in output 2017-08-25 23:06:52 +02:00
Sandro Santilli
320c305d92 Fix build and multi-arc duplicated points 2017-08-25 23:06:52 +02:00
Sandro Santilli
48c953991e Refactor curveToLine to emit equidistant segments and fix some issues
Fixes #16717
Fixes #16722

Include tests
2017-08-25 23:06:52 +02:00
Nyall Dawson
d3854e9e5a Remove use of some other q* functions which are implemented in std 2017-08-25 03:33:50 +10:00
Nyall Dawson
b5ca4b4ea8 (q)sqrt -> std::sqrt 2017-08-25 03:22:15 +10:00
Nyall Dawson
fec03ca423 (q)sin -> std::sin 2017-08-25 03:18:05 +10:00
Nyall Dawson
2e5d1abbb1 (q)cos -> std::cos 2017-08-25 03:05:22 +10:00
Nyall Dawson
7c5aa050d1 (q)ceil -> std::ceil 2017-08-25 03:01:48 +10:00
Nyall Dawson
031bf41d1b Swap q(pow) -> std::pow 2017-08-25 02:53:39 +10:00
Nyall Dawson
77c3be97e3 Make sure (f)abs are prefixed with std:: 2017-08-25 02:35:28 +10:00
Nyall Dawson
f2b2c6d2fd Use fabs/abs/labs instead of qAbs
Better to stick to standard methods where available instead
of less supported Qt methods
2017-08-25 02:35:27 +10:00
Nyall Dawson
4b009f96ec Use std::round instead of qRound
Now that our minimum VS studio version allowed supports std::round,
we should use that in place of Qt's qRound method.

Because:
- it doesn't truncate to int, resulting in unpredictable
behaviour (refs #16925)
- better to stick to standard c++ methods wherever possible,
since they're likely better supported and optimised by the
compilers
- it's a tiny reduction to the barrier for entry to QGIS
development (I'm sick of pointing out the need to use
qRound during PR reviews!)
2017-08-25 02:35:27 +10:00
Nyall Dawson
cb70aad7a3 Fix restricting model algorithm input types to valid types for alg (refs #17030) 2017-08-23 17:34:08 +10:00
Matthias Kuhn
b8d2a17476 Port symbols test from ebf20a5 2017-08-21 23:27:34 +02:00
Nyall Dawson
d2a90f40e3 Fix conversion of direct vector layer parameters to python strings 2017-08-20 18:21:02 +10:00
Nyall Dawson
ebda2fd212 Rename some enum values for clarity 2017-08-19 02:46:22 +10:00
Nyall Dawson
f1ac0be867 Fix processing setting to use filename as layer name 2017-08-19 00:56:18 +10:00
Nyall Dawson
7879c0a20b Fix processing rendering styles for output dialog, functionality 2017-08-19 00:47:21 +10:00
Nyall Dawson
e4dab7c5c7 Fix intermittently failing QgsGeometry asGML tests 2017-08-17 17:53:36 +10:00
Nyall Dawson
43536a66e3 Return subclasses where possible to fix build on older compilers 2017-08-17 16:43:13 +10:00
Nyall Dawson
d81a1a3b5f Return std::unique_ptrs where possible
When a class isn't exposed to Python, we should return a
std::unique_ptr whenever a returned pointer value is owned
by the caller.
2017-08-17 16:28:18 +10:00
Nyall Dawson
c54667c3b1 Handle mixed lists of values and lists when evaluating multilayer
parameters

This can happen when running models with mixed input types
for multilayer parameters
2017-08-17 05:00:47 +10:00
Nyall Dawson
e1b0f78619 Fix default layer sometimes inserted into multi layer parameter values 2017-08-17 04:38:36 +10:00
Etienne Trimaille
855f840fac always set a default name in the QGS project to avoid discrepancies with GetCapabilities 2017-08-16 18:39:23 +02:00
Nyall Dawson
479106ad80 An empty string parameter should not fallback to default value
Since we need to allow empty strings to override defaults in
some circumstances
2017-08-14 04:56:24 +10:00
Nyall Dawson
5177972806 Improve conversion of processing parameters to Python code
- Use layer paths instead of layer ids where possible, since they are persistent
- Don't wrap in QgsProcessingFeatureSourceDefinition/QgsProcessingOutputLayerDefinition
if we can avoid it
2017-08-13 16:56:58 +10:00
arnaud.morvan@camptocamp.com
e34a593c65 [FEATURE] Add expression function array_agg 2017-08-12 10:18:21 +02:00
Nyall Dawson
b42c055e97 Restore drawing of page grids 2017-08-07 19:34:28 +10:00
Nyall Dawson
ec5698393b Support data defined paper sizes 2017-08-07 19:34:28 +10:00
Nyall Dawson
4ab4a1fcad Spell check 'mitre' -> 'miter' (i.e. use en-us variation) 2017-08-07 18:08:57 +10:00
Nyall Dawson
88e00d67d5 Revert "[FEATURE] QGIS - GeoNode Integration: Integrate with QGIS Browser Panel (#4816)"
This reverts commit 5f66f36ff6dd911ba3fca8ec9580e50812f404a0.

Some outstanding issues need to be addressed before this can be merged
2017-08-07 05:53:14 +10:00
Muhammad Yarjuna Rohmat
5f66f36ff6 [FEATURE] QGIS - GeoNode Integration: Integrate with QGIS Browser Panel (#4816)
* add Geonode connection menu to the toolbar

* add header files for geonode-qgis client

* add action to launch geonode connection dialog from menubar

* Move to proper directory

* Add geonodeconnection class.

* Add unit test for geonode connection.

* Use const static to avoid typo.

* Get list layers from geonode.

* Add get maps method.

* Geonode connection dialog (#13)

* add new geonode connection dialog

* apply functionality to the geonode connection manager dialog

* add save and load geonode connection functionality

* edit baseKey and credentialBaseKey

* remove auto-connect slots

* Add unit test for geonode connection.

* Add wms url getter.

* Add uuid and layer name in the table.

* Add handler for the list layer clicked. WIP.

* Use new style connect, better hacky to get wms url.

* update gitignore

* Make QGIS able to add WMS layer from geonode. With hacky code.

* Fix Docstring.

* Show web service type (WMS/WFS) in layer table.

* fix http and toolbar menu

* add geonode data item to the browser panel as an extention of ows provider

* [WIP] Add WFS.

* Add geonode get service url.

* combobox functionality and test geonode connection

* Add WFS.

* Disable add button if it's a map. Currently we can't do anything for map.

* Add busy cursor when add layer.

* get service uri capabilitites

* add available layers to the geonode browser panel

* remove debugging footprint and replace old style connect

* add actions (new, edit, delete) to geonode browser panel

* fix getLayers by WMS url

* add Geonode connection menu to the toolbar

* Filter out invalid layer / map.

* Fix service url method.

* Add service url for XYZ for GeoNode QGIS Server backend.

* Add XYZ url to geonode connection  dialog.

* Add XYZ layer to QGIS.

* fix double geonode submenu

* add wfs/wms layers from browser panel using its native provider

* comply with qgis3 new class naming

* Handle different prefix for layer in GeoNode QGIS Server backend.

* base class for cms connection

* make geonode connection as a derived class from cms connection

* update cmakelists

* move geonode connection to geocms dir

* update CMakeLists

* Handle geonode 2.7 with new API.

* Handle multiple geoserver url in one geonode.

* Fix add xyz for qgis server. Fix add wms, wfs, xyz for geoserver in geonode 2.7

* Refactor serviceURL to return QStringList.

* add 'add geonode layer' icon

* add geonode to the data source manager dialog

* [GeoNode-Client] Fix add WFS layer.

* fix wms url parameter

* add xyz dataitems

* Use new style connect.

* [GeoNode Client] Handle qgis server specific typename to make add WFS works.

* Code improvement.

* [GeoNode Client] Make geonode dialog in add universal layer can add layer.

* Open universal add layer when click Add GeoNode layer.

* Make sure the geonode url has protocol.

* Handle geonode version in a better way.

* make sure the serviceUrl method has scheme in its urls

* add services option to the dialog

* remove version label if not wfs

* construct wms url with parameters for geonode connection

* handle layer from multi service urls for every wfs, wms, & xyz services

* fix new style connect using static_cast

* hode close button if dialog is in embedded mode

* fix xyz layer naming in the browser tree

* create base class for geocms dataitems

* fix compiling warning

* Use struct instead QVariantMap.

* tidy up code

* Tidy up code, use QgsStringMap instead QVariantMap.

* Add spellok for catalogue.

* update sip

* update sip

* Use naming convention for QgsGeoCmsConnection and use QUuid.

* Async by using GeoNodeRequest class.

* Move geonode to src/gui.

* Use stack not heap.

* Remove unused includes.

* Use signal to handle request.

* Use QStringLiteral.

* Switch to use Q_FOREACH.

* Use Q_FOREACH and addressing PR's review.

* Set private for data members.

* update sip

* Update sip.

* Update sip.

* Fix sip problem to make it buildable again.

* Remove geocms

* Tidy up code.

* Use QgsSetting Scope::Provider.

* Fix missing zip.h
2017-08-06 21:24:12 +02:00
andreasneumann
42d7e0b898 renamed parameter names of array_slice, ran prepare-commit.sh 2017-08-06 19:11:32 +02:00
andreasneumann
89784691b1 [FEATURE] array_slice expression function 2017-08-06 19:11:32 +02:00
Denis Rouzaud
06f9842637 rename symbology-ng to symbology 2017-08-06 14:18:57 +02:00
Andreas Neumann
303f9b7cdd [FEATURE] expression function array_reverse 2017-08-05 22:45:11 +02:00
Mario Baranzini
2e2edd64c2 Fix qt qhash seed for QT >= 5.6.0 2017-08-05 17:01:24 +02:00
Alexander Bruy
9fe326dee2 [processing] more consistent naming for class members, setters and
getters
2017-08-04 13:21:26 +03:00
Alexander Bruy
aad566eb31 [processing] tests for new band parameter 2017-08-04 12:12:22 +03:00
Nyall Dawson
f7b25a17b1 Allow setting layer type filter for QgsProcessingParameterVectorLayer
Turns out this is required for some algorithms
2017-07-27 14:30:04 +10:00
Nyall Dawson
e8514be010 Make matching to known page sizes less fussy
Since all gui widgets for page sizes limit to 2 decimal places,
we need to allow this much tolerance when checking the setting
against known page sizes.
2017-07-25 13:57:57 +10:00
Nyall Dawson
213064a8af Fix layout context flags not being respected when rendering items 2017-07-25 12:54:58 +10:00
Nyall Dawson
e444f00cc5 Fix calculation of layout bounds considers page shadow 2017-07-25 12:54:58 +10:00
Nyall Dawson
fabfd77c2b Show known page size when opening page properties if current page size matches 2017-07-25 12:54:58 +10:00