QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RPropertyEvent.h
Go to the documentation of this file.
1
20#ifndef RPROPERTYEVENT_H
21#define RPROPERTYEVENT_H
22
23#include "core_global.h"
24
25#include <QEvent>
26
27#include "RPropertyTypeId.h"
28#include "RPropertyAttributes.h"
29
30
31
40class QCADCORE_EXPORT RPropertyEvent : public QEvent {
41public:
43 QEvent((QEvent::Type)(QEvent::User+500)),
44 propertyTypeId(-1) {
45 }
46
51 RPropertyEvent(RPropertyTypeId propertyTypeId, const QVariant& value,
52 RS::EntityType entityTypeFilter = RS::EntityAll)
53 : QEvent((QEvent::Type)(QEvent::User+500)),
54 propertyTypeId(propertyTypeId),
55 value(value),
56 entityTypeFilter(entityTypeFilter) {
57 }
58
62 RPropertyTypeId getPropertyTypeId() const;
63
67 QVariant getValue() const {
68 return value;
69 }
70
75 return entityTypeFilter;
76 }
77
78private:
80 QVariant value;
82};
83
87
88#endif
Q_DECLARE_METATYPE(RMath *)
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyEvent.h:40
RS::EntityType getEntityTypeFilter() const
Definition RPropertyEvent.h:74
QVariant getValue() const
Definition RPropertyEvent.h:67
RPropertyEvent(RPropertyTypeId propertyTypeId, const QVariant &value, RS::EntityType entityTypeFilter=RS::EntityAll)
Definition RPropertyEvent.h:51
RPropertyEvent()
Definition RPropertyEvent.h:42
QVariant value
Definition RPropertyEvent.h:80
RS::EntityType entityTypeFilter
Definition RPropertyEvent.h:81
RPropertyTypeId propertyTypeId
Definition RPropertyEvent.h:79
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyTypeId.h:54
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityAll
All entities (for filters)
Definition RS.h:241
#define QCADCORE_EXPORT
Definition core_global.h:10