Seamly2D
Code documentation
vwidgetproperty_p.h
Go to the documentation of this file.
1
/************************************************************************
2
**
3
** @file vwidgetproperty_p.h
4
** @author hedgeware <internal(at)hedgeware.net>
5
** @date
6
**
7
** @brief
8
** @copyright
9
** All rights reserved. This program and the accompanying materials
10
** are made available under the terms of the GNU Lesser General Public License
11
** (LGPL) version 2.1 which accompanies this distribution, and is available at
12
** http://www.gnu.org/licenses/lgpl-2.1.html
13
**
14
** This library is distributed in the hope that it will be useful,
15
** but WITHOUT ANY WARRANTY; without even the implied warranty of
16
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
** Lesser General Public License for more details.
18
**
19
*************************************************************************/
20
21
#ifndef VWIDGETPROPERTY_P_H
22
#define VWIDGETPROPERTY_P_H
23
24
// ONLY INCLUDE THIS IN .CPP FILES
25
26
#include "
vproperty_p.h
"
27
#include "../vmisc/diagnostic.h"
28
29
#include <QPointer>
30
#include <QWidget>
31
32
namespace
VPE
33
{
34
35
QT_WARNING_PUSH
36
QT_WARNING_DISABLE_CLANG(
"-Wweak-vtables"
)
37
38
class
VWidgetPropertyPrivate
: public
VPropertyPrivate
39
{
40
public
:
41
//! The widget to show
42
QPointer<QWidget>
Widget
;
43
44
//! Constructor passing name and type
45
VWidgetPropertyPrivate
(
const
QString& name, QVariant::Type type, QWidget* widget =
nullptr
)
46
:
VPropertyPrivate
(name, type), Widget(widget) {}
47
48
//! Constructor
49
VWidgetPropertyPrivate
()
50
:
VPropertyPrivate
(), Widget(nullptr) {}
51
52
//! Destructor
53
virtual
~VWidgetPropertyPrivate
() Q_DECL_OVERRIDE
54
{
55
if
(Widget)
56
{
57
Widget->deleteLater();
58
}
59
}
60
};
61
62
QT_WARNING_POP
63
64
}
65
66
#endif
// VWIDGETPROPERTY_P_H
VPE::VPropertyPrivate
Definition:
vproperty_p.h:34
VPE::VWidgetPropertyPrivate
Definition:
vwidgetproperty_p.h:39
VPE::VWidgetPropertyPrivate::~VWidgetPropertyPrivate
virtual ~VWidgetPropertyPrivate() Q_DECL_OVERRIDE
Destructor.
Definition:
vwidgetproperty_p.h:53
VPE::VWidgetPropertyPrivate::VWidgetPropertyPrivate
VWidgetPropertyPrivate()
Constructor.
Definition:
vwidgetproperty_p.h:49
VPE::VWidgetPropertyPrivate::VWidgetPropertyPrivate
VWidgetPropertyPrivate(const QString &name, QVariant::Type type, QWidget *widget=nullptr)
Constructor passing name and type.
Definition:
vwidgetproperty_p.h:45
VPE::VWidgetPropertyPrivate::Widget
QPointer< QWidget > Widget
The widget to show.
Definition:
vwidgetproperty_p.h:42
QT_WARNING_POP
Definition:
union_tool.cpp:127
VPE
Definition:
lineweight_property.h:46
vproperty_p.h
src
libs
vpropertyexplorer
vwidgetproperty_p.h
Generated by
1.9.1