Skip to content

Commit

Permalink
Move setCrs() back to QgsDataItem from QgsLayerItem.
Browse files Browse the repository at this point in the history
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 34361ae
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/core/qgsdataitem.h
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 ---
Expand All @@ -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;
Expand Down

0 comments on commit 34361ae

Please sign in to comment.