QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
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
25#include <QMetaType>
26#include <QString>
27
35public:
41 RCommandEvent(const QString& cmd) {
42 this->cmd = cmd;
43 accepted = false;
44 }
45
50 QString getCommand() {
51 return cmd;
52 }
53
57 void accept() {
58 accepted = true;
59 }
60
64 bool isAccepted() {
65 return accepted;
66 }
67
68private:
69 QString cmd;
71};
72
74
75#endif
Q_DECLARE_METATYPE(RMath *)
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RCommandEvent.h:34
QString getCommand()
Definition RCommandEvent.h:50
RCommandEvent(const QString &cmd)
Creates a new command event that is not yet accepted.
Definition RCommandEvent.h:41
QString cmd
Definition RCommandEvent.h:69
void accept()
Sets the event state to accepted.
Definition RCommandEvent.h:57
bool isAccepted()
Definition RCommandEvent.h:64
bool accepted
Definition RCommandEvent.h:70
#define QCADCORE_EXPORT
Definition core_global.h:10