26 Commits

Author SHA1 Message Date
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
jef
be7c156a3f sync QgsVectorDataProvider sip interface
git-svn-id: http://svn.osgeo.org/qgis/trunk@10983 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-26 17:37:59 +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
jef
4f604a6aaf fix a warning and add a note about QgsVectorDataProvider::addAttributes() change
git-svn-id: http://svn.osgeo.org/qgis/trunk@10979 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-25 17:03:48 +00:00
mhugent
535490afff Support for enumerations as an edit type in the infotool dialog (with combo box selection)
git-svn-id: http://svn.osgeo.org/qgis/trunk@10902 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-11 07:23:31 +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
wonder
538827ccc9 Allow editing when _any_ of the editing capabilities is supported by data provider
(instead of checking only AddFeatures)


git-svn-id: http://svn.osgeo.org/qgis/trunk@9708 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-25 23:37:13 +00:00
wonder
48724e0561 fixed #1305
git-svn-id: http://svn.osgeo.org/qgis/trunk@9683 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-21 22:55:58 +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
timlinux
67fdbb5efb Changed begin() to rewind() on provider interface
git-svn-id: http://svn.osgeo.org/qgis/trunk@9582 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-08 00:49:59 +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
107a21bfd0 API Cleanup: Use begin() instead of reset() to move to start of selected features
git-svn-id: http://svn.osgeo.org/qgis/trunk@9447 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-06 21:11:54 +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
e3cfb78796 vector provider update:
- rename maxValue to maximumValue
- rename getUniqueValues to uniqueValues and let it return a list
  of variants instead of strings.
- add protected convertValue to convert string values to attribute values
- update attribute dialog, continuous color dialog, graduated symbol dialog,
  unique value dialog, postgres provider and ogr provider accordingly
- fixes #1250



git-svn-id: http://svn.osgeo.org/qgis/trunk@9196 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-27 22:13:27 +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
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
jef
82971f40a1 fix common typo: retreive
(identifing copied code...)


git-svn-id: http://svn.osgeo.org/qgis/trunk@8791 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-07-16 09:21:41 +00:00
wonder
215e7ca83b Applied Stefanie's patch to return features (with new IDs) after being added.
Thanks!


git-svn-id: http://svn.osgeo.org/qgis/trunk@8584 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-06-03 15:25:22 +00:00
jef
d8460108ff - add getUniqueValues method to QgsVectorDataProvider
- implement getUniqueValues in QgsPostgresProvider (fixes #399)
 - implement getUniqueValues, minValue and maxValue in OgsOgrProvider
 - use getUniqueValues in QgsUniqueValueDialog
- update QgsPostgresProvider::storageType interface (fixes #995)
  (applied patch from Steven Mizuno, thanks again)


git-svn-id: http://svn.osgeo.org/qgis/trunk@8233 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-16 16:52:11 +00:00
wonder
fd05e0c631 Some small updates to bindings
git-svn-id: http://svn.osgeo.org/qgis/trunk@7897 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-01-09 23:20:31 +00:00
wonder
5e7c63fe84 Moved all conversions between c++ templates and python objects to one file.
git-svn-id: http://svn.osgeo.org/qgis/trunk@7894 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-01-09 22:27:28 +00:00
wonder
b93ef15ddf Fixed compatibility with (some versions of) Python 2.5.
Also should stay compatible with older python versions.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6941 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-05-10 15:01:58 +00:00
wonder
1ac580270f Merged provider0_9-branch (r6844:6878) back to trunk.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6879 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-04-11 11:46:35 +00:00
wonder
00a43bc7dc QgsFeatureAttribute class has been removed and QVariant is used instead (supports arbitrary data types).
All providers and python bindings have been updated accordingly.
Currently supported variant types by providers are String, Int and Double.

Other API changes:
- QgsField
  - type info as QString is now typeName() and setTypeName()
  - added variant type (QVariant::Type) info: type(), setType()
- QgsFeature
  - removed fields() - use QgsVectorDataProvider::fields()
  - removed boundingBox() - use QgsGeometry::boundingBox()
- QgsVectorLayer - removed fields(), fieldCount(), getDefaultValue() - use directly QgsVectorDataProvider
- QgsVectorDataProvider - getDefaultValue() - field now addressed by id, returns variant
- QgsLabel - setLabelField() - field now addressed by id


git-svn-id: http://svn.osgeo.org/qgis/trunk@6833 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-03-24 22:40:10 +00:00
wonder
46a2d125a2 Merged refactoring branch back to trunk.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6415 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-01-09 02:39:15 +00:00