mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 23:34:04 +02:00
36 lines
778 B
C
36 lines
778 B
C
|
#ifndef VWIDGETPROPERTY_P_H
|
||
|
#define VWIDGETPROPERTY_P_H
|
||
|
|
||
|
// ONLY INCLUDE THIS IN .CPP FILES
|
||
|
|
||
|
#include "vproperty_p.h"
|
||
|
|
||
|
#include <QPointer>
|
||
|
#include <QWidget>
|
||
|
|
||
|
namespace VPE {
|
||
|
|
||
|
class VWidgetPropertyPrivate : public VPropertyPrivate {
|
||
|
public:
|
||
|
//! The widget to show
|
||
|
QPointer<QWidget> Widget;
|
||
|
|
||
|
//! Constructor passing name and type
|
||
|
VWidgetPropertyPrivate(const QString& name, QVariant::Type type, QWidget* widget = nullptr)
|
||
|
: VPropertyPrivate(name, type), Widget(widget) {}
|
||
|
|
||
|
//! Constructor
|
||
|
VWidgetPropertyPrivate()
|
||
|
: VPropertyPrivate(), Widget(nullptr) {}
|
||
|
|
||
|
//! Destructor
|
||
|
~VWidgetPropertyPrivate() {
|
||
|
if(Widget)
|
||
|
Widget->deleteLater();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif // VWIDGETPROPERTY_P_H
|