Skip to content
Permalink
Browse files

revert back qgspointcloudlayerproperties.cpp0

  • Loading branch information
NEDJIMAbelgacem committed Nov 17, 2020
1 parent 2cb6902 commit 73c1601795ee64436261699c5971c6982ed94e96
Showing with 19 additions and 21 deletions.
  1. +19 −21 src/app/pointcloud/qgspointcloudlayerproperties.cpp
@@ -32,9 +32,6 @@
#include <QMessageBox>
#include <QDesktopServices>

#include "qgsmaplayerconfigwidget.h"
#include "qgsmaplayerconfigwidgetfactory.h"

QgsPointCloudLayerProperties::QgsPointCloudLayerProperties( QgsPointCloudLayer *lyr, QgsMapCanvas *canvas, QgsMessageBar *, QWidget *parent, Qt::WindowFlags flags )
: QgsOptionsDialogBase( QStringLiteral( "PointCloudLayerProperties" ), parent, flags )
, mLayer( lyr )
@@ -107,14 +104,31 @@ QgsPointCloudLayerProperties::QgsPointCloudLayerProperties( QgsPointCloudLayer *
restoreOptionsBaseUi( title );
}

void QgsPointCloudLayerProperties::addPropertiesPageFactory( QgsMapLayerConfigWidgetFactory *factory )
{
if ( !factory->supportsLayer( mLayer ) || !factory->supportLayerPropertiesDialog() )
{
return;
}

QgsMapLayerConfigWidget *page = factory->createWidget( mLayer, mMapCanvas, false, this );
mConfigWidgets << page;

const QString beforePage = factory->layerPropertiesPagePositionHint();
if ( beforePage.isEmpty() )
addPage( factory->title(), factory->title(), factory->icon(), page );
else
insertPage( factory->title(), factory->title(), factory->icon(), page, beforePage );

page->syncToLayer( mLayer );
}

#include "qgspointcloudrenderer.h"

void QgsPointCloudLayerProperties::apply()
{
mMetadataWidget->acceptMetadata();

for ( QgsMapLayerConfigWidget *configWidget : mLayerPropertiesPages ) configWidget->apply();

// TODO -- move to proper widget classes!

#if 0
@@ -405,19 +419,3 @@ void QgsPointCloudLayerProperties::optionsStackedWidget_CurrentChanged( int inde
mBtnMetadata->setVisible( isMetadataPanel );
}

void QgsPointCloudLayerProperties::addPropertiesPageFactory( QgsMapLayerConfigWidgetFactory *factory )
{
if ( !factory->supportsLayer( mLayer ) || !factory->supportLayerPropertiesDialog() )
return;

QgsMapLayerConfigWidget *page = factory->createWidget( mLayer, nullptr, false, this );
mLayerPropertiesPages << page;

const QString beforePage = factory->layerPropertiesPagePositionHint();
if ( beforePage.isEmpty() )
addPage( factory->title(), factory->title(), factory->icon(), page );
else
insertPage( factory->title(), factory->title(), factory->icon(), page, beforePage );

page->syncToLayer( mLayer );
}

0 comments on commit 73c1601

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