QGIS API Documentation 3.41.0-Master (45a0abf3bec)
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:
39
45 QgsPanelWidgetStack( QWidget *parent = nullptr );
46
61 void setMainPanel( QgsPanelWidget *panel SIP_TRANSFER );
62
69 QgsPanelWidget *mainPanel();
70
80 QgsPanelWidget *takeMainPanel() SIP_TRANSFERBACK;
81
86 void clear();
87
91 QgsPanelWidget *currentPanel();
92
93 QSize sizeHint() const override;
94 QSize minimumSizeHint() const override;
95
96 public slots:
97
104 void acceptCurrentPanel();
105
111 void acceptAllPanels();
112
118 void showPanel( QgsPanelWidget *panel );
119
125 void closePanel( QgsPanelWidget *panel );
126
127 protected:
128
129 void mouseReleaseEvent( QMouseEvent *e ) override;
130 void keyPressEvent( QKeyEvent *e ) override;
131
132 private:
133 void updateBreadcrumb();
134 void updateMenuButton();
135 QStack<QString> mTitles;
136};
137
138
139#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