Skip to content
Permalink
Browse files

Move setCrs() back to QgsDataItem from QgsLayerItem.

The rationale is that some data sources (providers) share CRS for a whole
set of layers (e.g. GRASS)
  • Loading branch information
wonder-sk committed May 20, 2011
1 parent 215d50b commit 34361ae27936eaac94a704a5d2041006cdc50d2a
Showing with 13 additions and 11 deletions.
  1. +13 −11 src/core/qgsdataitem.h
@@ -77,6 +77,19 @@ class CORE_EXPORT QgsDataItem : public QObject

virtual QWidget * paramWidget() { return 0; }

//

enum Capability
{
NoCapabilities = 0,
SetCrs = 1 //Can set CRS on layer or group of layers
};

// This will _write_ selected crs in data source
virtual bool setCrs ( QgsCoordinateReferenceSystem crs ) { return false; }

virtual Capability capabilities() { return NoCapabilities; }

// static methods

static QPixmap getThemePixmap( const QString theName );
@@ -133,12 +146,6 @@ class CORE_EXPORT QgsLayerItem : public QgsDataItem
Table
};

enum Capability
{
NoCapabilities = 0,
SetCrs = 1 //Can set CRS on layer or group of layers
};

QgsLayerItem(QgsDataItem* parent, QString name, QString path, QString uri, LayerType layerType, QString providerKey);

// --- reimplemented from QgsDataItem ---
@@ -156,11 +163,6 @@ class CORE_EXPORT QgsLayerItem : public QgsDataItem
// Returns provider key
QString providerKey() { return mProviderKey; }

// This will _write_ selected crs in data source
virtual bool setCrs ( QgsCoordinateReferenceSystem crs ) { return false; }

virtual Capability capabilities() { return NoCapabilities; }

protected:

QString mProviderKey;

0 comments on commit 34361ae

Please sign in to comment.
You can’t perform that action at this time.