Schim
line.h
1 #ifndef LINE_H
2 #define LINE_H
3 
4 #include "object.h"
5 
6 #include <QLineF>
7 
16 class Line : public Object, public QLineF
17 {
18 public:
19  // CONSTRUCTORS
23  Line();
27  Line(qreal x1, qreal y1, qreal x2, qreal y2);
31  Line(const Line &line);
32  Object *clone() const override;
33 
34  // GETTERS
35  float getLinewidth() const;
36  QPointF getPos() const override;
37  QString getProperty(const QString &name) const override;
38 
39  // SETTERS
40  void setLinewidth(float w);
41  void setPos(const QPointF &pos) override;
42  void setProperty(const QString &name, const QString &value) override;
43 
44  // OPERATORS
45  bool operator==(const Line &obj) const;
46  bool operator!=(const Line &obj) const;
47 
48 private:
49  // ATTRIBUTES
51  float linewidth = 0.5;
52 };
53 
54 #endif // LINE_H
The abstract base class for all objects in a sheet.
Definition: object.h:21
Line()
Construct a null line.
A visual line object.
Definition: line.h:16
QPointF getPos() const override
Return the position of the object in the sheet.
void setPos(const QPointF &pos) override
Set the position of the object in the sheet.