Skip to content

Commit

Permalink
Some tweaks to the add delimited text layer dialog
Browse files Browse the repository at this point in the history
- Avoid the crs widget display when there is no geometry expected in the layer
- Align the crs widget with other geometry related settings
- various cleanup of the ui file and tab order

(cherry picked from commit 307c497)
  • Loading branch information
DelazJ authored and nyalldawson committed Feb 12, 2020
1 parent eb19089 commit 834b822
Show file tree
Hide file tree
Showing 3 changed files with 494 additions and 430 deletions.
7 changes: 7 additions & 0 deletions src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp
Expand Up @@ -57,6 +57,7 @@ QgsDelimitedTextSourceSelect::QgsDelimitedTextSourceSelect( QWidget *parent, Qt:


connect( bgFileFormat, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), swFileFormat, &QStackedWidget::setCurrentIndex ); connect( bgFileFormat, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), swFileFormat, &QStackedWidget::setCurrentIndex );
connect( bgGeomType, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), swGeomType, &QStackedWidget::setCurrentIndex ); connect( bgGeomType, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), swGeomType, &QStackedWidget::setCurrentIndex );
connect( bgGeomType, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), this, &QgsDelimitedTextSourceSelect::showCrsWidget );


cmbEncoding->clear(); cmbEncoding->clear();
cmbEncoding->addItems( QgsVectorDataProvider::availableEncodings() ); cmbEncoding->addItems( QgsVectorDataProvider::availableEncodings() );
Expand Down Expand Up @@ -779,3 +780,9 @@ void QgsDelimitedTextSourceSelect::showHelp()
{ {
QgsHelp::openHelp( QStringLiteral( "managing_data_source/opening_data.html#importing-a-delimited-text-file" ) ); QgsHelp::openHelp( QStringLiteral( "managing_data_source/opening_data.html#importing-a-delimited-text-file" ) );
} }

void QgsDelimitedTextSourceSelect::showCrsWidget()
{
crsGeometry->setVisible( !geomTypeNone->isChecked() );
textLabelCrs->setVisible( !geomTypeNone->isChecked() );
}
1 change: 1 addition & 0 deletions src/providers/delimitedtext/qgsdelimitedtextsourceselect.h
Expand Up @@ -55,6 +55,7 @@ class QgsDelimitedTextSourceSelect : public QgsAbstractDataSourceWidget, private
QButtonGroup *bgFileFormat = nullptr; QButtonGroup *bgFileFormat = nullptr;
QButtonGroup *bgGeomType = nullptr; QButtonGroup *bgGeomType = nullptr;
void showHelp(); void showHelp();
void showCrsWidget();


public slots: public slots:
void addButtonClicked() override; void addButtonClicked() override;
Expand Down

0 comments on commit 834b822

Please sign in to comment.