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>*)
71 Q_DECLARE_METATYPE(QList<RTextLabel>)
72 
73 #endif
RTextLabel::text
QString text
Definition: RTextLabel.h:63
RBox.h
RPoint
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPoint.h:38
RVector
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
RPoint.h
RVector.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RTextLabel::userData
QVariant userData
Definition: RTextLabel.h:64
RTextLabel::getText
QString getText() const
Definition: RTextLabel.h:52
RDEFAULT_QVARIANT
#define RDEFAULT_QVARIANT
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RTextLabel.h:30
RTextLabel
Text label.
Definition: RTextLabel.h:42
RTextLabel::clone
virtual RTextLabel * clone() const
Definition: RTextLabel.h:48
RPoint::print
virtual void print(QDebug dbg) const
Definition: RPoint.cpp:156
RTextLabel::getUserData
QVariant getUserData() const
Definition: RTextLabel.h:55
QCADCORE_EXPORT
#define QCADCORE_EXPORT
Definition: core_global.h:10