QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgspanelwidgetstack.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspanelwidgetstack.h
3 ---------------------
4 begin : June 2016
5 copyright : (C) 2016 by Nathan Woodrow
6 email :
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSPANELWIDGETSTACK_H
16#define QGSPANELWIDGETSTACK_H
17
18#include <QWidget>
19#include <QKeyEvent>
20#include <QStackedWidget>
21#include <QStack>
22
23#include "ui_qgsrenderercontainerbase.h"
24#include "qgis_gui.h"
25
26class QgsPanelWidget;
27
35class GUI_EXPORT QgsPanelWidgetStack : public QWidget, private Ui::QgsRendererWidgetContainerBase
36{
37 Q_OBJECT
38 public:
44 QgsPanelWidgetStack( QWidget *parent = nullptr );
45
60 void setMainPanel( QgsPanelWidget *panel SIP_TRANSFER );
61
68 QgsPanelWidget *mainPanel();
69
79 QgsPanelWidget *takeMainPanel() SIP_TRANSFERBACK;
80
85 void clear();
86
90 QgsPanelWidget *currentPanel();
91
92 QSize sizeHint() const override;
93 QSize minimumSizeHint() const override;
94
95 public slots:
96
103 void acceptCurrentPanel();
104
110 void acceptAllPanels();
111
117 void showPanel( QgsPanelWidget *panel );
118
124 void closePanel( QgsPanelWidget *panel );
125
126 protected:
127 void mouseReleaseEvent( QMouseEvent *e ) override;
128 void keyPressEvent( QKeyEvent *e ) override;
129
130 private:
131 void updateBreadcrumb();
132 void updateMenuButton();
133 QStack<QString> mTitles;
134};
135
136
137#endif // QGSPANELWIDGETSTACK_H
A stack widget to manage panels in the interface.
Base class for any widget that can be shown as a inline panel.
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_TRANSFERBACK
Definition qgis_sip.h:48