QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
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
92 QgsPanelWidget *currentPanel();
93
94 QSize sizeHint() const override;
95 QSize minimumSizeHint() const override;
96
97 public slots:
98
105 void acceptCurrentPanel();
106
113 void acceptAllPanels();
114
120 void showPanel( QgsPanelWidget *panel );
121
127 void closePanel( QgsPanelWidget *panel );
128
129 protected:
130
131 void mouseReleaseEvent( QMouseEvent *e ) override;
132 void keyPressEvent( QKeyEvent *e ) override;
133
134 private:
135 void updateBreadcrumb();
136 void updateMenuButton();
137 QStack<QString> mTitles;
138};
139
140
141#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