QgsPanelWidget class
Base class for any widget that can be shown as a inline panel.
Contents
Derived classes
- class QgsColorBrewerColorRampWidget
- A widget which allows users to modify the properties of a QgsColorBrewerColorRamp.
- class QgsCompoundColorWidget
- A custom QGIS widget for selecting a color, including options for selecting colors via hue wheel, color swatches, and a color sampler.
- class QgsDataDefinedSizeLegendWidget
- Widget for configuration of appearance of legend for marker symbols with data-defined size.
- class QgsEffectStackCompactWidget
- A small widget consisting of a checkbox for enabling/disabling an effect stack and a button for opening an effect stack customization dialog.
- class QgsEffectStackPropertiesWidget
- A widget for modifying the properties of a QgsEffectStack, including adding and reordering effects within the stack.
- class QgsLayoutItemBaseWidget
- A base class for property widgets for layout items.
- class QgsLimitedRandomColorRampWidget
- A widget which allows users to modify the properties of a QgsLimitedRandomColorRamp.
- class QgsMapLayerConfigWidget
- A panel widget that can be shown in the map style dock.
- class QgsMapUnitScaleWidget
- A widget which allows the user to choose the minimum and maximum scale of an object in map units and millimeters.
- class QgsPanelWidgetWrapper
- Wrapper widget for existing widgets which can't have the inheritance tree changed, e.g dialogs.
- class QgsPresetColorRampWidget
- A widget which allows users to modify the properties of a QgsPresetSchemeColorRamp.
- class QgsPropertyAssistantWidget
- Shows a user-friendly assistant guiding users through the creation of QgsProperty overrides.
- class QgsRendererWidget
- Base class for renderer settings widgets.
- class QgsSubstitutionListWidget
- A widget which allows users to specify a list of substitutions to apply to a string, with options for exporting and importing substitution lists.
- class QgsSymbolLevelsWidget
- A widget which allows the user to modify the rendering order of symbol layers.
- class QgsSymbolSelectorWidget
- Symbol selector widget that can be used to select and build a symbol.
Public static functions
- static auto findParentPanel(QWidget* widget) -> QgsPanelWidget*
- Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget.
Constructors, destructors, conversion operators
- QgsPanelWidget(QWidget* parent = nullptr)
- Base class for any widget that can be shown as a inline panel.
Public functions
- auto autoDelete() -> bool
- The the auto delete property on the widget.
- void connectChildPanel(QgsPanelWidget* panel)
- Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
- void connectChildPanels(const QList<QgsPanelWidget*>& panels)
- Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
- auto dockMode() -> bool
- Returns the dock mode state.
- auto panelTitle() -> QString
- The title of the panel.
- void setAutoDelete(bool autoDelete)
- The the auto delete property on the widget.
- void setDockMode(bool dockMode) virtual
- Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
- void setPanelTitle(const QString& panelTitle)
- Set the title of the panel when shown in the interface.
Signals
- void panelAccepted(QgsPanelWidget* panel)
- Emitted when the panel is accepted by the user.
- void showPanel(QgsPanelWidget* panel)
- Emit when you require a panel to be show in the interface.
- void widgetChanged()
- Emitted when the widget state changes.
Public slots
- void acceptPanel()
- Accept the panel.
- void openPanel(QgsPanelWidget* panel)
- Open a panel or dialog depending on dock mode setting If dock mode is true this method will emit the showPanel signal for connected slots to handle the open event.
Protected functions
- void keyPressEvent(QKeyEvent* event) override
- Overridden key press event to handle the esc event on the widget.
Function documentation
static QgsPanelWidget* QgsPanelWidget:: findParentPanel(QWidget* widget)
Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget.
| Parameters | |
|---|---|
| widget | widget which may be contained within a panel widget |
| Returns | parent panel widget if found, otherwise nullptr |
QgsPanelWidget:: QgsPanelWidget(QWidget* parent = nullptr)
Base class for any widget that can be shown as a inline panel.
| Parameters | |
|---|---|
| parent | Parent widget. |
bool QgsPanelWidget:: autoDelete()
The the auto delete property on the widget.
| Returns | The auto delete value for the widget. |
|---|
True by default. When auto delete is enabled when a panel is removed from the stack it will be deleted.
void QgsPanelWidget:: connectChildPanel(QgsPanelWidget* panel)
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
| Parameters | |
|---|---|
| panel | The panel to connect. |
Use this method if you have children widgets that need to show a panel to the user.
void QgsPanelWidget:: connectChildPanels(const QList<QgsPanelWidget*>& panels)
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
| Parameters | |
|---|---|
| panels | A list of panel widgets to connect. |
Use this method if you have children widgets that need to show a panel to the user.
bool QgsPanelWidget:: dockMode()
Returns the dock mode state.
| Returns | True if in dock mode. If in dock mode the widget will emit the showPanel signal to handle panel opening If false it will open dialogs when openPanel is called. |
|---|
void QgsPanelWidget:: setAutoDelete(bool autoDelete)
The the auto delete property on the widget.
| Parameters | |
|---|---|
| autoDelete | Enable or disable auto delete on the panel. |
True by default. When auto delete is enabled when a panel is removed from the stack it will be deleted.
void QgsPanelWidget:: setDockMode(bool dockMode) virtual
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
| Parameters | |
|---|---|
| dockMode | True to enable dock mode. |
void QgsPanelWidget:: setPanelTitle(const QString& panelTitle)
Set the title of the panel when shown in the interface.
| Parameters | |
|---|---|
| panelTitle | The panel title. |
void QgsPanelWidget:: panelAccepted(QgsPanelWidget* panel) signal
Emitted when the panel is accepted by the user.
| Parameters | |
|---|---|
| panel | The panel widget that was accepted. |
void QgsPanelWidget:: showPanel(QgsPanelWidget* panel) signal
Emit when you require a panel to be show in the interface.
| Parameters | |
|---|---|
| panel | The panel widget to show. |
void QgsPanelWidget:: widgetChanged() signal
Emitted when the widget state changes.
Connect to this to pull any changes off the widget when needed. As panels are non blocking "dialogs" you should listen to this signal to give the user feedback when something changes.
void QgsPanelWidget:: acceptPanel() public slot
Accept the panel.
Causes panelAccepted to be emitted. Widgets are normally removed form the interface using the panel manager or the caller.
void QgsPanelWidget:: openPanel(QgsPanelWidget* panel) public slot
Open a panel or dialog depending on dock mode setting If dock mode is true this method will emit the showPanel signal for connected slots to handle the open event.
| Parameters | |
|---|---|
| panel | The panel widget to open. |
If dock mode is false this method will open a dialog and block the user.
void QgsPanelWidget:: keyPressEvent(QKeyEvent* event) override protected
Overridden key press event to handle the esc event on the widget.
| Parameters | |
|---|---|
| event | The key event |