CSailPainter Class Reference

#include <sailpainter.h>

Inheritance diagram for CSailPainter:

CTextPainter

List of all members.

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


Detailed Description

A sail painter.

See also:
CSailDispLabel

Definition at line 35 of file sailpainter.h.


Constructor & Destructor Documentation

CSailPainter::CSailPainter ( QPaintDevice *  dev  )  [inline]

Construct a new sail painter.

Parameters:
dev the paint device we are operating on

Definition at line 42 of file sailpainter.h.


Member Function Documentation

void CSailPainter::draw ( const CPanel panel  ) 

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.

Parameters:
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.

Parameters:
point 
angle 

Definition at line 155 of file sailpainter.cpp.

References drawArrowLabel(), CVector3d::x(), and CVector3d::y().

Referenced by drawMarkers(), and CSailDevelPrinter::print().

void CSailPainter::drawDelta ( const CPoint3d pDisp,
const CVector3d vValue,
const real  angle 
)

Draw a label representing a distance.

Parameters:
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  ) 

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.

Parameters:
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.

Parameters:
sail 

Definition at line 302 of file sailpainter.cpp.

References drawMarkers().

void CSailPainter::setFontSize ( const real  size,
const real  zoom 
)

Set the font size.

Parameters:
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.

Parameters:
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().


The documentation for this class was generated from the following files:

Generated on Sun Mar 22 21:38:32 2009 for Sailcut CAD by  doxygen 1.5.6