QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
src
gui
qgspanelwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspanelwidget.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 QGSPANELWIDGET_H
16
#define QGSPANELWIDGET_H
17
18
#include <QWidget>
19
#include <QKeyEvent>
20
#include <QStack>
21
25
class
GUI_EXPORT
QgsPanelWidget
:
public
QWidget
26
{
27
Q_OBJECT
28
public
:
33
QgsPanelWidget
(
QWidget
*parent = 0 );
34
39
void
setPanelTitle
(
QString
panelTitle ) { mPanelTitle = panelTitle; }
40
45
QString
panelTitle
() {
return
mPanelTitle; }
46
54
void
connectChildPanels(
QList<QgsPanelWidget*>
panels );
55
63
void
connectChildPanel(
QgsPanelWidget
* panel );
64
70
virtual
void
setDockMode(
bool
dockMode );
71
78
bool
dockMode
() {
return
mDockMode; }
79
86
void
setAutoDelete
(
bool
autoDelete ) { mAutoDelete = autoDelete; }
87
94
bool
autoDelete
() {
return
mAutoDelete; }
95
102
static
QgsPanelWidget
* findParentPanel(
QWidget
* widget );
103
104
signals:
105
115
void
panelAccepted(
QgsPanelWidget
* panel );
116
123
void
showPanel(
QgsPanelWidget
* panel );
124
131
void
widgetChanged();
132
133
public
slots:
144
void
openPanel(
QgsPanelWidget
* panel );
145
150
void
acceptPanel();
151
152
protected
:
153
158
void
keyPressEvent
(
QKeyEvent
* event );
159
160
private
:
161
bool
mAutoDelete;
162
QString
mPanelTitle;
163
bool
mDockMode;
164
165
};
166
167
175
class
GUI_EXPORT
QgsPanelWidgetWrapper
:
public
QgsPanelWidget
176
{
177
Q_OBJECT
178
public
:
185
QgsPanelWidgetWrapper
(
QWidget
* widget,
QWidget
* parent =
nullptr
);
186
191
QWidget
*
widget
() {
return
mWidget; }
192
193
private
:
194
QWidget
* mWidget;
195
196
};
197
198
#endif // QGSPANELWIDGET_H
QWidget
QgsPanelWidgetWrapper::widget
QWidget * widget()
Returns the internal widget that is wrapped in this panel.
Definition:
qgspanelwidget.h:191
QgsPanelWidget::dockMode
bool dockMode()
Return the dock mode state.
Definition:
qgspanelwidget.h:78
QgsPanelWidget::autoDelete
bool autoDelete()
The the auto delete property on the widget.
Definition:
qgspanelwidget.h:94
QgsPanelWidget
Base class for any widget that can be shown as a inline panel.
Definition:
qgspanelwidget.h:25
QgsPanelWidget::setAutoDelete
void setAutoDelete(bool autoDelete)
The the auto delete property on the widget.
Definition:
qgspanelwidget.h:86
QgsPanelWidget::panelTitle
QString panelTitle()
The title of the panel.
Definition:
qgspanelwidget.h:45
QString
QList
QKeyEvent
QgsPanelWidget::setPanelTitle
void setPanelTitle(QString panelTitle)
Set the title of the panel when shown in the interface.
Definition:
qgspanelwidget.h:39
QWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
QgsPanelWidgetWrapper
Wrapper widget for existing widgets which can't have the inheritance tree changed, e.g dialogs.
Definition:
qgspanelwidget.h:175
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13