mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Merge pull request #5325 from DelazJ/qgsoptions
Clean QgsOptions class from on_m...clicked() calls
This commit is contained in:
commit
b9dd23805b
@ -249,6 +249,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
newItem->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
|
||||
mListPluginPaths->addItem( newItem );
|
||||
}
|
||||
connect( mBtnAddPluginPath, &QAbstractButton::clicked, this, &QgsOptions::addPluginPath );
|
||||
|
||||
//local directories to search when looking for an SVG with a given basename
|
||||
pathList = QgsApplication::svgPaths();
|
||||
@ -262,6 +263,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
mListSVGPaths->addItem( newItem );
|
||||
}
|
||||
}
|
||||
connect( mBtnAddSVGPath, &QAbstractButton::clicked, this, &QgsOptions::addSVGPath );
|
||||
connect( mBtnRemoveSVGPath, &QAbstractButton::clicked, this, &QgsOptions::removeSVGPath );
|
||||
|
||||
//local directories to search when looking for a composer templates
|
||||
pathList = QgsApplication::composerTemplatePaths();
|
||||
@ -275,6 +278,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
mListComposerTemplatePaths->addItem( newItem );
|
||||
}
|
||||
}
|
||||
connect( mBtnAddTemplatePath, &QAbstractButton::clicked, this, &QgsOptions::addTemplatePath );
|
||||
connect( mBtnRemoveTemplatePath, &QAbstractButton::clicked, this, &QgsOptions::removeTemplatePath );
|
||||
|
||||
//paths hidden from browser
|
||||
pathList = mSettings->value( QStringLiteral( "/browser/hiddenPaths" ) ).toStringList();
|
||||
@ -284,6 +289,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
newItem->setText( path );
|
||||
mListHiddenBrowserPaths->addItem( newItem );
|
||||
}
|
||||
connect( mBtnRemoveHiddenPath, &QAbstractButton::clicked, this, &QgsOptions::removeHiddenPath );
|
||||
|
||||
//locations of the QGIS help
|
||||
QStringList helpPathList = mSettings->value( QStringLiteral( "help/helpSearchPath" ), "http://docs.qgis.org/$qgis_short_version/$qgis_locale/docs/user_manual/" ).toStringList();
|
||||
@ -294,6 +300,10 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable );
|
||||
mHelpPathTreeWidget->addTopLevelItem( item );
|
||||
}
|
||||
connect( mBtnAddHelpPath, &QAbstractButton::clicked, this, &QgsOptions::addHelpPath );
|
||||
connect( mBtnRemoveHelpPath, &QAbstractButton::clicked, this, &QgsOptions::removeHelpPath );
|
||||
connect( mBtnMoveHelpUp, &QAbstractButton::clicked, this, &QgsOptions::moveHelpPathUp );
|
||||
connect( mBtnMoveHelpDown, &QAbstractButton::clicked, this, &QgsOptions::moveHelpPathDown );
|
||||
|
||||
//Network timeout
|
||||
mNetworkTimeoutSpinBox->setValue( mSettings->value( QStringLiteral( "/qgis/networkAndProxy/networkTimeout" ), "60000" ).toInt() );
|
||||
@ -340,6 +350,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
newItem->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
|
||||
mExcludeUrlListWidget->addItem( newItem );
|
||||
}
|
||||
connect( mAddUrlPushButton, &QAbstractButton::clicked, this, &QgsOptions::addExcludedUrl );
|
||||
connect( mRemoveUrlPushButton, &QAbstractButton::clicked, this, &QgsOptions::removeExcludedUrl );
|
||||
|
||||
// cache settings
|
||||
mCacheDirectory->setText( mSettings->value( QStringLiteral( "cache/directory" ) ).toString() );
|
||||
@ -349,6 +361,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
mCacheSize->setSingleStep( 1024 );
|
||||
qint64 cacheSize = mSettings->value( QStringLiteral( "cache/size" ), 50 * 1024 * 1024 ).toULongLong();
|
||||
mCacheSize->setValue( ( int )( cacheSize / 1024 ) );
|
||||
connect( mBrowseCacheDirectory, &QAbstractButton::clicked, this, &QgsOptions::browseCacheDirectory );
|
||||
connect( mClearCache, &QAbstractButton::clicked, this, &QgsOptions::clearCache );
|
||||
|
||||
//wms search server
|
||||
leWmsSearch->setText( mSettings->value( QStringLiteral( "/qgis/WMSSearchUrl" ), "http://geopole.org/wms/search?search=%1&type=rss" ).toString() );
|
||||
@ -472,6 +486,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
item->setText( 3, QString::number( v.second ) );
|
||||
mDefaultDatumTransformTreeWidget->addTopLevelItem( item );
|
||||
}
|
||||
connect( mAddDefaultTransformButton, &QAbstractButton::clicked, this, &QgsOptions::addDefaultTransformation );
|
||||
connect( mRemoveDefaultTransformButton, &QAbstractButton::clicked, this, &QgsOptions::removeDefaultTransformation );
|
||||
|
||||
// Set the units for measuring
|
||||
mDistanceUnitsComboBox->addItem( tr( "Meters" ), QgsUnitTypes::DistanceMeters );
|
||||
@ -563,6 +579,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
|
||||
// custom group boxes
|
||||
mCustomGroupBoxChkBx->setChecked( mStyleSheetOldOpts.value( QStringLiteral( "groupBoxCustom" ) ).toBool() );
|
||||
connect( mCustomGroupBoxChkBx, &QAbstractButton::clicked, this, &QgsOptions::useCustomGroupBox );
|
||||
|
||||
mMessageTimeoutSpnBx->setValue( mSettings->value( QStringLiteral( "/qgis/messageTimeout" ), 5 ).toInt() );
|
||||
|
||||
@ -722,6 +739,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
mProjectOnLaunchLineEdit->setText( mSettings->value( QStringLiteral( "/qgis/projOpenAtLaunchPath" ) ).toString() );
|
||||
mProjectOnLaunchLineEdit->setEnabled( projOpen == 2 );
|
||||
mProjectOnLaunchPushBtn->setEnabled( projOpen == 2 );
|
||||
connect( mProjectOnLaunchPushBtn, &QAbstractButton::pressed, this, &QgsOptions::selectProjectOnLaunch );
|
||||
|
||||
chbAskToSaveProjectChanges->setChecked( mSettings->value( QStringLiteral( "qgis/askToSaveProjectChanges" ), QVariant( true ) ).toBool() );
|
||||
mLayerDeleteConfirmationChkBx->setChecked( mSettings->value( QStringLiteral( "qgis/askToDeleteLayers" ), true ).toBool() );
|
||||
@ -732,13 +750,17 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
cbxProjectDefaultNew->setChecked( mSettings->value( QStringLiteral( "/qgis/newProjectDefault" ), QVariant( false ) ).toBool() );
|
||||
QString templateDirName = mSettings->value( QStringLiteral( "/qgis/projectTemplateDir" ),
|
||||
QgsApplication::qgisSettingsDirPath() + "project_templates" ).toString();
|
||||
// make dir if it doesn't exists - should just be called once
|
||||
// make dir if it doesn't exist - should just be called once
|
||||
QDir templateDir;
|
||||
if ( ! templateDir.exists( templateDirName ) )
|
||||
{
|
||||
templateDir.mkdir( templateDirName );
|
||||
}
|
||||
leTemplateFolder->setText( templateDirName );
|
||||
connect( pbnProjectDefaultSetCurrent, &QAbstractButton::clicked, this, &QgsOptions::setCurrentProjectDefault );
|
||||
connect( pbnProjectDefaultReset, &QAbstractButton::clicked, this, &QgsOptions::resetProjectDefault );
|
||||
connect( pbnTemplateFolderBrowse, &QAbstractButton::pressed, this, &QgsOptions::browseTemplateFolder );
|
||||
connect( pbnTemplateFolderReset, &QAbstractButton::pressed, this, &QgsOptions::resetTemplateFolder );
|
||||
|
||||
setZoomFactorValue();
|
||||
|
||||
@ -753,6 +775,11 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
}
|
||||
}
|
||||
connect( mListGlobalScales, &QListWidget::itemChanged, this, &QgsOptions::scaleItemChanged );
|
||||
connect( pbnAddScale, &QAbstractButton::clicked, this, &QgsOptions::addScale );
|
||||
connect( pbnRemoveScale, &QAbstractButton::clicked, this, &QgsOptions::removeScale );
|
||||
connect( pbnImportScales, &QAbstractButton::clicked, this, &QgsOptions::exportScales );
|
||||
connect( pbnImportScales, &QAbstractButton::clicked, this, &QgsOptions::importScales );
|
||||
connect( pbnDefaultScaleValues, &QAbstractButton::clicked, this, &QgsOptions::restoreDefaultScaleValues );
|
||||
|
||||
//
|
||||
// Color palette
|
||||
@ -950,6 +977,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
mVariableEditor->context()->appendScope( QgsExpressionContextUtils::globalScope() );
|
||||
mVariableEditor->reloadContext();
|
||||
mVariableEditor->setEditableScopeIndex( 0 );
|
||||
connect( mAddCustomVarBtn, &QAbstractButton::clicked, this, &QgsOptions::addCustomVariable );
|
||||
connect( mRemoveCustomVarBtn, &QAbstractButton::clicked, this, &QgsOptions::removeCustomVariable );
|
||||
|
||||
// locator
|
||||
mLocatorOptionsWidget = new QgsLocatorOptionsWidget( QgisApp::instance()->locatorWidget(), this );
|
||||
@ -976,7 +1005,12 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
|
||||
mOptionsStackedWidget->addWidget( page );
|
||||
}
|
||||
|
||||
connect( pbnEditCreateOptions, &QAbstractButton::pressed, this, &QgsOptions::editCreateOptions );
|
||||
connect( pbnEditPyramidsOptions, &QAbstractButton::pressed, this, &QgsOptions::editPyramidsOptions );
|
||||
|
||||
// restore window and widget geometry/state
|
||||
connect( mRestoreDefaultWindowStateBtn, &QAbstractButton::clicked, this, &QgsOptions::restoreDefaultWindowState );
|
||||
|
||||
restoreOptionsBaseUi();
|
||||
}
|
||||
|
||||
@ -1019,7 +1053,7 @@ void QgsOptions::on_cbxProjectDefaultNew_toggled( bool checked )
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnProjectDefaultSetCurrent_clicked()
|
||||
void QgsOptions::setCurrentProjectDefault()
|
||||
{
|
||||
QString fileName = QgsApplication::qgisSettingsDirPath() + QStringLiteral( "project_default.qgs" );
|
||||
if ( QgsProject::instance()->write( fileName ) )
|
||||
@ -1032,7 +1066,7 @@ void QgsOptions::on_pbnProjectDefaultSetCurrent_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnProjectDefaultReset_clicked()
|
||||
void QgsOptions::resetProjectDefault()
|
||||
{
|
||||
QString fileName = QgsApplication::qgisSettingsDirPath() + QStringLiteral( "project_default.qgs" );
|
||||
if ( QFile::exists( fileName ) )
|
||||
@ -1042,7 +1076,7 @@ void QgsOptions::on_pbnProjectDefaultReset_clicked()
|
||||
cbxProjectDefaultNew->setChecked( false );
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnTemplateFolderBrowse_pressed()
|
||||
void QgsOptions::browseTemplateFolder()
|
||||
{
|
||||
QString newDir = QFileDialog::getExistingDirectory( nullptr, tr( "Choose a directory to store project template files" ),
|
||||
leTemplateFolder->text() );
|
||||
@ -1052,7 +1086,7 @@ void QgsOptions::on_pbnTemplateFolderBrowse_pressed()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnTemplateFolderReset_pressed()
|
||||
void QgsOptions::resetTemplateFolder()
|
||||
{
|
||||
leTemplateFolder->setText( QgsApplication::qgisSettingsDirPath() + QStringLiteral( "project_templates" ) );
|
||||
}
|
||||
@ -1078,7 +1112,7 @@ void QgsOptions::on_mProjectOnLaunchCmbBx_currentIndexChanged( int indx )
|
||||
mProjectOnLaunchPushBtn->setEnabled( specific );
|
||||
}
|
||||
|
||||
void QgsOptions::on_mProjectOnLaunchPushBtn_pressed()
|
||||
void QgsOptions::selectProjectOnLaunch()
|
||||
{
|
||||
// Retrieve last used project dir from persistent settings
|
||||
QgsSettings settings;
|
||||
@ -1578,7 +1612,7 @@ void QgsOptions::on_mFontFamilyComboBox_currentFontChanged( const QFont &font )
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mCustomGroupBoxChkBx_clicked( bool chkd )
|
||||
void QgsOptions::useCustomGroupBox( bool chkd )
|
||||
{
|
||||
mStyleSheetNewOpts.insert( QStringLiteral( "groupBoxCustom" ), QVariant( chkd ) );
|
||||
mStyleSheetBuilder->buildStyleSheet( mStyleSheetNewOpts );
|
||||
@ -1604,12 +1638,12 @@ void QgsOptions::on_lstGdalDrivers_itemDoubleClicked( QTreeWidgetItem *item, int
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnEditCreateOptions_pressed()
|
||||
void QgsOptions::editCreateOptions()
|
||||
{
|
||||
editGdalDriver( cmbEditCreateOptions->currentText() );
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnEditPyramidsOptions_pressed()
|
||||
void QgsOptions::editPyramidsOptions()
|
||||
{
|
||||
editGdalDriver( QStringLiteral( "_pyramids" ) );
|
||||
}
|
||||
@ -1673,7 +1707,7 @@ QStringList QgsOptions::i18nList()
|
||||
return myList;
|
||||
}
|
||||
|
||||
void QgsOptions::on_mRestoreDefaultWindowStateBtn_clicked()
|
||||
void QgsOptions::restoreDefaultWindowState()
|
||||
{
|
||||
// richard
|
||||
if ( QMessageBox::warning( this, tr( "Restore UI defaults" ), tr( "Are you sure to reset the UI to default (needs restart)?" ), QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
|
||||
@ -1721,7 +1755,7 @@ void QgsOptions::addCustomEnvVarRow( const QString &varName, const QString &varV
|
||||
mCustomVariablesTable->setRowHeight( rowCnt, cbfm.height() + 8 );
|
||||
}
|
||||
|
||||
void QgsOptions::on_mAddCustomVarBtn_clicked()
|
||||
void QgsOptions::addCustomVariable()
|
||||
{
|
||||
addCustomEnvVarRow( QString(), QString() );
|
||||
mCustomVariablesTable->setFocus();
|
||||
@ -1729,7 +1763,7 @@ void QgsOptions::on_mAddCustomVarBtn_clicked()
|
||||
mCustomVariablesTable->edit( mCustomVariablesTable->currentIndex() );
|
||||
}
|
||||
|
||||
void QgsOptions::on_mRemoveCustomVarBtn_clicked()
|
||||
void QgsOptions::removeCustomVariable()
|
||||
{
|
||||
mCustomVariablesTable->removeRow( mCustomVariablesTable->currentRow() );
|
||||
}
|
||||
@ -1756,7 +1790,7 @@ void QgsOptions::on_mCurrentVariablesQGISChxBx_toggled( bool qgisSpecific )
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnAddPluginPath_clicked()
|
||||
void QgsOptions::addPluginPath()
|
||||
{
|
||||
QString myDir = QFileDialog::getExistingDirectory(
|
||||
this,
|
||||
@ -1775,14 +1809,14 @@ void QgsOptions::on_mBtnAddPluginPath_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnRemovePluginPath_clicked()
|
||||
void QgsOptions::removePluginPath()
|
||||
{
|
||||
int currentRow = mListPluginPaths->currentRow();
|
||||
QListWidgetItem *itemToRemove = mListPluginPaths->takeItem( currentRow );
|
||||
delete itemToRemove;
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnAddHelpPath_clicked()
|
||||
void QgsOptions::addHelpPath()
|
||||
{
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||
item->setText( 0, QStringLiteral( "HELP_LOCATION" ) );
|
||||
@ -1791,7 +1825,7 @@ void QgsOptions::on_mBtnAddHelpPath_clicked()
|
||||
mHelpPathTreeWidget->setCurrentItem( item );
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnRemoveHelpPath_clicked()
|
||||
void QgsOptions::removeHelpPath()
|
||||
{
|
||||
QList<QTreeWidgetItem *> items = mHelpPathTreeWidget->selectedItems();
|
||||
for ( int i = 0; i < items.size(); ++i )
|
||||
@ -1804,7 +1838,7 @@ void QgsOptions::on_mBtnRemoveHelpPath_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnMoveHelpUp_clicked()
|
||||
void QgsOptions::moveHelpPathUp()
|
||||
{
|
||||
QList<QTreeWidgetItem *> selectedItems = mHelpPathTreeWidget->selectedItems();
|
||||
QList<QTreeWidgetItem *>::iterator itemIt = selectedItems.begin();
|
||||
@ -1820,7 +1854,7 @@ void QgsOptions::on_mBtnMoveHelpUp_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnMoveHelpDown_clicked()
|
||||
void QgsOptions::moveHelpPathDown()
|
||||
{
|
||||
QList<QTreeWidgetItem *> selectedItems = mHelpPathTreeWidget->selectedItems();
|
||||
QList<QTreeWidgetItem *>::iterator itemIt = selectedItems.begin();
|
||||
@ -1836,7 +1870,7 @@ void QgsOptions::on_mBtnMoveHelpDown_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnAddTemplatePath_clicked()
|
||||
void QgsOptions::addTemplatePath()
|
||||
{
|
||||
QString myDir = QFileDialog::getExistingDirectory(
|
||||
this,
|
||||
@ -1855,7 +1889,7 @@ void QgsOptions::on_mBtnAddTemplatePath_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnRemoveTemplatePath_clicked()
|
||||
void QgsOptions::removeTemplatePath()
|
||||
{
|
||||
int currentRow = mListComposerTemplatePaths->currentRow();
|
||||
QListWidgetItem *itemToRemove = mListComposerTemplatePaths->takeItem( currentRow );
|
||||
@ -1863,7 +1897,7 @@ void QgsOptions::on_mBtnRemoveTemplatePath_clicked()
|
||||
}
|
||||
|
||||
|
||||
void QgsOptions::on_mBtnAddSVGPath_clicked()
|
||||
void QgsOptions::addSVGPath()
|
||||
{
|
||||
QString myDir = QFileDialog::getExistingDirectory(
|
||||
this,
|
||||
@ -1882,21 +1916,21 @@ void QgsOptions::on_mBtnAddSVGPath_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnRemoveHiddenPath_clicked()
|
||||
void QgsOptions::removeHiddenPath()
|
||||
{
|
||||
int currentRow = mListHiddenBrowserPaths->currentRow();
|
||||
QListWidgetItem *itemToRemove = mListHiddenBrowserPaths->takeItem( currentRow );
|
||||
delete itemToRemove;
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBtnRemoveSVGPath_clicked()
|
||||
void QgsOptions::removeSVGPath()
|
||||
{
|
||||
int currentRow = mListSVGPaths->currentRow();
|
||||
QListWidgetItem *itemToRemove = mListSVGPaths->takeItem( currentRow );
|
||||
delete itemToRemove;
|
||||
}
|
||||
|
||||
void QgsOptions::on_mAddUrlPushButton_clicked()
|
||||
void QgsOptions::addExcludedUrl()
|
||||
{
|
||||
QListWidgetItem *newItem = new QListWidgetItem( mExcludeUrlListWidget );
|
||||
newItem->setText( QStringLiteral( "URL" ) );
|
||||
@ -1905,14 +1939,14 @@ void QgsOptions::on_mAddUrlPushButton_clicked()
|
||||
mExcludeUrlListWidget->setCurrentItem( newItem );
|
||||
}
|
||||
|
||||
void QgsOptions::on_mRemoveUrlPushButton_clicked()
|
||||
void QgsOptions::removeExcludedUrl()
|
||||
{
|
||||
int currentRow = mExcludeUrlListWidget->currentRow();
|
||||
QListWidgetItem *itemToRemove = mExcludeUrlListWidget->takeItem( currentRow );
|
||||
delete itemToRemove;
|
||||
}
|
||||
|
||||
void QgsOptions::on_mBrowseCacheDirectory_clicked()
|
||||
void QgsOptions::browseCacheDirectory()
|
||||
{
|
||||
QString myDir = QFileDialog::getExistingDirectory(
|
||||
this,
|
||||
@ -1928,7 +1962,7 @@ void QgsOptions::on_mBrowseCacheDirectory_clicked()
|
||||
|
||||
}
|
||||
|
||||
void QgsOptions::on_mClearCache_clicked()
|
||||
void QgsOptions::clearCache()
|
||||
{
|
||||
QgsNetworkAccessManager::instance()->cache()->clear();
|
||||
}
|
||||
@ -2077,7 +2111,7 @@ void QgsOptions::saveGdalDriverList()
|
||||
mSettings->setValue( QStringLiteral( "gdal/skipList" ), QgsApplication::skippedGdalDrivers().join( QStringLiteral( " " ) ) );
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnAddScale_clicked()
|
||||
void QgsOptions::addScale()
|
||||
{
|
||||
int myScale = QInputDialog::getInt(
|
||||
this,
|
||||
@ -2094,14 +2128,14 @@ void QgsOptions::on_pbnAddScale_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnRemoveScale_clicked()
|
||||
void QgsOptions::removeScale()
|
||||
{
|
||||
int currentRow = mListGlobalScales->currentRow();
|
||||
QListWidgetItem *itemToRemove = mListGlobalScales->takeItem( currentRow );
|
||||
delete itemToRemove;
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnDefaultScaleValues_clicked()
|
||||
void QgsOptions::restoreDefaultScaleValues()
|
||||
{
|
||||
mListGlobalScales->clear();
|
||||
|
||||
@ -2112,7 +2146,7 @@ void QgsOptions::on_pbnDefaultScaleValues_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnImportScales_clicked()
|
||||
void QgsOptions::importScales()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), QDir::homePath(),
|
||||
tr( "XML files (*.xml *.XML)" ) );
|
||||
@ -2134,7 +2168,7 @@ void QgsOptions::on_pbnImportScales_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_pbnExportScales_clicked()
|
||||
void QgsOptions::exportScales()
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), QDir::homePath(),
|
||||
tr( "XML files (*.xml *.XML)" ) );
|
||||
@ -2211,7 +2245,7 @@ void QgsOptions::saveMinMaxLimits( QComboBox *cbox, const QString &name )
|
||||
mSettings->setValue( "/Raster/defaultContrastEnhancementLimits/" + name, value );
|
||||
}
|
||||
|
||||
void QgsOptions::on_mRemoveDefaultTransformButton_clicked()
|
||||
void QgsOptions::removeDefaultTransformation()
|
||||
{
|
||||
QList<QTreeWidgetItem *> items = mDefaultDatumTransformTreeWidget->selectedItems();
|
||||
for ( int i = 0; i < items.size(); ++i )
|
||||
@ -2224,7 +2258,7 @@ void QgsOptions::on_mRemoveDefaultTransformButton_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsOptions::on_mAddDefaultTransformButton_clicked()
|
||||
void QgsOptions::addDefaultTransformation()
|
||||
{
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||
item->setText( 0, QLatin1String( "" ) );
|
||||
@ -2277,7 +2311,7 @@ void QgsOptions::saveDefaultDatumTransformations()
|
||||
}
|
||||
|
||||
|
||||
void QgsOptions::on_mButtonAddColor_clicked()
|
||||
void QgsOptions::addColor()
|
||||
{
|
||||
QColor newColor = QgsColorDialog::getColor( QColor(), this->parentWidget(), tr( "Select color" ), true );
|
||||
if ( !newColor.isValid() )
|
||||
|
@ -63,17 +63,17 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
|
||||
|
||||
public slots:
|
||||
void on_cbxProjectDefaultNew_toggled( bool checked );
|
||||
void on_pbnProjectDefaultSetCurrent_clicked();
|
||||
void on_pbnProjectDefaultReset_clicked();
|
||||
void on_pbnTemplateFolderBrowse_pressed();
|
||||
void on_pbnTemplateFolderReset_pressed();
|
||||
void setCurrentProjectDefault();
|
||||
void resetProjectDefault();
|
||||
void browseTemplateFolder();
|
||||
void resetTemplateFolder();
|
||||
//! Slot called when user chooses to change the project wide projection.
|
||||
void on_leProjectGlobalCrs_crsChanged( const QgsCoordinateReferenceSystem &crs );
|
||||
//! Slot called when user chooses to change the default 'on the fly' projection.
|
||||
void on_leLayerGlobalCrs_crsChanged( const QgsCoordinateReferenceSystem &crs );
|
||||
void on_lstGdalDrivers_itemDoubleClicked( QTreeWidgetItem *item, int column );
|
||||
void on_pbnEditCreateOptions_pressed();
|
||||
void on_pbnEditPyramidsOptions_pressed();
|
||||
void editCreateOptions();
|
||||
void editPyramidsOptions();
|
||||
void editGdalDriver( const QString &driverName );
|
||||
void saveOptions();
|
||||
|
||||
@ -92,7 +92,7 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
|
||||
void on_mProjectOnLaunchCmbBx_currentIndexChanged( int indx );
|
||||
|
||||
//! Slot to choose path to project to open after launch
|
||||
void on_mProjectOnLaunchPushBtn_pressed();
|
||||
void selectProjectOnLaunch();
|
||||
|
||||
/**
|
||||
* Return the desired state of newly added layers. If a layer
|
||||
@ -114,100 +114,100 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
|
||||
void on_mFontFamilyComboBox_currentFontChanged( const QFont &font );
|
||||
|
||||
//! Slot to set whether to use custom group boxes
|
||||
void on_mCustomGroupBoxChkBx_clicked( bool chkd );
|
||||
void useCustomGroupBox( bool chkd );
|
||||
|
||||
void on_mProxyTypeComboBox_currentIndexChanged( int idx );
|
||||
|
||||
//! Add a new URL to exclude from Proxy
|
||||
void on_mAddUrlPushButton_clicked();
|
||||
void addExcludedUrl();
|
||||
|
||||
//! Remove an URL to exclude from Proxy
|
||||
void on_mRemoveUrlPushButton_clicked();
|
||||
void removeExcludedUrl();
|
||||
|
||||
//! Slot to flag restoring/delete window state settings upon restart
|
||||
void on_mRestoreDefaultWindowStateBtn_clicked();
|
||||
void restoreDefaultWindowState();
|
||||
|
||||
//! Slot to enable custom environment variables table and buttons
|
||||
void on_mCustomVariablesChkBx_toggled( bool chkd );
|
||||
|
||||
//! Slot to add a custom environment variable to the app
|
||||
void on_mAddCustomVarBtn_clicked();
|
||||
void addCustomVariable();
|
||||
|
||||
//! Slot to remove a custom environment variable from the app
|
||||
void on_mRemoveCustomVarBtn_clicked();
|
||||
void removeCustomVariable();
|
||||
|
||||
//! Slot to filter out current environment variables not specific to QGIS
|
||||
void on_mCurrentVariablesQGISChxBx_toggled( bool qgisSpecific );
|
||||
|
||||
/* Let the user add a path to the list of search paths
|
||||
* used for finding user Plugin libs. */
|
||||
void on_mBtnAddPluginPath_clicked();
|
||||
void addPluginPath();
|
||||
|
||||
/* Let the user remove a path from the list of search paths
|
||||
* used for finding Plugin libs. */
|
||||
void on_mBtnRemovePluginPath_clicked();
|
||||
void removePluginPath();
|
||||
|
||||
/* Let the user add a path to the list of search paths
|
||||
* used for finding QGIS help. */
|
||||
void on_mBtnAddHelpPath_clicked();
|
||||
void addHelpPath();
|
||||
|
||||
/* Let the user remove a path from the list of search paths
|
||||
* used for finding QGIS help. */
|
||||
void on_mBtnRemoveHelpPath_clicked();
|
||||
void removeHelpPath();
|
||||
|
||||
/* Let the user move selected path(s) up in the list raising
|
||||
* their priority. */
|
||||
void on_mBtnMoveHelpUp_clicked();
|
||||
void moveHelpPathUp();
|
||||
|
||||
/* Let the user move selected path(s) down in the list lowering
|
||||
* their priority. */
|
||||
void on_mBtnMoveHelpDown_clicked();
|
||||
void moveHelpPathDown();
|
||||
|
||||
/* Let the user add a path to the list of search paths
|
||||
* used for finding composer template files. */
|
||||
void on_mBtnAddTemplatePath_clicked();
|
||||
void addTemplatePath();
|
||||
|
||||
/* Let the user remove a path from the list of search paths
|
||||
* used for finding composer template files. */
|
||||
void on_mBtnRemoveTemplatePath_clicked();
|
||||
void removeTemplatePath();
|
||||
|
||||
/* Let the user add a path to the list of search paths
|
||||
* used for finding SVG files. */
|
||||
void on_mBtnAddSVGPath_clicked();
|
||||
void addSVGPath();
|
||||
|
||||
/* Let the user remove a path from the list of search paths
|
||||
* used for finding SVG files. */
|
||||
void on_mBtnRemoveSVGPath_clicked();
|
||||
void removeSVGPath();
|
||||
|
||||
/* Let the user remove a path from the hidden path list
|
||||
* for the browser */
|
||||
void on_mBtnRemoveHiddenPath_clicked();
|
||||
void removeHiddenPath();
|
||||
|
||||
void on_mBrowseCacheDirectory_clicked();
|
||||
void on_mClearCache_clicked();
|
||||
void browseCacheDirectory();
|
||||
void clearCache();
|
||||
|
||||
/**
|
||||
* Let the user add a scale to the list of scales
|
||||
* used in scale combobox
|
||||
*/
|
||||
void on_pbnAddScale_clicked();
|
||||
void addScale();
|
||||
|
||||
/**
|
||||
* Let the user remove a scale from the list of scales
|
||||
* used in scale combobox
|
||||
*/
|
||||
void on_pbnRemoveScale_clicked();
|
||||
void removeScale();
|
||||
|
||||
/**
|
||||
* Let the user restore default scales
|
||||
* used in scale combobox */
|
||||
void on_pbnDefaultScaleValues_clicked();
|
||||
void restoreDefaultScaleValues();
|
||||
|
||||
//! Let the user load scales from file
|
||||
void on_pbnImportScales_clicked();
|
||||
void importScales();
|
||||
|
||||
//! Let the user load scales from file
|
||||
void on_pbnExportScales_clicked();
|
||||
void exportScales();
|
||||
|
||||
//! Auto slot executed when the active page in the option section widget is changed
|
||||
void on_mOptionsStackedWidget_currentChanged( int indx );
|
||||
@ -221,10 +221,10 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
|
||||
/* Save the list of which gdal drivers should be used. */
|
||||
void saveGdalDriverList();
|
||||
|
||||
void on_mRemoveDefaultTransformButton_clicked();
|
||||
void on_mAddDefaultTransformButton_clicked();
|
||||
void removeDefaultTransformation();
|
||||
void addDefaultTransformation();
|
||||
|
||||
void on_mButtonAddColor_clicked();
|
||||
void addColor();
|
||||
|
||||
private:
|
||||
QgsSettings *mSettings = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user