Class: QgsPanelWidget¶
Base class for any widget that can be shown as an inline panel.
Class Hierarchy¶
Base classes¶
Subclasses¶
Base class for renderer settings widgets. |
|
A widget which creates a mapping for defining sets of aggregates of fields from a |
|
A base class for property widgets for annotation items. |
|
Base class for widgets which allow control over the properties of |
|
A widget showing a browser tree view along with toolbar and toggleable properties pane. |
|
A panel widget for configuration of callouts. |
|
A widget which wraps a |
|
A widget which allows users to modify the properties of a |
|
A widget for properties relating to a |
|
A custom QGIS widget for selecting a color, including options for selecting colors via hue wheel, color swatches, and a color sampler. |
|
A generic widget allowing users to pick a Coordinate Reference System (or define their own). |
|
A widget for entering a custom dash space pattern for lines. |
|
Widget for configuration of appearance of legend for marker symbols with data-defined size. |
|
Embeds the browser view to select an existing data source. |
|
A panel widget that can be shown in the developer tools panel. |
|
A widget for customizing an individual conditional formatting rule. |
|
A small widget consisting of a checkbox for enabling/disabling an effect stack and a button for opening an effect stack customization dialog. |
|
A widget for modifying the properties of a |
|
A widget for customizing conditional formatting options. |
|
Creates a mapping from one set of |
|
A widget showing entries from a |
|
Base class for widgets which allow customization of label engine properties, such as label placement settings. |
|
Base class for widgets which allow control over the properties of |
|
A widget which allows configuration of a list of labeling engine rules. |
|
A widget which allows configuration of the properties of a single |
|
A base class for property widgets for layout items. |
|
Widget for configuring a custom legend patch shape. |
|
A widget which allows users to modify the properties of a |
|
A panel widget that can be shown in the map style dock. |
|
A widget which allows the user to choose the minimum and maximum scale of an object in map units and millimeters. |
|
A widget which embeds the browser view to select a DB schema and a new table name. |
|
A widget which allows choice of numeric formats and the properties of them. |
|
Wrapper widget for existing widgets which can’t have the inheritance tree changed, e.g dialogs. |
|
Base class for point cloud 2D renderer settings widgets. |
|
A widget which allows users to modify the properties of a |
|
A widget for showing Processing algorithm execution history. |
|
A panel widget for selection of multiple options from a fixed list of options. |
|
A widget which allows users to select the value for the parameters for an algorithm. |
|
Shows a user-friendly assistant guiding users through the creation of |
|
The |
|
A widget for editing the details of a rule based renderer rule. |
|
A widget which allows users to specify a list of substitutions to apply to a string, with options for exporting and importing substitution lists. |
|
A widget for customising animation settings for a symbol. |
|
A widget for customising buffer settings for a symbol. |
|
A widget which allows the user to modify the rendering order of symbol layers. |
|
Symbol selector widget that can be used to select and build a symbol. |
|
A widget for configuring |
|
A widget for controlling playback properties of a |
|
Base class for tiled scene 2D renderer settings widgets. |
Methods
Accept the panel. |
|
The the auto delete property on the widget. |
|
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. |
|
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. |
|
Returns the dock mode state. |
|
Open a panel or dialog depending on dock mode setting If dock mode is |
|
The title of the panel. |
|
The the auto delete property on the widget. |
|
Set the title of the panel when shown in the interface. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsPanelWidget. See the FAQ for more details.
Returns |
|
Overridden key press event to handle the esc event on the widget. |
|
Returns the menu to use for the menu button for this panel, or |
|
Returns the (translated) tooltip text to use for the menu button for this panel. |
|
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs |
Static Methods
Traces through the parents of a widget to find if it is contained within a |
Signals
Emitted when the panel is accepted by the user. |
|
Emit when you require a panel to be show in the interface. |
|
Emitted when the widget state changes. |
- class qgis.gui.QgsPanelWidget[source]¶
Bases:
QWidget
- __init__(parent: QWidget | None = None)
Base class for any widget that can be shown as an inline panel
- Parameters:
parent (Optional[QWidget] = None) – Parent widget.
- acceptPanel(self)[source]¶
Accept the panel. Causes panelAccepted to be emitted. Widgets are normally removed form the interface using the panel manager or the caller.
- virtual applySizeConstraintsToStack(self) bool [source]¶
Returns
True
if the size constraints and hints for the panel widget should be applied to the parentQgsPanelWidgetStack
which this panel is shown in.The default behavior is to return
False
.Added in version 3.20.
- Return type:
bool
- autoDelete(self) bool [source]¶
The the auto delete property on the widget.
True
by default. When auto delete is enabled when a panel is removed from the stack it will be deleted.- Return type:
bool
- Returns:
The auto delete value for the widget.
- connectChildPanel(self, panel: QgsPanelWidget | None)[source]¶
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
Use this method if you have children widgets that need to show a panel to the user.
- Parameters:
panel (Optional[QgsPanelWidget]) – The panel to connect.
- connectChildPanels(self, panels: Iterable[QgsPanelWidget])[source]¶
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
Use this method if you have children widgets that need to show a panel to the user.
- Parameters:
panels (Iterable[QgsPanelWidget]) – A list of panel widgets to connect.
- dockMode(self) bool [source]¶
Returns the dock mode state.
- Return type:
bool
- Returns:
True
if in dock mode. If in dock mode the widget will emit the showPanel signal to handle panel opening IfFalse
it will open dialogs when openPanel is called.
- static findParentPanel(widget: QWidget | None) QgsPanelWidget | None [source]¶
Traces through the parents of a widget to find if it is contained within a
QgsPanelWidget
widget.- Parameters:
widget (Optional[QWidget]) – widget which may be contained within a panel widget
- Return type:
Optional[QgsPanelWidget]
- Returns:
parent panel widget if found, otherwise
None
- virtual keyPressEvent(self, event: QKeyEvent | None)[source]¶
Overridden key press event to handle the esc event on the widget.
- Parameters:
event (Optional[QKeyEvent]) – The key event
Returns the menu to use for the menu button for this panel, or
None
if no menu button is required.Added in version 3.12.
- Return type:
Optional[QMenu]
Returns the (translated) tooltip text to use for the menu button for this panel.
This is only used when the panel returns a
menuButtonMenu()
.Added in version 3.12.
- Return type:
str
- openPanel(self, panel: QgsPanelWidget | None)[source]¶
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.If dock mode is
False
this method will open a dialog and block the user.- Parameters:
panel (Optional[QgsPanelWidget]) – The panel widget to open.
- signal panelAccepted(panel: QgsPanelWidget)[source]¶
Emitted when the panel is accepted by the user.
- Parameters:
panel (QgsPanelWidget) – The panel widget that was accepted.
Note
This argument is normally raised with emit panelAccepted(this) so that callers can retrieve the widget easier in calling code.
Note
this is emitted only when this panel is accepted, and is not emitted for child panels. For example, if this panel opens a second stacked panel, then this panel will not emit panelAccepted when the second panel is accepted.
- panelTitle(self) str [source]¶
The title of the panel.
- Return type:
str
- Returns:
The title pf the panel.
- setAutoDelete(self, autoDelete: bool)[source]¶
The the auto delete property on the widget.
True
by default. When auto delete is enabled when a panel is removed from the stack it will be deleted.- Parameters:
autoDelete (bool) – Enable or disable auto delete on the panel.
- virtual setDockMode(self, dockMode: bool)[source]¶
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs
- Parameters:
dockMode (bool) –
True
to enable dock mode.
- setPanelTitle(self, panelTitle: str | None)[source]¶
Set the title of the panel when shown in the interface.
- Parameters:
panelTitle (Optional[str]) – The panel title.
- signal showPanel(panel: QgsPanelWidget)[source]¶
Emit when you require a panel to be show in the interface.
- Parameters:
panel (QgsPanelWidget) – The panel widget to show.
Note
If you are connected to this signal you should also connect given panels showPanel signal as they can be nested.