From 1a46c40a7467f14acc7ef6b8da5a8e3d00e64199 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 6 Jan 2015 13:06:48 +1100 Subject: [PATCH] Port a bunch of CRS selectors across to QgsProjectionSelectionWidget --- python/gui/qgsnewmemorylayerdialog.sip | 7 +- python/gui/qgsnewvectorlayerdialog.sip | 1 - python/gui/qgsprojectionselectionwidget.sip | 11 + src/app/ogr/qgsvectorlayersaveasdialog.cpp | 28 +- src/app/ogr/qgsvectorlayersaveasdialog.h | 2 +- src/app/qgsrasterlayerproperties.cpp | 22 +- src/app/qgsrasterlayerproperties.h | 4 +- src/app/qgsvectorlayerproperties.cpp | 22 +- src/app/qgsvectorlayerproperties.h | 2 +- src/gui/qgsnewmemorylayerdialog.cpp | 39 +-- src/gui/qgsnewmemorylayerdialog.h | 10 +- src/gui/qgsnewvectorlayerdialog.cpp | 33 +-- src/gui/qgsnewvectorlayerdialog.h | 2 - src/gui/qgsprojectionselectionwidget.cpp | 11 +- src/gui/qgsprojectionselectionwidget.h | 13 + src/ui/qgsnewmemorylayerdialogbase.ui | 40 ++- src/ui/qgsnewvectorlayerdialogbase.ui | 278 ++++++++++---------- src/ui/qgsrasterlayerpropertiesbase.ui | 165 ++++++++---- src/ui/qgsvectorlayerpropertiesbase.ui | 71 ++--- src/ui/qgsvectorlayersaveasdialogbase.ui | 86 +++--- 20 files changed, 407 insertions(+), 440 deletions(-) diff --git a/python/gui/qgsnewmemorylayerdialog.sip b/python/gui/qgsnewmemorylayerdialog.sip index 83aa30d9c31..8318a158754 100644 --- a/python/gui/qgsnewmemorylayerdialog.sip +++ b/python/gui/qgsnewmemorylayerdialog.sip @@ -18,13 +18,10 @@ class QgsNewMemoryLayerDialog : QDialog /**Returns the selected geometry type*/ QGis::WkbType selectedType() const; - /**Returns the selected crs id*/ - QString selectedCrsId() const; + /**Returns the selected crs*/ + QgsCoordinateReferenceSystem crs() const; /**Returns the layer name*/ QString layerName() const; - protected slots: - - void on_mChangeSrsButton_clicked(); }; diff --git a/python/gui/qgsnewvectorlayerdialog.sip b/python/gui/qgsnewvectorlayerdialog.sip index e7f19358b25..46d60c72b99 100644 --- a/python/gui/qgsnewvectorlayerdialog.sip +++ b/python/gui/qgsnewvectorlayerdialog.sip @@ -27,7 +27,6 @@ class QgsNewVectorLayerDialog : QDialog void on_mAddAttributeButton_clicked(); void on_mRemoveAttributeButton_clicked(); void on_mTypeBox_currentIndexChanged( int index ); - void on_pbnChangeSpatialRefSys_clicked(); void on_buttonBox_helpRequested(); void nameChanged( QString ); void selectionChanged(); diff --git a/python/gui/qgsprojectionselectionwidget.sip b/python/gui/qgsprojectionselectionwidget.sip index 7371c762d7b..461b65a5715 100644 --- a/python/gui/qgsprojectionselectionwidget.sip +++ b/python/gui/qgsprojectionselectionwidget.sip @@ -14,6 +14,17 @@ class QgsProjectionSelectionWidget : QWidget explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0 ); + /* Returns a pointer to the projection selector dialog used by the widget. Can be used + * to modify how the projection selector dialog behaves. + * @returns projection selector dialog + */ + QgsGenericProjectionSelector* dialog(); + + /* Returns a pointer to the line edit used by the widget + * @returns CRS line edit + */ + QLineEdit* lineEdit(); + /* Returns the currently selected CRS for the widget * @returns current CRS */ diff --git a/src/app/ogr/qgsvectorlayersaveasdialog.cpp b/src/app/ogr/qgsvectorlayersaveasdialog.cpp index 7ed2308ce01..cf3a163259e 100644 --- a/src/app/ogr/qgsvectorlayersaveasdialog.cpp +++ b/src/app/ogr/qgsvectorlayersaveasdialog.cpp @@ -81,7 +81,9 @@ void QgsVectorLayerSaveAsDialog::setup() mCRSSelection->addItems( QStringList() << tr( "Layer CRS" ) << tr( "Project CRS" ) << tr( "Selected CRS" ) ); QgsCoordinateReferenceSystem srs( mCRS, QgsCoordinateReferenceSystem::InternalCrsId ); - leCRS->setText( srs.description() ); + mCrsSelector->setCrs( srs ); + mCrsSelector->dialog()->setMessage( tr( "Select the coordinate reference system for the vector file. " + "The data points will be transformed from the layer coordinate reference system." ) ); mEncodingComboBox->setCurrentIndex( idx ); on_mFormatComboBox_currentIndexChanged( mFormatComboBox->currentIndex() ); @@ -186,7 +188,7 @@ void QgsVectorLayerSaveAsDialog::accept() void QgsVectorLayerSaveAsDialog::on_mCRSSelection_currentIndexChanged( int idx ) { - leCRS->setEnabled( idx == 2 ); + mCrsSelector->lineEdit()->setEnabled( idx == 2 ); QgsCoordinateReferenceSystem crs; if ( mCRSSelection->currentIndex() == 0 ) @@ -302,25 +304,11 @@ void QgsVectorLayerSaveAsDialog::on_browseFilename_clicked() } } -void QgsVectorLayerSaveAsDialog::on_browseCRS_clicked() +void QgsVectorLayerSaveAsDialog::on_mCrsSelector_crsChanged( QgsCoordinateReferenceSystem crs ) { - QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector(); - if ( mCRS >= 0 ) - mySelector->setSelectedCrsId( mCRS ); - mySelector->setMessage( tr( "Select the coordinate reference system for the vector file. " - "The data points will be transformed from the layer coordinate reference system." ) ); - - if ( mySelector->exec() ) - { - QgsCoordinateReferenceSystem srs( mySelector->selectedCrsId(), QgsCoordinateReferenceSystem::InternalCrsId ); - mCRS = srs.srsid(); - leCRS->setText( srs.description() ); - mCRSSelection->setCurrentIndex( 2 ); - - mExtentGroupBox->setOutputCrs( srs ); - } - - delete mySelector; + mCRS = crs.srsid(); + mCRSSelection->setCurrentIndex( 2 ); + mExtentGroupBox->setOutputCrs( crs ); } QString QgsVectorLayerSaveAsDialog::filename() const diff --git a/src/app/ogr/qgsvectorlayersaveasdialog.h b/src/app/ogr/qgsvectorlayersaveasdialog.h index a4bf2ce7a28..c883cf16390 100644 --- a/src/app/ogr/qgsvectorlayersaveasdialog.h +++ b/src/app/ogr/qgsvectorlayersaveasdialog.h @@ -70,7 +70,7 @@ class QgsVectorLayerSaveAsDialog : public QDialog, private Ui::QgsVectorLayerSav void on_leFilename_textChanged( const QString& text ); void on_mCRSSelection_currentIndexChanged( int idx ); void on_browseFilename_clicked(); - void on_browseCRS_clicked(); + void on_mCrsSelector_crsChanged( QgsCoordinateReferenceSystem crs ); void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); } void on_mSymbologyExportComboBox_currentIndexChanged( const QString& text ); void accept(); diff --git a/src/app/qgsrasterlayerproperties.cpp b/src/app/qgsrasterlayerproperties.cpp index 2175956e6c1..a4dcc716e7f 100644 --- a/src/app/qgsrasterlayerproperties.cpp +++ b/src/app/qgsrasterlayerproperties.cpp @@ -198,8 +198,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv QgsDebugMsg( "Setting crs to " + mRasterLayer->crs().toWkt() ); QgsDebugMsg( "Setting crs to " + mRasterLayer->crs().authid() + " - " + mRasterLayer->crs().description() ); - leSpatialRefSys->setText( mRasterLayer->crs().authid() + " - " + mRasterLayer->crs().description() ); - leSpatialRefSys->setCursorPosition( 0 ); + mCrsSelector->setCrs( mRasterLayer->crs() ); // Set text for pyramid info box QString pyramidFormat( "

%1

%2 %3 %4

%5

%6

" ); @@ -1086,24 +1085,9 @@ void QgsRasterLayerProperties::on_pbnAddValuesManually_clicked() tableTransparency->resizeRowsToContents(); } -void QgsRasterLayerProperties::on_pbnChangeSpatialRefSys_clicked() +void QgsRasterLayerProperties::on_mCrsSelector_crsChanged( QgsCoordinateReferenceSystem crs ) { - - QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector( this ); - mySelector->setSelectedCrsId( mRasterLayer->crs().srsid() ); - if ( mySelector->exec() ) - { - QgsCoordinateReferenceSystem srs( mySelector->selectedCrsId(), QgsCoordinateReferenceSystem::InternalCrsId ); - mRasterLayer->setCrs( srs ); - } - else - { - QApplication::restoreOverrideCursor(); - } - delete mySelector; - - leSpatialRefSys->setText( mRasterLayer->crs().authid() + " - " + mRasterLayer->crs().description() ); - leSpatialRefSys->setCursorPosition( 0 ); + mRasterLayer->setCrs( crs ); } void QgsRasterLayerProperties::on_pbnDefaultValues_clicked() diff --git a/src/app/qgsrasterlayerproperties.h b/src/app/qgsrasterlayerproperties.h index d4f92bda5bd..2d3800fc8d7 100644 --- a/src/app/qgsrasterlayerproperties.h +++ b/src/app/qgsrasterlayerproperties.h @@ -65,8 +65,8 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private void on_pbnAddValuesFromDisplay_clicked(); /** \brief slot executed when user presses "Add Values Manually" button on the transparency page */ void on_pbnAddValuesManually_clicked(); - /** Override the CRS specified when the layer was loaded */ - void on_pbnChangeSpatialRefSys_clicked(); + /** \brief slot executed when user changes the layer's CRS */ + void on_mCrsSelector_crsChanged( QgsCoordinateReferenceSystem crs ); /** \brief slot executed when user wishes to reset noNoDataValue and transparencyTable to default value */ void on_pbnDefaultValues_clicked(); /** \brief slot executed when user wishes to export transparency values */ diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index f54147e28d5..5a7d2a9b09a 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -205,8 +205,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties( } } - leSpatialRefSys->setText( layer->crs().authid() + " - " + layer->crs().description() ); - leSpatialRefSys->setCursorPosition( 0 ); + mCrsSelector->setCrs( layer->crs() ); //insert existing join info const QList< QgsVectorJoinInfo >& joins = layer->vectorJoins(); @@ -652,24 +651,9 @@ void QgsVectorLayerProperties::on_mLayerOrigNameLineEdit_textEdited( const QStri txtDisplayName->setText( layer->capitaliseLayerName( text ) ); } -void QgsVectorLayerProperties::on_pbnChangeSpatialRefSys_clicked() +void QgsVectorLayerProperties::on_mCrsSelector_crsChanged( QgsCoordinateReferenceSystem crs ) { - QgsGenericProjectionSelector * mySelector = new QgsGenericProjectionSelector( this ); - mySelector->setMessage(); - mySelector->setSelectedCrsId( layer->crs().srsid() ); - if ( mySelector->exec() ) - { - QgsCoordinateReferenceSystem srs( mySelector->selectedCrsId(), QgsCoordinateReferenceSystem::InternalCrsId ); - layer->setCrs( srs ); - } - else - { - QApplication::restoreOverrideCursor(); - } - delete mySelector; - - leSpatialRefSys->setText( layer->crs().authid() + " - " + layer->crs().description() ); - leSpatialRefSys->setCursorPosition( 0 ); + layer->setCrs( crs ); } void QgsVectorLayerProperties::on_pbnLoadDefaultStyle_clicked() diff --git a/src/app/qgsvectorlayerproperties.h b/src/app/qgsvectorlayerproperties.h index d178e339755..6c9250e32ce 100644 --- a/src/app/qgsvectorlayerproperties.h +++ b/src/app/qgsvectorlayerproperties.h @@ -103,7 +103,7 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private void on_pbnQueryBuilder_clicked(); void on_pbnIndex_clicked(); - void on_pbnChangeSpatialRefSys_clicked(); + void on_mCrsSelector_crsChanged( QgsCoordinateReferenceSystem crs ); void on_pbnLoadDefaultStyle_clicked(); void on_pbnSaveDefaultStyle_clicked(); void on_pbnLoadStyle_clicked(); diff --git a/src/gui/qgsnewmemorylayerdialog.cpp b/src/gui/qgsnewmemorylayerdialog.cpp index 8aec0eae6c4..e8ecf1d2f2f 100644 --- a/src/gui/qgsnewmemorylayerdialog.cpp +++ b/src/gui/qgsnewmemorylayerdialog.cpp @@ -19,7 +19,6 @@ #include "qgsapplication.h" #include "qgis.h" #include "qgscoordinatereferencesystem.h" -#include "qgsgenericprojectionselector.h" #include "qgsproviderregistry.h" #include "qgsvectordataprovider.h" @@ -38,7 +37,7 @@ QgsVectorLayer *QgsNewMemoryLayerDialog::runAndCreateLayer( QWidget *parent ) } QGis::WkbType geometrytype = dialog.selectedType(); - QString crsId = dialog.selectedCrsId(); + QString crsId = dialog.crs().authid(); QString geomType; switch ( geometrytype ) @@ -81,11 +80,10 @@ QgsNewMemoryLayerDialog::QgsNewMemoryLayerDialog( QWidget *parent, Qt::WindowFla mPointRadioButton->setChecked( true ); - QgsCoordinateReferenceSystem srs; - srs.createFromOgcWmsCrs( settings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString() ); - srs.validate(); - mCrsId = srs.authid(); - mSpatialRefSysEdit->setText( srs.authid() + " - " + srs.description() ); + QgsCoordinateReferenceSystem defaultCrs; + defaultCrs.createFromOgcWmsCrs( settings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString() ); + defaultCrs.validate(); + mCrsSelector->setCrs( defaultCrs ); mNameLineEdit->setText( tr( "New scratch layer" ) ); } @@ -125,29 +123,12 @@ QGis::WkbType QgsNewMemoryLayerDialog::selectedType() const return QGis::WKBUnknown; } +QgsCoordinateReferenceSystem QgsNewMemoryLayerDialog::crs() const +{ + return mCrsSelector->crs(); +} + QString QgsNewMemoryLayerDialog::layerName() const { return mNameLineEdit->text(); } - -QString QgsNewMemoryLayerDialog::selectedCrsId() const -{ - return mCrsId; -} - -void QgsNewMemoryLayerDialog::on_mChangeSrsButton_clicked() -{ - QgsGenericProjectionSelector *selector = new QgsGenericProjectionSelector( this ); - selector->setMessage(); - selector->setSelectedAuthId( mCrsId ); - if ( selector->exec() ) - { - mCrsId = selector->selectedAuthId(); - mSpatialRefSysEdit->setText( mCrsId ); - } - else - { - QApplication::restoreOverrideCursor(); - } - delete selector; -} diff --git a/src/gui/qgsnewmemorylayerdialog.h b/src/gui/qgsnewmemorylayerdialog.h index d4ff5738f3e..2e6bd898894 100644 --- a/src/gui/qgsnewmemorylayerdialog.h +++ b/src/gui/qgsnewmemorylayerdialog.h @@ -21,6 +21,7 @@ #include "qgisgui.h" #include "qgis.h" #include "qgsvectorlayer.h" +#include "qgscoordinatereferencesystem.h" class GUI_EXPORT QgsNewMemoryLayerDialog: public QDialog, private Ui::QgsNewMemoryLayerDialogBase { @@ -40,17 +41,14 @@ class GUI_EXPORT QgsNewMemoryLayerDialog: public QDialog, private Ui::QgsNewMemo /**Returns the selected geometry type*/ QGis::WkbType selectedType() const; - /**Returns the selected crs id*/ - QString selectedCrsId() const; + /**Returns the selected crs*/ + QgsCoordinateReferenceSystem crs() const; /**Returns the layer name*/ QString layerName() const; - protected slots: - - void on_mChangeSrsButton_clicked(); - private: + QString mCrsId; }; diff --git a/src/gui/qgsnewvectorlayerdialog.cpp b/src/gui/qgsnewvectorlayerdialog.cpp index 1f6a1438522..d99dc3b09ea 100644 --- a/src/gui/qgsnewvectorlayerdialog.cpp +++ b/src/gui/qgsnewvectorlayerdialog.cpp @@ -20,7 +20,6 @@ #include "qgis.h" #include "qgslogger.h" #include "qgscoordinatereferencesystem.h" -#include "qgsgenericprojectionselector.h" #include "qgsproviderregistry.h" #include "qgsvectordataprovider.h" #include "qgsvectorfilewriter.h" @@ -85,13 +84,10 @@ QgsNewVectorLayerDialog::QgsNewVectorLayerDialog( QWidget *parent, Qt::WindowFla mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << "id" << "Integer" << "10" << "" ) ); - QgsCoordinateReferenceSystem srs; - - srs.createFromOgcWmsCrs( settings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString() ); - srs.validate(); - - mCrsId = srs.srsid(); - leSpatialRefSys->setText( srs.authid() + " - " + srs.description() ); + QgsCoordinateReferenceSystem defaultCrs; + defaultCrs.createFromOgcWmsCrs( settings.value( "/Projections/layerDefaultCrs", GEO_EPSG_CRS_AUTHID ).toString() ); + defaultCrs.validate(); + mCrsSelector->setCrs( defaultCrs ); connect( mNameEdit, SIGNAL( textChanged( QString ) ), this, SLOT( nameChanged( QString ) ) ); connect( mAttributeView, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) ); @@ -166,7 +162,7 @@ QGis::WkbType QgsNewVectorLayerDialog::selectedType() const int QgsNewVectorLayerDialog::selectedCrsId() const { - return mCrsId; + return mCrsSelector->crs().srsid(); } void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked() @@ -193,25 +189,6 @@ void QgsNewVectorLayerDialog::on_mRemoveAttributeButton_clicked() } } -void QgsNewVectorLayerDialog::on_pbnChangeSpatialRefSys_clicked() -{ - QgsGenericProjectionSelector *mySelector = new QgsGenericProjectionSelector( this ); - mySelector->setMessage(); - mySelector->setSelectedCrsId( mCrsId ); - if ( mySelector->exec() ) - { - QgsCoordinateReferenceSystem srs; - srs.createFromOgcWmsCrs( mySelector->selectedAuthId() ); - mCrsId = srs.srsid(); - leSpatialRefSys->setText( srs.authid() + " - " + srs.description() ); - } - else - { - QApplication::restoreOverrideCursor(); - } - delete mySelector; -} - void QgsNewVectorLayerDialog::attributes( QList< QPair >& at ) const { QTreeWidgetItemIterator it( mAttributeView ); diff --git a/src/gui/qgsnewvectorlayerdialog.h b/src/gui/qgsnewvectorlayerdialog.h index cb4bdc4c6a0..b71f13895b8 100644 --- a/src/gui/qgsnewvectorlayerdialog.h +++ b/src/gui/qgsnewvectorlayerdialog.h @@ -51,14 +51,12 @@ class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNewVect void on_mRemoveAttributeButton_clicked(); void on_mFileFormatComboBox_currentIndexChanged( int index ); void on_mTypeBox_currentIndexChanged( int index ); - void on_pbnChangeSpatialRefSys_clicked(); void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); } void nameChanged( QString ); void selectionChanged(); private: QPushButton *mOkButton; - int mCrsId; }; #endif //qgsnewvectorlayerdialog_H diff --git a/src/gui/qgsprojectionselectionwidget.cpp b/src/gui/qgsprojectionselectionwidget.cpp index 9fe1150f3e6..ff4e41b3497 100644 --- a/src/gui/qgsprojectionselectionwidget.cpp +++ b/src/gui/qgsprojectionselectionwidget.cpp @@ -23,6 +23,8 @@ QgsProjectionSelectionWidget::QgsProjectionSelectionWidget( QWidget *parent ) : QWidget( parent ) { + mDialog = new QgsGenericProjectionSelector( this ); + QHBoxLayout* layout = new QHBoxLayout(); layout->setContentsMargins( 0, 0, 0, 0 ); layout->setSpacing( 0 ); @@ -34,6 +36,7 @@ QgsProjectionSelectionWidget::QgsProjectionSelectionWidget( QWidget *parent ) : mButton = new QToolButton( this ); mButton->setIcon( QgsApplication::getThemeIcon( "mActionSetProjection.svg" ) ); + mButton->setToolTip( tr( "Select CRS" ) ); layout->addWidget( mButton ); setFocusPolicy( Qt::StrongFocus ); @@ -44,18 +47,16 @@ QgsProjectionSelectionWidget::QgsProjectionSelectionWidget( QWidget *parent ) : void QgsProjectionSelectionWidget::selectCrs() { - QgsGenericProjectionSelector* mySelector = new QgsGenericProjectionSelector( this ); - //find out crs id of current proj4 string if ( mCrs.isValid() ) { - mySelector->setSelectedCrsId( mCrs.srsid() ); + mDialog->setSelectedCrsId( mCrs.srsid() ); } - if ( mySelector->exec() ) + if ( mDialog->exec() ) { QgsCoordinateReferenceSystem crs; - crs.createFromOgcWmsCrs( mySelector->selectedAuthId() ); + crs.createFromOgcWmsCrs( mDialog->selectedAuthId() ); setCrs( crs ); emit crsChanged( crs ); } diff --git a/src/gui/qgsprojectionselectionwidget.h b/src/gui/qgsprojectionselectionwidget.h index 51dbfbad9d3..d63f4a4ac60 100644 --- a/src/gui/qgsprojectionselectionwidget.h +++ b/src/gui/qgsprojectionselectionwidget.h @@ -23,6 +23,8 @@ #include "qgscoordinatereferencesystem.h" +class QgsGenericProjectionSelector; + /** * \class QgsProjectionSelectionWidget * \ingroup gui @@ -35,6 +37,16 @@ class GUI_EXPORT QgsProjectionSelectionWidget : public QWidget public: explicit QgsProjectionSelectionWidget( QWidget *parent = 0 ); + /* Returns a pointer to the projection selector dialog used by the widget + * @returns projection selector dialog + */ + QgsGenericProjectionSelector* dialog() { return mDialog; } + + /* Returns a pointer to the line edit used by the widget + * @returns CRS line edit + */ + QLineEdit* lineEdit() { return mCrsLineEdit; } + /* Returns the currently selected CRS for the widget * @returns current CRS */ @@ -61,6 +73,7 @@ class GUI_EXPORT QgsProjectionSelectionWidget : public QWidget QgsCoordinateReferenceSystem mCrs; QLineEdit* mCrsLineEdit; QToolButton* mButton; + QgsGenericProjectionSelector* mDialog; }; #endif // QGSPROJECTIONSELECTIONWIDGET_H diff --git a/src/ui/qgsnewmemorylayerdialogbase.ui b/src/ui/qgsnewmemorylayerdialogbase.ui index 961a533fff6..2c5cdd2656b 100644 --- a/src/ui/qgsnewmemorylayerdialogbase.ui +++ b/src/ui/qgsnewmemorylayerdialogbase.ui @@ -7,7 +7,7 @@ 0 0 444 - 255 + 293 @@ -89,28 +89,11 @@ - - - - - true - - - - - - - Specify the coordinate reference system of the layer's geometry. - - - Specify the coordinate reference system of the layer's geometry. - - - Specify CRS - - - - + + + Qt::StrongFocus + + @@ -151,6 +134,14 @@ + + + QgsProjectionSelectionWidget + QWidget +
qgsprojectionselectionwidget.h
+ 1 +
+
mNameLineEdit mPointRadioButton @@ -159,8 +150,7 @@ mMultiPointRadioButton mMultiLineRadioButton mMultiPolygonRadioButton - mSpatialRefSysEdit - mChangeSrsButton + mCrsSelector mButtonBox diff --git a/src/ui/qgsnewvectorlayerdialogbase.ui b/src/ui/qgsnewvectorlayerdialogbase.ui index 8abc55c180b..d39f93c7a0e 100644 --- a/src/ui/qgsnewvectorlayerdialogbase.ui +++ b/src/ui/qgsnewvectorlayerdialogbase.ui @@ -7,7 +7,7 @@ 0 0 444 - 543 + 578
@@ -17,13 +17,53 @@ true - - - + + + true + + + + true + + + File format + + + mFileFormatComboBox + + + + + + + true + + + + + + + true + + + File encoding + + + mFileFormatComboBox + + + + + + + Qt::StrongFocus + + + @@ -54,90 +94,6 @@ - - - - Attributes list - - - - - - - 0 - 0 - - - - true - - - false - - - 4 - - - - Name - - - - - Type - - - - - Width - - - - - Precision - - - - - - - - Qt::Horizontal - - - - 121 - 20 - - - - - - - - - 0 - 0 - - - - Delete selected attribute - - - Remove attribute - - - - ../../images/themes/default/mActionDeleteAttribute.png../../images/themes/default/mActionDeleteAttribute.png - - - Qt::ToolButtonTextBesideIcon - - - - - - @@ -148,32 +104,6 @@ - - - - true - - - File format - - - mFileFormatComboBox - - - - - - - true - - - File encoding - - - mFileFormatComboBox - - - @@ -261,47 +191,115 @@ - - - - Specify the coordinate reference system of the layer's geometry. - - - Specify the coordinate reference system of the layer's geometry. - - - Specify CRS - - - - - - - true - - - - - - - true + + + + Attributes list + + + + + + 0 + 0 + + + + true + + + false + + + 4 + + + + Name + + + + + Type + + + + + Width + + + + + Precision + + + + + + + + Qt::Horizontal + + + + 121 + 20 + + + + + + + + + 0 + 0 + + + + Delete selected attribute + + + Remove attribute + + + + ../../images/themes/default/mActionDeleteAttribute.png../../images/themes/default/mActionDeleteAttribute.png + + + Qt::ToolButtonTextBesideIcon + + + + + + + QgsProjectionSelectionWidget + QWidget +
qgsprojectionselectionwidget.h
+ 1 +
+
mPointRadioButton mLineRadioButton mPolygonRadioButton - leSpatialRefSys - pbnChangeSpatialRefSys + mFileEncoding + mFileFormatComboBox + mCrsSelector mNameEdit mTypeBox mWidth mPrecision + mAddAttributeButton mAttributeView + mRemoveAttributeButton buttonBox diff --git a/src/ui/qgsrasterlayerpropertiesbase.ui b/src/ui/qgsrasterlayerpropertiesbase.ui index 8fb735b5dcc..a77080dbc80 100644 --- a/src/ui/qgsrasterlayerpropertiesbase.ui +++ b/src/ui/qgsrasterlayerpropertiesbase.ui @@ -182,7 +182,7 @@ - 1 + 0 @@ -203,7 +203,7 @@ 0 0 615 - 508 + 509 @@ -218,7 +218,7 @@ Layer info - + rastergeneral @@ -324,30 +324,14 @@ Coordinate reference system - + rastergeneral - - - 11 - - - - - Specify the coordinate reference system of the layer's geometry. - - - Specify the coordinate reference system of the layer's geometry. - - - Specify... - - - - - - - true + + + + + Qt::StrongFocus @@ -365,18 +349,18 @@ false - + rastergeneral - - 6 - 11 + + 6 + - + @@ -426,7 +410,7 @@ 0 0 615 - 508 + 509 @@ -441,7 +425,7 @@ Band rendering - + rasterstyle @@ -529,13 +513,13 @@ Color rendering - + false - + true - + rasterstyle @@ -831,13 +815,13 @@ false - + false - + true - + rasterstyle @@ -1047,8 +1031,8 @@ 0 0 - 400 - 381 + 472 + 395 @@ -1065,7 +1049,7 @@ Global transparency - + rastertransp @@ -1149,7 +1133,7 @@ No data value - + rastertransp @@ -1223,7 +1207,7 @@ Custom transparency options - + rastertransp @@ -1454,8 +1438,8 @@ 0 0 - 515 - 196 + 600 + 205 @@ -1518,8 +1502,8 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Cantarell'; font-size:11pt;"><br /></span></p></body></html> +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Cantarell';"><br /></span></p></body></html> @@ -1615,8 +1599,8 @@ p, li { white-space: pre-wrap; } 0 0 - 100 - 30 + 84 + 36 @@ -1665,8 +1649,8 @@ p, li { white-space: pre-wrap; } 0 0 - 302 - 593 + 393 + 608 @@ -1675,7 +1659,7 @@ p, li { white-space: pre-wrap; } Description - + rastermeta @@ -1770,7 +1754,7 @@ p, li { white-space: pre-wrap; } Attribution - + vectormeta @@ -1802,7 +1786,7 @@ p, li { white-space: pre-wrap; } MetadataUrl - + vectormeta @@ -1957,7 +1941,7 @@ p, li { white-space: pre-wrap; } Properties - + rastermeta @@ -2065,6 +2049,12 @@ p, li { white-space: pre-wrap; } QToolButton
qgscolorbuttonv2.h
+ + QgsProjectionSelectionWidget + QWidget +
qgsprojectionselectionwidget.h
+ 1 +
QgsScaleRangeWidget QWidget @@ -2076,6 +2066,71 @@ p, li { white-space: pre-wrap; }
qgsblendmodecombobox.h
+ + pbnSaveDefaultStyle + pbnLoadStyle + pbnLoadDefaultStyle + pbnSaveStyleAs + buttonBox + mOptionsListWidget + scrollArea_3 + leDisplayName + mLayerOrigNameLineEd + leLayerSource + mCrsSelector + chkUseScaleDependentRendering + mRenderTypeComboBox + sliderSaturation + mSliderBrightness + mBrightnessSpinBox + mSliderContrast + mContrastSpinBox + spinBoxSaturation + mColorizeCheck + btnColorizeColor + sliderColorizeStrength + spinColorizeStrength + mBlendModeComboBox + mResetColorRenderingBtn + comboGrayscale + mZoomedInResamplingComboBox + mZoomedOutResamplingComboBox + mMaximumOversamplingSpinBox + scrollArea_2 + sliderTransparency + mSrcNoDataValueCheckBox + leNoDataValue + tableTransparency + cboxTransparencyBand + pbnAddValuesManually + pbnAddValuesFromDisplay + pbnRemoveSelectedRow + pbnDefaultValues + pbnImportTransparentPixelValues + pbnExportTransparentPixelValues + scrollArea_5 + lbxPyramidResolutions + tePyramidDescription + buttonBuildPyramids + cboResamplingMethod + cbxPyramidsFormat + scrollArea_6 + scrollArea_4 + mLayerTitleLineEdit + mLayerAbstractTextEdit + mLayerKeywordListLineEdit + mLayerDataUrlLineEdit + mLayerDataUrlFormatComboBox + mLayerAttributionLineEdit + mLayerAttributionUrlLineEdit + mLayerMetadataUrlLineEdit + mLayerMetadataUrlTypeComboBox + mLayerMetadataUrlFormatComboBox + mLayerLegendUrlLineEdit + mLayerLegendUrlFormatComboBox + txtbMetadata + scrollArea + diff --git a/src/ui/qgsvectorlayerpropertiesbase.ui b/src/ui/qgsvectorlayerpropertiesbase.ui index 868d5c2a8e2..02b1125244a 100644 --- a/src/ui/qgsvectorlayerpropertiesbase.ui +++ b/src/ui/qgsvectorlayerpropertiesbase.ui @@ -279,7 +279,7 @@ Layer info - + vectorgeneral @@ -377,7 +377,7 @@ false - + vectorgeneral @@ -385,34 +385,11 @@ 6 - - - - - - 100 - 0 - - - - true - - - - - - - Specify the coordinate reference system of the layer's geometry. - - - Specify the coordinate reference system of the layer's geometry. - - - Specify... - - - - + + + Qt::StrongFocus + + @@ -465,7 +442,7 @@ - + A widget to define the scale visibility @@ -747,8 +724,8 @@ 0 0 - 702 - 171 + 684 + 165
@@ -841,7 +818,7 @@
- + 0 @@ -1099,7 +1076,7 @@ 0 0 - 90 + 98 113 @@ -1249,7 +1226,7 @@ Description - + vectormeta @@ -1344,7 +1321,7 @@ Attribution - + vectormeta @@ -1376,7 +1353,7 @@ MetadataUrl - + vectormeta @@ -1531,7 +1508,7 @@ Properties - + vectormeta @@ -1645,16 +1622,22 @@
qgscollapsiblegroupbox.h
1 + + QgsScaleComboBox + QWidget +
qgsscalecombobox.h
+
+ + QgsProjectionSelectionWidget + QWidget +
qgsprojectionselectionwidget.h
+ 1 +
QgsScaleRangeWidget QWidget
qgsscalerangewidget.h
- - QgsScaleComboBox - QComboBox -
qgsscalecombobox.h
-
diff --git a/src/ui/qgsvectorlayersaveasdialogbase.ui b/src/ui/qgsvectorlayersaveasdialogbase.ui index dbc71d9d071..6f06bd0aab4 100644 --- a/src/ui/qgsvectorlayersaveasdialogbase.ui +++ b/src/ui/qgsvectorlayersaveasdialogbase.ui @@ -40,32 +40,6 @@
- - - - Save as - - - leFilename - - - - - - - CRS - - - leCRS - - - - - - - - - @@ -76,20 +50,33 @@ - - + + - Change... + CRS - - - - false + + + + + + + + + + Qt::StrongFocus - - true + + + + + + Save as + + + leFilename @@ -106,8 +93,8 @@ 0 0 - 562 - 508 + 555 + 523 @@ -153,7 +140,7 @@ true - + @@ -341,6 +328,12 @@
qgscollapsiblegroupbox.h
1 + + QgsProjectionSelectionWidget + QWidget +
qgsprojectionselectionwidget.h
+ 1 +
QgsExtentGroupBox QGroupBox @@ -348,6 +341,23 @@ 1 + + mFormatComboBox + leFilename + browseFilename + mCRSSelection + mCrsSelector + scrollArea + mEncodingComboBox + mSelectedOnly + mSkipAttributeCreation + mAddToCanvas + mSymbologyExportComboBox + mScaleSpinBox + mOgrDatasourceOptions + buttonBox + mOgrLayerOptions +