KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
ViewGuard.h
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: Waqar Ahmed <waqar.ahmed@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11
12#ifndef KDDW_VIEW_GUARD_H
13#define KDDW_VIEW_GUARD_H
14
15#include "kddockwidgets/docks_export.h"
16
17#include "kdbindings/signal.h"
18
19namespace KDDockWidgets {
20
21namespace Core {
22class View;
23
26class DOCKS_EXPORT ViewGuard
27{
28public:
29 ViewGuard(View *v);
30 ViewGuard(const ViewGuard &);
31 ~ViewGuard();
32
33 operator bool() const;
34 View *operator->();
35 const View *operator->() const;
36 void clear();
37 bool isNull() const;
38 View *view() const;
39
40 ViewGuard &operator=(View *);
41 ViewGuard &operator=(const ViewGuard &);
42
43private:
44 void setView(View *);
45 View *v = nullptr;
47};
48
49}
50}
51
52#endif
A ConnectionHandle represents the connection of a Signal to a slot (i.e. a function that is called wh...
Definition signal.h:68
This class provides a weak reference to a view i.e., it becomes null automatically once a View is des...
Definition ViewGuard.h:27
Class to abstract QAction, so code still works with QtQuick and Flutter.

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8