コード例 #1
0
ファイル: qgscomposerlegend.cpp プロジェクト: RossGammon/QGIS
void QgsComposerLegend::setAutoUpdateModel( bool autoUpdate )
{
  if ( autoUpdate == autoUpdateModel() )
    return;

  setCustomLayerTree( autoUpdate ? 0 : QgsLayerTree::toGroup( QgsProject::instance()->layerTreeRoot()->clone() ) );
}
コード例 #2
0
ファイル: qgscomposerlegend.cpp プロジェクト: GeoCat/QGIS
void QgsComposerLegend::nodeCustomPropertyChanged( QgsLayerTreeNode *, const QString & )
{
  if ( autoUpdateModel() )
  {
    // in "auto update" mode, some parameters on the main app legend may have been changed (expression filtering)
    // we must then call updateItem to reflect the changes
    updateItem();
  }
}
コード例 #3
0
ファイル: qgscomposerlegend.cpp プロジェクト: GeoCat/QGIS
void QgsComposerLegend::setAutoUpdateModel( bool autoUpdate )
{
  if ( autoUpdate == autoUpdateModel() )
    return;

  setCustomLayerTree( autoUpdate ? nullptr : mComposition->project()->layerTreeRoot()->clone() );
  adjustBoxSize();
  updateItem();
}
コード例 #4
0
ファイル: qgslayoutitemlegend.cpp プロジェクト: aaime/QGIS
void QgsLayoutItemLegend::setAutoUpdateModel( bool autoUpdate )
{
  if ( autoUpdate == autoUpdateModel() )
    return;

  setCustomLayerTree( autoUpdate ? nullptr : mLayout->project()->layerTreeRoot()->clone() );
  adjustBoxSize();
  updateFilterByMap( false );
}