#include <sailpainter.h>

Public Member Functions | |
| CSailPainter (QPaintDevice *dev) | |
| void | draw (const CPanel &panel) |
| void | draw (const CPanelGroup &sail) |
| void | drawArrowLabel (const CPoint3d &pDisp, const QStringList &lst, const real angle) |
| void | drawCoord (const CPoint3d &p, const real angle) |
| void | drawDelta (const CPoint3d &pDisp, const CVector3d &vValue, const real angle) |
| void | drawCross (const CPoint3d &p, const real size) |
| void | drawTextCentered (const CPoint3d &p, const QString &str) |
| void | drawTextCentered (const CPoint3d &p, const QStringList &lst) |
| void | drawLabels (const CPanel &panel) |
| void | drawLabels (const CPanelGroup &sail) |
| void | drawMarkers (const CPanel &panel) |
| void | drawMarkers (const CPanelGroup &sail) |
| void | setFontSize (const real size, const real zoom) |
| void | setWindow (const CRect3d &lRect) |
| CVector3d | textSize (const QStringList &lst) |
| CRect3d | viewRect () const |
Definition at line 35 of file sailpainter.h.
| CSailPainter::CSailPainter | ( | QPaintDevice * | dev | ) | [inline] |
Construct a new sail painter.
| dev | the paint device we are operating on |
Definition at line 42 of file sailpainter.h.
| void CSailPainter::draw | ( | const CPanel & | panel | ) |
Draws a panel of a sail.
Definition at line 37 of file sailpainter.cpp.
References CPanel::bottom, CPanel::cutBottom, CPanel::cutLeft, CPanel::cutRight, CPanel::cutTop, CPanel::hasHems, CPanel::left, CPanel::right, and CPanel::top.
Referenced by draw(), CSailDispLabel::paintEvent(), CSailDrawingPrinter::print(), and CSailDevelPrinter::print().
| void CSailPainter::draw | ( | const CPanelGroup & | sail | ) |
Draws a complete sail.
Definition at line 86 of file sailpainter.cpp.
References CPanelGroup::child, draw(), and CPanelGroup::type.
| void CSailPainter::drawArrowLabel | ( | const CPoint3d & | pDisp, | |
| const QStringList & | lst, | |||
| const real | angle | |||
| ) |
Print a label with a line to a point.
| pDisp | the display point coordinates | |
| lst | a list of lines of text to print | |
| angle |
Definition at line 115 of file sailpainter.cpp.
References drawTextCentered(), CMatrix::rot3d(), textSize(), CVector3d::x(), and CVector3d::y().
Referenced by drawCoord(), and drawDelta().
| void CSailPainter::drawCoord | ( | const CPoint3d & | point, | |
| const real | angle | |||
| ) |
Draw a label representing a point's coordinates.
| point | ||
| angle |
Definition at line 155 of file sailpainter.cpp.
References drawArrowLabel(), CVector3d::x(), and CVector3d::y().
Referenced by drawMarkers(), and CSailDevelPrinter::print().
Draw a label representing a distance.
| pDisp | the display point coordinates | |
| vValue | the distances | |
| angle |
Definition at line 171 of file sailpainter.cpp.
References drawArrowLabel(), CVector3d::x(), and CVector3d::y().
Referenced by drawMarkers().
| void CSailPainter::drawCross | ( | const CPoint3d & | p, | |
| const real | size | |||
| ) |
Draws a cross at a given Point position.
Definition at line 183 of file sailpainter.cpp.
References CVector3d::x(), and CVector3d::y().
Referenced by CSailDevelPrinter::print().
| void CSailPainter::drawTextCentered | ( | const CPoint3d & | p, | |
| const QString & | str | |||
| ) |
Draw text centered at the given position.
Definition at line 192 of file sailpainter.cpp.
Referenced by drawArrowLabel(), and drawLabels().
| void CSailPainter::drawTextCentered | ( | const CPoint3d & | p, | |
| const QStringList & | lst | |||
| ) |
Draw text centered at the given position.
Definition at line 200 of file sailpainter.cpp.
References textSize(), CVector3d::x(), and CVector3d::y().
| void CSailPainter::drawLabels | ( | const CPanel & | panel | ) |
Draws a panel label.
Definition at line 78 of file sailpainter.cpp.
References drawTextCentered(), CPanel::label, CPanelLabel::name, and CPanelLabel::origin.
Referenced by drawLabels(), CSailDispLabel::paintEvent(), CSailDrawingPrinter::print(), and CSailDevelPrinter::print().
| void CSailPainter::drawLabels | ( | const CPanelGroup & | sail | ) |
Draw all the sail's panel labels.
Definition at line 218 of file sailpainter.cpp.
References CPanelGroup::child, and drawLabels().
| void CSailPainter::drawMarkers | ( | const CPanel & | currentPanel | ) |
Draw the markers for a panel.
| currentPanel |
Definition at line 233 of file sailpainter.cpp.
References CPanel::bottom, drawCoord(), drawDelta(), CPanel::left, CPanel::right, and CPanel::top.
Referenced by drawMarkers(), and CSailDevelPrinter::print().
| void CSailPainter::drawMarkers | ( | const CPanelGroup & | sail | ) |
Draw the markers for a full sail.
| sail |
Definition at line 302 of file sailpainter.cpp.
References drawMarkers().
| void CSailPainter::setFontSize | ( | const real | size, | |
| const real | zoom | |||
| ) |
Set the font size.
| size | ||
| zoom |
Definition at line 314 of file sailpainter.cpp.
Referenced by CSailDispLabel::paintEvent(), CSailDrawingPrinter::print(), CSailDevelPrinter::print(), and CSailDataPrinter::print().
| void CSailPainter::setWindow | ( | const CRect3d & | lRect | ) |
Set coordinate system to match the logical viewport.
| lRect | the logical viewport rectangle |
Definition at line 327 of file sailpainter.cpp.
References CRect3d::height(), CRect3d::max, CRect3d::min, CRect3d::width(), CVector3d::x(), and CVector3d::y().
Referenced by CSailDispLabel::paintEvent(), CSailDrawingPrinter::print(), and CSailDevelPrinter::print().
| CVector3d CSailPainter::textSize | ( | const QStringList & | lst | ) |
Draw text centered at the given position.
Definition at line 339 of file sailpainter.cpp.
References CVector3d::x(), and CVector3d::y().
Referenced by drawArrowLabel(), and drawTextCentered().
| CRect3d CSailPainter::viewRect | ( | ) | const |
Return the viewport rectangle.
Definition at line 359 of file sailpainter.cpp.
Referenced by CSailDispLabel::paintEvent(), CSailDrawingPrinter::print(), and CSailDevelPrinter::print().
1.5.6