Subgroup: Panel
Class: QgsPanelWidget¶
-
class
qgis.gui.
QgsPanelWidget
(parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QWidget
Base class for any widget that can be shown as a inline panel
Parameters: parent – Parent widget. Base class for any widget that can be shown as a inline panel
Methods
acceptPanel
Accept the panel. actionEvent
autoDelete
The the auto delete property on the widget. changeEvent
childEvent
closeEvent
connectChildPanel
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. connectChildPanels
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. connectNotify
contextMenuEvent
create
customEvent
destroy
disconnectNotify
dockMode
Returns the dock mode state. dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
enterEvent
event
findParentPanel
Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget. focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
hideEvent
initPainter
inputMethodEvent
isSignalConnected
keyPressEvent
Overridden key press event to handle the esc event on the widget. keyReleaseEvent
leaveEvent
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
openPanel
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. paintEvent
panelTitle
The title of the panel. receivers
resizeEvent
sender
senderSignalIndex
setAutoDelete
The the auto delete property on the widget. setDockMode
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs setPanelTitle
Set the title of the panel when shown in the interface. sharedPainter
showEvent
tabletEvent
timerEvent
updateMicroFocus
wheelEvent
Signals
panelAccepted
Emitted when the panel is accepted by the user. showPanel
Emit when you require a panel to be show in the interface. widgetChanged
Emitted when the widget state changes. Attributes
-
acceptPanel
(self)¶ Accept the panel. Causes panelAccepted to be emitted. Widgets are normally removed form the interface using the panel manager or the caller.
-
actionEvent
()¶
-
autoDelete
(self) → bool¶ 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.
Returns: The auto delete value for the widget.
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectChildPanel
(self, panel: QgsPanelWidget)¶ 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 – The panel to connect.
-
connectChildPanels
(self, panels: object)¶ 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 – A list of panel widgets to connect.
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dockMode
(self) → bool¶ 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.
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
findParentPanel
(widget: QWidget) → QgsPanelWidget¶ 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 None New in version 3.0.
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
(self, event: QKeyEvent)¶ Overridden key press event to handle the esc event on the widget.
Parameters: event – The key event
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
openPanel
(self, panel: QgsPanelWidget)¶ 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 – The panel widget to open.
-
paintEvent
()¶
-
panelAccepted
¶ Emitted when the panel is accepted by the user.
Parameters: panel – 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. [signal]
-
panelTitle
(self) → str¶ The title of the panel.
Returns: The title pf the panel.
-
receivers
()¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAutoDelete
(self, autoDelete: bool)¶ 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 – Enable or disable auto delete on the panel.
-
setDockMode
(self, dockMode: bool)¶ 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.
-
setPanelTitle
(self, panelTitle: str)¶ Set the title of the panel when shown in the interface.
Parameters: panelTitle – The panel title.
-
showEvent
()¶
-
showPanel
¶ Emit when you require a panel to be show in the interface.
Parameters: panel – 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. [signal]
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-
widgetChanged
¶ 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. [signal]
-