67 Commits

Author SHA1 Message Date
Denis Rouzaud
6e14854f90 [sipify] remove redundant private sections 2017-10-09 09:51:40 +02:00
Nyall Dawson
49b426d951 Make doxygen_space script convert multiline //! comments
Because:
- the /** format is much more prevalent throughout QGIS
- sipify works correctly with /**
2017-10-06 07:55:52 +10:00
Muhammad Yarjuna Rohmat
e2678936df [FEATURE][geonode] integration - copy style action
Allows copying styles directly from geonode layers for pasting into project layers.
2017-09-23 13:36:57 +10:00
Nyall Dawson
7c53dc1574 Correctly parent browser item actions to transient menu instance
Currently most browser item actions are parented to the item
itself, which is often long-lived (e.g. connection items
which last for the duration of the qgis session). This
commit adds an explicit parent widget parameter to
QgsDataItem::actions to ensure that the newly created actions
are correctly parented to the menu, and deleted after the
menu is removed.
2017-09-22 09:32:54 +10:00
Nyall Dawson
15e650d624 Merge pull request #5221 from nyalldawson/browser_awesome
Add QLR, processing models to browser
2017-09-21 05:20:07 +10:00
Nyall Dawson
a67dab52d2 Spelling 2017-09-20 18:45:59 +10:00
Nyall Dawson
253c4c7a42 Add a Custom item type for QgsDataItem 2017-09-20 14:09:03 +10:00
Nyall Dawson
8bce7a62a7 Allow QgsDataItems to override default double click behavior 2017-09-20 14:09:03 +10:00
Nyall Dawson
6ce3c6100d [FEATURE] Add 'open directory' action to right click menu for
folders in browser dock

Opens the folder in the OS' file explorer
2017-09-20 09:24:02 +10:00
Alessandro Pasotti
31b51178b8 Added static QgsLayerItem::iconName(LayerType) for reuse and consistency 2017-09-07 16:12:01 +02:00
Nyall Dawson
1fddfcf622 Flip Q_ENUMS to Q_ENUM
See https://woboq.com/blog/q_enum.html for rationale
2017-08-29 18:03:41 +10:00
Alessandro Pasotti
bcb48f2bdc Fixes two issues with the browser refresh
1. endless loop when a sqlite-based layer is opened, and
   wal+shm files are created. This triggers a loop because
   the directoryChanged signal is emitted again and again ...
   This was the real blocker.

2. when a new files appears in a directory
   the directoryChanged is emitted and OGR/GDAL may fail
   to open the file because the file copy was not yet
   finished.

This commit fixes 1 but the fix for 2 is only a best effort using
a 100 ms timer: I could not find a definitive solution to this issue,
a file could be legitimately opened in streaming mode and it will
always triggers an error, there is apparently no way to get
the QFileSystemWatcher emit a signal when new files are closed
flusehd and not when they are just created.
2017-08-09 08:59:17 +02:00
Alessandro Pasotti
61504e7073 Expose GeoPackage to the browser tree 2017-08-09 08:59:17 +02:00
Juergen E. Fischer
4f9a9e0360 s/( )/()/; s/== /== /; s/!= /!= /; 2017-07-19 09:19:37 +02:00
Alessandro Pasotti
f6c8ef3ad1 Complete documentation for connectionsChanged signals 2017-07-18 11:42:02 +02:00
Alessandro Pasotti
e57399bae0 [bugfix] Sync the dialogs connections when changed from the browser
For now it's only for WMS but you get the idea.

There is a new abstract base class for the source select
dialogs, that will grow with common behavior for all
the select dialogs.

Signals are forwarded from the (root) data items to the
app and then delivered to the various browser instances
and to the unified layer dialog.

A change in one of the browser items should trigger a
refresh in all the other browsers and dialogs.
2017-07-18 11:38:53 +02:00
Alessandro Pasotti
cf0ffefc1a [bugfix] Prevent expansion of WMS connection layers when restoring the browser
This was causing unwanted connections to WMS when QGIS starts.
2017-06-16 17:39:12 +02:00
Denis Rouzaud
41ceed3d77 [sipify] fix false virtual methods 2017-06-08 07:28:36 +02:00
Denis Rouzaud
9a40754fb8 sipify Qgis, QgsDxfExport 2017-06-07 12:03:22 +02:00
Martin Dobias
51e7efe218 Replace QString::null by QString() in core (deprecated since Qt 5.9) 2017-06-06 11:36:41 +02:00
doublebyte1
bb1bded249 - changes to sipify script
- updated gsdataitem header:
  - added qgis.h include
  - skip sDataItemPtr
  - remove , between SIP annotations
- run sipify for qgsvector and qgsdataitem
2017-05-01 17:43:07 +02:00
doublebyte1
1287a64eb2 - updated const variables on the qgsvector header.
- Removed dataItem_t pointer from qgsdataitem bindings.
- Put back qobject_cast.
2017-04-30 22:33:58 +02:00
doublebyte1
2d7b2ecff4 - Supporting automated sip generation for qgsdataitem and qgsvector classes
- Removed qgsdataitem.sip and qgsvector.sip from auto_sip.blacklist
 - Annotated qgsdataitem.h for sip
 - regenerated automatically qgsdataitem.sip and qgsvector.sip
2017-04-30 22:33:58 +02:00
Matthias Kuhn
6f430a60a7 Move QgsAnimatedIcon to a generic implementation (#4272) 2017-03-19 12:52:35 +01:00
Juergen E. Fischer
a10c890383 More QgsSettings updates:
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Nyall Dawson
b5480633e4 Standardise names for static variables
All non-const variables are prefixed with "s", all const
statics are ALL_CAPS
2017-01-14 16:40:24 +10:00
Nyall Dawson
231f6af0e1 Don't return const references to implicitly shared Qt classes
Instead return the inexpensive copies. Should provide extra safety
against issues like #14822

(refs #14822)
2017-01-14 15:53:45 +10:00
Nyall Dawson
bd950616ac Rename visible "favourite" strings to "favorite", change API to
use "favorite"
2016-10-31 08:00:19 +10:00
Nyall Dawson
44289084e9 Optimise passing of variables by ref/value 2016-10-24 10:36:23 +10:00
Martin Dobias
b4fe9002d8 [FEATURE] API to allow drag'n'drop of custom browser items
QgsDataItem implementations may provide hasDragEnabled(), mimeUri()
and QgsCustomDropHandler implementation to deal with drop of custom items.
2016-08-09 08:49:42 +02:00
Martin Dobias
2482a6bbd0 Small cleanup in data items 2016-08-02 13:04:45 +02:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Martin Dobias
ea2395dd92 Integration of embedded widgets into layer tree + config GUI 2016-06-01 20:03:53 +02:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
ac328a6993 Fix QgsDataItem docs 2016-02-03 16:30:58 +11:00
Nyall Dawson
44bf78fa5c Fix Sip coverage test on Debian nightlies 2016-01-08 16:51:18 +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
Nathan Woodrow
6dfffc5f12 Add missing docs 2015-12-11 15:12:11 +10:00
Nathan Woodrow
bc67c082ad Add missing SIP and docs 2015-12-11 14:11:02 +10:00
Nathan Woodrow
ffd7c9436f [FEATURE] Add project loading support from browser 2015-12-11 14:08:03 +10:00
Nyall Dawson
9cc9d424ce Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.

It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.

Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
2015-12-07 21:55:36 +11:00
Nyall Dawson
719ff408a5 Add some missing SIP bindings, comment some classes as not available
in Python
2015-11-10 17:08:27 +11:00
Juergen E. Fischer
b5794b2f2d sip coverage fixes:
* make sip coverage test aware that there are less classes where QSci sip
  headers are not available
* exclude properties from members
* fix QgsFeatureIds typedef (fixes missing signal
  QgsVectorLayer.featuresDeleted and others)
* add missing notes for PyNames
* include some missing new methods in bindings
2015-11-08 19:30:39 +00:00
Nyall Dawson
fe3417b5ef Partial revert of 70bff3f
Commit was causing crashes in browser. Refs #13738
2015-11-05 21:23:04 +11:00
Nyall Dawson
70bff3f6aa Finish flipping a lot of methods to take const references for
non-trivial types
2015-10-26 22:46:14 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Hugo Mercier
95ff0922e4 Handle QgsDataItem class hierarchy in SIP bindings 2015-07-30 15:04:56 +02:00
Radim Blazek
0c4ea1f6e5 new class QgsAnimatedIcon 2015-05-26 10:59:55 +02:00
Martin Dobias
69d0b30d58 Allow data items from plugins 2015-03-18 14:24:36 +07:00
Martin Dobias
59e710c2cd Fix QgsDataItem python bindings - transfer of ownership 2015-03-05 00:13:05 +07:00