- DrawingWindow(DrawingArea &a);
- DrawingWindow(QWidget *parent, DrawingArea &a);
- DrawingWindow(QWidget *parent, Qt::WindowFlags flags, DrawingArea &a);
+ typedef int (*ThreadFunction)(DrawingWindow &);
+
+ static const int DEFAULT_WIDTH = 640;
+ static const int DEFAULT_HEIGHT = 480;
+
+ DrawingWindow(ThreadFunction fun,
+ int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT);
+ DrawingWindow(QWidget *parent,
+ ThreadFunction fun,
+ int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT);
+ DrawingWindow(QWidget *parent, Qt::WindowFlags flags,
+ ThreadFunction fun,
+ int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT);
+
+ ~DrawingWindow();
+
+ int width() const;
+ int height() const;
+
+ void setColor(float red, float green, float blue);
+ void setColor(const QColor &color);
+
+ void drawPoint(int x, int y);
+ void drawLine(int x1, int y1, int x2, int y2);