QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
A stack widget to manage panels in the interface. More...
#include <qgspanelwidgetstack.h>
Public Slots | |
void | acceptAllPanels () |
Accepts all panel widgets open in the stack in turn until only the mainPanel() remains. More... | |
void | acceptCurrentPanel () |
Accept the current active widget in the stack. More... | |
void | closePanel (QgsPanelWidget *panel) |
Closes the panel in the widget. More... | |
void | showPanel (QgsPanelWidget *panel) |
Show a panel in the stack widget. More... | |
Public Member Functions | |
QgsPanelWidgetStack (QWidget *parent=nullptr) | |
A stack widget to manage panels in the interface. More... | |
void | clear () |
Clear the stack of all widgets. More... | |
QgsPanelWidget * | currentPanel () |
Returns the panel currently shown in the stack. More... | |
QgsPanelWidget * | mainPanel () |
The main panel widget that is set in the stack. More... | |
QSize | minimumSizeHint () const override |
void | setMainPanel (QgsPanelWidget *panel SIP_TRANSFER) |
Sets the main panel widget for the stack and selects it for the user. More... | |
QSize | sizeHint () const override |
QgsPanelWidget * | takeMainPanel () SIP_TRANSFERBACK |
Removes the main panel widget from the stack and transfers ownsership to the caller. More... | |
Protected Member Functions | |
void | keyPressEvent (QKeyEvent *e) override |
void | mouseReleaseEvent (QMouseEvent *e) override |
A stack widget to manage panels in the interface.
Handles the open and close events for added panels. Any widgets that want to have a non blocking panel based interface should use this class to manage the panels.
Definition at line 35 of file qgspanelwidgetstack.h.
QgsPanelWidgetStack::QgsPanelWidgetStack | ( | QWidget * | parent = nullptr | ) |
A stack widget to manage panels in the interface.
Handles the open and close events for added panels.
parent |
Definition at line 26 of file qgspanelwidgetstack.cpp.
|
slot |
Accepts all panel widgets open in the stack in turn until only the mainPanel() remains.
Definition at line 132 of file qgspanelwidgetstack.cpp.
|
slot |
Accept the current active widget in the stack.
Calls the panelAccepeted signal on the active widget.
Definition at line 122 of file qgspanelwidgetstack.cpp.
void QgsPanelWidgetStack::clear | ( | ) |
Clear the stack of all widgets.
Unless the panels autoDelete is set to false
the widget will be deleted.
Definition at line 71 of file qgspanelwidgetstack.cpp.
|
slot |
Closes the panel in the widget.
Will also delete the widget. This slot is normally auto connected to panelAccepted when a panel is shown.
panel | The panel to close. |
Definition at line 165 of file qgspanelwidgetstack.cpp.
QgsPanelWidget * QgsPanelWidgetStack::currentPanel | ( | ) |
Returns the panel currently shown in the stack.
Definition at line 96 of file qgspanelwidgetstack.cpp.
|
overrideprotected |
Definition at line 196 of file qgspanelwidgetstack.cpp.
QgsPanelWidget * QgsPanelWidgetStack::mainPanel | ( | ) |
The main panel widget that is set in the stack.
The main widget can not be closed and doesn't display a back button.
Definition at line 49 of file qgspanelwidgetstack.cpp.
|
override |
Definition at line 111 of file qgspanelwidgetstack.cpp.
|
overrideprotected |
Definition at line 188 of file qgspanelwidgetstack.cpp.
void QgsPanelWidgetStack::setMainPanel | ( | QgsPanelWidget *panel | SIP_TRANSFER | ) |
Sets the main panel widget for the stack and selects it for the user.
The main widget cannot be closed and only the showPanel signal is attached to handle children widget opening panels.
Ownership of panel is transferred to the stack.
Definition at line 37 of file qgspanelwidgetstack.cpp.
|
slot |
Show a panel in the stack widget.
Will connect to the panels showPanel event to handle nested panels. Auto switches the the given panel for the user.
panel | The panel to show. |
Definition at line 149 of file qgspanelwidgetstack.cpp.
|
override |
Definition at line 101 of file qgspanelwidgetstack.cpp.
QgsPanelWidget * QgsPanelWidgetStack::takeMainPanel | ( | ) |
Removes the main panel widget from the stack and transfers ownsership to the caller.
Definition at line 54 of file qgspanelwidgetstack.cpp.