11 class Line :
public QWidget
23 explicit Line(QWidget *parent = 0);
45 Line(
int fromX,
int fromY,
int toX,
int toY,
int w, QColor c, QWidget *parent = 0);
68 Line(
int fromX,
int fromY,
int length,
double angle,
int w, QColor c, QWidget *parent = 0);
83 void setCoords(
int fromX,
int fromY,
int toX,
int toY);
Line(QWidget *parent=0)
Constructor sets coordinates to 0, pen color to black and pen width to 1.
Definition: line.cpp:14
int x1
Definition: line.h:154
QColor penColor
Definition: line.h:159
int y0
Definition: line.h:154
int y1
Definition: line.h:154
void setCoords(int fromX, int fromY, int toX, int toY)
Setter for the line coordinates.
Definition: line.cpp:91
int getX1()
Getter for the ending coordinate x.
Definition: line.cpp:143
void setPenWidth(int w)
Setter for the pen width.
Definition: line.cpp:115
int getY1()
Getter for the ending coordinate y.
Definition: line.cpp:152
int x0
Definition: line.h:154
int penWidth
Definition: line.h:158
int getY0()
Getter for the starting coordinate y.
Definition: line.cpp:134
int getX0()
Getter for the starting coordinate x.
Definition: line.cpp:125
void paintEvent(QPaintEvent *)
The paint event function is automatically invoked whenever a resize or repaint happens.
Definition: line.cpp:161
void setpenColor(QColor c)
Setter for the pen color.
Definition: line.cpp:106