40#include "moc_qgsvectorlayerproperties.cpp" 
   77#include <QDesktopServices> 
   87#include <QColorDialog> 
   90#include <QRegularExpressionValidator> 
  101  , mMessageBar( messageBar )
 
  103  , mOriginalSubsetSQL( lyr->subsetString() )
 
  106  connect( pbnQueryBuilder, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::pbnQueryBuilder_clicked );
 
  107  connect( pbnIndex, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::pbnIndex_clicked );
 
  109  connect( pbnUpdateExtents, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::pbnUpdateExtents_clicked );
 
  110  connect( mButtonAddJoin, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::mButtonAddJoin_clicked );
 
  111  connect( mButtonEditJoin, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::mButtonEditJoin_clicked );
 
  112  connect( mJoinTreeWidget, &QTreeWidget::itemDoubleClicked, 
this, &QgsVectorLayerProperties::mJoinTreeWidget_itemDoubleClicked );
 
  113  connect( mButtonRemoveJoin, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::mButtonRemoveJoin_clicked );
 
  114  connect( mButtonAddWmsDimension, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::mButtonAddWmsDimension_clicked );
 
  115  connect( mButtonEditWmsDimension, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::mButtonEditWmsDimension_clicked );
 
  116  connect( mWmsDimensionsTreeWidget, &QTreeWidget::itemDoubleClicked, 
this, &QgsVectorLayerProperties::mWmsDimensionsTreeWidget_itemDoubleClicked );
 
  117  connect( mButtonRemoveWmsDimension, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::mButtonRemoveWmsDimension_clicked );
 
  118  connect( mSimplifyDrawingGroupBox, &QGroupBox::toggled, 
this, &QgsVectorLayerProperties::mSimplifyDrawingGroupBox_toggled );
 
  119  connect( buttonBox, &QDialogButtonBox::helpRequested, 
this, &QgsVectorLayerProperties::showHelp );
 
  128  mBtnStyle = 
new QPushButton( tr( 
"Style" ), 
this );
 
  129  QMenu *menuStyle = 
new QMenu( 
this );
 
  130  mActionLoadStyle = 
new QAction( tr( 
"Load Style…" ), 
this );
 
  133  mActionSaveStyle = 
new QAction( tr( 
"Save Current Style…" ), 
this );
 
  136  mActionSaveMultipleStyles = 
new QAction( tr( 
"Save Multiple Styles…" ), 
this );
 
  137  connect( mActionSaveMultipleStyles, &QAction::triggered, 
this, &QgsVectorLayerProperties::saveMultipleStylesAs );
 
  139  mSourceGroupBox->hide();
 
  142  connect( menuStyle, &QMenu::aboutToShow, 
this, &QgsVectorLayerProperties::aboutToShowStyleMenu );
 
  143  buttonBox->addButton( 
mBtnStyle, QDialogButtonBox::ResetRole );
 
  164  mMapTipFieldComboBox->setLayer( lyr );
 
  165  mDisplayExpressionWidget->setLayer( lyr );
 
  166  mDisplayExpressionWidget->registerExpressionContextGenerator( 
this );
 
  169  connect( mMapTipInsertFieldButton, &QAbstractButton::clicked, 
this, &QgsVectorLayerProperties::insertField );
 
  170  connect( mMapTipInsertExpressionButton, &QAbstractButton::clicked, 
this, &QgsVectorLayerProperties::insertOrEditExpression );
 
  175  connect( mEnableMapTips, &QAbstractButton::toggled, mHtmlMapTipGroupBox, &QWidget::setEnabled );
 
  178  QVBoxLayout *layout = 
nullptr;
 
  183    layout = 
new QVBoxLayout( labelingFrame );
 
  184    layout->setContentsMargins( 0, 0, 0, 0 );
 
  186    labelingDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  188    layout->addWidget( labelingDialog );
 
  189    labelingFrame->setLayout( layout );
 
  192    layout = 
new QVBoxLayout( mMaskingFrame );
 
  193    layout->setContentsMargins( 0, 0, 0, 0 );
 
  194    mMaskingWidget = 
new QgsMaskingWidget( mMaskingFrame );
 
  195    mMaskingWidget->setLayer( mLayer );
 
  196    mMaskingWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  197    layout->addWidget( mMaskingWidget );
 
  198    mMaskingFrame->setLayout( layout );
 
  202    labelingDialog = 
nullptr;
 
  203    mOptsPage_Labels->setEnabled( 
false ); 
 
  204    mOptsPage_Masks->setEnabled( 
false );  
 
  205    mGeomGroupBox->setEnabled( 
false );
 
  206    mGeomGroupBox->setVisible( 
false );
 
  207    mCrsGroupBox->setEnabled( 
false );
 
  208    mCrsGroupBox->setVisible( 
false );
 
  212  QVBoxLayout *actionLayout = 
new QVBoxLayout( actionOptionsFrame );
 
  213  actionLayout->setContentsMargins( 0, 0, 0, 0 );
 
  215  mActionDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  216  actionLayout->addWidget( mActionDialog );
 
  219  mSourceFieldsPropertiesDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  220  mSourceFieldsFrame->setLayout( 
new QVBoxLayout( mSourceFieldsFrame ) );
 
  221  mSourceFieldsFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  222  mSourceFieldsFrame->layout()->addWidget( mSourceFieldsPropertiesDialog );
 
  227  mAttributesFormPropertiesDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  228  mAttributesFormFrame->setLayout( 
new QVBoxLayout( mAttributesFormFrame ) );
 
  229  mAttributesFormFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  230  mAttributesFormFrame->layout()->addWidget( mAttributesFormPropertiesDialog );
 
  233  QVBoxLayout *metadataLayout = 
new QVBoxLayout( metadataFrame );
 
  234  metadataLayout->setContentsMargins( 0, 0, 0, 0 );
 
  236  mMetadataWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  238  metadataLayout->addWidget( mMetadataWidget );
 
  239  metadataFrame->setLayout( metadataLayout );
 
  241  QVBoxLayout *temporalLayout = 
new QVBoxLayout( temporalFrame );
 
  242  temporalLayout->setContentsMargins( 0, 0, 0, 0 );
 
  244  temporalLayout->addWidget( mTemporalWidget );
 
  248  mBtnMetadata = 
new QPushButton( tr( 
"Metadata" ), 
this );
 
  249  QMenu *menuMetadata = 
new QMenu( 
this );
 
  252  menuMetadata->addSeparator();
 
  256  buttonBox->addButton( 
mBtnMetadata, QDialogButtonBox::ResetRole );
 
  258  mSelectionColorButton->setAllowOpacity( 
true );
 
  259  mSelectionColorButton->setColorDialogTitle( tr( 
"Override Selection Color" ) );
 
  265  connect( mRadioOverrideSelectionColor, &QRadioButton::toggled, mSelectionColorButton, &QWidget::setEnabled );
 
  266  mSelectionColorButton->setEnabled( 
false );
 
  267  connect( mRadioOverrideSelectionSymbol, &QRadioButton::toggled, mSelectionSymbolButton, &QWidget::setEnabled );
 
  284  mSelectionSymbolButton->setEnabled( 
false );
 
  285  mRadioDefaultSelectionColor->setChecked( 
true );
 
  288  QVBoxLayout *diagLayout = 
new QVBoxLayout( mDiagramFrame );
 
  289  diagLayout->setContentsMargins( 0, 0, 0, 0 );
 
  291  diagramPropertiesDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
 
  293  diagLayout->addWidget( diagramPropertiesDialog );
 
  294  mDiagramFrame->setLayout( diagLayout );
 
  304      pbnIndex->setEnabled( 
false );
 
  308      pbnIndex->setEnabled( 
false );
 
  309      pbnIndex->setText( tr( 
"Spatial Index Exists" ) );
 
  316      int encindex = cboProviderEncoding->findText( enc );
 
  319        cboProviderEncoding->insertItem( 0, enc );
 
  322      cboProviderEncoding->setCurrentIndex( encindex );
 
  324    else if ( mLayer->
providerType() == QLatin1String( 
"ogr" ) )
 
  329      cboProviderEncoding->setEnabled( 
false );
 
  334      mDataSourceEncodingFrame->hide();
 
  338  mCrsSelector->setCrs( mLayer->
crs() );
 
  341  const QList<QgsVectorLayerJoinInfo> &joins = mLayer->
vectorJoins();
 
  344    addJoinToTreeWidget( join );
 
  350  mLegendWidget->setMapCanvas( 
mCanvas );
 
  351  mLegendWidget->setLayer( mLayer );
 
  352  mLegendConfigEmbeddedWidget->setLayer( mLayer );
 
  356  const QList<QgsMapLayerServerProperties::WmsDimensionInfo> &wmsDims = serverProperties->
wmsDimensions();
 
  359    addWmsDimensionInfoToTreeWidget( dim );
 
  363  myStyle.append( QStringLiteral( 
"body { margin: 10px; }\n " ) );
 
  364  teMetadataViewer->clear();
 
  365  teMetadataViewer->document()->setDefaultStyleSheet( myStyle );
 
  366  teMetadataViewer->setHtml( htmlMetadata() );
 
  367  teMetadataViewer->setOpenLinks( 
false );
 
  369  mMetadataFilled = 
true;
 
  374  if ( !settings.
contains( QStringLiteral( 
"/Windows/VectorLayerProperties/tab" ) ) )
 
  376    settings.
setValue( QStringLiteral( 
"Windows/VectorLayerProperties/tab" ), 
mOptStackedWidget->indexOf( mOptsPage_Style ) );
 
  379  QList<QgsMapLayer *> dependencySources;
 
  380  const QSet<QgsMapLayerDependency> constDependencies = mLayer->
dependencies();
 
  385      dependencySources << layer;
 
  391  connect( 
QgsProject::instance(), &QObject::destroyed, 
this, [
this] { mLayersDependenciesTreeView->setModel( 
nullptr ); } );
 
  392  mLayersDependenciesTreeView->setModel( mLayersDependenciesTreeModel );
 
  394  mRefreshSettingsWidget->setLayer( mLayer );
 
  395  mMapLayerServerPropertiesWidget->setHasWfsTitle( 
true );
 
  396  mMapLayerServerPropertiesWidget->setServerProperties( mLayer->
serverProperties() );
 
  399  QMenu *menu = 
new QMenu( 
this );
 
  401  mAuxiliaryLayerActionNew = 
new QAction( tr( 
"Create" ), 
this );
 
  402  menu->addAction( mAuxiliaryLayerActionNew );
 
  403  connect( mAuxiliaryLayerActionNew, &QAction::triggered, 
this, &QgsVectorLayerProperties::onAuxiliaryLayerNew );
 
  405  mAuxiliaryLayerActionClear = 
new QAction( tr( 
"Clear" ), 
this );
 
  406  menu->addAction( mAuxiliaryLayerActionClear );
 
  407  connect( mAuxiliaryLayerActionClear, &QAction::triggered, 
this, &QgsVectorLayerProperties::onAuxiliaryLayerClear );
 
  409  mAuxiliaryLayerActionDelete = 
new QAction( tr( 
"Delete" ), 
this );
 
  410  menu->addAction( mAuxiliaryLayerActionDelete );
 
  411  connect( mAuxiliaryLayerActionDelete, &QAction::triggered, 
this, &QgsVectorLayerProperties::onAuxiliaryLayerDelete );
 
  413  mAuxiliaryLayerActionExport = 
new QAction( tr( 
"Export" ), 
this );
 
  414  menu->addAction( mAuxiliaryLayerActionExport );
 
  417  mAuxiliaryStorageActions->setMenu( menu );
 
  419  connect( mAuxiliaryStorageFieldsDeleteBtn, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::onAuxiliaryLayerDeleteField );
 
  420  connect( mAuxiliaryStorageFieldsAddBtn, &QPushButton::clicked, 
this, &QgsVectorLayerProperties::onAuxiliaryLayerAddField );
 
  422  updateAuxiliaryStoragePage();
 
  424  mOptsPage_Information->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#information-properties" ) );
 
  425  mOptsPage_Source->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#source-properties" ) );
 
  426  mOptsPage_Style->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#symbology-properties" ) );
 
  427  mOptsPage_Labels->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#labels-properties" ) );
 
  428  mOptsPage_Masks->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#masks-properties" ) );
 
  429  mOptsPage_Diagrams->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#diagrams-properties" ) );
 
  430  mOptsPage_SourceFields->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#fields-properties" ) );
 
  431  mOptsPage_AttributesForm->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#attributes-form-properties" ) );
 
  432  mOptsPage_Joins->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#joins-properties" ) );
 
  433  mOptsPage_AuxiliaryStorage->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#auxiliary-storage-properties" ) );
 
  434  mOptsPage_Actions->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#actions-properties" ) );
 
  435  mOptsPage_Display->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#display-properties" ) );
 
  436  mOptsPage_Rendering->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#rendering-properties" ) );
 
  437  mOptsPage_Temporal->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#temporal-properties" ) );
 
  438  mOptsPage_Variables->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#variables-properties" ) );
 
  439  mOptsPage_Metadata->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#metadata-properties" ) );
 
  440  mOptsPage_DataDependencies->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#dependencies-properties" ) );
 
  441  mOptsPage_Legend->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#legend-properties" ) );
 
  442  mOptsPage_Server->setProperty( 
"helpPage", QStringLiteral( 
"working_with_vector/vector_properties.html#qgis-server-properties" ) );
 
 
  450void QgsVectorLayerProperties::toggleEditing()
 
  455  emit toggleEditing( mLayer );
 
  457  setPbnQueryBuilderEnabled();
 
  460void QgsVectorLayerProperties::insertField()
 
  464  if ( mMapTipFieldComboBox->currentField().isEmpty() )
 
  466  QString expression = QStringLiteral( 
"[%\"" );
 
  467  expression += mMapTipFieldComboBox->currentField();
 
  468  expression += QLatin1String( 
"\"%]" );
 
  470  mMapTipWidget->insertText( expression );
 
  473void QgsVectorLayerProperties::insertOrEditExpression()
 
  476  int selectionStart = mMapTipWidget->selectionStart();
 
  477  int selectionEnd = mMapTipWidget->selectionEnd();
 
  483  exprDlg.setWindowTitle( tr( 
"Insert Expression" ) );
 
  484  if ( exprDlg.exec() == QDialog::Accepted && !exprDlg.expressionText().trimmed().isEmpty() )
 
  485    mMapTipWidget->insertText( 
"[%" + exprDlg.expressionText().trimmed() + 
"%]" );
 
  487    mMapTipWidget->setLinearSelection( selectionStart, selectionEnd );
 
  492  if ( !mSourceWidget )
 
  497      QHBoxLayout *layout = 
new QHBoxLayout();
 
  498      layout->addWidget( mSourceWidget );
 
  499      mSourceGroupBox->setLayout( layout );
 
  501        mSourceGroupBox->setTitle( mSourceWidget->
groupTitle() );
 
  503      mSourceGroupBox->show();
 
  506        buttonBox->button( QDialogButtonBox::Apply )->setEnabled( isValid );
 
  507        buttonBox->button( QDialogButtonBox::Ok )->setEnabled( isValid );
 
  519  mLayerOrigNameLineEdit->setText( mLayer->
name() );
 
  520  mBackupCrs = mLayer->
crs();
 
  523  mSubsetGroupBox->setEnabled( 
true );
 
  530  txtSubsetSQL->setReadOnly( 
true );
 
  531  txtSubsetSQL->setCaretWidth( 0 );
 
  532  txtSubsetSQL->setCaretLineVisible( 
false );
 
  533  setPbnQueryBuilderEnabled();
 
  537    mSubsetGroupBox->hide();
 
  547  mScaleRangeWidget->setMapCanvas( 
mCanvas );
 
  550  mReferenceScaleWidget->setShowCurrentScaleButton( 
true );
 
  551  mReferenceScaleWidget->setMapCanvas( 
mCanvas );
 
  552  if ( mUseReferenceScaleGroupBox->isChecked() )
 
  560  mSimplifyDrawingSpinBox->setValue( simplifyMethod.
threshold() );
 
  561  mSimplifyDrawingSpinBox->setClearValue( 1.0 );
 
  566    mSelectionColorButton->setColor( selectionProperties->
selectionColor() );
 
  570    mSelectionSymbolButton->setSymbol( symbol->clone() );
 
  575      mRadioDefaultSelectionColor->setChecked( 
true );
 
  582        mRadioOverrideSelectionColor->setChecked( 
true );
 
  586        mRadioDefaultSelectionColor->setChecked( 
true );
 
  594        mRadioOverrideSelectionSymbol->setChecked( 
true );
 
  598        mRadioDefaultSelectionColor->setChecked( 
true );
 
  603  QString remark = QStringLiteral( 
" (%1)" ).arg( tr( 
"Not supported" ) );
 
  607    mSimplifyDrawingAtProvider->setChecked( 
false );
 
  608    mSimplifyDrawingAtProvider->setEnabled( 
false );
 
  609    if ( !mSimplifyDrawingAtProvider->text().endsWith( remark ) )
 
  610      mSimplifyDrawingAtProvider->setText( mSimplifyDrawingAtProvider->text().append( remark ) );
 
  615    mSimplifyDrawingAtProvider->setEnabled( mSimplifyDrawingGroupBox->isChecked() );
 
  616    if ( mSimplifyDrawingAtProvider->text().endsWith( remark ) )
 
  618      QString newText = mSimplifyDrawingAtProvider->text();
 
  619      newText.chop( remark.size() );
 
  620      mSimplifyDrawingAtProvider->setText( newText );
 
  627    mSimplifyDrawingGroupBox->setChecked( 
false );
 
  628    mSimplifyDrawingGroupBox->setEnabled( 
false );
 
  635  mSimplifyAlgorithmComboBox->setCurrentIndex( mSimplifyAlgorithmComboBox->findData( QVariant::fromValue( simplifyMethod.
simplifyAlgorithm() ) ) );
 
  638  myScalesList.append( QStringLiteral( 
"1:1" ) );
 
  639  mSimplifyMaximumScaleComboBox->updateScales( myScalesList );
 
  640  mSimplifyMaximumScaleComboBox->setScale( simplifyMethod.
maximumScale() );
 
  644  mRefreshSettingsWidget->syncToLayer();
 
  645  mMapLayerServerPropertiesWidget->sync();
 
  653  updateSymbologyPage();
 
  657  if ( labelingDialog )
 
  660  mSourceFieldsPropertiesDialog->
init();
 
  661  mAttributesFormPropertiesDialog->
init();
 
  664  updateVariableEditor();
 
  666  if ( diagramPropertiesDialog )
 
  672    page->syncToLayer( mLayer );
 
  679  mLegendWidget->setLayer( mLayer );
 
 
  684  if ( labelingDialog )
 
  688  mBackupCrs = mLayer->
crs();
 
  690  mLegendWidget->applyToLayer();
 
  691  mLegendConfigEmbeddedWidget->applyToLayer();
 
  695  mMetadataFilled = 
false;
 
  698  if ( mMaskingWidget )
 
  699    mMaskingWidget->apply();
 
  720  const auto constActions = mActionDialog->
actions();
 
  721  for ( 
const QgsAction &action : constActions )
 
  728  QVector<QgsAttributeTableConfig::ColumnConfig> columns = attributeTableConfig.
columns();
 
  730  for ( 
int i = 0; i < columns.size(); ++i )
 
  742  mLayer->
setName( mLayerOrigNameLineEdit->text() );
 
  744  mAttributesFormPropertiesDialog->
apply();
 
  745  mSourceFieldsPropertiesDialog->
apply();
 
  757  diagramPropertiesDialog->
apply();
 
  765  if ( mMapLayerServerPropertiesWidget->save() )
 
  766    mMetadataFilled = 
false;
 
  770  if ( mSimplifyDrawingGroupBox->isChecked() )
 
  773    if ( mSimplifyDrawingSpinBox->value() > 1 )
 
  779  simplifyMethod.
setThreshold( mSimplifyDrawingSpinBox->value() );
 
  781  simplifyMethod.
setMaximumScale( mSimplifyMaximumScaleComboBox->scale() );
 
  791  if ( mSelectionColorButton->color() != mSelectionColorButton->defaultColor() )
 
  795  if ( 
QgsSymbol *symbol = mSelectionSymbolButton->symbol() )
 
  798  if ( mRadioOverrideSelectionSymbol->isChecked() )
 
  802  else if ( mRadioOverrideSelectionColor->isChecked() )
 
  811  mRefreshSettingsWidget->saveToLayer();
 
  814  mLayer->
setRefreshOnNofifyMessage( mNotificationMessageCheckBox->isChecked() ? mNotifyMessageValueLineEdit->text() : QString() );
 
  820  updateVariableEditor();
 
  823  QSet<QgsMapLayerDependency> deps;
 
  824  const auto checkedLayers = mLayersDependenciesTreeModel->
checkedLayers();
 
  829    QMessageBox::warning( 
nullptr, tr( 
"Save Dependency" ), tr( 
"This configuration introduces a cycle in data dependencies and will be ignored." ) );
 
  838  bool dialogNeedsResync = 
false;
 
  841    const QString newSource = mSourceWidget->
sourceUri();
 
  842    if ( newSource != mLayer->
source() )
 
  849      dialogNeedsResync = 
true;
 
  855  mSubsetGroupBox->setEnabled( 
true );
 
  860    mMetadataFilled = 
false;
 
  862    dialogNeedsResync = 
true;
 
  866  if ( dialogNeedsResync )
 
  871  mProjectDirtyBlocker.reset();
 
 
  883    const auto constVectorJoins = mLayer->
vectorJoins();
 
  905  if ( backupCrs != mLayer->
crs() )
 
  906    mLayer->
setCrs( backupCrs );
 
 
  909void QgsVectorLayerProperties::pbnQueryBuilder_clicked()
 
  918  if ( dialog->exec() )
 
  931void QgsVectorLayerProperties::pbnIndex_clicked()
 
  936    setCursor( Qt::WaitCursor );
 
  938    setCursor( Qt::ArrowCursor );
 
  941      pbnIndex->setEnabled( 
false );
 
  942      pbnIndex->setText( tr( 
"Spatial Index Exists" ) );
 
  943      QMessageBox::information( 
this, tr( 
"Spatial Index" ), tr( 
"Creation of spatial index successful" ) );
 
  947      QMessageBox::warning( 
this, tr( 
"Spatial Index" ), tr( 
"Creation of spatial index failed" ) );
 
  952QString QgsVectorLayerProperties::htmlMetadata()
 
  961  mMetadataFilled = 
false;
 
  965void QgsVectorLayerProperties::saveMultipleStylesAs()
 
  968  dlg.setSaveOnlyCurrentStyle( 
false );
 
  977    const QListWidget *stylesWidget { dlg.stylesWidget() };
 
  980    QStringList stylesSelected;
 
  981    for ( 
int i = 0; i < stylesWidget->count(); i++ )
 
  983      if ( stylesWidget->item( i )->checkState() == Qt::CheckState::Checked )
 
  985        stylesSelected.push_back( stylesWidget->item( i )->text() );
 
  989    if ( !stylesSelected.isEmpty() )
 
  992      for ( 
const QString &styleName : std::as_const( stylesSelected ) )
 
  994        bool defaultLoadedFlag = 
false;
 
 1004            const QString filePath { dlg.outputFilePath() };
 
 1005            const QFileInfo fi { filePath };
 
 1007            if ( styleIndex > 0 && stylesSelected.count() > 1 )
 
 1010              while ( QFile::exists( safePath ) )
 
 1012                const QFileInfo fi { safePath };
 
 1013                safePath = QString( safePath ).replace( 
'.' + fi.completeSuffix(), QStringLiteral( 
"_%1.%2" ).arg( QString::number( i ), fi.completeSuffix() ) );
 
 1018              message = mLayer->
saveNamedStyle( safePath, defaultLoadedFlag, dlg.styleCategories() );
 
 1020              message = mLayer->
saveSldStyle( safePath, defaultLoadedFlag );
 
 1023            if ( defaultLoadedFlag )
 
 1030              QMessageBox::information( 
this, tr( 
"Save Style" ), message );
 
 1037            QString infoWindowTitle = QObject::tr( 
"Save style '%1' to DB (%2)" )
 
 1044            QString name { dbSettings.
name };
 
 1045            if ( name.isEmpty() )
 
 1051              name += QStringLiteral( 
"_%1" ).arg( styleName );
 
 1052              QStringList ids, names, descriptions;
 
 1055              while ( names.contains( name ) )
 
 1057                name = QStringLiteral( 
"%1 %2" ).arg( name, QString::number( i ) );
 
 1062            QString errorMessage;
 
 1065              if ( QMessageBox::question( 
nullptr, QObject::tr( 
"Save style in database" ), QObject::tr( 
"A matching style already exists in the database for this layer. Do you want to overwrite it?" ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::No )
 
 1070            else if ( !errorMessage.isEmpty() )
 
 1072              QMessageBox::warning( 
this, infoWindowTitle, errorMessage );
 
 1078            if ( !msgError.isNull() )
 
 1080              QMessageBox::warning( 
this, infoWindowTitle, msgError );
 
 1084              QMessageBox::information( 
this, infoWindowTitle, tr( 
"Style '%1' saved" ).arg( styleName ) );
 
 1099void QgsVectorLayerProperties::aboutToShowStyleMenu()
 
 1102  QMenu *m = qobject_cast<QMenu *>( sender() );
 
 1105  m->addAction( mActionLoadStyle );
 
 1106  m->addAction( mActionSaveStyle );
 
 1111    mActionSaveStyle->setText( tr( 
"Save Current Style…" ) );
 
 1112    m->addAction( mActionSaveMultipleStyles );
 
 1116    mActionSaveStyle->setText( tr( 
"Save Style…" ) );
 
 1128void QgsVectorLayerProperties::mButtonAddJoin_clicked()
 
 1133  QList<QgsMapLayer *> joinedLayers;
 
 1134  const QList<QgsVectorLayerJoinInfo> &joins = mLayer->
vectorJoins();
 
 1135  joinedLayers.reserve( joins.size() );
 
 1136  for ( 
int i = 0; i < joins.size(); ++i )
 
 1138    joinedLayers.append( joins[i].joinLayer() );
 
 1142  if ( d.exec() == QDialog::Accepted )
 
 1146    if ( d.createAttributeIndex() )
 
 1155    addJoinToTreeWidget( info );
 
 1156    setPbnQueryBuilderEnabled();
 
 1157    mSourceFieldsPropertiesDialog->
init();
 
 1158    mAttributesFormPropertiesDialog->
init();
 
 1162void QgsVectorLayerProperties::mButtonEditJoin_clicked()
 
 1164  QTreeWidgetItem *currentJoinItem = mJoinTreeWidget->currentItem();
 
 1165  mJoinTreeWidget_itemDoubleClicked( currentJoinItem, 0 );
 
 1168void QgsVectorLayerProperties::mJoinTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, 
int )
 
 1170  if ( !mLayer || !item )
 
 1176  QTreeWidgetItem *currentJoinItem = item;
 
 1177  if ( item->parent() )
 
 1179    currentJoinItem = item->parent();
 
 1183  QList<QgsMapLayer *> joinedLayers;
 
 1184  QString joinLayerId = currentJoinItem->data( 0, Qt::UserRole ).toString();
 
 1185  const QList<QgsVectorLayerJoinInfo> &joins = mLayer->
vectorJoins();
 
 1187  for ( 
int i = 0; i < joins.size(); ++i )
 
 1193    if ( joinLayer->
id() == joinLayerId )
 
 1200      joinedLayers.append( joinLayer );
 
 1209  d.setWindowTitle( tr( 
"Edit Vector Join" ) );
 
 1210  d.setJoinInfo( joins[j] );
 
 1212  if ( d.exec() == QDialog::Accepted )
 
 1218    int idx = mJoinTreeWidget->indexOfTopLevelItem( item );
 
 1219    mJoinTreeWidget->takeTopLevelItem( idx );
 
 1224    if ( d.createAttributeIndex() )
 
 1233    addJoinToTreeWidget( info, idx );
 
 1235    setPbnQueryBuilderEnabled();
 
 1236    mSourceFieldsPropertiesDialog->
init();
 
 1237    mAttributesFormPropertiesDialog->
init();
 
 1241void QgsVectorLayerProperties::addJoinToTreeWidget( 
const QgsVectorLayerJoinInfo &join, 
const int insertIndex )
 
 1243  QTreeWidgetItem *joinItem = 
new QTreeWidgetItem();
 
 1244  joinItem->setFlags( Qt::ItemIsEnabled );
 
 1247  if ( !mLayer || !joinLayer )
 
 1252  joinItem->setText( 0, tr( 
"Join layer" ) );
 
 1258  joinItem->setText( 1, joinLayer->
name() );
 
 1260  QFont f = joinItem->font( 0 );
 
 1262  joinItem->setFont( 0, f );
 
 1263  joinItem->setFont( 1, f );
 
 1265  joinItem->setData( 0, Qt::UserRole, join.
joinLayerId() );
 
 1267  QTreeWidgetItem *childJoinField = 
new QTreeWidgetItem();
 
 1268  childJoinField->setText( 0, tr( 
"Join field" ) );
 
 1270  childJoinField->setFlags( Qt::ItemIsEnabled );
 
 1271  joinItem->addChild( childJoinField );
 
 1273  QTreeWidgetItem *childTargetField = 
new QTreeWidgetItem();
 
 1274  childTargetField->setText( 0, tr( 
"Target field" ) );
 
 1276  joinItem->addChild( childTargetField );
 
 1278  QTreeWidgetItem *childMemCache = 
new QTreeWidgetItem();
 
 1279  childMemCache->setText( 0, tr( 
"Cache join layer in virtual memory" ) );
 
 1281    childMemCache->setText( 1, QChar( 0x2714 ) );
 
 1282  joinItem->addChild( childMemCache );
 
 1284  QTreeWidgetItem *childDynForm = 
new QTreeWidgetItem();
 
 1285  childDynForm->setText( 0, tr( 
"Dynamic form" ) );
 
 1287    childDynForm->setText( 1, QChar( 0x2714 ) );
 
 1288  joinItem->addChild( childDynForm );
 
 1290  QTreeWidgetItem *childEditable = 
new QTreeWidgetItem();
 
 1291  childEditable->setText( 0, tr( 
"Editable join layer" ) );
 
 1293    childEditable->setText( 1, QChar( 0x2714 ) );
 
 1294  joinItem->addChild( childEditable );
 
 1296  QTreeWidgetItem *childUpsert = 
new QTreeWidgetItem();
 
 1297  childUpsert->setText( 0, tr( 
"Upsert on edit" ) );
 
 1299    childUpsert->setText( 1, QChar( 0x2714 ) );
 
 1300  joinItem->addChild( childUpsert );
 
 1302  QTreeWidgetItem *childCascade = 
new QTreeWidgetItem();
 
 1303  childCascade->setText( 0, tr( 
"Delete cascade" ) );
 
 1305    childCascade->setText( 1, QChar( 0x2714 ) );
 
 1306  joinItem->addChild( childCascade );
 
 1308  QTreeWidgetItem *childPrefix = 
new QTreeWidgetItem();
 
 1309  childPrefix->setText( 0, tr( 
"Custom field name prefix" ) );
 
 1310  childPrefix->setText( 1, join.
prefix() );
 
 1311  joinItem->addChild( childPrefix );
 
 1313  QTreeWidgetItem *childFields = 
new QTreeWidgetItem();
 
 1314  childFields->setText( 0, tr( 
"Joined fields" ) );
 
 1317    childFields->setText( 1, QLocale().toString( list->count() ) );
 
 1319    childFields->setText( 1, tr( 
"all" ) );
 
 1320  joinItem->addChild( childFields );
 
 1322  if ( insertIndex >= 0 )
 
 1323    mJoinTreeWidget->insertTopLevelItem( insertIndex, joinItem );
 
 1325    mJoinTreeWidget->addTopLevelItem( joinItem );
 
 1327  mJoinTreeWidget->setCurrentItem( joinItem );
 
 1328  mJoinTreeWidget->header()->setSectionResizeMode( QHeaderView::ResizeToContents );
 
 1338  QDialog *dlg = 
new QDialog();
 
 1339  QString key = QStringLiteral( 
"/UI/paneldialog/%1" ).arg( panel->
panelTitle() );
 
 1341  dlg->restoreGeometry( settings.
value( key ).toByteArray() );
 
 1343  dlg->setLayout( 
new QVBoxLayout() );
 
 1344  dlg->layout()->addWidget( panel );
 
 1345  QDialogButtonBox *buttonBox = 
new QDialogButtonBox( QDialogButtonBox::Ok );
 
 1346  connect( buttonBox, &QDialogButtonBox::accepted, dlg, &QDialog::accept );
 
 1347  dlg->layout()->addWidget( buttonBox );
 
 1349  settings.
setValue( key, dlg->saveGeometry() );
 
 1353void QgsVectorLayerProperties::mButtonRemoveJoin_clicked()
 
 1355  QTreeWidgetItem *currentJoinItem = mJoinTreeWidget->currentItem();
 
 1357  if ( currentJoinItem && currentJoinItem->parent() )
 
 1359    currentJoinItem = currentJoinItem->parent();
 
 1362  if ( !mLayer || !currentJoinItem )
 
 1367  mLayer->
removeJoin( currentJoinItem->data( 0, Qt::UserRole ).toString() );
 
 1368  mJoinTreeWidget->takeTopLevelItem( mJoinTreeWidget->indexOfTopLevelItem( currentJoinItem ) );
 
 1369  setPbnQueryBuilderEnabled();
 
 1370  mSourceFieldsPropertiesDialog->
init();
 
 1371  mAttributesFormPropertiesDialog->
init();
 
 1375void QgsVectorLayerProperties::mButtonAddWmsDimension_clicked()
 
 1381  QStringList alreadyDefinedDimensions;
 
 1383  const QList<QgsMapLayerServerProperties::WmsDimensionInfo> &dims = serverProperties->
wmsDimensions();
 
 1386    alreadyDefinedDimensions << dim.name;
 
 1390  if ( d.exec() == QDialog::Accepted )
 
 1395    addWmsDimensionInfoToTreeWidget( info );
 
 1399void QgsVectorLayerProperties::mButtonEditWmsDimension_clicked()
 
 1401  QTreeWidgetItem *currentWmsDimensionItem = mWmsDimensionsTreeWidget->currentItem();
 
 1402  mWmsDimensionsTreeWidget_itemDoubleClicked( currentWmsDimensionItem, 0 );
 
 1405void QgsVectorLayerProperties::mWmsDimensionsTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, 
int )
 
 1407  if ( !mLayer || !item )
 
 1412  QString wmsDimName = item->data( 0, Qt::UserRole ).toString();
 
 1414  const QList<QgsMapLayerServerProperties::WmsDimensionInfo> &dims = serverProperties->
wmsDimensions();
 
 1415  QStringList alreadyDefinedDimensions;
 
 1417  for ( 
int i = 0; i < dims.size(); ++i )
 
 1419    QString dimName = dims[i].name;
 
 1420    if ( dimName == wmsDimName )
 
 1426      alreadyDefinedDimensions << dimName;
 
 1435  d.setWindowTitle( tr( 
"Edit WMS Dimension" ) );
 
 1436  d.setInfo( dims[j] );
 
 1438  if ( d.exec() == QDialog::Accepted )
 
 1445    int idx = mWmsDimensionsTreeWidget->indexOfTopLevelItem( item );
 
 1446    mWmsDimensionsTreeWidget->takeTopLevelItem( idx );
 
 1450    addWmsDimensionInfoToTreeWidget( info, idx );
 
 1456  QTreeWidgetItem *wmsDimensionItem = 
new QTreeWidgetItem();
 
 1457  wmsDimensionItem->setFlags( Qt::ItemIsEnabled );
 
 1459  wmsDimensionItem->setText( 0, tr( 
"Dimension" ) );
 
 1460  wmsDimensionItem->setText( 1, wmsDim.
name );
 
 1462  QFont f = wmsDimensionItem->font( 0 );
 
 1464  wmsDimensionItem->setFont( 0, f );
 
 1465  wmsDimensionItem->setFont( 1, f );
 
 1467  wmsDimensionItem->setData( 0, Qt::UserRole, wmsDim.
name );
 
 1469  QTreeWidgetItem *childWmsDimensionField = 
new QTreeWidgetItem();
 
 1470  childWmsDimensionField->setText( 0, tr( 
"Field" ) );
 
 1471  childWmsDimensionField->setText( 1, wmsDim.
fieldName );
 
 1472  childWmsDimensionField->setFlags( Qt::ItemIsEnabled );
 
 1473  wmsDimensionItem->addChild( childWmsDimensionField );
 
 1475  QTreeWidgetItem *childWmsDimensionEndField = 
new QTreeWidgetItem();
 
 1476  childWmsDimensionEndField->setText( 0, tr( 
"End field" ) );
 
 1477  childWmsDimensionEndField->setText( 1, wmsDim.
endFieldName );
 
 1478  childWmsDimensionEndField->setFlags( Qt::ItemIsEnabled );
 
 1479  wmsDimensionItem->addChild( childWmsDimensionEndField );
 
 1481  QTreeWidgetItem *childWmsDimensionUnits = 
new QTreeWidgetItem();
 
 1482  childWmsDimensionUnits->setText( 0, tr( 
"Units" ) );
 
 1483  childWmsDimensionUnits->setText( 1, wmsDim.
units );
 
 1484  childWmsDimensionUnits->setFlags( Qt::ItemIsEnabled );
 
 1485  wmsDimensionItem->addChild( childWmsDimensionUnits );
 
 1487  QTreeWidgetItem *childWmsDimensionUnitSymbol = 
new QTreeWidgetItem();
 
 1488  childWmsDimensionUnitSymbol->setText( 0, tr( 
"Unit symbol" ) );
 
 1489  childWmsDimensionUnitSymbol->setText( 1, wmsDim.
unitSymbol );
 
 1490  childWmsDimensionUnitSymbol->setFlags( Qt::ItemIsEnabled );
 
 1491  wmsDimensionItem->addChild( childWmsDimensionUnitSymbol );
 
 1493  QTreeWidgetItem *childWmsDimensionDefaultValue = 
new QTreeWidgetItem();
 
 1494  childWmsDimensionDefaultValue->setText( 0, tr( 
"Default display" ) );
 
 1496  childWmsDimensionDefaultValue->setFlags( Qt::ItemIsEnabled );
 
 1497  wmsDimensionItem->addChild( childWmsDimensionDefaultValue );
 
 1499  QTreeWidgetItem *childWmsDimensionRefValue = 
new QTreeWidgetItem();
 
 1500  childWmsDimensionRefValue->setText( 0, tr( 
"Reference value" ) );
 
 1501  childWmsDimensionRefValue->setText( 1, wmsDim.
referenceValue.toString() );
 
 1502  childWmsDimensionRefValue->setFlags( Qt::ItemIsEnabled );
 
 1503  wmsDimensionItem->addChild( childWmsDimensionRefValue );
 
 1505  if ( insertIndex >= 0 )
 
 1506    mWmsDimensionsTreeWidget->insertTopLevelItem( insertIndex, wmsDimensionItem );
 
 1508    mWmsDimensionsTreeWidget->addTopLevelItem( wmsDimensionItem );
 
 1510  mWmsDimensionsTreeWidget->setCurrentItem( wmsDimensionItem );
 
 1511  mWmsDimensionsTreeWidget->header()->setSectionResizeMode( QHeaderView::ResizeToContents );
 
 1514void QgsVectorLayerProperties::mButtonRemoveWmsDimension_clicked()
 
 1516  QTreeWidgetItem *currentWmsDimensionItem = mWmsDimensionsTreeWidget->currentItem();
 
 1517  if ( !mLayer || !currentWmsDimensionItem )
 
 1523  serverProperties->
removeWmsDimension( currentWmsDimensionItem->data( 0, Qt::UserRole ).toString() );
 
 1524  mWmsDimensionsTreeWidget->takeTopLevelItem( mWmsDimensionsTreeWidget->indexOfTopLevelItem( currentWmsDimensionItem ) );
 
 1528void QgsVectorLayerProperties::updateSymbologyPage()
 
 1531  delete mRendererDialog;
 
 1532  mRendererDialog = 
nullptr;
 
 1548    mOptsPage_Style->setEnabled( 
false ); 
 
 1551  if ( mRendererDialog )
 
 1553    mRendererDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
 
 1554    widgetStackRenderers->addWidget( mRendererDialog );
 
 1555    widgetStackRenderers->setCurrentWidget( mRendererDialog );
 
 1556    widgetStackRenderers->currentWidget()->layout()->setContentsMargins( 0, 0, 0, 0 );
 
 1560void QgsVectorLayerProperties::setPbnQueryBuilderEnabled()
 
 1566    pbnQueryBuilder->setToolTip( tr( 
"Stop editing mode to enable this." ) );
 
 1570void QgsVectorLayerProperties::pbnUpdateExtents_clicked()
 
 1573  mMetadataFilled = 
false;
 
 1580  if ( index == 
mOptStackedWidget->indexOf( mOptsPage_Information ) && !mMetadataFilled )
 
 1583    teMetadataViewer->clear();
 
 1584    teMetadataViewer->setHtml( htmlMetadata() );
 
 1585    mMetadataFilled = 
true;
 
 1590    mAttributesFormPropertiesDialog->
store();
 
 1595    if ( mActionDialog )
 
 
 1604void QgsVectorLayerProperties::mSimplifyDrawingGroupBox_toggled( 
bool checked )
 
 1609    mSimplifyDrawingAtProvider->setEnabled( 
false );
 
 1613    mSimplifyDrawingAtProvider->setEnabled( checked );
 
 1617void QgsVectorLayerProperties::updateVariableEditor()
 
 1620  mVariableEditor->setContext( &context );
 
 1624  mVariableEditor->reloadContext();
 
 1625  mVariableEditor->setEditableScopeIndex( 2 );
 
 1628void QgsVectorLayerProperties::showHelp()
 
 1630  const QVariant helpPage = mOptionsStackedWidget->currentWidget()->property( 
"helpPage" );
 
 1632  if ( helpPage.isValid() )
 
 1638    QgsHelp::openHelp( QStringLiteral( 
"working_with_vector/vector_properties.html" ) );
 
 1642void QgsVectorLayerProperties::updateAuxiliaryStoragePage()
 
 1649    mAuxiliaryStorageInformationGrpBox->setEnabled( 
true );
 
 1650    mAuxiliaryStorageFieldsGrpBox->setEnabled( 
true );
 
 1657    mAuxiliaryStorageFeaturesLineEdit->setText( QLocale().toString( features ) );
 
 1660    mAuxiliaryLayerActionClear->setEnabled( 
true );
 
 1661    mAuxiliaryLayerActionDelete->setEnabled( 
true );
 
 1662    mAuxiliaryLayerActionExport->setEnabled( 
true );
 
 1663    mAuxiliaryLayerActionNew->setEnabled( 
false );
 
 1669      mAuxiliaryStorageFieldsLineEdit->setText( QLocale().toString( fields ) );
 
 1672      mAuxiliaryStorageFieldsTree->clear();
 
 1673      for ( 
const QgsField &field : alayer->auxiliaryFields() )
 
 1676        QTreeWidgetItem *item = 
new QTreeWidgetItem();
 
 1678        item->setText( 0, prop.
origin() );
 
 1679        item->setText( 1, prop.
name() );
 
 1680        item->setText( 2, prop.
comment() );
 
 1681        item->setText( 3, field.typeName() );
 
 1682        item->setText( 4, field.name() );
 
 1684        mAuxiliaryStorageFieldsTree->addTopLevelItem( item );
 
 1690    mAuxiliaryStorageInformationGrpBox->setEnabled( 
false );
 
 1691    mAuxiliaryStorageFieldsGrpBox->setEnabled( 
false );
 
 1693    mAuxiliaryLayerActionClear->setEnabled( 
false );
 
 1694    mAuxiliaryLayerActionDelete->setEnabled( 
false );
 
 1695    mAuxiliaryLayerActionExport->setEnabled( 
false );
 
 1696    mAuxiliaryLayerActionNew->setEnabled( 
true );
 
 1698    mAuxiliaryStorageFieldsTree->clear();
 
 1699    mAuxiliaryStorageKeyLineEdit->setText( QString() );
 
 1700    mAuxiliaryStorageFieldsLineEdit->setText( QString() );
 
 1701    mAuxiliaryStorageFeaturesLineEdit->setText( QString() );
 
 1705void QgsVectorLayerProperties::onAuxiliaryLayerNew()
 
 1713  if ( dlg.exec() == QDialog::Accepted )
 
 1715    updateAuxiliaryStoragePage();
 
 1719void QgsVectorLayerProperties::onAuxiliaryLayerClear()
 
 1726  const QString msg = tr( 
"Are you sure you want to clear auxiliary data for %1?" ).arg( mLayer->
name() );
 
 1727  QMessageBox::StandardButton reply;
 
 1728  reply = QMessageBox::question( 
this, 
"Clear Auxiliary Data", msg, QMessageBox::Yes | QMessageBox::No );
 
 1730  if ( reply == QMessageBox::Yes )
 
 1732    QApplication::setOverrideCursor( Qt::WaitCursor );
 
 1734    QApplication::restoreOverrideCursor();
 
 1735    updateAuxiliaryStoragePage();
 
 1740void QgsVectorLayerProperties::onAuxiliaryLayerDelete()
 
 1746  const QString msg = tr( 
"Are you sure you want to delete auxiliary storage for %1?" ).arg( mLayer->
name() );
 
 1747  QMessageBox::StandardButton reply;
 
 1748  reply = QMessageBox::question( 
this, 
"Delete Auxiliary Storage", msg, QMessageBox::Yes | QMessageBox::No );
 
 1750  if ( reply == QMessageBox::Yes )
 
 1752    QApplication::setOverrideCursor( Qt::WaitCursor );
 
 1765    QApplication::restoreOverrideCursor();
 
 1766    updateAuxiliaryStoragePage();
 
 1771void QgsVectorLayerProperties::onAuxiliaryLayerDeleteField()
 
 1777  QList<QTreeWidgetItem *> items = mAuxiliaryStorageFieldsTree->selectedItems();
 
 1778  if ( items.count() < 1 )
 
 1782  const QTreeWidgetItem *item = items[0];
 
 1785  def.
setName( item->text( 1 ) );
 
 1795  const QString msg = tr( 
"Are you sure you want to delete auxiliary field %1 for %2?" ).arg( item->text( 1 ), item->text( 0 ) );
 
 1797  QMessageBox::StandardButton reply;
 
 1798  const QString title = QObject::tr( 
"Delete Auxiliary Field" );
 
 1799  reply = QMessageBox::question( 
this, title, msg, QMessageBox::Yes | QMessageBox::No );
 
 1801  if ( reply == QMessageBox::Yes )
 
 1803    QApplication::setOverrideCursor( Qt::WaitCursor );
 
 1804    deleteAuxiliaryField( index );
 
 1806    QApplication::restoreOverrideCursor();
 
 1810void QgsVectorLayerProperties::onAuxiliaryLayerAddField()
 
 1817  if ( dlg.exec() == QDialog::Accepted )
 
 1819    updateAuxiliaryStoragePage();
 
 1823void QgsVectorLayerProperties::deleteAuxiliaryField( 
int index )
 
 1836    if ( key >= 0 && def.
origin().compare( 
"labeling", Qt::CaseInsensitive ) == 0
 
 1843    updateAuxiliaryStoragePage();
 
 1844    mSourceFieldsPropertiesDialog->
init();
 
 1848    const QString title = QObject::tr( 
"Delete Auxiliary Field" );
 
 1850    const QString msg = QObject::tr( 
"Unable to remove auxiliary field (%1)" ).arg( errors );
 
 1858  if ( obj == mMapTipPreviewContainer && ev->type() == QEvent::Resize )
 
 1862  return QgsOptionsDialogBase::eventFilter( obj, ev );
 
 
 1865void QgsVectorLayerProperties::initMapTipPreview()
 
 1868  mMapTipSplitter->setSizes( { 400, 200 } );
 
 1870  mMapTipPreviewContainer->installEventFilter( 
this );
 
 1874  mMapTipPreview = 
new QgsWebView( mMapTipPreviewContainer );
 
 1877  mMapTipPreview->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks ); 
 
 1878  mMapTipPreview->setContextMenuPolicy( Qt::NoContextMenu );                     
 
 1879  connect( mMapTipPreview, &QWebView::loadFinished, 
this, &QgsVectorLayerProperties::resizeMapTip );
 
 1882  mMapTipPreview->page()->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, 
true );
 
 1883  mMapTipPreview->page()->settings()->setAttribute( QWebSettings::JavascriptEnabled, 
true );
 
 1884  mMapTipPreview->page()->settings()->setAttribute( QWebSettings::LocalStorageEnabled, 
true );
 
 1887  mMapTipPreview->page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
 
 1888  mMapTipPreview->page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff );
 
 1891  connect( mMapTipWidget, &QgsCodeEditorHTML::textChanged, 
this, &QgsVectorLayerProperties::updateMapTipPreview );
 
 1895void QgsVectorLayerProperties::updateMapTipPreview()
 
 1897  mMapTipPreview->setMaximumSize( mMapTipPreviewContainer->width(), mMapTipPreviewContainer->height() );
 
 1899  mMapTipPreview->setHtml( htmlContent );
 
 1902void QgsVectorLayerProperties::resizeMapTip()
 
 1905  mMapTipPreview->setMaximumSize( mMapTipPreviewContainer->width(), mMapTipPreviewContainer->height() );
 
 1908  const QWebElement container = mMapTipPreview->page()->mainFrame()->findFirstElement(
 
 1909    QStringLiteral( 
"#QgsWebViewContainer" )
 
 1911  const int width = container.geometry().width();
 
 1912  const int height = container.geometry().height();
 
 1913  mMapTipPreview->resize( width, height );
 
 1916  mMapTipPreview->move( ( mMapTipPreviewContainer->width() - mMapTipPreview->width() ) / 2, ( mMapTipPreviewContainer->height() - mMapTipPreview->height() ) / 2 );
 
 1919  mMapTipPreview->adjustSize();
 
@ SimplifyGeometries
Supports simplification of geometries on provider side according to a distance tolerance.
 
@ SelectEncoding
Allows user to select encoding.
 
@ CreateSpatialIndex
Allows creation of spatial index.
 
QFlags< VectorRenderingSimplificationFlag > VectorRenderingSimplificationFlags
Simplification flags for vector feature rendering.
 
@ Present
A valid spatial index exists for the source.
 
@ AntialiasingSimplification
The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size'.
 
@ NoSimplification
No simplification can be applied.
 
@ GeometrySimplification
The geometries can be simplified using the current map2pixel context state.
 
VectorSimplificationAlgorithm
Simplification algorithms for vector features.
 
@ Distance
The simplification uses the distance between points to remove duplicate points.
 
@ SnapToGrid
The simplification uses a grid (similar to ST_SnapToGrid) to remove duplicate points.
 
@ Visvalingam
The simplification gives each point in a line an importance weighting, so that least important points...
 
@ Warning
Warning message.
 
static QString defaultProjectScales()
A string with default project scales.
 
QFlags< DataProviderReadFlag > DataProviderReadFlags
Flags which control data provider construction.
 
QFlags< VectorProviderCapability > VectorProviderCapabilities
Vector data provider capabilities.
 
@ CustomColor
Use default symbol with a custom selection color.
 
@ CustomSymbol
Use a custom symbol.
 
@ Default
Use default symbol and selection colors.
 
void clearActions()
Removes all actions.
 
QUuid addAction(Qgis::AttributeActionType type, const QString &name, const QString &command, bool capture=false)
Add an action with the given name and action details.
 
Utility class that encapsulates an action based on vector attributes.
 
static QString reportStyleSheet(QgsApplication::StyleSheetType styleSheetType=QgsApplication::StyleSheetType::Qt)
Returns a css style sheet for reports, the styleSheetType argument determines what type of stylesheet...
 
A dialog for configuring vector layer actions.
 
void init(const QgsActionManager &action, const QgsAttributeTableConfig &attributeTableConfig)
 
bool showWidgetInAttributeTable() const
 
QList< QgsAction > actions() const
 
QgsAttributeTableConfig::ActionWidgetStyle attributeTableWidgetStyle() const
 
A container for configuration of the attribute table.
 
@ Action
This column represents an action widget.
 
QVector< QgsAttributeTableConfig::ColumnConfig > columns() const
Gets the list with all columns and their configuration.
 
void update(const QgsFields &fields)
Update the configuration with the given fields.
 
void setActionWidgetStyle(ActionWidgetStyle actionWidgetStyle)
Set the style of the action widget.
 
void setColumns(const QVector< QgsAttributeTableConfig::ColumnConfig > &columns)
Set the list of columns visible in the attribute table.
 
Allows managing the auxiliary storage for a vector layer.
 
static QString nameFromProperty(const QgsPropertyDefinition &def, bool joined=false)
Returns the name of the auxiliary field for a property definition.
 
static QgsPropertyDefinition propertyDefinitionFromField(const QgsField &field)
Returns the property definition from an auxiliary field.
 
bool clear()
Deletes all features from the layer.
 
bool deleteAttribute(int attr) override
Removes attribute from the layer and commits changes.
 
QgsFields auxiliaryFields() const
Returns a list of all auxiliary fields currently managed by the layer.
 
int propertyFromIndex(int index) const
Returns the underlying property key for the field index.
 
QgsVectorLayerJoinInfo joinInfo() const
Returns information to use for joining with primary key and so on.
 
QgsPropertyDefinition propertyDefinitionFromIndex(int index) const
Returns the property definition for the underlying field index.
 
static bool deleteTable(const QgsDataSourceUri &uri)
Removes a table from the auxiliary storage.
 
Represents a coordinate reference system (CRS).
 
virtual bool supportsSubsetString() const
Returns true if the provider supports setting of subset strings.
 
Stores the component parts of a data source URI (e.g.
 
A generic dialog for building expression strings.
 
static void setLayerVariables(QgsMapLayer *layer, const QVariantMap &variables)
Sets all layer context variables.
 
static QgsExpressionContextScope * projectScope(const QgsProject *project)
Creates a new scope which contains variables and functions relating to a QGIS project.
 
static QgsExpressionContextScope * atlasScope(const QgsLayoutAtlas *atlas)
Creates a new scope which contains variables and functions relating to a QgsLayoutAtlas.
 
static QgsExpressionContextScope * mapSettingsScope(const QgsMapSettings &mapSettings)
Creates a new scope which contains variables and functions relating to a QgsMapSettings object.
 
static QgsExpressionContextScope * layerScope(const QgsMapLayer *layer)
Creates a new scope which contains variables and functions relating to a QgsMapLayer.
 
static QgsExpressionContextScope * globalScope()
Creates a new scope which contains variables and functions relating to the global QGIS context.
 
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
 
static QString findAndSelectActiveExpression(QgsCodeEditor *editor, const QString &pattern=QString())
Find the expression under the cursor in the given editor and select it.
 
bool forceRasterRender() const
Returns whether the renderer must render as a raster.
 
void setForceRasterRender(bool forceRaster)
Sets whether the renderer should be rendered to a raster destination.
 
double referenceScale() const
Returns the symbology reference scale.
 
void setReferenceScale(double scale)
Sets the symbology reference scale.
 
virtual Qgis::SpatialIndexPresence hasSpatialIndex() const
Returns an enum value representing the presence of a valid spatial index on the source,...
 
Encapsulate a field in an attribute table or data source.
 
Q_INVOKABLE int indexFromName(const QString &fieldName) const
Gets the field index from the field name.
 
Q_INVOKABLE int indexOf(const QString &fieldName) const
Gets the field index from the field name.
 
int size() const
Returns number of items.
 
static QString stringToSafeFilename(const QString &string)
Converts a string to a safe filename, replacing characters which are not safe for filenames with an '...
 
static QgsProviderSourceWidgetProviderRegistry * sourceWidgetProviderRegistry()
Returns the registry of provider source widget providers.
 
static QgsSubsetStringEditorProviderRegistry * subsetStringEditorProviderRegistry()
Returns the registry of subset string editors of data providers.
 
static void openHelp(const QString &key)
Opens help topic for the given help key using default system web browser.
 
A dialog for configuring vector layer joins.
 
Base class for "layer properties" dialogs, containing common utilities for handling functionality in ...
 
QPushButton * mBtnStyle
Style button.
 
void saveMetadataToFile()
Allows the user to save the layer's metadata as a file.
 
virtual void rollback()
Rolls back changes made to the layer.
 
void optionsStackedWidget_CurrentChanged(int index) override
 
StyleType
Style storage type.
 
QList< QgsMapLayerConfigWidget * > mConfigWidgets
Layer config widgets.
 
void setMetadataWidget(QgsMetadataWidget *widget, QWidget *page)
Sets the metadata widget and page associated with the dialog.
 
void loadDefaultStyle()
Reloads the default style for the layer.
 
void saveStyleAs()
Saves a style when appriate button is pressed.
 
void loadStyle()
Triggers a dialog to load a saved style.
 
QgsMapCanvas * mCanvas
Associated map canvas.
 
void loadDefaultMetadata()
Reloads the default layer metadata for the layer.
 
void loadMetadataFromFile()
Allows the user to load layer metadata from a file.
 
void saveDefaultStyle()
Saves the default style when appropriate button is pressed.
 
QPushButton * mBtnMetadata
Metadata button.
 
void initialize()
Initialize the dialog.
 
void saveMetadataAsDefault()
Saves the current layer metadata as the default for the layer.
 
void openUrl(const QUrl &url)
Handles opening a url from the dialog.
 
A sort filter proxy model to easily reproduce the legend/layer tree in a tree view.
 
QList< QgsMapLayer * > checkedLayers() const
Returns the checked layers.
 
void setLayerTreeModel(QgsLayerTreeModel *layerTreeModel)
Sets the layer tree model.
 
void setCheckedLayers(const QList< QgsMapLayer * > layers)
Initialize the list of checked layers.
 
A model representing the layer tree, including layers and groups of layers.
 
Map canvas is a class for displaying all GIS data types on a canvas.
 
QColor selectionColor() const
Returns color for selected features.
 
QgsExpressionContext createExpressionContext() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
 
double scale() const
Returns the last reported scale of the canvas.
 
Models dependencies with or between map layers.
 
A dialog which allows saving map layer styles.
 
Manages QGIS Server properties for a map layer.
 
void addStyleManagerActions(QMenu *m, QgsMapLayer *layer)
adds actions to the menu in accordance to the layer
 
static QgsMapLayerStyleGuiUtils * instance()
returns a singleton instance of this class
 
QString currentStyle() const
Returns name of the current style.
 
QStringList styles() const
Returns list of all defined style names.
 
bool setCurrentStyle(const QString &name)
Set a different style as the current style - will apply it to the layer.
 
void currentStyleChanged(const QString ¤tName)
Emitted when the current style has been changed.
 
Base class for all map layer types.
 
void setRefreshOnNotifyEnabled(bool enabled)
Set whether provider notification is connected to triggerRepaint.
 
virtual QString saveSldStyle(const QString &uri, bool &resultFlag) const
Saves the properties of this layer to an SLD format file.
 
QString source() const
Returns the source for the layer.
 
QString providerType() const
Returns the provider type (provider key) for this layer.
 
void setMinimumScale(double scale)
Sets the minimum map scale (i.e.
 
QgsCoordinateReferenceSystem crs
 
QgsMapLayerServerProperties * serverProperties()
Returns QGIS Server Properties for the map layer.
 
virtual int listStylesInDatabase(QStringList &ids, QStringList &names, QStringList &descriptions, QString &msgError)
Lists all the style in db split into related to the layer and not related to.
 
void setDataSource(const QString &dataSource, const QString &baseName=QString(), const QString &provider=QString(), bool loadDefaultStyleFlag=false)
Updates the data source of the layer.
 
void triggerRepaint(bool deferredUpdate=false)
Will advise the map canvas (and any other interested party) that this layer requires to be repainted.
 
QgsMapLayer::SaveStyleResults saveStyleToDatabaseV2(const QString &name, const QString &description, bool useAsDefault, const QString &uiFileContent, QString &msgError, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories)
Saves QML and SLD representations of the layer's style to a table in the database.
 
void setMaximumScale(double scale)
Sets the maximum map scale (i.e.
 
QgsLayerMetadata metadata
 
bool isRefreshOnNotifyEnabled() const
Returns true if the refresh on provider nofification is enabled.
 
void setScaleBasedVisibility(bool enabled)
Sets whether scale based visibility is enabled for the layer.
 
bool hasScaleBasedVisibility() const
Returns whether scale based visibility is enabled for the layer.
 
void setRefreshOnNofifyMessage(const QString &message)
Set the notification message that triggers repaint If refresh on notification is enabled,...
 
void setName(const QString &name)
Set the display name of the layer.
 
QString refreshOnNotifyMessage() const
Returns the message that should be notified by the provider to triggerRepaint.
 
void setMapTipsEnabled(bool enabled)
Enable or disable map tips for this layer.
 
double minimumScale() const
Returns the minimum map scale (i.e.
 
QgsMapLayerStyleManager * styleManager() const
Gets access to the layer's style manager.
 
virtual QString saveNamedStyle(const QString &uri, bool &resultFlag, StyleCategories categories=AllStyleCategories)
Save the properties of this layer as a named style (either as a .qml file on disk or as a record in t...
 
void setMapTipTemplate(const QString &mapTipTemplate)
The mapTip is a pretty, html representation for feature information.
 
double maximumScale() const
Returns the maximum map scale (i.e.
 
void setCrs(const QgsCoordinateReferenceSystem &srs, bool emitSignal=true)
Sets layer's spatial reference system.
 
Contains configuration for rendering maps.
 
static QString vectorMapTipPreviewText(QgsMapLayer *layer, QgsMapCanvas *mapCanvas, const QString &mapTemplate, const QString &displayExpression)
Returns the html that would be displayed in a maptip for a given layer.
 
A bar for displaying non-blocking messages to the user.
 
void pushMessage(const QString &text, Qgis::MessageLevel level=Qgis::MessageLevel::Info, int duration=-1)
A convenience method for pushing a message with the specified text to the bar.
 
A dialog to create a new auxiliary field.
 
A dialog to create a new auxiliary layer.
 
void resizeAlltabs(int index)
Resizes all tabs when the dialog is resized.
 
QStackedWidget * mOptStackedWidget
 
void initOptionsBase(bool restoreUi=true, const QString &title=QString())
Set up the base ui connections for vertical tabs.
 
Property
Data definable properties.
 
static QgsProject * instance()
Returns the QgsProject singleton instance.
 
Q_INVOKABLE QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
 
void setDirty(bool b=true)
Flag the project as dirty (modified).
 
Definition for a property.
 
QString comment() const
Returns the comment of the property.
 
void setOrigin(const QString &origin)
Sets the origin of the property.
 
QString name() const
Returns the name of the property.
 
void setName(const QString &name)
Sets the name of the property.
 
QString origin() const
Returns the origin of the property.
 
void setComment(const QString &comment)
Sets comment of the property.
 
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
 
A dialog for configuring vector layer renderers.
 
void showPanel(QgsPanelWidget *panel)
Emit when you require a panel to be show in the interface.
 
void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the dialog is shown, e.g., the associated map canvas and expression context...
 
void apply()
Apply the changes from the dialog to the layer.
 
void layerVariablesChanged()
Emitted when expression context variables on the associated vector layers have been changed.
 
void widgetChanged()
Emitted when something on the widget has changed.
 
void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
 
static QMap< int, QString > wmsDimensionDefaultDisplayLabels()
Returns WMS Dimension default display labels.
 
bool addWmsDimension(const QgsServerWmsDimensionProperties::WmsDimensionInfo &wmsDimInfo)
Adds a QGIS Server WMS Dimension.
 
bool removeWmsDimension(const QString &wmsDimName)
Removes a QGIS Server WMS Dimension.
 
const QList< QgsServerWmsDimensionProperties::WmsDimensionInfo > wmsDimensions() const
Returns the QGIS Server WMS Dimension list.
 
Stores settings for use within QGIS.
 
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
 
bool contains(const QString &key, QgsSettings::Section section=QgsSettings::NoSection) const
Returns true if there exists a setting called key; returns false otherwise.
 
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
 
A widget which displays information about vector layer fields, and allows some configuration of them.
 
static QgsStyle * defaultStyle(bool initialize=true)
Returns the default application-wide style.
 
Interface for a dialog that can edit subset strings.
 
virtual QString subsetString() const =0
Returns the subset string entered in the dialog.
 
virtual void setSubsetString(const QString &subsetString)=0
Sets a subset string into the dialog.
 
QgsSubsetStringEditorInterface * createDialog(QgsVectorLayer *layer, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Creates a new dialog to edit the subset string of the provided layer.
 
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
 
void setMapCanvas(QgsMapCanvas *canvas)
Sets the map canvas associated with the widget.
 
void setMessageBar(QgsMessageBar *bar)
Sets the message bar associated with the widget.
 
Abstract base class for all rendered symbols.
 
Base class for vector data providers.
 
static QStringList availableEncodings()
Returns a list of available encodings.
 
virtual bool createSpatialIndex()
Creates a spatial index on the datasource (if supported by the provider type).
 
virtual Q_INVOKABLE Qgis::VectorProviderCapabilities capabilities() const
Returns flags containing the supported capabilities.
 
virtual bool createAttributeIndex(int field)
Create an attribute index on the datasource.
 
QString encoding() const
Returns the encoding which is used for accessing data.
 
Defines left outer join from our vector layer to some other vector layer.
 
bool hasCascadedDelete() const
Returns whether a feature deleted on the target layer has to impact the joined layer by deleting the ...
 
bool isDynamicFormEnabled() const
Returns whether the form has to be dynamically updated with joined fields when a feature is being cre...
 
bool hasUpsertOnEdit() const
Returns whether a feature created on the target layer has to impact the joined layer by creating a ne...
 
bool isEditable() const
Returns whether joined fields may be edited through the form of the target layer.
 
bool isUsingMemoryCache() const
Returns whether values from the joined layer should be cached in memory to speed up lookups.
 
QString prefix() const
Returns prefix of fields from the joined layer. If nullptr, joined layer's name will be used.
 
static QStringList joinFieldNamesSubset(const QgsVectorLayerJoinInfo &info, bool blocklisted=true)
Returns the list of field names to use for joining considering blocklisted fields and subset.
 
QString joinFieldName() const
Returns name of the field of joined layer that will be used for join.
 
QString targetFieldName() const
Returns name of the field of our layer that will be used for join.
 
QString joinLayerId() const
ID of the joined layer - may be used to resolve reference to the joined layer.
 
QgsVectorLayer * joinLayer() const
Returns joined layer (may be nullptr if the reference was set by layer ID and not resolved yet)
 
Layer properties dialog for vector layers.
 
bool eventFilter(QObject *obj, QEvent *ev) override
 
QgsVectorLayerProperties(QgsMapCanvas *canvas, QgsMessageBar *messageBar, QgsVectorLayer *lyr=nullptr, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
 
void optionsStackedWidget_CurrentChanged(int index) final
 
void toggleEditing(QgsMapLayer *)
 
void exportAuxiliaryLayer(QgsAuxiliaryLayer *layer)
 
Implementation of layer selection properties for vector layers.
 
void setSelectionSymbol(QgsSymbol *symbol)
Sets the symbol used to render selected features in the layer.
 
QgsSymbol * selectionSymbol() const
Returns the symbol used to render selected features in the layer.
 
Qgis::SelectionRenderingMode selectionRenderingMode() const
Returns the selection rendering mode to use for selected features in the layer.
 
QColor selectionColor() const
Returns the color to use for rendering selected features in the layer.
 
void setSelectionColor(const QColor &color)
Sets the color to use for rendering selected features in the layer.
 
void setSelectionRenderingMode(Qgis::SelectionRenderingMode mode)
Sets the selection rendering mode to use for selected features in the layer.
 
Represents a vector layer which manages a vector based dataset.
 
void setAuxiliaryLayer(QgsAuxiliaryLayer *layer=nullptr)
Sets the current auxiliary layer.
 
bool addJoin(const QgsVectorLayerJoinInfo &joinInfo)
Joins another vector layer to this layer.
 
QSet< QgsMapLayerDependency > dependencies() const FINAL
Gets the list of dependencies.
 
long long featureCount(const QString &legendKey) const
Number of features rendered with specified legend key.
 
void updateFields()
Will regenerate the fields property of this layer by obtaining all fields from the dataProvider,...
 
bool isSpatial() const FINAL
Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeome...
 
QString htmlMetadata() const FINAL
Obtain a formatted HTML string containing assorted metadata for this layer.
 
void setSimplifyMethod(const QgsVectorSimplifyMethod &simplifyMethod)
Sets the simplification settings for fast rendering of features.
 
QgsAuxiliaryLayer * auxiliaryLayer()
Returns the current auxiliary layer.
 
bool setDependencies(const QSet< QgsMapLayerDependency > &layers) FINAL
Sets the list of dependencies.
 
void setProviderEncoding(const QString &encoding)
Sets the text encoding of the data provider.
 
void setDisplayExpression(const QString &displayExpression)
Set the preview expression, used to create a human readable preview string.
 
bool removeJoin(const QString &joinLayerId)
Removes a vector layer join.
 
bool isEditable() const FINAL
Returns true if the provider is in editing mode.
 
QStringList commitErrors() const
Returns a list containing any error messages generated when attempting to commit changes to the layer...
 
virtual void updateExtents(bool force=false)
Update the extents for the layer.
 
QgsFeatureRenderer * renderer()
Returns the feature renderer used for rendering the features in the layer in 2D map views.
 
QString displayExpression
 
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
 
QgsAttributeTableConfig attributeTableConfig() const
Returns the attribute table configuration object.
 
QgsActionManager * actions()
Returns all layer actions defined on this layer.
 
Q_INVOKABLE Qgis::GeometryType geometryType() const
Returns point, line or polygon.
 
void setAttributeTableConfig(const QgsAttributeTableConfig &attributeTableConfig)
Sets the attribute table configuration object.
 
virtual bool setSubsetString(const QString &subset)
Sets the string (typically sql) used to define a subset of the layer.
 
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings for fast rendering of features.
 
const QList< QgsVectorLayerJoinInfo > vectorJoins() const
 
QgsMapLayerSelectionProperties * selectionProperties() override
Returns the layer's selection properties.
 
Contains settings for simplifying geometries fetched from a vector layer.
 
bool forceLocalOptimization() const
Gets where the simplification executes, after fetch the geometries from provider, or when supported,...
 
Qgis::VectorRenderingSimplificationFlags simplifyHints() const
Gets the simplification hints of the vector layer managed.
 
float maximumScale() const
Gets the maximum scale at which the layer should be simplified.
 
Qgis::VectorSimplificationAlgorithm simplifyAlgorithm() const
Gets the local simplification algorithm of the vector layer managed.
 
void setThreshold(float threshold)
Sets the simplification threshold of the vector layer managed.
 
void setForceLocalOptimization(bool localOptimization)
Sets where the simplification executes, after fetch the geometries from provider, or when supported,...
 
void setSimplifyHints(Qgis::VectorRenderingSimplificationFlags simplifyHints)
Sets the simplification hints of the vector layer managed.
 
float threshold() const
Gets the simplification threshold of the vector layer managed.
 
void setMaximumScale(float maximumScale)
Sets the maximum scale at which the layer should be simplified.
 
void setSimplifyAlgorithm(Qgis::VectorSimplificationAlgorithm simplifyAlgorithm)
Sets the local simplification algorithm of the vector layer managed.
 
A collection of stubs to mimic the API of QWebView on systems where the real library is not available...
 
A dialog that provides an interface for WMS/OAPIF (WFS3) dimensions configuration.
 
const QgsCoordinateReferenceSystem & crs
 
Setting options for creating vector data providers.
 
Setting to define QGIS Server WMS Dimension.