5114 Commits

Author SHA1 Message Date
Denis Rouzaud
f27a5043bb remove useless includes 2018-10-09 11:48:33 -08:00
Denis Rouzaud
ef1efebda4 forward declaration of QgsPoint 2018-10-09 11:48:33 -08:00
Denis Rouzaud
d000157341 forward declarations for QgsMapLayer 2018-10-08 13:01:16 -08:00
Nathan Woodrow
f928c2e545
[FIX] - Respect selection order in attribute table copy. (#8048)
Only copy fields shown in view for current table.
2018-10-08 12:07:28 +10:00
Blottiere Paul
9ccb1b579b Update doc 2018-10-08 07:24:53 +10:00
Blottiere Paul
6e95586a1c Update python binding 2018-10-08 07:24:53 +10:00
Even Rouault
7e81226b51 Replace toUtf8().data() by toUtf8().constData()
All your uses of toUtf8().data() actually just need a const char*
So use constData() that is semantically more correct, and documented
to be faster.

From http://doc.qt.io/qt-5/qbytearray.html#data
"For read-only access, constData() is faster because it never
causes a deep copy to occur."
2018-10-07 07:23:42 +10:00
Denis Rouzaud
9fa8c356dd
make QgsWkbTypes a Q_GADGET and declare GeometryType as Q_ENUM (#8024)
* make QgsWkbTypes a Q_GADGET and declare GeometryType as Q_ENUM

* include QObject

* remove extra include

* move QgsWkbTypes to moc headers

* run sip_include
2018-10-05 10:25:35 -08:00
Matthias Kuhn
e25d6347c6
Merge pull request #8034 from m-kuhn/canCommitChanges
Add QgsVectorLayer::allowCommit property
2018-10-05 13:11:28 +02:00
Matthias Kuhn
3522518bec
Do not add allowCommit to Python bindings 2018-10-05 08:43:13 +02:00
Nyall Dawson
234985b59d [needs-docs][labeling] Fix substitutions don't play well with wrapped labels
Fixes an issue identified in the upcoming QGIS Map Design 2nd ed
(spoiler alert!) where it's impossible to utilise label text
substitutions if you also want to use word wrapping.

This isn't possible to directly fix, because we need to evaluate
the full label expression (including the word wrapping component)
in order to actually HAVE text to substitute into.

So, a new setting has been added to the label formatting tab
allowing users to directly set an auto-wrapping line ideal
line size. This is applied AFTER label text evaluation, substitutions,
and the 'wrap text on' character, so it can play correctly well with
all these other settings. This also has the nice side-effect
of making auto label text wrapping more accessible to new
users/those unfamiliar with the wordwrap expression function.

Fixes #20007, and cleans up a chapter of QMD 2ed ;)
2018-10-05 06:58:56 +10:00
Nyall Dawson
dce8673d21 Move guts of wordwrap expression function to QgsStringUtils::wordWrap
To allow use outside of expressions
2018-10-05 06:58:56 +10:00
Denis Rouzaud
819aaee382 move XML flag reading to Xml utils 2018-10-04 08:56:51 -04:00
nirvn
3235fb5422 [ui] resurrect home folder 2018-10-03 14:03:40 +07:00
Matthias Kuhn
b3f36dc22f
Merge pull request #8056 from qgis/3nids-patch-3
use float precision for screen coordinates
2018-10-02 14:04:50 +02:00
Matthias Kuhn
66f2272be0 Improve API docs concerning sort behavior 2018-10-02 15:37:07 +10:00
Nyall Dawson
76190d594a Remove useless member variable 2018-10-02 10:49:41 +10:00
Alessandro Pasotti
a68a82cb60 qgsVariantEqual second iteration 2018-10-01 14:59:19 +02:00
Alessandro Pasotti
90e2c45502 Add qgsVariantEqual for null-aware comparison 2018-10-01 14:02:09 +02:00
Nyall Dawson
b5476ef5d4 Fix clang warnings, scale truncation to int 2018-10-01 16:07:40 +10:00
Nyall Dawson
3ecb1548fb Add missing fox for QgsFontMarkerSymbolLayer, improve existing dox 2018-10-01 10:55:09 +10:00
Nyall Dawson
d50ccff69e [browser] Fix tiny folder icons on hidpi screens
QStyle::standardPixmap is deprecated and not hi-dpi friendly.
Unfortunately, there's no equivalent of QIcon::addPixmap
for QIcons themselves -- so it's **impossible** in current Qt
API to handle the ON/OFF icon states.

Believe me... there's NOOOOOOO way. I've looked. I've tried.
It's not possible.

This means we have to change the logic for showing open/closed
folders in browser. This commit revises the logic to show the
open icon for any *populated* folders, regardless of whether
they are opened or not.
2018-10-01 09:15:47 +10:00
Denis Rouzaud
157ba0f4be QgsMapToPixel API cleanup
* overload toMapCoordinates to also take double (use different PyName)
* deprecate toMapPoint which is strictly equivalent to toMapCoordinates
2018-09-29 11:05:54 -04:00
Nyall Dawson
6110931f8a Rename QgsSpatialIndex::insertFeature to ::addFeature, for consistency
with other classes

And make QgsSpatialIndex a QgsFeatureSink
2018-09-29 07:37:53 +10:00
Nyall Dawson
f1ced30ee2 Fix dox 2018-09-28 13:17:12 +10:00
Nyall Dawson
39d148612b Optimise conversion of geometry from OGR -> QGIS
Avoid conversion to/from WKB at OGR/QGIS side, and just directly
utilise OGR geometry API to construct QGIS geometries.

Shaves ~10% off rendering time for a large point layer (GPKG)
2018-09-28 13:17:12 +10:00
Martin Dobias
a1d130ac97 Fix spelling 2018-09-27 00:46:37 +02:00
Martin Dobias
8831f19b79 Fix missing indicators after they are moved to a different group
The issue was that during drag&drop, we first connect to layer's signal
for the second time, but then the disconnect() call on removal of the original
layer node would disconnect all connections (not just one). For that reason
now we only connect/disconnect when the layer is in the tree only once.
2018-09-27 00:46:37 +02:00
Matthias Kuhn
c3066c2c46
Cleanup 2018-09-26 19:47:26 +02:00
Matthias Kuhn
0e3280768c
Change canCommitChanges to allowCommit flag 2018-09-26 18:31:03 +02:00
Matthias Kuhn
cda4950dd8
Change canCommitChanges to allowCommit flag 2018-09-26 17:35:53 +02:00
Matthias Kuhn
d2bb3d606b
Fix python signature? 2018-09-26 17:15:53 +02:00
Matthias Kuhn
a56deacf54
Add QgsVectorLayer::canCommitChanges
to control if changes can be saved or not. This signal is emitted before a layer is being saved and if a connected slot marks the canCommit variable as False, the layer will not be saved
2018-09-26 16:17:24 +02:00
Martin Dobias
5047571c13 Move recursive "collect layers" algorithm to QgsLayerTreeUtils + tests 2018-09-26 09:55:37 +02:00
Nyall Dawson
0f62685963 Fix is_layer_visible to allow direct layer objects and handle removed layers 2018-09-26 04:27:27 +10:00
Nyall Dawson
d26f25cf94 Deprecate unused QgsProcessingAlgorithm::helpString method 2018-09-26 04:26:49 +10:00
Nyall Dawson
95d68e9172 [processing] Default to hiding help button for algorithms
And require that showing help is opt-in. Apart from a handful
of built-in providers, most providers will not have help pages
available within the QGIS documentation (including model and
script algorithms). Accordingly, we should hide the help button
by default and only show it for these selected providers.

Note that 3rd party algorithms can still specify custom helpUrl
urls, in which case the button WILL be shown.
2018-09-26 04:26:49 +10:00
Nyall Dawson
e2082a0935 [processing] Fix modeler help/description generation, allow setting
of model short description text

Fixes #18767
2018-09-26 04:26:49 +10:00
Alessandro Pasotti
b34c461dc1 Drop const on makeFeatureComptible returned values 2018-09-25 08:24:49 +02:00
Alessandro Pasotti
a8dbb5395c Some minor changes
- QgsVectorLayer *
- make a const copy of a const container
- typo and comments
2018-09-25 08:17:14 +02:00
Alessandro Pasotti
8d82ce86cc makeFeatureCompatible on a single input feature 2018-09-25 08:17:14 +02:00
Alessandro Pasotti
7e8592bca2 Const correctness (because it's not an API break) 2018-09-25 08:17:14 +02:00
Alessandro Pasotti
3157af2eaa Revert const on createFeature
just because it would be an API break
2018-09-25 08:17:14 +02:00
Alessandro Pasotti
930c3f8e45 Port makeFeaturesCompatible to C++
as: QgsVectorLayerUtils::makeFeaturesCompatible

With tests.
2018-09-25 08:17:14 +02:00
Nyall Dawson
af4a1df90d [browser] Correctly show drives inserted (or removed!) after QGIS launch
Fixes #14481, #9843
2018-09-25 13:22:01 +10:00
Nyall Dawson
eacf4adb30 Dox++ 2018-09-25 08:49:21 +10:00
Nyall Dawson
a8794001e0 Add method to match feature attributes to the given fields
Refs #18784
2018-09-25 08:49:21 +10:00
Nyall Dawson
81487f9f18 Proxy filterNeedsGeometry for inverted/displacement renderers 2018-09-25 05:21:35 +10:00
Nyall Dawson
b5867bff58 Fix legend count is 0 if graduated/categorized expression uses geometry
Likely fixes many other bugs too with graduated/categorized renderers

Fixes #15544
2018-09-25 05:21:35 +10:00
Peter Petrik
11645ac744 implement simple cache for rendering of mesh layer 2018-09-24 11:04:50 +02:00