Skip to content

Commit

Permalink
Rename Map Styling Dock to Layer Styling Dock
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jun 20, 2016
1 parent 1cd7808 commit 0914b74
Show file tree
Hide file tree
Showing 27 changed files with 130 additions and 182 deletions.
4 changes: 2 additions & 2 deletions python/gui/qgisinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ class QgisInterface : QObject
virtual void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) = 0;

/** Register a new tab in the layer properties dialog */
virtual void registerMapStylePanelFactory( QgsMapStylingPanelFactory* factory ) = 0;
virtual void registerMapStylePanelFactory( QgsLayerStylingPanelFactory* factory ) = 0;

/** Unregister a previously registered tab in the layer properties dialog */
virtual void unregisterMapStylePanelFactory( QgsMapStylingPanelFactory* factory ) = 0;
virtual void unregisterMapStylePanelFactory( QgsLayerStylingPanelFactory* factory ) = 0;

// @todo is this deprecated in favour of QgsContextHelp?
/** Open a url in the users browser. By default the QGIS doc directory is used
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgsmaplayerstylemanagerwidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @brief The QgsMapLayerStyleManagerWidget class which is used to visually manage
* the layer styles.
*/
class QgsMapLayerStyleManagerWidget : QgsMapStylingPanel
class QgsMapLayerStyleManagerWidget : QgsLayerStylingPanel
{
%TypeHeaderCode
#include "qgsmaplayerstylemanagerwidget.h"
Expand Down
16 changes: 8 additions & 8 deletions python/gui/qgsmapstylepanel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* \class A panel widget that can be shown in the map style dock
* \note added in QGIS 2.16
*/
class QgsMapStylingPanel : public QgsPanelWidget
class QgsLayerStylingPanel : public QgsPanelWidget
{
%TypeHeaderCode
#include <qgsmapstylepanel.h>
Expand All @@ -16,7 +16,7 @@ public:
* @note The widget is created each time the panel is selected in the dock.
* Keep the loading light as possible for speed in the UI.
*/
QgsMapStylingPanel(QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget *parent = 0);
QgsLayerStylingPanel(QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget *parent = 0);

signals:
/**
Expand All @@ -38,10 +38,10 @@ public slots:


/** \ingroup gui
* \class QgsMapStylePanelFactory
* \class QgsLayerStylingPanelFactory
* \note added in QGIS 2.16
*/
class QgsMapStylingPanelFactory
class QgsLayerStylingPanelFactory
{
%TypeHeaderCode
#include <qgsmapstylepanel.h>
Expand All @@ -50,10 +50,10 @@ class QgsMapStylingPanelFactory
typedef QFlags<QgsMapLayer::LayerType> LayerTypesFlags;

/** Constructor */
QgsMapStylingPanelFactory();
QgsLayerStylingPanelFactory();

/** Destructor */
virtual ~QgsMapStylingPanelFactory();
virtual ~QgsLayerStylingPanelFactory();

/**
* @brief The icon that will be shown in the UI for the panel.
Expand All @@ -80,7 +80,7 @@ class QgsMapStylingPanelFactory
* @param layer The active layer in the dock.
* @param canvas The map canvas.
* @param parent The parent of the widget.
* @return A new QgsMapStylePanel which is shown in the map style dock.
* @return A new QgsLayerStylingPanel which is shown in the map style dock.
*/
virtual QgsMapStylingPanel* createPanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget* parent /TransferThis/ ) = 0 /Factory/;
virtual QgsLayerStylingPanel* createPanel( QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget* parent /TransferThis/ ) = 0 /Factory/;
};
2 changes: 1 addition & 1 deletion python/gui/raster/qgsrendererrasterpropertieswidget.sip
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class QgsRendererRasterPropertiesWidget : QgsMapStylingPanel
class QgsRendererRasterPropertiesWidget : QgsLayerStylingPanel
{
%TypeHeaderCode
#include <qgsrendererrasterpropertieswidget.h>
Expand Down
4 changes: 2 additions & 2 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SET(QGIS_APP_SRCS
nodetool/qgsvertexentry.cpp
nodetool/qgsnodeeditor.cpp

qgsmapstylingwidget.cpp
qgslayerstylingwidget.cpp
qgsmeasuredialog.cpp
qgsmeasuretool.cpp
qgsmergeattributesdialog.cpp
Expand Down Expand Up @@ -277,7 +277,7 @@ SET (QGIS_APP_MOC_HDRS
nodetool/qgsselectedfeature.h
nodetool/qgsnodeeditor.h

qgsmapstylingwidget.h
qgslayerstylingwidget.h
qgsmeasuredialog.h
qgsmeasuretool.h
qgsmergeattributesdialog.h
Expand Down
18 changes: 9 additions & 9 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
#include <qgsnetworkaccessmanager.h>
#include <qgsapplication.h>
#include <qgscomposition.h>
#include <qgsmapstylingwidget.h>
#include <qgslayerstylingwidget.h>

#include <QNetworkReply>
#include <QNetworkProxy>
Expand Down Expand Up @@ -772,11 +772,11 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
addDockWidget( Qt::LeftDockWidgetArea, mUndoDock );
mUndoDock->hide();

startProfile( "Map Style dock" );
startProfile( "Layer Style dock" );
mMapStylingDock = new QgsDockWidget( this );
mMapStylingDock->setWindowTitle( tr( "Map Styling" ) );
mMapStylingDock->setObjectName( "MapStyling" );
mMapStyleWidget = new QgsMapStylingWidget( mMapCanvas, mMapStylePanelFactories );
mMapStylingDock->setWindowTitle( tr( "Layer Styling" ) );
mMapStylingDock->setObjectName( "LayerStyling" );
mMapStyleWidget = new QgsLayerStylingWidget( mMapCanvas, mMapStylePanelFactories );
mMapStylingDock->setWidget( mMapStyleWidget );
connect( mMapStyleWidget, SIGNAL( styleChanged( QgsMapLayer* ) ), this, SLOT( updateLabelToolButtons() ) );
connect( mMapStylingDock, SIGNAL( visibilityChanged( bool ) ), mActionStyleDock, SLOT( setChecked( bool ) ) );
Expand Down Expand Up @@ -3006,9 +3006,9 @@ void QgisApp::initLayerTreeView()
mLegendExpressionFilterButton->setToolTip( tr( "Filter legend by expression" ) );
connect( mLegendExpressionFilterButton, SIGNAL( toggled( bool ) ), this, SLOT( toggleFilterLegendByExpression( bool ) ) );

mActionStyleDock = new QAction( tr( "Map Styling" ), this );
mActionStyleDock = new QAction( tr( "Layer Styling" ), this );
mActionStyleDock->setCheckable( true );
mActionStyleDock->setToolTip( tr( "Open the map styling dock" ) );
mActionStyleDock->setToolTip( tr( "Open the layer styling dock" ) );
mActionStyleDock->setShortcut( QString( "F7" ) );
mActionStyleDock->setIcon( QgsApplication::getThemeIcon( "propertyicons/symbology.svg" ) );
connect( mActionStyleDock, SIGNAL( toggled( bool ) ), this, SLOT( mapStyleDock( bool ) ) );
Expand Down Expand Up @@ -9094,12 +9094,12 @@ void QgisApp::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory*
mMapLayerPropertiesFactories.removeAll( factory );
}

void QgisApp::registerMapStylePanelFactory( QgsMapStylingPanelFactory *factory )
void QgisApp::registerMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )
{
mMapStylePanelFactories << factory;
}

void QgisApp::unregisterMapStylePanelFactory( QgsMapStylingPanelFactory *factory )
void QgisApp::unregisterMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )
{
mMapStylePanelFactories.removeAll( factory );
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class QgsLayerTreeView;
class QgsMapCanvas;
class QgsMapLayer;
class QgsMapLayerPropertiesFactory;
class QgsMapStylingPanelFactory;
class QgsLayerStylingPanelFactory;
class QgsMapTip;
class QgsMapTool;
class QgsMapToolAdvancedDigitizing;
Expand Down Expand Up @@ -98,7 +98,7 @@ class QgsDataItem;
class QgsTileScaleWidget;

class QgsLabelingWidget;
class QgsMapStylingWidget;
class QgsLayerStylingWidget;
class QgsDiagramProperties;

#include <QMainWindow>
Expand Down Expand Up @@ -514,10 +514,10 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory );

/** Register a new tab in the layer properties dialog */
void registerMapStylePanelFactory( QgsMapStylingPanelFactory* factory );
void registerMapStylePanelFactory( QgsLayerStylingPanelFactory* factory );

/** Unregister a previously registered tab in the layer properties dialog */
void unregisterMapStylePanelFactory( QgsMapStylingPanelFactory* factory );
void unregisterMapStylePanelFactory( QgsLayerStylingPanelFactory* factory );

public slots:
void layerTreeViewDoubleClicked( const QModelIndex& index );
Expand Down Expand Up @@ -1735,7 +1735,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow

QgsPluginManager *mPluginManager;
QgsDockWidget *mMapStylingDock;
QgsMapStylingWidget* mMapStyleWidget;
QgsLayerStylingWidget* mMapStyleWidget;

QgsComposerManager *mComposerManager;

Expand Down Expand Up @@ -1781,7 +1781,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QgsSnappingUtils* mSnappingUtils;

QList<QgsMapLayerPropertiesFactory*> mMapLayerPropertiesFactories;
QList<QgsMapStylingPanelFactory*> mMapStylePanelFactories;
QList<QgsLayerStylingPanelFactory*> mMapStylePanelFactories;

QDateTime mProjectLastModified;

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisappinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,12 @@ void QgisAppInterface::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertie
qgis->unregisterMapLayerPropertiesFactory( factory );
}

void QgisAppInterface::registerMapStylePanelFactory( QgsMapStylingPanelFactory *factory )
void QgisAppInterface::registerMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )
{
qgis->registerMapStylePanelFactory( factory );
}

void QgisAppInterface::unregisterMapStylePanelFactory( QgsMapStylingPanelFactory *factory )
void QgisAppInterface::unregisterMapStylePanelFactory( QgsLayerStylingPanelFactory *factory )
{
qgis->unregisterMapStylePanelFactory( factory );
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisappinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
virtual void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) override;

/** Register a new tab in the layer properties dialog */
virtual void registerMapStylePanelFactory( QgsMapStylingPanelFactory* factory ) override;
virtual void registerMapStylePanelFactory( QgsLayerStylingPanelFactory* factory ) override;

/** Unregister a previously registered tab in the layer properties dialog */
virtual void unregisterMapStylePanelFactory( QgsMapStylingPanelFactory* factory ) override;
virtual void unregisterMapStylePanelFactory( QgsLayerStylingPanelFactory* factory ) override;

/** Accessors for inserting items into menus and toolbars.
* An item can be inserted before any existing action.
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgslabelingwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "qgisapp.h"

QgsLabelingWidget::QgsLabelingWidget( QgsVectorLayer* layer, QgsMapCanvas* canvas, QWidget* parent )
: QgsMapStylingPanel( layer, canvas, parent )
: QgsLayerStylingPanel( layer, canvas, parent )
, mLayer( layer )
, mCanvas( canvas )
, mWidget( nullptr )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgslabelingwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class QgsMapLayer;
/**
* Master widget for configuration of labeling of a vector layer
*/
class QgsLabelingWidget : public QgsMapStylingPanel, private Ui::QgsLabelingWidget
class QgsLabelingWidget : public QgsLayerStylingPanel, private Ui::QgsLabelingWidget
{
Q_OBJECT
public:
Expand Down
Loading

0 comments on commit 0914b74

Please sign in to comment.