QGIS API Documentation
3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
src
gui
qgsdockwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdockwidget.h
3
---------------
4
begin : June 2016
5
copyright : (C) 2016 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
#ifndef QGSDOCKWIDGET_H
18
#define QGSDOCKWIDGET_H
19
20
#include "qgis_gui.h"
21
#include "
qgis_sip.h
"
22
23
#include <QDockWidget>
24
30
31
class
GUI_EXPORT
QgsDockWidget
:
public
QDockWidget
32
{
33
Q_OBJECT
34
35
public
:
41
explicit
QgsDockWidget
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
, Qt::WindowFlags flags = Qt::WindowFlags() );
42
49
explicit
QgsDockWidget
(
const
QString &title, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
, Qt::WindowFlags flags = Qt::WindowFlags() );
50
57
bool
isUserVisible
()
const
;
58
66
void
setToggleVisibilityAction
( QAction *action );
67
74
QAction *
toggleVisibilityAction
();
75
76
public
slots:
77
94
void
setUserVisible
(
bool
visible );
95
105
void
toggleUserVisible
();
106
107
protected
:
108
void
closeEvent
( QCloseEvent * )
override
;
109
void
showEvent
( QShowEvent *event )
override
;
110
111
signals:
112
118
void
closed
();
119
126
void
closedStateChanged
(
bool
wasClosed );
127
133
void
opened
();
134
141
void
openedStateChanged
(
bool
wasOpened );
142
143
private
slots:
144
145
void
handleVisibilityChanged(
bool
visible );
146
147
private
:
148
bool
mVisibleAndActive =
false
;
149
150
QAction *mAction =
nullptr
;
151
};
152
#endif
//QGSDOCKWIDGET_H
QgsDockWidget::closed
void closed()
Emitted when dock widget is closed.
QgsDockWidget::toggleVisibilityAction
QAction * toggleVisibilityAction()
Returns the action linked to the dock.
Definition
qgsdockwidget.cpp:77
QgsDockWidget::closedStateChanged
void closedStateChanged(bool wasClosed)
Emitted when dock widget is closed (or opened).
QgsDockWidget::QgsDockWidget
QgsDockWidget(QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
Constructor for QgsDockWidget.
Definition
qgsdockwidget.cpp:25
QgsDockWidget::isUserVisible
bool isUserVisible() const
Returns true if the dock is both opened and raised to the front (ie not hidden by any other tabs.
Definition
qgsdockwidget.cpp:58
QgsDockWidget::setUserVisible
void setUserVisible(bool visible)
Sets the dock widget as visible to a user, ie both shown and raised to the front.
Definition
qgsdockwidget.cpp:37
QgsDockWidget::toggleUserVisible
void toggleUserVisible()
Toggles whether the dock is user visible.
Definition
qgsdockwidget.cpp:53
QgsDockWidget::closeEvent
void closeEvent(QCloseEvent *) override
Definition
qgsdockwidget.cpp:82
QgsDockWidget::opened
void opened()
Emitted when dock widget is opened.
QgsDockWidget::showEvent
void showEvent(QShowEvent *event) override
Definition
qgsdockwidget.cpp:90
QgsDockWidget::setToggleVisibilityAction
void setToggleVisibilityAction(QAction *action)
Links an action to the dock, so that toggling the action will automatically set the dock's visibility...
Definition
qgsdockwidget.cpp:63
QgsDockWidget::openedStateChanged
void openedStateChanged(bool wasOpened)
Emitted when dock widget is opened (or closed).
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
Generated on
for QGIS API Documentation by
1.15.0