-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename QgsLayerStylingPanelFactory to QgsMapLayerConfigWidgetFactory
- Move QgsMapLayerPropertiesFactory into single factory object for dock and properties
- Loading branch information
Showing
36 changed files
with
243 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** \ingroup gui | ||
* \class QgsMapLayerConfigWidget | ||
* \class A panel widget that can be shown in the map style dock | ||
* \note added in QGIS 2.16 | ||
*/ | ||
class QgsMapLayerConfigWidget : public QgsPanelWidget | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsmaplayerconfigwidget.h> | ||
%End | ||
public: | ||
/** | ||
* @brief A panel widget that can be shown in the map style dock | ||
* @param layer The layer active in the dock. | ||
* @param canvas The canvas object. | ||
* @param parent The parent of the widget. | ||
* @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. | ||
*/ | ||
QgsMapLayerConfigWidget(QgsMapLayer* layer, QgsMapCanvas *canvas, QWidget *parent = 0); | ||
|
||
public slots: | ||
|
||
/** | ||
* @brief Called when changes to the layer need to be made. | ||
* Will be called when live update is enabled. | ||
*/ | ||
virtual void apply() = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** \ingroup gui | ||
* \class QgsMapLayerConfigWidgetFactory | ||
* \note added in QGIS 2.16 | ||
* Factory class for creating custom map layer property pages | ||
*/ | ||
class QgsMapLayerConfigWidgetFactory | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsmaplayerconfigwidgetfactory.h> | ||
%End | ||
|
||
public: | ||
/** Constructor */ | ||
QgsMapLayerConfigWidgetFactory(); | ||
|
||
/** Destructor */ | ||
virtual ~QgsMapLayerConfigWidgetFactory(); | ||
|
||
/** | ||
* @brief The icon that will be shown in the UI for the panel. | ||
* @return A QIcon for the panel icon. | ||
*/ | ||
virtual QIcon icon() const; | ||
|
||
/** | ||
* @brief The title of the panel. | ||
* @note This may or may not be shown to the user. | ||
* @return Title of the panel | ||
*/ | ||
virtual QString title() const; | ||
|
||
/** | ||
* @brief Check if the layer is supported for this widget. | ||
* @return True if this layer is supported for this widget | ||
*/ | ||
virtual bool supportsLayer( QgsMapLayer *layer ) const; | ||
|
||
/** | ||
* @brief Factory fucntion to create the widget on demand as needed by the dock. | ||
* @note This function is called each time the panel is selected. Keep it light for better UX. | ||
* @param layer The active layer in the dock. | ||
* @param canvas The map canvas. | ||
* @param dockWidget True of the widget will be shown a dock style widget. | ||
* @param parent The parent of the widget. | ||
* @return A new QgsMapStylePanel which is shown in the map style dock. | ||
*/ | ||
virtual QgsMapLayerConfigWidget* createWidget( QgsMapLayer* layer, QgsMapCanvas *canvas, bool dockWidget = true, QWidget* parent /TransferThis/ = 0) const = 0 /Factory/; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fdf16e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaks the globe plugin - what does it fix?
fdf16e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.