QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 "qgspanelwidget.h"
24 
25 #include "ui_qgsrenderercontainerbase.h"
26 
27 
34 class GUI_EXPORT QgsPanelWidgetStack : public QWidget, private Ui::QgsRendererWidgetContainerBase
35 {
36  Q_OBJECT
37  public:
38 
44  QgsPanelWidgetStack( QWidget* parent = nullptr );
45 
52  void addMainPanel( QgsPanelWidget* panel );
53 
59  QgsPanelWidget* mainWidget();
60 
66  QgsPanelWidget* takeMainWidget();
67 
72  void clear();
73 
74  public slots:
80  void acceptCurrentPanel();
81 
87  void showPanel( QgsPanelWidget* panel );
88 
94  void closePanel( QgsPanelWidget* panel );
95  private:
96  void updateBreadcrumb();
97  QStack<QString> mTitles;
98 };
99 
100 
101 #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.