250 Commits

Author SHA1 Message Date
jef
793b091892 postgres & ogr provider update:
- postgres provider: report field width -1 for everything except strings (fixes #1131)
- in vector file writer, ogr provider choose field width:
  - 255 for strings, when given width is negative or larger.
    (was 80 in ogr provider and OGR determined-default for vector file writer).
  - 10 for integers, when given width is negative or larger.
  - 32 for reals, when given width is negative or larger.



git-svn-id: http://svn.osgeo.org/qgis/trunk@11464 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-08-21 13:32:42 +00:00
jef
0bb8cb2adb automatic indentation update (r11227-r11370)
git-svn-id: http://svn.osgeo.org/qgis/trunk@11371 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-08-14 09:20:23 +00:00
jef
2b5663083b more cleanups:
- don't link GSL's CBLAS. We don't use it.
- don't link GEOS and GDAL into python bindings. They don't use them directly.
- link libdl on unix when internal spatialite is used
- update SONAMEs
- fix some warnings and typos



git-svn-id: http://svn.osgeo.org/qgis/trunk@11250 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-08-02 15:28:05 +00:00
jef
b49980c995 automatic indentation update (r11003-r11227)
git-svn-id: http://svn.osgeo.org/qgis/trunk@11228 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-07-31 17:15:15 +00:00
wonder
8b1fb78d8d providers: deprecated some overlapping capabilities and added doxygen docs for them.
All providers should have now correctly set capability for fast access to features by id (SelectAtId).

Until now, attribute table was using memory model for Postgres provider (i.e. very slow open)
From now it uses the "good" model, so the attribute table opens much faster.


git-svn-id: http://svn.osgeo.org/qgis/trunk@11137 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-07-21 14:29:38 +00:00
jef
eead1f7ddd fix #1707
git-svn-id: http://svn.osgeo.org/qgis/trunk@11107 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-07-18 21:26:40 +00:00
mhugent
c4b6e7b2f2 Handle non-ascii characters in domain check constraints
git-svn-id: http://svn.osgeo.org/qgis/trunk@11104 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-07-17 17:35:44 +00:00
jef
f76f8a94e6 fix #1744
git-svn-id: http://svn.osgeo.org/qgis/trunk@10969 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-23 12:36:33 +00:00
jef
6faf04d396 reindent postgres provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@10968 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-23 12:35:23 +00:00
mhugent
927985e949 Extended enum support in postgres provider to work also with domain check constrains (at the moment only for constrain types like VALUE in ('a', 'b', 'c'))
git-svn-id: http://svn.osgeo.org/qgis/trunk@10940 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-06-17 09:42:24 +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
jef
468550c6d2 speed up loading of projects with (complex) views:
save key column of postgresql layers to projects file and try it first on
reload.



git-svn-id: http://svn.osgeo.org/qgis/trunk@10657 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-04-26 22:49:37 +00:00
jef
6779465eae automatic indentation update (r10488-r10594)
git-svn-id: http://svn.osgeo.org/qgis/trunk@10595 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-04-19 08:32:36 +00:00
jef
4bd78a398f handle broken postgis installations more traceful
git-svn-id: http://svn.osgeo.org/qgis/trunk@10578 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-04-16 19:58:26 +00:00
jef
f8277d9154 use ctid as temporary feature id in postgres provider if there is no other primary key available
git-svn-id: http://svn.osgeo.org/qgis/trunk@10474 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-04-05 10:51:35 +00:00
jef
9addfdbbd2 fix feature count in postgres provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@10426 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-03-27 17:40:08 +00:00
cfarmer
539ee46f24 Ensures that features (properly) fetched from provider (via nextFeature)
are set as valid
Ensures that only valid features are rendered on the map canvas


git-svn-id: http://svn.osgeo.org/qgis/trunk@10272 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-03-11 23:45:23 +00:00
jef
72cfd51023 string translation update:
- collect concatenated strings into one string to get more translation context (foo + tr(" bar ") + baz => tr("%1 bar %2)").arg( foo ).arg( bar) 
- don't qualify tr(), when not necessary (QObject::tr => tr)
- remove QString cast/ctor where not necessary ( QString( tr(...) ) => tr (...) )
- add numerusforms where applicable
- fix QgsGrassEdit::setCanvasPrompt (was setCanvasPropmt) and more typos
- remove plugin template strings from coordinate capture plugin
- add Q_OBJECT to classes using QObject::tr (fixes lupdate warnings)



git-svn-id: http://svn.osgeo.org/qgis/trunk@9897 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-12-26 21:07:03 +00:00
jef
6fbda00825 automatic indentation update (r9447-r9780)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9781 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-12-13 11:07:45 +00:00
wonder
1be590bf14 Allow opening layers with M dimension, but explicitly disable editation of geometries (would corrupt M dimension) and creation of new features (would keep invalid M dimension).
git-svn-id: http://svn.osgeo.org/qgis/trunk@9709 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-25 23:42:35 +00:00
jef
bb63eac685 postgres provider update:
- handle secondary geometry columns as text in EWKT.
- improve handling of errornous queries.
- kudos to Stefanie Tellex for the initial patch



git-svn-id: http://svn.osgeo.org/qgis/trunk@9619 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-11-10 19:40:00 +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
timlinux
bb9c89abbb qgsprovidercountcalcevent api cleanups
git-svn-id: http://svn.osgeo.org/qgis/trunk@9538 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-24 22:12:40 +00:00
timlinux
394993ea8f API cleanups for qgsgeometry
git-svn-id: http://svn.osgeo.org/qgis/trunk@9515 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-22 07:31:05 +00:00
timlinux
314e8e6065 Api cleanups for qgsfeature
git-svn-id: http://svn.osgeo.org/qgis/trunk@9506 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-20 21:44:15 +00:00
timlinux
9884ef0758 Remove abbreviation of connectionInfo
git-svn-id: http://svn.osgeo.org/qgis/trunk@9502 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-20 20:24:36 +00:00
timlinux
dcfedaad21 remove get prefix for crs accessor
git-svn-id: http://svn.osgeo.org/qgis/trunk@9501 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-10-20 20:08:43 +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
jef
099fe8f618 postgres provider: use default values for primary key
git-svn-id: http://svn.osgeo.org/qgis/trunk@9382 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-09-23 06:28:35 +00:00
jef
ef10609f17 vector bugfixes
- QgsVectorLayer::commitChanges: handle deleted added features
- QgsPostgresProvider:
  - update ids of added features only, when they were actually inserted
  - deallocate prepared statements after rollback (fixes #1328)



git-svn-id: http://svn.osgeo.org/qgis/trunk@9381 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-09-23 05:42:44 +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
874b29b71f minor update (indentation, debug output, plenks)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9189 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-27 12:57:47 +00:00
jef
b9452c2dd8 postgres provider update
- track open cursors and commit transaction whenever no open cursors are left
- close cursor after immediately after feature retrieval (releases locks earlier)
- wrap postgres calls in Conn class
- introduce Result class to handle PQclear mostly transparently (fixes minor leaks)
- remove executeDbCommand method (duplicate of PQexecNR)
- introduce support for estimate_extents (fixes #582)
- introduce support for enum types (fixes #1210)



git-svn-id: http://svn.osgeo.org/qgis/trunk@9183 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-27 08:00:57 +00:00
ersts
dfcacb69a3 -Propogated updates for QgsRect setYMin/setYMax
git-svn-id: http://svn.osgeo.org/qgis/trunk@9177 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-26 20:47:53 +00:00
jef
4b46398bc4 astyle re-indentation & iostream=>QgsDebugMsg migration cleanup
git-svn-id: http://svn.osgeo.org/qgis/trunk@9138 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-23 21:37:31 +00:00
jef
120a61cabe various code cleanups by mloskot for GCC 4.1 (fixes #1239, #1240).
Inspired by it I also enabled pedantic mode for MSVC and cleaned
up some more warnings found by GCC 4.3 and MSVC.




git-svn-id: http://svn.osgeo.org/qgis/trunk@9133 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-23 14:06:01 +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
753a1c449e fix #1237
git-svn-id: http://svn.osgeo.org/qgis/trunk@9120 c8812cc2-4d05-0410-92ff-de0c093fc19c
2008-08-22 10:32:29 +00:00
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