QCAD
Open Source 2D CAD
RTextLabel.h
Go to the documentation of this file.
1 
20 #ifndef RTEXTLABEL_H
21 #define RTEXTLABEL_H
22 
23 #include "../core_global.h"
24 
25 #include "RPoint.h"
26 #include "RVector.h"
27 #include "RBox.h"
28 
29 #ifndef RDEFAULT_QVARIANT
30 #define RDEFAULT_QVARIANT QVariant()
31 #endif
32 
43 public:
44  RTextLabel();
45  RTextLabel(const RVector& position, const QString& text, const QVariant& userData = RDEFAULT_QVARIANT);
46  virtual ~RTextLabel();
47 
48  virtual RTextLabel* clone() const {
49  return new RTextLabel(*this);
50  }
51 
52  QString getText() const {
53  return text;
54  }
55  QVariant getUserData() const {
56  return userData;
57  }
58 
59 protected:
60  virtual void print(QDebug dbg) const;
61 
62 public:
63  QString text;
64  QVariant userData;
65 };
66 
69 Q_DECLARE_METATYPE(QSharedPointer<RTextLabel>)
70 Q_DECLARE_METATYPE(QSharedPointer<RTextLabel>*)
72 
73 #endif
QVariant userData
Definition: RTextLabel.h:64
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
Text label.
Definition: RTextLabel.h:42
#define QCADCORE_EXPORT
Definition: core_global.h:10
virtual RTextLabel * clone() const
Definition: RTextLabel.h:48
Q_DECLARE_METATYPE(RMath *)
QVariant getUserData() const
Definition: RTextLabel.h:55
#define RDEFAULT_QVARIANT
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RTextLabel.h:30
QString text
Definition: RTextLabel.h:63
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RPoint.h:38
QString getText() const
Definition: RTextLabel.h:52
virtual void print(QDebug dbg) const
Definition: RPoint.cpp:144