208 Commits

Author SHA1 Message Date
timlinux
a4bd78c9f8 Refactor spatial reference system to coordinate reference system (finalise fix of ticket #15). Also updated some more core api docs / module assignments.
git-svn-id: http://svn.osgeo.org/qgis/trunk@9108 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-21 21:11:56 +00:00
jef
f2cdcca6bc remove 'with hold' from postgres cursors
git-svn-id: http://svn.osgeo.org/qgis/trunk@9095 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-20 15:16: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
telwertowski
784ce74d40 Remove use of Qt3 support inline routines which redirect old Qt3 names to new Qt4 names. Remove USE_QT3SUPPORT from top-level CMakeLists and add it to GRASS provider/plugin CMakeLists so that all use of Qt3 names and libraries is limited to these two directories.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8630 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-06-09 03:30:50 +00:00
jef
42b8445ba9 update feature id of added features in OGR and PostgrSQL provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@8583 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-06-03 14:41:04 +00:00
telwertowski
21708a56fb Remove all use of Qt3 compatibiliy routines except for the GRASS provider/plugin. Automatic casts of QString to char* have also been removed for compatibility with Qt/Mac-Cocoa (64-bit).
git-svn-id: http://svn.osgeo.org/qgis/trunk@8406 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-05-07 05:15:58 +00:00
jef
38fc0b9e77 fix for #130:
- skip type check for unchanged defaults in QgsAttributDialog
- don't replace NULL default value with empty string


git-svn-id: http://svn.osgeo.org/qgis/trunk@8390 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-04-30 20:15:02 +00:00
jef
518a97b880 fix #1052
git-svn-id: http://svn.osgeo.org/qgis/trunk@8389 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-04-30 19:04:20 +00:00
jef
adaa577fd4 postgres provider update
- handle PQsendQuery in one getNextFeature run (fixes nested iteration of
  cursors with connection pooling)
- beautify DELETE and ALTER TABLE statements


git-svn-id: http://svn.osgeo.org/qgis/trunk@8313 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-04-02 22:35:33 +00:00
jef
509223bc2f postgres provider update
- remove some unnecessary includes
- add private PQexec method with additional debug output
- update all changed attributes of a feature at once
- fix quoting and beautify creation of SQL statements
- replace assertion on unexpected field types with useful debug output and
    consider values as NULL


git-svn-id: http://svn.osgeo.org/qgis/trunk@8307 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-31 19:02:58 +00:00
jef
a0c1772d4c yet another postgres provider update
- apply patch #1009 from Steven Mizuno. Thanks.
- remove column name and use of PQfnumber for cursors


git-svn-id: http://svn.osgeo.org/qgis/trunk@8292 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-28 11:02:05 +00:00
jef
fa696cdabb another postgres provider update:
- make declareCursor and getFeature private
- there's no need to track column names in cursors
  (which contained a bug triggering #962 again and more)
- introduce private method field(index) that verifies that
  the index in valid or throws an exception.
- use that in public methods that get indexes from
  outside (minValue, maxValue, uniqueValues...)


git-svn-id: http://svn.osgeo.org/qgis/trunk@8290 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-27 23:50:45 +00:00
jef
c598dc2783 More work on the postgres provider:
- put common code from select/getNextFeature and getFeatureById methods 
  to new declareCursor and getFeature methods
- unify type handling and support bool, arrays and time types
  (fixes #1009)
- ignore columns not explicitly supported (might apply to columns
  previously supported implicitly; please file a bug if you run into
  one)
- fixes a unreported problem with getFeatureById returning only NULL
  attributes.

Please test!


git-svn-id: http://svn.osgeo.org/qgis/trunk@8285 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-27 00:44:22 +00:00
jef
5eaa4a8c9d reintroduce connection pooling, but use cursors independantly of transactions
by declaring them "WITH HOLD" and "CLOSE" them when done.


git-svn-id: http://svn.osgeo.org/qgis/trunk@8273 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-25 21:24:56 +00:00
jef
9893f4af87 fix #1007
git-svn-id: http://svn.osgeo.org/qgis/trunk@8267 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-25 17:55:34 +00:00
jef
af1b88d847 fix #1001 introduced with r8233
git-svn-id: http://svn.osgeo.org/qgis/trunk@8248 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-19 16:40:17 +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
jef
ee95b957e1 fix gcc compile error
git-svn-id: http://svn.osgeo.org/qgis/trunk@8219 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-13 21:17:13 +00:00
jef
93284cccf3 fix compile error
git-svn-id: http://svn.osgeo.org/qgis/trunk@8218 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-13 19:48:19 +00:00
jef
f86a0afa49 - Support NULL database values (fixes #987 and #988)
- check for NULL values on load
  - show "NULL" in attribute table and identify results
  - support entry of "NULL" in attribute table or dialog
- free result of PQexec in postgres provider (fixes memory leaks)


git-svn-id: http://svn.osgeo.org/qgis/trunk@8217 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-13 18:43:35 +00:00
jef
2ea7615b9c - applied patch from Steven Mizuno from #964. Nice work. Thank you very much.
- better privilege handling (fixes #955)
  - better postgis i18n (unicode handling, identifier quotation)
  - password saving fixed
  - support for int8 type added
- let provider capabilities follow table privileges (fixes #976)
- use prepared statements for adding features (fixed #977)
- remove connection pooling (fixes cursor problem)
- clear attribute list on loadFields (fixes #984)
- ignore bytea fields
- handle transactions/error reporting better
- some cleanups


git-svn-id: http://svn.osgeo.org/qgis/trunk@8213 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-03-12 21:02:40 +00:00
mhugent
1542231de3 Patch from smizuno to fix bug #954. Thanks!
git-svn-id: http://svn.osgeo.org/qgis/trunk@8172 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-02-21 16:21:43 +00:00
mhugent
b3e835e670 Fixed a memory leak in postgres provider (that was caused by my own modifications a week ago)
git-svn-id: http://svn.osgeo.org/qgis/trunk@8136 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-02-11 17:18:22 +00:00
mhugent
bcdcc68cd0 Fix for bug where projects loaded slowly
git-svn-id: http://svn.osgeo.org/qgis/trunk@8117 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-02-08 08:07:42 +00:00
mhugent
88caf1761d Insert 0 for missing geometries in postgres provider. Plus little performance enhancement by avoiding unnecessary copies
git-svn-id: http://svn.osgeo.org/qgis/trunk@8101 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-02-04 07:55:34 +00:00
timlinux
fc0a8a181a Applied bugfix patch from Stefanie Tellex:
- The bug  occurs when you make two providers that 
   access the same table, and then try to iterate 
   through the features in each provider in a nested loop.
 - The provider in the inner loop would never have any 
   features because all providers use the same cursor 
   name so things would get messed up.
 - This patch fixes the bug by adding a providerId 
   member to QgsPostgresProvider, and appending the 
   id to all cursor names.


git-svn-id: http://svn.osgeo.org/qgis/trunk@8092 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-01-30 01:41:27 +00:00
mhugent
e70e53d532 Commit postgis dialog extension to trunk
git-svn-id: http://svn.osgeo.org/qgis/trunk@7920 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-01-10 20:54:26 +00:00
jef
f5cbf5329d fix for #860
git-svn-id: http://svn.osgeo.org/qgis/trunk@7756 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-12-10 12:44:23 +00:00
jef
bf85ce9f85 additional fix for #843
git-svn-id: http://svn.osgeo.org/qgis/trunk@7712 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-12-04 12:14:34 +00:00
jef
5b4e6997dd real fix for #843
determine the current schema in the postgresprovider and clear
the schema name of the table, if it's identical.  That way we
only qualify tables, if we need to (like GDAL does).

Please test!


git-svn-id: http://svn.osgeo.org/qgis/trunk@7711 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-12-04 09:00:22 +00:00
jef
4652d5acf5 Improve parsing in QgsDataSourceURI (adapted from PQconnectdb) and gather
connection info parsing and creation there.   Fixes #817.

Please test!



git-svn-id: http://svn.osgeo.org/qgis/trunk@7672 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-27 21:35:10 +00:00
timlinux
b0ee620944 No code changes, applied auto formatting using vim to comply with QGIS coding guidelines (use spaces for tabs and proper bracket indentation.
git-svn-id: http://svn.osgeo.org/qgis/trunk@7666 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-27 03:29:42 +00:00
timlinux
b80c73c959 Commented out line that was causing:
qgis/src/providers/postgres/qgspostgresprovider.cpp:920: error: ‘mTables’ was not declared in this scope

Please fix and re-enable as needed



git-svn-id: http://svn.osgeo.org/qgis/trunk@7665 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-27 03:26:36 +00:00
jef
bd35aecf1e fix for #835
git-svn-id: http://svn.osgeo.org/qgis/trunk@7661 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-26 19:59:51 +00:00
jef
c32914f503 attribute table: add attributes before applying attribute changes, fixes #763
please test


git-svn-id: http://svn.osgeo.org/qgis/trunk@7642 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-22 20:52:32 +00:00
jef
6ba8b2a686 support for GEOMETRY column, fixes #818
git-svn-id: http://svn.osgeo.org/qgis/trunk@7611 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-19 21:26:56 +00:00
jef
f35fb37d8e quote identifiers and ignore bytea columns, fix for #741
git-svn-id: http://svn.osgeo.org/qgis/trunk@7443 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-17 17:22:55 +00:00
gsherman
c6c8128f75 Revert changes made to fix #741 since it appears to break more than it fixes
git-svn-id: http://svn.osgeo.org/qgis/trunk@7442 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-17 16:34:01 +00:00
gsherman
dabea3c697 Applied patch for bug #741
Please test


git-svn-id: http://svn.osgeo.org/qgis/trunk@7431 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-16 23:38:36 +00:00
mhugent
0c21bfd9a9 Fix for problem where columns that are used as primary keys are not displayed
git-svn-id: http://svn.osgeo.org/qgis/trunk@7401 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-14 10:54:35 +00:00
timlinux
aca333feb4 Applied Jürgens patch with improvements for MSVC build and initial attempts at GRASS under MSVC
git-svn-id: http://svn.osgeo.org/qgis/trunk@7322 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-11-05 01:23:41 +00:00
mhugent
596b81b7d0 Fix for compiler warning
git-svn-id: http://svn.osgeo.org/qgis/trunk@7271 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-10-13 09:18:59 +00:00
mhugent
fe4278dbad Avoid two geometry copies in postgresprovider. Just pass geometry pointers instead
git-svn-id: http://svn.osgeo.org/qgis/trunk@7270 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-10-13 09:03:38 +00:00
mhugent
e47e5924ff Fetch features asynchronously from the database server. This improves performance, especially if the db is located on a remote computer. Plus fixed a memory leak in qgsfeature that is important for postgres provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@7269 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-10-13 07:58:50 +00:00
mhugent
721c2a7983 Applied patch from Juergen that adds a connection pool to the postgres provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@7268 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-10-12 15:47:30 +00:00
mhugent
c55115b561 Fix for problems with unique value dialog and some postgis tables
git-svn-id: http://svn.osgeo.org/qgis/trunk@7138 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-08-14 15:28:22 +00:00
mhugent
5324e893bf Fix that adresses ticket #477 'Loading a PostGIS view is very slow'
git-svn-id: http://svn.osgeo.org/qgis/trunk@7071 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-07-15 08:36:20 +00:00
mhugent
0174afd26a Fix to make deletion of postgres columns working again
git-svn-id: http://svn.osgeo.org/qgis/trunk@7063 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-07-06 13:39:41 +00:00
mhugent
68510607ec A tool to add polygons to multipolygon features
git-svn-id: http://svn.osgeo.org/qgis/trunk@6963 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-05-26 07:31:01 +00:00
mhugent
45b045f017 Added a tool to cut holes into polygons/multipolygons. Made QgsMapToolCapture a base class of QgsMapToolAddRing and QgsMapToolAddFeature. Many bugfixes, e.g. it should now be possible to edit a reprojected layer (but the snapping distance needs to be given in the source units of the edited layer)
git-svn-id: http://svn.osgeo.org/qgis/trunk@6942 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-05-13 13:40:35 +00:00