QGIS API Documentation 3.41.0-Master (d5b93354e9c)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Slots | Friends | List of all members
QgsRasterLayerProperties Class Reference

Property sheet for a raster map layer. More...

#include <qgsrasterlayerproperties.h>

Inheritance diagram for QgsRasterLayerProperties:
Inheritance graph
[legend]

Public Types

enum  StyleType { QML , SLD }
 enumeration for the different types of style More...
 
- Public Types inherited from QgsLayerPropertiesDialog
enum  StyleType { QML , SLD , DatasourceDatabase , UserDatabase }
 Style storage type. More...
 

Public Member Functions

 QgsRasterLayerProperties (QgsMapLayer *lyr, QgsMapCanvas *canvas, QWidget *parent=nullptr, Qt::WindowFlags=QgsGuiUtils::ModalDialogFlags)
 Constructor.
 
void addPropertiesPageFactory (const QgsMapLayerConfigWidgetFactory *factory) FINAL
 Adds properties page from a factory.
 
QgsExpressionContext createExpressionContext () const override
 This method needs to be reimplemented in all classes which implement this interface and return an expression context.
 
bool eventFilter (QObject *obj, QEvent *ev) override
 
Q_DECL_DEPRECATED void saveDefaultStyle ()
 Saves the default style when appropriate button is pressed.
 
- Public Member Functions inherited from QgsLayerPropertiesDialog
 QgsLayerPropertiesDialog (QgsMapLayer *layer, QgsMapCanvas *canvas, const QString &settingsKey, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags(), QgsSettings *settings=nullptr)
 Constructor for QgsLayerPropertiesDialog.
 
void loadStyle ()
 Triggers a dialog to load a saved style.
 
void saveDefaultStyle ()
 Saves the default style when appropriate button is pressed.
 
void saveStyleAs ()
 Saves a style when appriate button is pressed.
 
void setMetadataWidget (QgsMetadataWidget *widget, QWidget *page)
 Sets the metadata widget and page associated with the dialog.
 
- Public Member Functions inherited from QgsOptionsDialogBase
 QgsOptionsDialogBase (const QString &settingsKey, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags(), QgsSettings *settings=nullptr)
 Constructor.
 
 ~QgsOptionsDialogBase () override
 
void addPage (const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QStringList &path=QStringList(), const QString &key=QString())
 Adds a new page to the dialog pages.
 
bool iconOnly ()
 Determine if the options list is in icon only mode.
 
void initOptionsBase (bool restoreUi=true, const QString &title=QString())
 Set up the base ui connections for vertical tabs.
 
void insertPage (const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QString &before, const QStringList &path=QStringList(), const QString &key=QString())
 Inserts a new page into the dialog pages.
 
void resizeAlltabs (int index)
 Resizes all tabs when the dialog is resized.
 
void restoreLastPage ()
 Refocus the active tab from the last time the dialog was shown.
 
void restoreOptionsBaseUi (const QString &title=QString())
 Restore the base ui.
 
void setCurrentPage (const QString &page)
 Sets the dialog page (by object name) to show.
 
void setSettings (QgsSettings *settings)
 
- Public Member Functions inherited from QgsExpressionContextGenerator
virtual ~QgsExpressionContextGenerator ()=default
 

Protected Slots

void apply () FINAL
 
void optionsStackedWidget_CurrentChanged (int index) FINAL
 
void rollback () FINAL
 
- Protected Slots inherited from QgsLayerPropertiesDialog
virtual void apply ()=0
 Applies the dialog settings to the layer.
 
void openUrl (const QUrl &url)
 Handles opening a url from the dialog.
 
void optionsStackedWidget_CurrentChanged (int index) override
 
virtual void rollback ()
 Rolls back changes made to the layer.
 
virtual void syncToLayer ()=0
 Resets the dialog to the current layer state.
 
- Protected Slots inherited from QgsOptionsDialogBase
virtual void optionsStackedWidget_CurrentChanged (int index)
 Select relevant tab on current page change.
 
virtual void optionsStackedWidget_WidgetRemoved (int index)
 Remove tab and unregister widgets on page remove.
 
virtual void updateOptionsListVerticalTabs ()
 Update tabs on the splitter move.
 
void warnAboutMissingObjects ()
 

Friends

class QgsAppScreenShots
 

Additional Inherited Members

- Public Slots inherited from QgsLayerPropertiesDialog
void loadDefaultMetadata ()
 Reloads the default layer metadata for the layer.
 
void loadDefaultStyle ()
 Reloads the default style for the layer.
 
void loadMetadataFromFile ()
 Allows the user to load layer metadata from a file.
 
void loadStyleFromFile ()
 Allows the user to load layer style from a file.
 
void saveMetadataAsDefault ()
 Saves the current layer metadata as the default for the layer.
 
void saveMetadataToFile ()
 Allows the user to save the layer's metadata as a file.
 
void saveStyleAsDefault ()
 Saves the current layer style as the default for the layer.
 
void saveStyleToFile ()
 Allows the user to save the layer's style to a file.
 
- Public Slots inherited from QgsOptionsDialogBase
void searchText (const QString &text)
 searchText searches for a text in all the pages of the stacked widget and highlight the results
 
- Protected Member Functions inherited from QgsLayerPropertiesDialog
void initialize ()
 Initialize the dialog.
 
void refocusDialog ()
 Ensures the dialog is focused and activated.
 
void storeCurrentStyleForUndo ()
 Stores the current layer style so that undo operations can be performed.
 
- Protected Member Functions inherited from QgsOptionsDialogBase
QStandardItem * createItem (const QString &name, const QString &tooltip, const QString &icon)
 Creates a new QStandardItem with the specified name, tooltip and icon.
 
void paintEvent (QPaintEvent *e) override
 
void registerTextSearchWidgets ()
 register widgets in the dialog to search for text in it it is automatically called if a line edit has "mSearchLineEdit" as object name.
 
void showEvent (QShowEvent *e) override
 
virtual void updateWindowTitle ()
 
- Protected Attributes inherited from QgsLayerPropertiesDialog
QPushButton * mBtnMetadata = nullptr
 Metadata button.
 
QPushButton * mBtnStyle = nullptr
 Style button.
 
QgsMapCanvasmCanvas = nullptr
 Associated map canvas.
 
QList< QgsMapLayerConfigWidget * > mConfigWidgets
 Layer config widgets.
 
QgsMapLayerStyle mOldStyle
 Previous layer style.
 
- Protected Attributes inherited from QgsOptionsDialogBase
bool mDelSettings = false
 
QString mDialogTitle
 
bool mIconOnly = false
 
bool mInit = false
 
QDialogButtonBox * mOptButtonBox = nullptr
 
QListWidget * mOptListWidget = nullptr
 
QString mOptsKey
 
QSplitter * mOptSplitter = nullptr
 
QStackedWidget * mOptStackedWidget = nullptr
 
QStandardItemModel * mOptTreeModel = nullptr
 
QTreeView * mOptTreeView = nullptr
 
QList< QPair< QgsOptionsDialogHighlightWidget *, int > > mRegisteredSearchWidgets
 
QgsFilterLineEditmSearchLineEdit = nullptr
 
QPointer< QgsSettingsmSettings
 
QgsOptionsProxyModel * mTreeProxyModel = nullptr
 

Detailed Description

Property sheet for a raster map layer.

Since
QGIS 3.12 (in the GUI API)

Definition at line 57 of file qgsrasterlayerproperties.h.

Member Enumeration Documentation

◆ StyleType

enumeration for the different types of style

Enumerator
QML 
SLD 

Definition at line 66 of file qgsrasterlayerproperties.h.

Constructor & Destructor Documentation

◆ QgsRasterLayerProperties()

QgsRasterLayerProperties::QgsRasterLayerProperties ( QgsMapLayer lyr,
QgsMapCanvas canvas,
QWidget *  parent = nullptr,
Qt::WindowFlags  fl = QgsGuiUtils::ModalDialogFlags 
)

Constructor.

Parameters
lyrMap layer for which properties will be displayed
canvasthe QgsMapCanvas instance
parentthe parent of this widget
flwindows flag

Definition at line 98 of file qgsrasterlayerproperties.cpp.

Member Function Documentation

◆ addPropertiesPageFactory()

void QgsRasterLayerProperties::addPropertiesPageFactory ( const QgsMapLayerConfigWidgetFactory factory)
virtual

Adds properties page from a factory.

Reimplemented from QgsLayerPropertiesDialog.

Definition at line 579 of file qgsrasterlayerproperties.cpp.

◆ apply

void QgsRasterLayerProperties::apply ( )
protectedslot

Definition at line 893 of file qgsrasterlayerproperties.cpp.

◆ createExpressionContext()

QgsExpressionContext QgsRasterLayerProperties::createExpressionContext ( ) const
overridevirtual

This method needs to be reimplemented in all classes which implement this interface and return an expression context.

Implements QgsExpressionContextGenerator.

Definition at line 607 of file qgsrasterlayerproperties.cpp.

◆ eventFilter()

bool QgsRasterLayerProperties::eventFilter ( QObject *  obj,
QEvent *  ev 
)
override

Definition at line 1469 of file qgsrasterlayerproperties.cpp.

◆ optionsStackedWidget_CurrentChanged

void QgsRasterLayerProperties::optionsStackedWidget_CurrentChanged ( int  index)
protectedslot

Definition at line 1220 of file qgsrasterlayerproperties.cpp.

◆ rollback

void QgsRasterLayerProperties::rollback ( )
protectedslot

Definition at line 1431 of file qgsrasterlayerproperties.cpp.

◆ saveDefaultStyle()

void QgsRasterLayerProperties::saveDefaultStyle ( )

Saves the default style when appropriate button is pressed.

Deprecated:
QGIS 3.40. Use saveStyleAsDefault() instead.

Definition at line 1378 of file qgsrasterlayerproperties.cpp.

Friends And Related Symbol Documentation

◆ QgsAppScreenShots

friend class QgsAppScreenShots
friend

Definition at line 261 of file qgsrasterlayerproperties.h.


The documentation for this class was generated from the following files: