35 changes: 0 additions & 35 deletions src/app/qgsvectorlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "qgsvectorlayerproperties.h"
#include "qgsconfig.h"
#include "qgsvectordataprovider.h"
#include "qgsvectoroverlayplugin.h"
#include "qgsquerybuilder.h"
#include "qgsdatasourceuri.h"

Expand Down Expand Up @@ -480,12 +479,6 @@ void QgsVectorLayerProperties::apply()
//apply diagram settings
diagramPropertiesDialog->apply();

//apply overlay dialogs
for ( QList<QgsApplyDialog*>::iterator it = mOverlayDialogs.begin(); it != mOverlayDialogs.end(); ++it )
{
( *it )->apply();
}

//layer title and abstract
layer->setTitle( mLayerTitleLineEdit->text() );
layer->setAbstract( mLayerAbstractTextEdit->toPlainText() );
Expand Down Expand Up @@ -899,34 +892,6 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()

}

QList<QgsVectorOverlayPlugin*> QgsVectorLayerProperties::overlayPlugins() const
{
QList<QgsVectorOverlayPlugin*> pluginList;

QgisPlugin* thePlugin = 0;
QgsVectorOverlayPlugin* theOverlayPlugin = 0;

QList<QgsPluginMetadata*> pluginData = QgsPluginRegistry::instance()->pluginData();
for ( QList<QgsPluginMetadata*>::iterator it = pluginData.begin(); it != pluginData.end(); ++it )
{
if ( *it )
{
thePlugin = ( *it )->plugin();
if ( thePlugin && thePlugin->type() == QgisPlugin::VECTOR_OVERLAY )
{
theOverlayPlugin = dynamic_cast<QgsVectorOverlayPlugin *>( thePlugin );
if ( theOverlayPlugin )
{
pluginList.push_back( theOverlayPlugin );
}
}
}
}

return pluginList;
}


void QgsVectorLayerProperties::on_mButtonAddJoin_clicked()
{
QgsAddJoinDialog d( layer );
Expand Down
7 changes: 0 additions & 7 deletions src/app/qgsvectorlayerproperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class QgsAttributeActionDialog;
class QgsApplyDialog;
class QgsLabelDialog;
class QgsVectorLayer;
class QgsVectorOverlayPlugin;
class QgsLabelingGui;
class QgsDiagramProperties;
class QgsFieldsProperties;
Expand Down Expand Up @@ -168,14 +167,8 @@ class QgsVectorLayerProperties : public QgsOptionsDialogBase, private Ui::QgsVec
/**Fields dialog. If apply is pressed, options are applied to vector's diagrams*/
QgsFieldsProperties* mFieldsPropertiesDialog;


QList<QgsApplyDialog*> mOverlayDialogs;

void initDiagramTab();

/**Requests all overlay plugis from the plugin registry. Useful for inserting their dialogs as new tabs*/
QList<QgsVectorOverlayPlugin*> overlayPlugins() const;

/**Buffer pixmap which takes the picture of renderers before they are assigned to the vector layer*/
//QPixmap bufferPixmap;

Expand Down
9 changes: 0 additions & 9 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ SET(QGIS_CORE_SRCS
qgscacheindex.cpp
qgscacheindexfeatureid.cpp
qgsbrowsermodel.cpp
qgscentralpointpositionmanager.cpp
qgsclipper.cpp
qgscontexthelp.cpp
qgscontexthelp_texts.cpp
Expand Down Expand Up @@ -93,11 +92,8 @@ SET(QGIS_CORE_SRCS
qgscredentials.cpp
qgsofflineediting.cpp
qgsogcutils.cpp
qgsoverlayobject.cpp
qgsowsconnection.cpp
qgspalgeometry.cpp
qgspallabeling.cpp
qgspalobjectpositionmanager.cpp
qgspluginlayer.cpp
qgspluginlayerregistry.cpp
qgspoint.cpp
Expand Down Expand Up @@ -129,7 +125,6 @@ SET(QGIS_CORE_SRCS
qgsvectorlayerimport.cpp
qgsvectorlayerjoinbuffer.cpp
qgsvectorlayerundocommand.cpp
qgsvectoroverlay.cpp

qgsnetworkaccessmanager.cpp

Expand Down Expand Up @@ -379,7 +374,6 @@ SET(QGIS_CORE_HDRS
qgscachedfeatureiterator.h
qgscacheindex.h
qgscacheindexfeatureid.h
qgscentralpointpositionmanager.h
qgsclipper.h
qgscontexthelp.h
qgscoordinatetransform.h
Expand Down Expand Up @@ -415,10 +409,8 @@ SET(QGIS_CORE_HDRS
qgscredentials.h
qgsofflineediting.h
qgsogcutils.h
qgsoverlayobjectpositionmanager.h
qgsowsconnection.h
qgspallabeling.h
qgspalobjectpositionmanager.h
qgspluginlayer.h
qgspluginlayerregistry.h
qgspoint.h
Expand Down Expand Up @@ -448,7 +440,6 @@ SET(QGIS_CORE_HDRS
qgsvectorlayerfeatureiterator.h
qgsvectorlayerimport.h
qgsvectorlayerundocommand.h
qgsvectoroverlay.h
qgstolerance.h

diagram/qgsdiagram.h
Expand Down
248 changes: 0 additions & 248 deletions src/core/qgscentralpointpositionmanager.cpp

This file was deleted.

51 changes: 0 additions & 51 deletions src/core/qgscentralpointpositionmanager.h

This file was deleted.

81 changes: 0 additions & 81 deletions src/core/qgsmaprenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
#include "qgsdistancearea.h"
#include "qgscentralpointpositionmanager.h"
#include "qgsoverlayobjectpositionmanager.h"
#include "qgspalobjectpositionmanager.h"
#include "qgsproject.h"
#include "qgsvectorlayer.h"
#include "qgsvectoroverlay.h"


#include <QDomDocument>
Expand Down Expand Up @@ -345,9 +341,6 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
}
}

QgsOverlayObjectPositionManager* overlayManager = overlayManagerFromSettings();
QList<QgsVectorOverlay*> allOverlayList; //list of all overlays, used to draw them after layers have been rendered

// render all layers in the stack, starting at the base
QListIterator<QString> li( mLayerSet );
li.toBack();
Expand Down Expand Up @@ -446,30 +439,6 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
scaleRaster = true;
}


//create overlay objects for features within the view extent
if ( ml->type() == QgsMapLayer::VectorLayer && overlayManager )
{
QgsVectorLayer* vl = qobject_cast<QgsVectorLayer *>( ml );
if ( vl )
{
QList<QgsVectorOverlay*> thisLayerOverlayList;
vl->vectorOverlays( thisLayerOverlayList );

QList<QgsVectorOverlay*>::iterator overlayIt = thisLayerOverlayList.begin();
for ( ; overlayIt != thisLayerOverlayList.end(); ++overlayIt )
{
if (( *overlayIt )->displayFlag() )
{
( *overlayIt )->createOverlayObjects( mRenderContext );
allOverlayList.push_back( *overlayIt );
}
}

overlayManager->addLayer( vl, thisLayerOverlayList );
}
}

// Force render of layers that are being edited
// or if there's a labeling engine that needs the layer to register features
if ( ml->type() == QgsMapLayer::VectorLayer )
Expand Down Expand Up @@ -693,20 +662,6 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
}
} // if (!mOverview)

//find overlay positions and draw the vector overlays
if ( overlayManager && allOverlayList.size() > 0 )
{
overlayManager->findObjectPositions( mRenderContext, mScaleCalculator->mapUnits() );
//draw all the overlays
QList<QgsVectorOverlay*>::iterator allOverlayIt = allOverlayList.begin();
for ( ; allOverlayIt != allOverlayList.end(); ++allOverlayIt )
{
( *allOverlayIt )->drawOverlayObjects( mRenderContext );
}
overlayManager->removeLayers();
}

delete overlayManager;
// make sure progress bar arrives at 100%!
emit drawingProgress( 1, 1 );

Expand Down Expand Up @@ -1059,42 +1014,6 @@ QStringList& QgsMapRenderer::layerSet()
return mLayerSet;
}

QgsOverlayObjectPositionManager* QgsMapRenderer::overlayManagerFromSettings()
{
QSettings settings;
QString overlayAlgorithmQString = settings.value( "qgis/overlayPlacementAlgorithm", "Central point" ).toString();

QgsOverlayObjectPositionManager* result = 0;

if ( overlayAlgorithmQString != "Central point" )
{
QgsPALObjectPositionManager* palManager = new QgsPALObjectPositionManager();
if ( overlayAlgorithmQString == "Chain" )
{
palManager->setPlacementAlgorithm( "Chain" );
}
else if ( overlayAlgorithmQString == "Popmusic tabu chain" )
{
palManager->setPlacementAlgorithm( "Popmusic tabu chain" );
}
else if ( overlayAlgorithmQString == "Popmusic tabu" )
{
palManager->setPlacementAlgorithm( "Popmusic tabu" );
}
else if ( overlayAlgorithmQString == "Popmusic chain" )
{
palManager->setPlacementAlgorithm( "Popmusic chain" );
}
result = palManager;
}
else
{
result = new QgsCentralPointPositionManager();
}

return result;
}

bool QgsMapRenderer::readXML( QDomNode & theNode )
{
QDomNode myNode = theNode.namedItem( "units" );
Expand Down
5 changes: 0 additions & 5 deletions src/core/qgsmaprenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class QgsMapRenderer;
class QgsScaleCalculator;
class QgsCoordinateReferenceSystem;
class QgsDistanceArea;
class QgsOverlayObjectPositionManager;
class QgsVectorLayer;

class QgsPalLayerSettings;
Expand Down Expand Up @@ -323,10 +322,6 @@ class CORE_EXPORT QgsMapRenderer : public QObject
*/
bool splitLayersExtent( QgsMapLayer* layer, QgsRectangle& extent, QgsRectangle& r2 );

/**Creates an overlay object position manager subclass according to the current settings
@note this method was added in version 1.1*/
QgsOverlayObjectPositionManager* overlayManagerFromSettings();

//! indicates drawing in progress
static bool mDrawing;

Expand Down
67 changes: 0 additions & 67 deletions src/core/qgsoverlayobject.cpp

This file was deleted.

80 changes: 0 additions & 80 deletions src/core/qgsoverlayobject.h

This file was deleted.

47 changes: 0 additions & 47 deletions src/core/qgsoverlayobjectpositionmanager.h

This file was deleted.

46 changes: 0 additions & 46 deletions src/core/qgspalgeometry.cpp

This file was deleted.

52 changes: 0 additions & 52 deletions src/core/qgspalgeometry.h

This file was deleted.

235 changes: 0 additions & 235 deletions src/core/qgspalobjectpositionmanager.cpp

This file was deleted.

50 changes: 0 additions & 50 deletions src/core/qgspalobjectpositionmanager.h

This file was deleted.

54 changes: 0 additions & 54 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
#include "qgsvectorlayerfeatureiterator.h"
#include "qgsvectorlayerjoinbuffer.h"
#include "qgsvectorlayerundocommand.h"
#include "qgsvectoroverlay.h"
#include "qgsmaplayerregistry.h"
#include "qgsclipper.h"
#include "qgsproject.h"
Expand Down Expand Up @@ -202,14 +201,6 @@ QgsVectorLayer::~QgsVectorLayer()
delete mActions;

delete mRendererV2;

//delete remaining overlays

QList<QgsVectorOverlay*>::iterator overlayIt = mOverlays.begin();
for ( ; overlayIt != mOverlays.end(); ++overlayIt )
{
delete *overlayIt;
}
}

QString QgsVectorLayer::storageType() const
Expand Down Expand Up @@ -2382,16 +2373,6 @@ bool QgsVectorLayer::writeSymbology( QDomNode& node, QDomDocument& doc, QString&
// add attribute actions
mActions->writeXML( node, doc );

//save vector overlays (e.g. diagrams)
QList<QgsVectorOverlay*>::const_iterator overlay_it = mOverlays.constBegin();
for ( ; overlay_it != mOverlays.constEnd(); ++overlay_it )
{
if ( *overlay_it )
{
( *overlay_it )->writeXML( mapLayerNode, doc );
}
}

return true;
}

Expand Down Expand Up @@ -3115,41 +3096,6 @@ void QgsVectorLayer::setLabelOnTop( int idx, bool onTop )
mLabelOnTop[ fields[idx].name()] = onTop;
}

void QgsVectorLayer::addOverlay( QgsVectorOverlay* overlay )
{
mOverlays.push_back( overlay );
}

void QgsVectorLayer::removeOverlay( const QString& typeName )
{
for ( int i = mOverlays.size() - 1; i >= 0; --i )
{
if ( mOverlays.at( i )->typeName() == typeName )
{
mOverlays.removeAt( i );
}
}
}

void QgsVectorLayer::vectorOverlays( QList<QgsVectorOverlay*>& overlayList )
{
overlayList = mOverlays;
}

QgsVectorOverlay* QgsVectorLayer::findOverlayByType( const QString& typeName )
{
QList<QgsVectorOverlay*>::iterator it = mOverlays.begin();
for ( ; it != mOverlays.end(); ++it )
{
if (( *it )->typeName() == typeName )
{
return *it;
}
}
return 0; //not found
}


QgsFeatureRendererV2* QgsVectorLayer::rendererV2()
{
return mRendererV2;
Expand Down
24 changes: 0 additions & 24 deletions src/core/qgsvectorlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class QgsMapToPixel;
class QgsLabel;
class QgsRectangle;
class QgsVectorDataProvider;
class QgsVectorOverlay;
class QgsSingleSymbolRendererV2;
class QgsRectangle;
class QgsVectorLayerJoinBuffer;
Expand Down Expand Up @@ -1164,26 +1163,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
**/
void setLabelOnTop( int idx, bool onTop );

/**Adds a new overlay to this class. QgsVectorLayer takes ownership of the object
@note this method was added in version 1.1
*/
void addOverlay( QgsVectorOverlay* overlay );

/**Removes all overlays of a given type
@note this method was added in version 1.1
*/
void removeOverlay( const QString& typeName );

/**Returns pointers to the overlays of this layer
@note this method was added in version 1.1
*/
void vectorOverlays( QList<QgsVectorOverlay*>& overlayList );

/**Returns the (first) overlay of a type, e.g. diagram or label
@note this method was added in version 1.1
*/
QgsVectorOverlay* findOverlayByType( const QString& typeName );

//! Buffer with uncommitted editing operations. Only valid after editing has been turned on.
QgsVectorLayerEditBuffer* editBuffer() { return mEditBuffer; }

Expand Down Expand Up @@ -1539,9 +1518,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
/** Flag if the vertex markers should be drawn only for selection (true) or for all features (false) */
bool mVertexMarkerOnlyForSelection;

/** List of overlays. Vector overlays will be rendered on top of all maplayers */
QList<QgsVectorOverlay*> mOverlays;

QStringList mCommitErrors;

QMap< QString, EditType > mEditTypes;
Expand Down
39 changes: 0 additions & 39 deletions src/core/qgsvectoroverlay.cpp

This file was deleted.

94 changes: 0 additions & 94 deletions src/core/qgsvectoroverlay.h

This file was deleted.

1 change: 0 additions & 1 deletion src/plugins/qgisplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class QgisPlugin
UI = 1, /* user interface plug-in */
MAPLAYER, /* map layer plug-in */
RENDERER, /*a plugin for a new renderer class*/
VECTOR_OVERLAY /*an overlay plugin. Added in version 1.1*/
};


Expand Down
39 changes: 0 additions & 39 deletions src/plugins/qgsvectoroverlayplugin.h

This file was deleted.

82 changes: 25 additions & 57 deletions src/ui/qgsoptionsbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>663</width>
<height>564</height>
<width>687</width>
<height>523</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_28">
Expand Down Expand Up @@ -912,8 +912,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>663</width>
<height>757</height>
<width>670</width>
<height>750</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_22">
Expand Down Expand Up @@ -1248,8 +1248,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>680</width>
<height>511</height>
<width>687</width>
<height>523</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_27">
Expand Down Expand Up @@ -1505,12 +1505,12 @@
</item>
<item>
<widget class="QCheckBox" name="cbxIgnoreShapeEncoding">
<property name="text">
<string>Ignore shapefile encoding declaration</string>
</property>
<property name="toolTip">
<string>Disable OGR on-the-fly conversion from declared encoding to UTF-8</string>
</property>
<property name="text">
<string>Ignore shapefile encoding declaration</string>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -1577,8 +1577,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>663</width>
<height>635</height>
<width>670</width>
<height>611</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_29">
Expand Down Expand Up @@ -2092,8 +2092,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>452</width>
<height>357</height>
<width>687</width>
<height>523</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_25">
Expand Down Expand Up @@ -2348,38 +2348,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="mPositionGroupBox">
<property name="title">
<string>Overlay position</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="mAlgorithmLabel">
<property name="text">
<string>Placement algorithm</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>221</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="mOverlayAlgorithmComboBox"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
Expand Down Expand Up @@ -2427,8 +2395,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>491</width>
<height>636</height>
<width>670</width>
<height>619</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_30">
Expand Down Expand Up @@ -2834,8 +2802,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>442</width>
<height>574</height>
<width>670</width>
<height>551</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_31">
Expand Down Expand Up @@ -3335,8 +3303,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>426</width>
<height>336</height>
<width>687</width>
<height>523</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
Expand Down Expand Up @@ -3475,8 +3443,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>582</width>
<height>352</height>
<width>687</width>
<height>523</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_15">
Expand Down Expand Up @@ -3656,8 +3624,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>268</width>
<height>207</height>
<width>687</width>
<height>523</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
Expand Down Expand Up @@ -3756,8 +3724,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>663</width>
<height>553</height>
<width>670</width>
<height>528</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_33">
Expand Down