QCAD
Open Source 2D CAD
RTransactionEvent.h
Go to the documentation of this file.
1 
20 #ifndef RTRANSACTIONEVENT_H
21 #define RTRANSACTIONEVENT_H
22 
23 #include "core_global.h"
24 
25 #include <QEvent>
26 
27 #include "RS.h"
28 #include "RTransaction.h"
29 
36 class QCADCORE_EXPORT RTransactionEvent : public QEvent {
37 public:
38  RTransactionEvent(RTransaction& t, bool onlyChanges=false, RS::EntityType entityTypeFilter = RS::EntityAll) :
39  QEvent((QEvent::Type)(QEvent::User+300)),
40  transaction(t),
41  onlyChanges(onlyChanges),
42  entityTypeFilter(entityTypeFilter) {}
43 
44  virtual ~RTransactionEvent() {}
45 
46  bool hasOnlyChanges() {
47  return onlyChanges;
48  }
49 
51  return entityTypeFilter;
52  }
53 
55  return transaction;
56  }
57 
58 private:
62 };
63 
65 
66 #endif
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:76
#define QCADCORE_EXPORT
Definition: core_global.h:10
RS::EntityType getEntityTypeFilter() const
Definition: RTransactionEvent.h:50
Transaction implementation.
Definition: RTransaction.h:74
RS::EntityType entityTypeFilter
Definition: RTransactionEvent.h:61
virtual ~RTransactionEvent()
Definition: RTransactionEvent.h:44
bool onlyChanges
Definition: RTransactionEvent.h:60
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RTransactionEvent.h:36
Q_DECLARE_METATYPE(RMath *)
bool hasOnlyChanges()
Definition: RTransactionEvent.h:46
RTransaction getTransaction() const
Definition: RTransactionEvent.h:54
RTransaction transaction
Definition: RTransactionEvent.h:59
All entities (for filters)
Definition: RS.h:88
RTransactionEvent(RTransaction &t, bool onlyChanges=false, RS::EntityType entityTypeFilter=RS::EntityAll)
Definition: RTransactionEvent.h:38