VR-Forces 4.2 Class Documentation
lineDrawer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2001 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: lineDrawer.h,v $ $Revision: 1.18 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DtLineDrawer_H_
13 #define DtLineDrawer_H_
14 
17 #include "symbology/lineSymbol.h"
18 
19 class DtSymbol;
20 class DtCenterPoint;
21 class QPainterPath;
22 
24 #include <QtCore/QCache>
25 #include <QtGui/QPixmap>
26 
32 
34 {
35 public:
36 
37  DtLineDrawer();
38  virtual ~DtLineDrawer();
39 
40 
45  virtual bool draw( QPainter& paint,
46  const DtSymbol * const symbol ) const;
47 
53  static void drawClippedLine(QPainterPath& path, QPainter& paint, const QPoint& point);
54  static void drawClippedLine(QPainter& paint, const QPoint& start, const QPoint& end);
55 
58  virtual QSize calcBBox( const DtSymbol * const symbol ) const;
59 
61  virtual void setPenThickness(int thickness);
62 
65  virtual void setArrowStyle(DtLineSymbol::DtArrowStyle style);
66  virtual void clearArrowStyleOverride();
67 
70  virtual void setPenStyle(Qt::PenStyle style);
71  virtual void clearPenStyleOverride();
72 
73  static DtSymbolDrawer* create();
74 
75 private:
77  DtLineDrawer(const DtLineDrawer& orig);
78  DtLineDrawer& operator=(const DtLineDrawer& orig);
80 
81 protected:
82  virtual void drawSimpleArrow(QPainterPath& path, QPainter & paint,
83  const DtLineSymbol * const arrowSymbol ) const;
84  virtual void drawMainArrow(QPainterPath& path, QPainter & paint,
85  const DtLineSymbol * const arrowSymbol ) const;
86  virtual void drawRearArrow(QPainterPath& path, QPainter & paint,
87  const DtLineSymbol * const arrowSymbol ) const;
88  virtual void drawCappedSides(QPainterPath& path, QPainter & paint,
89  const DtLineSymbol * const arrowSymbol ) const;
90  virtual void drawTriangle(QPainterPath& path, QPainter & paint,
91  const DtLineSymbol * const arrowSymbol ) const;
92  virtual void drawThickArrow(QPainterPath& path, QPainter & paint,
93  const DtLineSymbol * const arrowSymbol ) const;
94  virtual void drawThickDoubleArrow(QPainterPath& path, QPainter & paint,
95  const DtLineSymbol * const arrowSymbol ) const;
96  virtual void drawFeintArrow(QPainterPath& path, QPainter & paint,
97  const DtLineSymbol * const arrowSymbol ) const;
98  virtual void draw2525TailArrow(QPainterPath& path, QPainter & paint,
99  const DtLineSymbol * const arrowSymbol ) const;
100  virtual void drawBridge(QPainterPath& path, QPainter & paint,
101  const DtLineSymbol * const arrowSymbol ) const;
102 
103 protected:
107 
108  Qt::PenStyle myPenStyle;
110 };
111 
112 #endif

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)