Skip to content

Commit

Permalink
revert back qgspointcloudlayerproperties.cpp0
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem committed Nov 17, 2020
1 parent 2cb6902 commit 73c1601
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions src/app/pointcloud/qgspointcloudlayerproperties.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.