QCAD
Open Source 2D CAD
RCommandEvent.h
Go to the documentation of this file.
1 
20 #ifndef RCOMMANDEVENT_H
21 #define RCOMMANDEVENT_H
22 
23 #include "core_global.h"
24 
32 public:
38  RCommandEvent(const QString& cmd) {
39  this->cmd = cmd;
40  accepted = false;
41  }
42 
47  QString getCommand() {
48  return cmd;
49  }
50 
54  void accept() {
55  accepted = true;
56  }
57 
61  bool isAccepted() {
62  return accepted;
63  }
64 
65 private:
66  QString cmd;
67  bool accepted;
68 };
69 
71 
72 #endif
QString getCommand()
Definition: RCommandEvent.h:47
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RCommandEvent.h:31
#define QCADCORE_EXPORT
Definition: core_global.h:10
void accept()
Sets the event state to accepted.
Definition: RCommandEvent.h:54
Q_DECLARE_METATYPE(RMath *)
bool isAccepted()
Definition: RCommandEvent.h:61
QString cmd
Definition: RCommandEvent.h:66
bool accepted
Definition: RCommandEvent.h:67
RCommandEvent(const QString &cmd)
Creates a new command event that is not yet accepted.
Definition: RCommandEvent.h:38