/usr/include/qgis/qgspanelwidgetstack.h is in libqgis-dev 2.18.17+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | /***************************************************************************
qgspanelwidgetstack.h
---------------------
begin : June 2016
copyright : (C) 2016 by Nathan Woodrow
email :
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSPANELWIDGETSTACK_H
#define QGSPANELWIDGETSTACK_H
#include <QWidget>
#include <QKeyEvent>
#include <QStackedWidget>
#include <QStack>
#include "qgspanelwidget.h"
#include "ui_qgsrenderercontainerbase.h"
/** \ingroup gui
* 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.
*/
class GUI_EXPORT QgsPanelWidgetStack : public QWidget, private Ui::QgsRendererWidgetContainerBase
{
Q_OBJECT
public:
/**
* A stack widget to manage panels in the interface. Handles the open and close events
* for added panels.
* @param parent
*/
QgsPanelWidgetStack( QWidget* parent = nullptr );
/**
* Adds the main widget to the stack and selects it for the user
* The main widget can not be closed and only the showPanel signal is attached
* to handle children widget opening panels.
* @param panel The panel to set as the first widget in the stack.
*/
void addMainPanel( QgsPanelWidget* panel );
/**
* The main widget that is set in the stack. The main widget can not be closed
* and doesn't display a back button.
* @return The main QgsPanelWidget that is active in the stack.
*/
QgsPanelWidget* mainWidget();
/**
* Removes the main widget from the stack and transfers ownsership to the
* caller.
* @return The main widget that is set in the stack.
*/
QgsPanelWidget* takeMainWidget();
/**
* Clear the stack of all widgets. Unless the panels autoDelete is set to false
* the widget will be deleted.
*/
void clear();
public slots:
/**
* Accept the current active widget in the stack.
*
* Calls the panelAccepeted signal on the active widget.
*/
void acceptCurrentPanel();
/**
* 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.
* @param panel The panel to show.
*/
void showPanel( QgsPanelWidget* panel );
/**
* Closes the panel in the widget. Will also delete the widget.
* This slot is normally auto connected to panelAccepted when a panel is shown.
* @param panel The panel to close.
*/
void closePanel( QgsPanelWidget* panel );
private:
void updateBreadcrumb();
QStack<QString> mTitles;
};
#endif // QGSPANELWIDGETSTACK_H
|