44 Commits

Author SHA1 Message Date
Denis Rouzaud
f20e28d98f allow to hide/show all columns in attribute table config 2016-06-01 11:56:54 +02:00
Nyall Dawson
ca5c7e2cd4 [FEATURE] Form based select/filter in attribute table
This commit adds a new mode to the attribute table dialog for searching
and filtering features. When activated (using a button on the toolbar
or by pressng CTRL+F), the dialog will switch to form view and all
widgets are replaced with their search widget wrapper variant.

Alongside each widget is a tool button with options for controlling
the search/filter behaviour for that field, eg "equal to", "not equal
to", "is null", "greater than", etc.., with the options presented
matching themselves to the corresponding field and widget type.

New buttons appear at the bottom of the form for either selecting
matching features (with options for add to selection/remove from
selection/select within current selection) or filtering features
in the table (with options for adding features to a current filter
or further restricting a current filter).

Sponsored by SIGE
2016-05-24 00:26:14 +10:00
Matthias Kuhn
d07d9edda6 Allow sorting attribute table by expression 2016-05-16 11:16:13 +02:00
Matthias Kuhn
d088fe072d Fix action widget on attribute table 2016-05-11 09:22:49 +02:00
Matthias Kuhn
f03a94f650 Fix crash 2016-05-02 18:25:58 +02:00
Matthias Kuhn
c369aabac4 Doxygen and sip bindings 2016-05-02 18:25:57 +02:00
Matthias Kuhn
dd88fa99f3 [feature] New configuration options for attribute table
* Allow reordering the attribute table columns
 * Allow adding a new column to trigger an action to the attribute table
2016-05-02 18:25:57 +02:00
Matthias Kuhn
ff4ad50809 Rename QgsFilterTableFields to QgsOrganizeTableColumns 2016-05-02 18:25:57 +02:00
Stéphane Brunner
d4ccc77f27 Add a possibility to hide a column in the attribute table 2016-05-02 18:25:56 +02:00
Nyall Dawson
66b51d4a81 [FEATURE] Edit attributes of multiple features simultaneously
This change allows the attributes of multiple features to be edited
simultaneously. It is enabled when the attribute table dialog is in
"form mode", via a new "multi edit" button on the toolbar.

In this mode, attribute value changes will apply to all selected
features. New widgets appear next to each editor widget allowing for
display of the current multi-edit state and for rolling back changes
on a field-by-field basis.

Changes are made as a single edit command, so pressing undo will
rollback the attribute changes for all selected features at once.

Multiedit mode is only available for auto generated and drag and
drop forms - it is not supported by custom ui forms.

Sponsored by Kanton Basel Stadt
2016-04-18 15:15:11 +10:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
mhugent
3febba279d Merge pull request #2619 from mhugent/zoom_to_feature
[FEATURE]: Zoom to feature with right-click in attribute table
2016-01-12 16:20:17 +01:00
Marco Hugentobler
36c628336c Add doc 2016-01-05 09:00:58 +01: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
Marco Hugentobler
1519b3e041 Move zoomToFeature to QgsDualView and add checks for null geometries / geometryless layers 2016-01-04 16:29:49 +01:00
Marco Hugentobler
f815ebc86b [FEATURE]: Zoom to feature with right-click in attribute table 2015-12-28 12:35:19 +01:00
Matthias Kuhn
e76949b2a0 More sip bindings 2015-12-01 11:45:44 +01: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
elpaso
35d09825bf Added new method to bindings 2015-11-04 10:37:43 +01:00
Nyall Dawson
f1633a1796 Change all signals to use const refs for non trivial objects 2015-10-26 22:46:25 +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
Matthias Kuhn
1e6f673a23 Update email address 2015-08-30 13:00:15 +02:00
Nyall Dawson
ac6c32421e Coverity uninitialized member fixes 2015-08-28 13:06:34 +10:00
Nyall Dawson
9d984b163e Immediately apply conditional formatting changes to table 2015-08-21 10:04:22 +10:00
Nyall Dawson
6a3357fab8 Fix warnings, add missing sip bindings 2015-08-21 05:45:49 +10:00
Nyall Dawson
39f4ed526d Fix build 2015-05-30 08:57:55 +10:00
Nyall Dawson
42da218626 Fix memory leaks 2015-05-30 08:53:19 +10:00
Matthias Kuhn
8eca38ca5f Attribute table performance when deleting features
This fixes performance issues with the attribute table visible when deleting a
large number of features.

The attribute table tries to behave smart in the following way:

 * It tries to remove only the deleted rows as long as they are in one or a few
   single blocks
 * If there are more than 100 rows to delete and it starts to delete blocks
   of a size smaller than 10 it assumes that the selection to delete is widely
   distributed and that a reload of the whole model is less expensive than a
   differential update.

Fix #10167
2015-05-27 22:28:23 +02:00
Nyall Dawson
3c71498c3e Add some missing /TransferThis/ to sip bindings for QObject parents 2015-02-18 17:35:47 +11:00
Nyall Dawson
c1fe68c821 Fix big parameter passed by value warnings 2015-02-16 16:11:57 +11:00
Nyall Dawson
b05e789c57 Fix build 2015-02-03 20:47:29 +11:00
Juergen E. Fischer
abd4a04399 sip update 2015-02-03 02:21:52 +01:00
Juergen E. Fischer
c4c131ef75 sip sync 2014-05-27 23:32:42 +02:00
Matthias Kuhn
ea91b6fe4a [FEATURE] Port editor widgets to new API
Create a new widget for for attribute form

fix #10281
fix #7319
fix #7013
fix #9335
fix #4417
2014-05-22 22:50:36 +02:00
Juergen E. Fischer
74e7314c36 update sip bindings II 2014-01-27 09:22:53 +01:00
Juergen E. Fischer
d4e369414b update sip bindings 2014-01-26 18:36:29 +01:00
Nyall Dawson
85a17c246a Add QgsMapLayerAction and QgsMapLayerActionRegistry, which can be
used as a generic api for registering actions which can apply to
a specific map layer or layer type.

Create a QgsMapLayerAction for setting features as the current
atlas feature for compositions.

This work was kindly sponsored by SIGE (www.sige.ch).
2014-01-20 21:35:56 +11:00
Matthias Kuhn
331f71acba [attrtable] Selection model and request filter
* With a selection model, the way the attribute table handles selections
  can be customized. E.g. synchronized to layer selection or used to pick
  features.
* With request filters, the visible features on an attribute table can be
  limited. This will effectively reduce the subset of features the attribute
  table works on. Additional filters by means of a proxy model can of course
  further reduce the visible subset subsequently.
2013-10-07 16:17:42 +02:00
Juergen E. Fischer
f4744f6657 fix sip build errors 2013-06-24 08:54:27 +02:00
Juergen E. Fischer
3854086d47 sip update 2013-06-23 16:00:24 +02:00
Juergen E. Fischer
99f998aa30 - add missing sip bindings
- port widgets_tree.py to QtXml and update customization.xml (fixes #5752 and  #8054)
2013-06-22 19:41:34 +02:00
Matthias Kuhn
33fa1d5443 Major redesign of attribute table, codename: dual view 2013-03-27 10:54:36 +01:00
Juergen E. Fischer
f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00