[QGIS Commit] r12259 - in trunk/qgis: i18n src/app src/core
src/providers/ogr src/ui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Nov 25 17:37:45 EST 2009
Author: jef
Date: 2009-11-25 17:37:43 -0500 (Wed, 25 Nov 2009)
New Revision: 12259
Modified:
trunk/qgis/i18n/qgis_de.ts
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp
trunk/qgis/src/app/qgsnewvectorlayerdialog.h
trunk/qgis/src/core/qgsvectorfilewriter.cpp
trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui
Log:
[FEATURE] allow specification of CRS when creating shape files (also fixes #2123)
Modified: trunk/qgis/i18n/qgis_de.ts
===================================================================
--- trunk/qgis/i18n/qgis_de.ts 2009-11-25 15:13:19 UTC (rev 12258)
+++ trunk/qgis/i18n/qgis_de.ts 2009-11-25 22:37:43 UTC (rev 12259)
@@ -14768,8 +14768,8 @@
</message>
<message>
<location filename="../src/ui/qgsnewvectorlayerdialogbase.ui" line="245"/>
- <source>Removed selected attribute</source>
- <translation>Gewähltes Attribute gelöscht</translation>
+ <source>Remove selected attribute</source>
+ <translation type="unfinished">Gewähltes Attribut löschen</translation>
</message>
</context>
<context>
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2009-11-25 15:13:19 UTC (rev 12258)
+++ trunk/qgis/src/app/qgisapp.cpp 2009-11-25 22:37:43 UTC (rev 12259)
@@ -1802,11 +1802,11 @@
connect( mActionRedo, SIGNAL( triggered() ), mUndoWidget, SLOT( redo() ) );
connect( mUndoWidget, SIGNAL( undoStackChanged() ), this, SLOT( updateUndoActions() ) );
+ // Monitor change of project path
connect( QgsProject::instance(), SIGNAL( readProject( const QDomDocument & ) ),
this, SLOT( projectChanged( const QDomDocument & ) ) );
connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ),
this, SLOT( projectChanged( QDomDocument & ) ) );
-
}
void QgisApp::createCanvas()
@@ -3209,16 +3209,15 @@
return;
}
- QGis::WkbType geometrytype;
- QString fileformat;
-
QgsNewVectorLayerDialog geomDialog( this );
if ( geomDialog.exec() == QDialog::Rejected )
{
return;
}
- geometrytype = geomDialog.selectedType();
- fileformat = geomDialog.selectedFileFormat();
+
+ QGis::WkbType geometrytype = geomDialog.selectedType();
+ QString fileformat = geomDialog.selectedFileFormat();
+ int crsId = geomDialog.selectedCrsId();
QgsDebugMsg( QString( "New file format will be: %1" ).arg( fileformat ) );
std::list<std::pair<QString, QString> > attributes;
@@ -3286,27 +3285,14 @@
QgsDebugMsg( "ogr provider loaded" );
typedef bool ( *createEmptyDataSourceProc )( const QString&, const QString&, const QString&, QGis::WkbType,
- const std::list<std::pair<QString, QString> >& );
+ const std::list<std::pair<QString, QString> >&, const QgsCoordinateReferenceSystem * );
createEmptyDataSourceProc createEmptyDataSource = ( createEmptyDataSourceProc ) cast_to_fptr( myLib->resolve( "createEmptyDataSource" ) );
if ( createEmptyDataSource )
{
-#if 0
- if ( geometrytype == QGis::WKBPoint )
- {
- createEmptyDataSource( fileName, fileformat, enc, QGis::WKBPoint, attributes );
- }
- else if ( geometrytype == QGis::WKBLineString )
- {
- createEmptyDataSource( fileName, fileformat, enc, QGis::WKBLineString, attributes );
- }
- else if ( geometrytype == QGis::WKBPolygon )
- {
- createEmptyDataSource( fileName, fileformat, enc, QGis::WKBPolygon, attributes );
- }
-#endif
if ( geometrytype != QGis::WKBUnknown )
{
- createEmptyDataSource( fileName, fileformat, enc, geometrytype, attributes );
+ QgsCoordinateReferenceSystem srs( crsId, QgsCoordinateReferenceSystem::InternalCrsId );
+ createEmptyDataSource( fileName, fileformat, enc, geometrytype, attributes, &srs );
}
else
{
Modified: trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp 2009-11-25 15:13:19 UTC (rev 12258)
+++ trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp 2009-11-25 22:37:43 UTC (rev 12259)
@@ -20,8 +20,11 @@
#include "qgsapplication.h"
#include "qgisapp.h" // <- for theme icons
#include "qgslogger.h"
+#include "qgscoordinatereferencesystem.h"
+#include "qgsgenericprojectionselector.h"
#include <QPushButton>
+
QgsNewVectorLayerDialog::QgsNewVectorLayerDialog( QWidget *parent, Qt::WFlags fl )
: QDialog( parent, fl )
{
@@ -48,6 +51,12 @@
}
mOkButton = buttonBox->button( QDialogButtonBox::Ok );
mOkButton->setEnabled( false );
+
+ QgsCoordinateReferenceSystem srs;
+ srs.validate();
+
+ mCrsId = srs.srsid();
+ leSpatialRefSys->setText( srs.toProj4() );
}
QgsNewVectorLayerDialog::~QgsNewVectorLayerDialog()
@@ -76,6 +85,11 @@
return QGis::WKBUnknown;
}
+int QgsNewVectorLayerDialog::selectedCrsId() const
+{
+ return mCrsId;
+}
+
void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked()
{
QString myName = mNameEdit->text();
@@ -100,6 +114,23 @@
}
}
+void QgsNewVectorLayerDialog::on_pbnChangeSpatialRefSys_clicked()
+{
+ QgsGenericProjectionSelector *mySelector = new QgsGenericProjectionSelector( this );
+ mySelector->setMessage();
+ mySelector->setSelectedCrsId( pbnChangeSpatialRefSys->text().toInt() );
+ if ( mySelector->exec() )
+ {
+ mCrsId = mySelector->selectedCrsId();
+ leSpatialRefSys->setText( mySelector->selectedProj4String() );
+ }
+ else
+ {
+ QApplication::restoreOverrideCursor();
+ }
+ delete mySelector;
+}
+
void QgsNewVectorLayerDialog::attributes( std::list<std::pair<QString, QString> >& at ) const
{
QTreeWidgetItemIterator it( mAttributeView );
Modified: trunk/qgis/src/app/qgsnewvectorlayerdialog.h
===================================================================
--- trunk/qgis/src/app/qgsnewvectorlayerdialog.h 2009-11-25 15:13:19 UTC (rev 12258)
+++ trunk/qgis/src/app/qgsnewvectorlayerdialog.h 2009-11-25 22:37:43 UTC (rev 12259)
@@ -37,15 +37,19 @@
void attributes( std::list<std::pair<QString, QString> >& at ) const;
/**Returns the file format for storage*/
QString selectedFileFormat() const;
+ /**Returns the selected crs id*/
+ int selectedCrsId() const;
protected slots:
void on_mAddAttributeButton_clicked();
void on_mRemoveAttributeButton_clicked();
void on_mTypeBox_currentIndexChanged( int index );
+ void on_pbnChangeSpatialRefSys_clicked();
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
private:
QPushButton *mOkButton;
+ int mCrsId;
};
#endif //qgsnewvectorlayerdialog_H
Modified: trunk/qgis/src/core/qgsvectorfilewriter.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorfilewriter.cpp 2009-11-25 15:13:19 UTC (rev 12258)
+++ trunk/qgis/src/core/qgsvectorfilewriter.cpp 2009-11-25 22:37:43 UTC (rev 12259)
@@ -95,12 +95,27 @@
}
// datasource created, now create the output layer
- QString layerName = shapefileName.left( shapefileName.indexOf( ".shp" ) );
+ QString layerName = shapefileName.left( shapefileName.lastIndexOf( ".shp", Qt::CaseInsensitive ) );
OGRwkbGeometryType wkbType = static_cast<OGRwkbGeometryType>( geometryType );
mLayer = OGR_DS_CreateLayer( mDS, QFile::encodeName( layerName ).data(), ogrRef, wkbType, NULL );
if ( srs )
{
+ if ( shapefileName != layerName )
+ {
+ QFile prjFile( layerName + ".prj" );
+ if ( prjFile.open( QIODevice::WriteOnly ) )
+ {
+ QTextStream prjStream( &prjFile );
+ prjStream << srs->toWkt().toLocal8Bit().data() << endl;
+ prjFile.close();
+ }
+ else
+ {
+ QgsDebugMsg( "Couldn't open file " + layerName + ".prj" );
+ }
+ }
+
OSRDestroySpatialReference( ogrRef );
}
@@ -344,8 +359,8 @@
// This means we shouldn't transform, use source CRS as output (if defined)
outputCRS = &layer->srs();
}
- QgsVectorFileWriter* writer = new QgsVectorFileWriter( shapefileName,
- fileEncoding, provider->fields(), provider->geometryType(), outputCRS );
+ QgsVectorFileWriter* writer =
+ new QgsVectorFileWriter( shapefileName, fileEncoding, provider->fields(), provider->geometryType(), outputCRS );
// check whether file creation was successful
WriterError err = writer->hasError();
@@ -394,26 +409,6 @@
delete ct;
}
- // Ohh, a great Hack-fest starts!
- // Overwrite the .prj file created by QGsVectorFileWrite().
- // This might break progrmas that relies on ESRI style .prf-files.
- // The 'CT-params' (e.g. +towgs84) does not get stripped in this way
- QRegExp regExp( ".shp$" );
- QString prjName = shapefileName;
- prjName.replace( regExp, QString( "" ) );
- prjName.append( QString( ".prj" ) );
- QFile prjFile( prjName );
-
- if ( !prjFile.open( QIODevice::WriteOnly ) )
- {
- QgsDebugMsg( "Couldn't open file " + prjName );
- return NoError; // For now
- }
-
- QTextStream prjStream( & prjFile );
- prjStream << destCRS->toWkt() << endl;
- prjFile.close();
-
return NoError;
}
Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2009-11-25 15:13:19 UTC (rev 12258)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2009-11-25 22:37:43 UTC (rev 12259)
@@ -1453,7 +1453,8 @@
const QString& format,
const QString& encoding,
QGis::WkbType vectortype,
- const std::list<std::pair<QString, QString> >& attributes )
+ const std::list<std::pair<QString, QString> > &attributes,
+ const QgsCoordinateReferenceSystem *srs = NULL )
{
QgsDebugMsg( QString( "Creating empty vector layer with format: %1" ).arg( format ) );
OGRSFDriverH driver;
@@ -1473,8 +1474,17 @@
//consider spatial reference system
OGRSpatialReferenceH reference = NULL;
+
QgsCoordinateReferenceSystem mySpatialRefSys;
- mySpatialRefSys.validate();
+ if ( srs )
+ {
+ mySpatialRefSys = *srs;
+ }
+ else
+ {
+ mySpatialRefSys.validate();
+ }
+
QString myWkt = mySpatialRefSys.toWkt();
if ( !myWkt.isNull() && myWkt.length() != 0 )
@@ -1576,6 +1586,22 @@
OGR_DS_Destroy( dataSource );
+ if ( uri.endsWith( ".shp", Qt::CaseInsensitive ) )
+ {
+ QString layerName = uri.left( uri.length() - 4 );
+ QFile prjFile( layerName + ".prj" );
+ if ( prjFile.open( QIODevice::WriteOnly ) )
+ {
+ QTextStream prjStream( &prjFile );
+ prjStream << myWkt.toLocal8Bit().data() << endl;
+ prjFile.close();
+ }
+ else
+ {
+ QgsDebugMsg( "Couldn't open file " + layerName + ".prj" );
+ }
+ }
+
QgsDebugMsg( QString( "GDAL Version number %1" ).arg( GDAL_VERSION_NUM ) );
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1310
if ( reference )
Modified: trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui 2009-11-25 15:13:19 UTC (rev 12258)
+++ trunk/qgis/src/ui/qgsnewvectorlayerdialogbase.ui 2009-11-25 22:37:43 UTC (rev 12259)
@@ -1,64 +1,65 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>QgsNewVectorLayerDialogBase</class>
- <widget class="QDialog" name="QgsNewVectorLayerDialogBase" >
- <property name="geometry" >
+ <widget class="QDialog" name="QgsNewVectorLayerDialogBase">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>364</width>
+ <width>444</width>
<height>488</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>New Vector Layer</string>
</property>
- <property name="modal" >
+ <property name="modal">
<bool>true</bool>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="mFileFormatLabel" >
- <property name="enabled" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="mFileFormatLabel">
+ <property name="enabled">
<bool>true</bool>
</property>
- <property name="text" >
+ <property name="text">
<string>File format</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>mFileFormatComboBox</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QComboBox" name="mFileFormatComboBox" >
- <property name="enabled" >
+ <item row="0" column="1" colspan="2">
+ <widget class="QComboBox" name="mFileFormatComboBox">
+ <property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
- <item row="1" column="0" colspan="2" >
- <widget class="QGroupBox" name="buttonGroup1" >
- <property name="title" >
+ <item row="1" column="0" colspan="3">
+ <widget class="QGroupBox" name="buttonGroup1">
+ <property name="title">
<string>Type</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QRadioButton" name="mPointRadioButton" >
- <property name="text" >
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QRadioButton" name="mPointRadioButton">
+ <property name="text">
<string>Point</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QRadioButton" name="mLineRadioButton" >
- <property name="text" >
+ <item>
+ <widget class="QRadioButton" name="mLineRadioButton">
+ <property name="text">
<string>Line</string>
</property>
</widget>
</item>
- <item row="0" column="2" >
- <widget class="QRadioButton" name="mPolygonRadioButton" >
- <property name="text" >
+ <item>
+ <widget class="QRadioButton" name="mPolygonRadioButton">
+ <property name="text">
<string>Polygon</string>
</property>
</widget>
@@ -66,163 +67,125 @@
</layout>
</widget>
</item>
- <item row="2" column="0" colspan="2" >
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
+ <item row="4" column="0" colspan="3">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
<string>New attribute</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="textLabel1" >
- <property name="text" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="textLabel1">
+ <property name="text">
<string>Name</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>mNameEdit</cstring>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="4" >
- <widget class="QLineEdit" name="mNameEdit" />
+ <item row="0" column="1" colspan="4">
+ <widget class="QLineEdit" name="mNameEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="textLabel2" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="textLabel2">
+ <property name="text">
<string>Type</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>mTypeBox</cstring>
</property>
</widget>
</item>
- <item row="1" column="1" colspan="4" >
- <widget class="QComboBox" name="mTypeBox" />
+ <item row="1" column="1" colspan="4">
+ <widget class="QComboBox" name="mTypeBox"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Width</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>mWidth</cstring>
</property>
</widget>
</item>
- <item row="2" column="1" colspan="2" >
- <widget class="QLineEdit" name="mWidth" />
+ <item row="2" column="1" colspan="2">
+ <widget class="QLineEdit" name="mWidth"/>
</item>
- <item row="2" column="3" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
+ <item row="2" column="3">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
<string>Precision</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>mPrecision</cstring>
</property>
</widget>
</item>
- <item row="2" column="4" >
- <widget class="QLineEdit" name="mPrecision" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <item row="2" column="4">
+ <widget class="QLineEdit" name="mPrecision">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
- <item row="3" column="0" colspan="2" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>121</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="2" colspan="3" >
- <widget class="QToolButton" name="mAddAttributeButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" >
- <string>Add attribute to list</string>
- </property>
- <property name="layoutDirection" >
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text" >
- <string>Add to attributes list</string>
- </property>
- <property name="icon" >
- <iconset>../../images/themes/default/mActionNewAttribute.png</iconset>
- </property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
- <item row="3" column="0" colspan="2" >
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="title" >
+ <item row="6" column="0" colspan="3">
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
<string>Attributes list</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" colspan="2" >
- <widget class="QTreeWidget" name="mAttributeView" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <layout class="QGridLayout">
+ <item row="2" column="0" colspan="2">
+ <widget class="QTreeWidget" name="mAttributeView">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="alternatingRowColors" >
+ <property name="alternatingRowColors">
<bool>true</bool>
</property>
- <property name="rootIsDecorated" >
+ <property name="rootIsDecorated">
<bool>false</bool>
</property>
- <property name="columnCount" >
+ <property name="columnCount">
<number>4</number>
</property>
<column>
- <property name="text" >
+ <property name="text">
<string>Name</string>
</property>
</column>
<column>
- <property name="text" >
+ <property name="text">
<string>Type</string>
</property>
</column>
<column>
- <property name="text" >
+ <property name="text">
<string>Width</string>
</property>
</column>
<column>
- <property name="text" >
+ <property name="text">
<string>Precision</string>
</property>
</column>
</widget>
</item>
- <item row="1" column="0" >
+ <item row="3" column="0">
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>121</width>
<height>20</height>
@@ -230,44 +193,114 @@
</property>
</spacer>
</item>
- <item row="1" column="1" >
- <widget class="QToolButton" name="mRemoveAttributeButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
+ <item row="3" column="1">
+ <widget class="QToolButton" name="mRemoveAttributeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="toolTip" >
+ <property name="toolTip">
<string>Delete selected attribute</string>
</property>
- <property name="text" >
- <string>Removed selected attribute</string>
+ <property name="text">
+ <string>Remove selected attribute</string>
</property>
- <property name="icon" >
- <iconset>../../images/themes/default/mActionDeleteAttribute.png</iconset>
+ <property name="icon">
+ <iconset>
+ <normaloff>../../images/themes/default/mActionDeleteAttribute.png</normaloff>../../images/themes/default/mActionDeleteAttribute.png</iconset>
</property>
- <property name="toolButtonStyle" >
+ <property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1">
+ <widget class="QToolButton" name="mAddAttributeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Add attribute to list</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string>Add to attributes list</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>../../images/themes/default/mActionNewAttribute.png</normaloff>../../images/themes/default/mActionNewAttribute.png</iconset>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
- <item row="4" column="0" colspan="2" >
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
+ <item row="7" column="0" colspan="3">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>CRS ID</string>
+ </property>
+ <property name="buddy">
+ <cstring>leSpatialRefSys</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="leSpatialRefSys">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QPushButton" name="pbnChangeSpatialRefSys">
+ <property name="toolTip">
+ <string>Specify the coordinate reference system of the layer's geometry.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Specify the coordinate reference system of the layer's geometry.</string>
+ </property>
+ <property name="text">
+ <string>Specify CRS</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
- <layoutdefault spacing="6" margin="11" />
+ <layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>mFileFormatComboBox</tabstop>
<tabstop>mPointRadioButton</tabstop>
@@ -277,7 +310,6 @@
<tabstop>mTypeBox</tabstop>
<tabstop>mWidth</tabstop>
<tabstop>mPrecision</tabstop>
- <tabstop>mAddAttributeButton</tabstop>
<tabstop>mAttributeView</tabstop>
<tabstop>mRemoveAttributeButton</tabstop>
<tabstop>buttonBox</tabstop>
@@ -290,11 +322,11 @@
<receiver>QgsNewVectorLayerDialogBase</receiver>
<slot>accept()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>349</x>
<y>400</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>387</x>
<y>304</y>
</hint>
@@ -306,11 +338,11 @@
<receiver>QgsNewVectorLayerDialogBase</receiver>
<slot>reject()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>275</x>
<y>400</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>242</x>
<y>308</y>
</hint>
More information about the QGIS-commit
mailing list