Skip to content
Permalink
Browse files

[needs-docs][ui] Move 'add saved file to map' option away from data s…

…ettings
  • Loading branch information
nirvn committed Nov 20, 2018
1 parent 5603546 commit 1237fb678693707c8007c487132cdf27d74671b0
@@ -88,7 +88,7 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, i
mExtentGroupBox->hide();

mSelectedOnly->setEnabled( layer && layer->selectedFeatureCount() != 0 );
buttonBox->button( QDialogButtonBox::Ok )->setDisabled( true );
mButtonBox->button( QDialogButtonBox::Ok )->setDisabled( true );
}

void QgsVectorLayerSaveAsDialog::setup()
@@ -104,7 +104,16 @@ void QgsVectorLayerSaveAsDialog::setup()
connect( mDeselectAllAttributes, &QPushButton::clicked, this, &QgsVectorLayerSaveAsDialog::mDeselectAllAttributes_clicked );
connect( mReplaceRawFieldValues, &QCheckBox::stateChanged, this, &QgsVectorLayerSaveAsDialog::mReplaceRawFieldValues_stateChanged );
connect( mAttributeTable, &QTableWidget::itemChanged, this, &QgsVectorLayerSaveAsDialog::mAttributeTable_itemChanged );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsVectorLayerSaveAsDialog::showHelp );

#ifdef Q_OS_WIN
mHelpButtonBox->setVisible( false );
mButtonBox->addButton( QDialogButtonBox::Help );
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsVectorLayerSaveAsDialog::showHelp );
#else
connect( mHelpButtonBox, &QDialogButtonBox::helpRequested, this, &QgsVectorLayerSaveAsDialog::showHelp );
#endif
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QgsVectorLayerSaveAsDialog::accept );
connect( mButtonBox, &QDialogButtonBox::rejected, this, &QgsVectorLayerSaveAsDialog::reject );

const QList< QgsVectorFileWriter::DriverDetails > drivers = QgsVectorFileWriter::ogrDriverList();
mFormatComboBox->blockSignals( true );
@@ -174,7 +183,7 @@ void QgsVectorLayerSaveAsDialog::setup()
QFileInfo fileInfo( filePath );
leLayername->setText( fileInfo.baseName() );
}
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( !filePath.isEmpty() );
mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( !filePath.isEmpty() );
} );
}

@@ -149,7 +149,15 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
okButton->setEnabled( false );
}

#ifdef Q_OS_WIN
mHelpButtonBox->setVisible( false );
mButtonBox->addButton( QDialogButtonBox::Help );
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsRasterLayerSaveAsDialog::showHelp );
#else
connect( mHelpButtonBox, &QDialogButtonBox::helpRequested, this, &QgsRasterLayerSaveAsDialog::showHelp );
#endif
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QgsRasterLayerSaveAsDialog::accept );
connect( mButtonBox, &QDialogButtonBox::rejected, this, &QgsRasterLayerSaveAsDialog::reject );

mExtentGroupBox->setOutputCrs( outputCrs() );
mExtentGroupBox->setOriginalExtent( mDataProvider->extent(), mLayerCrs );
@@ -147,16 +147,6 @@ datasets with maximum width and height specified below.</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="mAddToCanvas">
<property name="text">
<string>Add saved file to map</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
@@ -665,14 +655,51 @@ datasets with maximum width and height specified below.</string>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="mButtonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QDialogButtonBox" name="mHelpButtonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Help</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="mAddToCanvas">
<property name="text">
<string>Add saved file to map</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="mButtonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
@@ -728,7 +755,6 @@ datasets with maximum width and height specified below.</string>
<tabstop>mFilename</tabstop>
<tabstop>mLayerName</tabstop>
<tabstop>mCrsSelector</tabstop>
<tabstop>mAddToCanvas</tabstop>
<tabstop>mScrollArea</tabstop>
<tabstop>mResolutionRadioButton</tabstop>
<tabstop>mXResolutionLineEdit</tabstop>
@@ -750,6 +776,7 @@ datasets with maximum width and height specified below.</string>
<tabstop>mRemoveSelectedNoDataToolButton</tabstop>
<tabstop>mLoadTransparentNoDataToolButton</tabstop>
<tabstop>mRemoveAllNoDataToolButton</tabstop>
<tabstop>mAddToCanvas</tabstop>
</tabstops>
<resources>
<include location="../../images/images.qrc"/>
@@ -126,16 +126,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mAddToCanvas">
<property name="text">
<string>Add saved file to map</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBox" name="mAttributesSelection">
<property name="title">
@@ -417,14 +407,51 @@
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDialogButtonBox" name="mHelpButtonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Help</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="mAddToCanvas">
<property name="text">
<string>Add saved file to map</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="mButtonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
@@ -480,11 +507,11 @@
<tabstop>mGeometryTypeComboBox</tabstop>
<tabstop>mForceMultiCheckBox</tabstop>
<tabstop>mIncludeZCheckBox</tabstop>
<tabstop>mAddToCanvas</tabstop>
<tabstop>mAttributeTable</tabstop>
<tabstop>mReplaceRawFieldValues</tabstop>
<tabstop>mOgrDatasourceOptions</tabstop>
<tabstop>mOgrLayerOptions</tabstop>
<tabstop>mAddToCanvas</tabstop>
</tabstops>
<resources/>
<connections>

0 comments on commit 1237fb6

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