#include <canvas.h>
Public Types | |
enum | Shape { LINE, CIRCLE, TEXT } |
Public Slots | |
void | draw (Shape, const QColor &, const QPoint &, const QPoint &, int width=3, const QString &text=QString::null) |
Signals | |
void | drawing (QString &str) |
Public Member Functions | |
Canvas (QWidget *parent=0, const char *name=0) | |
void | setPenColor (const QColor &c) |
void | setPenWidth (int w) |
void | setDrawingShape (Shape s) |
QColor | penColor () |
int | penWidth () |
int | drawingShape () |
void | save (const QString &filename, const QString &format) |
void | clearScreen () |
Protected Member Functions | |
void | mousePressEvent (QMouseEvent *e) |
void | mouseReleaseEvent (QMouseEvent *e) |
void | mouseMoveEvent (QMouseEvent *e) |
void | resizeEvent (QResizeEvent *e) |
void | paintEvent (QPaintEvent *e) |
Protected Attributes | |
QPen | pen |
QPen | eraser |
Shape | shape |
QPoint | start |
QPoint | tmp |
bool | mousePressed |
QPixmap | buffer |
QPixmap | over |
Private Slots | |
void | draw (const QPoint &, const QPoint &, bool definitive=true, bool erase=false) |
|
Definition at line 31 of file canvas.h. Referenced by Painter::slotShape(). |
|
Definition at line 33 of file canvas.cpp. References clearScreen(), LINE, and shape. |
|
Definition at line 51 of file canvas.cpp. References buffer. Referenced by Canvas(). |
|
Definition at line 67 of file canvas.cpp. References abs, buffer, CIRCLE, drawing(), LINE, min, over, penColor(), penWidth(), and TEXT. |
|
Definition at line 135 of file canvas.cpp. References abs, buffer, CIRCLE, LINE, max, min, TEXT, and tmp. Referenced by Painter::append(), mouseMoveEvent(), and mouseReleaseEvent(). |
|
Referenced by draw(). |
|
Definition at line 60 of file canvas.h. References shape. |
|
Definition at line 188 of file canvas.cpp. |
|
Definition at line 56 of file canvas.cpp. References mousePressed, and start. |
|
Definition at line 61 of file canvas.cpp. References draw(), mousePressed, and start. |
|
Definition at line 210 of file canvas.cpp. References buffer. |
|
Definition at line 52 of file canvas.h. References pen. Referenced by draw(), and Painter::slotColor(). |
|
Definition at line 56 of file canvas.h. References pen. Referenced by draw(). |
|
Definition at line 196 of file canvas.cpp. |
|
Definition at line 46 of file canvas.cpp. References buffer, and no_writing. |
|
Definition at line 48 of file canvas.h. References shape. Referenced by Painter::slotShape(). |
|
Definition at line 39 of file canvas.h. References pen. Referenced by Painter::slotColor(). |
|
Definition at line 43 of file canvas.h. Referenced by Painter::slotWidth(). |
|
Definition at line 81 of file canvas.h. Referenced by clearScreen(), draw(), paintEvent(), resizeEvent(), and save(). |
|
Definition at line 75 of file canvas.h. Referenced by setPenWidth(). |
|
Definition at line 79 of file canvas.h. Referenced by mousePressEvent(), and mouseReleaseEvent(). |
|
Definition at line 81 of file canvas.h. Referenced by draw(). |
|
Definition at line 75 of file canvas.h. Referenced by penColor(), penWidth(), setPenColor(), and setPenWidth(). |
|
Definition at line 76 of file canvas.h. Referenced by Canvas(), drawingShape(), and setDrawingShape(). |
|
Definition at line 77 of file canvas.h. Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent(). |
|
Definition at line 77 of file canvas.h. Referenced by draw(), mouseMoveEvent(), and resizeEvent(). |