263 Commits

Author SHA1 Message Date
wonder
9ff2f5793b Added missing python bindings for table joins
git-svn-id: http://svn.osgeo.org/qgis/trunk@15327 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-03-03 22:45:21 +00:00
mhugent
2c0e214df0 Add uniqueValues() method for vector layer. Fixes #3528
git-svn-id: http://svn.osgeo.org/qgis/trunk@15310 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-03-02 14:45:49 +00:00
jef
ce8e3d5f05 add 'deprecated' annotation to SIP bindings
git-svn-id: http://svn.osgeo.org/qgis/trunk@15209 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-02-19 13:24:24 +00:00
mhugent
d373bb68af Safer handling of layers with unknown geometry
git-svn-id: http://svn.osgeo.org/qgis/trunk@15180 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-02-17 09:15:25 +00:00
jef
132088f6d2 fix API QgsMapLayer::getLayerID() to id()), some warnings and use doxygen deprecation tag.
git-svn-id: http://svn.osgeo.org/qgis/trunk@15168 c8812cc2-4d05-0410-92ff-de0c093fc19c
2011-02-13 20:24:55 +00:00
wonder
1d66171ff3 PyQGIS fixes: added few typedefs (IIRC they were not supported by some old SIP versions) and added missing signals in QgsVectorLayer
git-svn-id: http://svn.osgeo.org/qgis/trunk@14978 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-12-27 21:27:01 +00:00
brushtyler
519f120602 applied patch to make a vector layer read-only, to fix #3157
git-svn-id: http://svn.osgeo.org/qgis/trunk@14451 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-10-29 22:12:42 +00:00
mhugent
2222397334 [FEATURE]: added reload method to map layers and provider interface. Like this, caching providers (currently WMS and WFS) can synchronize with changes in the datasource
git-svn-id: http://svn.osgeo.org/qgis/trunk@14264 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-09-20 11:27:12 +00:00
wonder
c9d34fd8c7 PyQGIS: added missing annotation
git-svn-id: http://svn.osgeo.org/qgis/trunk@13417 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-05-03 21:02:05 +00:00
mhugent
f930a163df Remember last annotation form for a layer and store it in project
git-svn-id: http://svn.osgeo.org/qgis/trunk@13291 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-04-09 07:42:30 +00:00
wonder
2034de2bc9 PyQGIS: few additions for more pythonic api
- QgsVectorLayer and QgsVectorDataProvider support iterating
- QgsFeature allows direct access to attributes (get/set/del)


git-svn-id: http://svn.osgeo.org/qgis/trunk@12878 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-02-04 21:08:33 +00:00
wonder
b3f2966396 Show editing vertex markers with symbology-ng. Fixes #2171.
git-svn-id: http://svn.osgeo.org/qgis/trunk@12537 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-12-20 15:39:05 +00:00
jef
cbf1a50bd6 fix common typos
git-svn-id: http://svn.osgeo.org/qgis/trunk@12528 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-12-20 12:29:07 +00:00
jef
40c10fa255 missed the python part
git-svn-id: http://svn.osgeo.org/qgis/trunk@12347 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-12-07 00:36:57 +00:00
jef
865fce9cf3 add support for a python feature form initialization function
git-svn-id: http://svn.osgeo.org/qgis/trunk@12215 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-21 19:55:25 +00:00
jef
a4758ff01f add support for multiline edit widget
git-svn-id: http://svn.osgeo.org/qgis/trunk@12165 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-17 18:47:47 +00:00
wonder
55c3c7bcc7 Updated version of QGIS when the new function were added to 1.4
git-svn-id: http://svn.osgeo.org/qgis/trunk@12140 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-16 11:53:50 +00:00
wonder
961742e243 Symbology-NG branch merged to trunk. This includes also work on labeling done during my GSoC'09.
git-svn-id: http://svn.osgeo.org/qgis/trunk@12139 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-16 10:36:24 +00:00
jef
03224425e5 [FEATHRE] attribute action improvements
- add python bindings for attribute actions
- support actions as context menu in feature form (ui)
- add action types:
  * generic: commands that should work on all platforms
  * windows, mac, unix: commands that should work and are only shown on one platform respectively
    (eg. vim on unix, notepad on windows and textmate on Mac)
  * python: python strings to be executed instead of a command
    (eg. qgis.utils.plugins['apluginname'].amethod('[%someattribute%]'))

[BUGFIXES]
- ogr support for relative filenames fixed
- relative filename support also for feature form uis


git-svn-id: http://svn.osgeo.org/qgis/trunk@12113 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-15 00:15:55 +00:00
jef
6b7ad07597 [FEATURE] customizable attribute forms using Qt Designer dialog UIs
- add support for checkbox edit type and edit forms for vector layers
- selection of ui file in vector layer properties (general tab)
- the forms are opened when a feature is added or via identify.
  The widgets on the ui have to be named like the attribute they are supposed
  to edit or show.  If the vector layer is not in editing mode, the widgets
  will be disabled



git-svn-id: http://svn.osgeo.org/qgis/trunk@12077 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-10 18:30:57 +00:00
jef
4ed28f36b8 wider support for vector layer queries:
- add query support for OGR and spatialite layers (additional to postgres)
- QgsDataProvider::setSubsetString() now returns if the query is successful.
- add optional parameter to limit number of values returned from QgsVectorDataProvider::uniqueValues() 
- rename QgsDbSourceSelect to QgsPgSourceSelect, use QgsVectorLayer for layer queries and make it wider
- QgsDataSourceURI: improve quoting
- fix relative path support for SpatiaLite on windows
- rename QgsPgQueryBuilder to QgsQueryBuilder and use QgsVectorLayer for
  queries instead of postgres

cleanups:
- rename QgsServerSourceSelect to QgsWMSSourceSelect



git-svn-id: http://svn.osgeo.org/qgis/trunk@11762 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-10-06 22:05:52 +00:00
wonder
0054b7a41d Undo changes in active edit command when it gets destroyed.
Fixed return value for deletion of vertices.
Contributed by Richard Kostecky.


git-svn-id: http://svn.osgeo.org/qgis/trunk@11143 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-07-22 11:40:13 +00:00
mhugent
de9d62fcde Add missing edit types in python bindings (ticket #1781)
git-svn-id: http://svn.osgeo.org/qgis/trunk@11084 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-07-15 11:33:17 +00:00
mhugent
0408094792 Updated python bindings with some added functions
git-svn-id: http://svn.osgeo.org/qgis/trunk@11014 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-07-03 15:42:42 +00:00
jef
7331968172 re-add vector attribute method removed in r10863
git-svn-id: http://svn.osgeo.org/qgis/trunk@10982 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-26 17:04:31 +00:00
wonder
7fd5ba816a Added infrastructure for vector editing undo/redo functionality.
Note - when implementing edit tools for vector layer:
All editation should be done between beginEditCommand() and endEditCommand()
calls so that the operation are stored. 

Note - when doing changes inside QgsVectorLayer code:
When doing any changes inside QgsVectorLayer they should be done using edit*() functions
and _not_ directly e.g. mChangedGeometries[fid] = (...) otherwise the change won't be
stored in the undo stack and it would lead to invalid behaviour of undo.


git-svn-id: http://svn.osgeo.org/qgis/trunk@10920 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-14 14:17:18 +00:00
jef
3e01e6d3d5 - allow setting of field width and precision when adding attributes
- update vector data providers accordingly
- postgres provider:
  - add support for more native types and setting of column comments
  - catch errors on retrieval of defaults values (fixes #1713)



git-svn-id: http://svn.osgeo.org/qgis/trunk@10863 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-05-30 17:48:49 +00:00
mhugent
cfd97adee1 Revert change in qgsvectorlayer.sip
git-svn-id: http://svn.osgeo.org/qgis/trunk@10847 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-05-25 19:29:15 +00:00
mhugent
9a2e66a11f added overlay methods to python bindings for QgsVectorLayer
git-svn-id: http://svn.osgeo.org/qgis/trunk@10845 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-05-25 14:08:27 +00:00
wonder
c245c644ae Added changeGeometry() method as have been suggested on mailing list.
git-svn-id: http://svn.osgeo.org/qgis/trunk@10701 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-05-02 16:13:59 +00:00
jef
bac663a4cd fix #1462
git-svn-id: http://svn.osgeo.org/qgis/trunk@9805 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-12-15 13:15:47 +00:00
mhugent
c569639b7c Applied patch from Borys to invert selection when ctrl-key pressed
git-svn-id: http://svn.osgeo.org/qgis/trunk@9754 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-12-08 17:02:01 +00:00
jef
270fe71f75 new fix for #1162 restoring lost qml features
git-svn-id: http://svn.osgeo.org/qgis/trunk@9747 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-12-07 03:10:00 +00:00
wonder
635abe2b88 Added QgsVectorLayer::deselect()
git-svn-id: http://svn.osgeo.org/qgis/trunk@9729 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-12-02 23:09:55 +00:00
wonder
9221974159 QgsVectorLayer::featureAtId() - use the same semantics as QgsVectorDataProvider::featureAtId()
i.e. return true on success


git-svn-id: http://svn.osgeo.org/qgis/trunk@9620 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-11 13:13:13 +00:00
timlinux
b40ceb2d62 API cleanups for QgsRect that got overlooked...
git-svn-id: http://svn.osgeo.org/qgis/trunk@9605 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-09 00:14:12 +00:00
mhugent
31725ec599 First try to fix font scale problem for map labels
git-svn-id: http://svn.osgeo.org/qgis/trunk@9557 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-31 12:09:27 +00:00
timlinux
adc0124db6 API tidy ups for qgssnapper
git-svn-id: http://svn.osgeo.org/qgis/trunk@9542 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-24 23:22:44 +00:00
timlinux
7c318ead1a API cleanups
git-svn-id: http://svn.osgeo.org/qgis/trunk@9529 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-24 11:00:31 +00:00
timlinux
a8daacfe8a Cleanup for type accessors on maplayer and subclasses
git-svn-id: http://svn.osgeo.org/qgis/trunk@9493 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-18 22:24:15 +00:00
jef
8094f1d4c6 hackfest commit from timlinux:
- more API cleanups
- single click (instead of drag) to select a feature (fixes #1154)
- fixes for topological editing


git-svn-id: http://svn.osgeo.org/qgis/trunk@9471 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-10 20:02:22 +00:00
timlinux
3072d71114 API cleanups: getNextFeature becomes nextFeature, getFeatureAtId becomes featureAtId, getDefaultValue becomes defaultValue, allAttributeList becomes attributeIndexes and reset becomes begin on data provider api.
git-svn-id: http://svn.osgeo.org/qgis/trunk@9449 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-07 07:36:24 +00:00
timlinux
8892abffb9 API Cleanups
git-svn-id: http://svn.osgeo.org/qgis/trunk@9446 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-06 18:50:42 +00:00
timlinux
3aa9ebcc0b Updates to api docs and some api consistency cleanups
git-svn-id: http://svn.osgeo.org/qgis/trunk@9213 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-30 09:28:54 +00:00
jef
683dcea781 vector layer updates
- fix: retrieve only existing attributes from provider when editing and set
  added attributes to null
- introduce slider widget for attribute dialog
- include added attributes when editing from identify



git-svn-id: http://svn.osgeo.org/qgis/trunk@9182 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-27 07:44:03 +00:00
jef
31327f51fd Merged rest of composer branch (9087-9115)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9125 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-23 09:19:49 +00:00
jef
c175c12f98 re-add useIntersect support in QgsVectorLayer
git-svn-id: http://svn.osgeo.org/qgis/trunk@9097 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-20 18:25:17 +00:00
jef
43278d720b handling vector data geometry and attribute updates refactored
QgsVectorLayer:
  - move attribute part of editing to vector layer class and unify with geometry handling:
    * remove commitAttributeChanges(), addedFeatures(), deletedFeatureIds(), changedAttributes()
      and replace with changeAttributeValue(), deleteFeature(), addAttribute()
      and deleteAttribute()
    * add pendingFields(), pendingAttributeList(), pendingFeatureCount()
    * emit signals on start editing and commit, change of attribute values, adding/deleting of
      attributes and layer or feature removal (currently used in the attribute table)
  - new commitErrors() method to query errors from commitChanges()
  - replaced featuresInRectangle with select/getNextFeature combo
  - edit types added to support more input widgets and input constraints

QgsFeature:
  - remove update aware ctor
  - unify geometry handling in ctors

QgsVectorDataProvider:
  - add QVariant::Type to supportNativeTypes()

QgisApp:
  - add instance() method to query QgisApp object
  - replace code at various place to use it instead of passing the pointer
    arround or searching it in the widget tree.
  - move toggleEditing() code from the legend here

QgsAttributeTable/QgsAttributeTableDisplay:
  - move attribute table creation legend here
  - make attribute table dockable (from Tim)
  - most editing logic moved to QgsVectorLayer
  - adding/deleting attributes moved to QgsVectorLayerProperties

QgsIdentifyResults:
  - add support for attribute editing when it edit mode

QgsVectorLayerProperties:
  add a new tab to show attribute list:
    * start/stop editing
    * add/delete attributes
    * assign edit type to attributes (unique values, value map, ranges)

QgsAttributeDialog:
  add support for attribute edit types:
   * selection from unique value render classes (combobox)
   * selection from unique values of existing features (combobox or line edits with completion)
   * spinboxes for ranges

QgsPostgresProvider:
 - use read-only connection for cursors and read-write connection for updates
 - updated native types

QgsOgrProvider:
 - remove unused references to GEOS geometry factory
 - updated native types


git-svn-id: http://svn.osgeo.org/qgis/trunk@9092 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-20 12:15:14 +00:00
timlinux
c4437144a9 Use readXml, writeXml instead of readXML_,writeXML_
git-svn-id: http://svn.osgeo.org/qgis/trunk@9026 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-07 22:18:47 +00:00
mhugent
68cdb3abf4 Merge of rendercontext branch into trunk
git-svn-id: http://svn.osgeo.org/qgis/trunk@8440 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-05-15 08:13:05 +00:00