pieDisplay Class Reference

An obstacle display widget. More...

#include <pieDisplay.h>

List of all members.

Public Slots

void addThreat (threatType t, trendDir d, int relAlt, int anglepos, int vecangle, unsigned long &key)
void removeThreat (int idx)

Public Member Functions

 pieDisplay (QWidget *parent=0)
 The default constructor.
QSizePolicy sizePolicy () const
 Returns the size policy of the widget.

Protected Member Functions

void paintEvent (QPaintEvent *event)

Private Member Functions

void paintThreat (QPainter *p, std::list< threatListItem >::iterator item)
 Paint a threat on the display inside the QWidget.
void drawTriangle (QPainter *p, int angle, int relalt, threatType type, int lrAngle)
 Paint a triangle on the display.
void drawAircraftSymbol (QPainter *p)
 Draw the aircraft symbol in the center of the widget.

Private Attributes

std::list< threatListItemtList
 All created threats are stored in a STL list container.
int threatIndex
 A counter that keeps track of the number of threats attached to the display.


Detailed Description

An obstacle display widget.

This display widget (so-named because of its "pie shape) is useful for displaying obstacles when angular position is known. This can, for example, display an obstacle at a specific angle left or right of the aircraft, and at a specified orientation.

The threat type controls the color of the obstacle indicator, with a simple label of "B" for below the aircraft, and "A" for above the aircraft.

Definition at line 27 of file pieDisplay.h.


Constructor & Destructor Documentation

pieDisplay::pieDisplay ( QWidget *  parent = 0  ) 

The default constructor.

Definition at line 12 of file pieDisplay.cpp.

References threatIndex.


Member Function Documentation

void pieDisplay::addThreat ( threatType  t,
trendDir  d,
int  relAlt,
int  anglepos,
int  vecangle,
unsigned long &  key 
) [slot]

Parameters:
t A threat defined by threatType as defined in the tcastypes.h header file.
d The trend direction of the threat as defined in tcastypes.h.
relAlt The altitude of the threat relative to the aircraft.
anglepos The angle of the vector of the threat relative to the coordinate system of the aircraft
vecangle The angle of rotation of the vector of the threat relative to the coordinate system of the aircraft
key The key of the newly added threat.

Definition at line 109 of file pieDisplay.cpp.

References threatIndex, and tList.

void pieDisplay::drawAircraftSymbol ( QPainter *  p  )  [private]

Draw the aircraft symbol in the center of the widget.

Definition at line 138 of file pieDisplay.cpp.

Referenced by paintEvent().

void pieDisplay::drawTriangle ( QPainter *  p,
int  angle,
int  relalt,
threatType  type,
int  lrAngle 
) [private]

Paint a triangle on the display.

Parameters:
p A pointer to the painter that is to be used to paint the arrow symbol.
angle The angle of the intruder relative to the aircraft coordinate sytem
relalt The relative altitude of the threat
type The type of threat being drawn.
lrAngle The location angle in degrees left or right of the aircraft.

Definition at line 82 of file pieDisplay.cpp.

Referenced by paintThreat().

void pieDisplay::paintThreat ( QPainter *  p,
std::list< threatListItem >::iterator  item 
) [private]

Paint a threat on the display inside the QWidget.

Parameters:
p A pointer to the painter that is to be used to paint the threat symbol.
p An iterator of type threatlistItem that contains all the information related to the threat to be painted.

Definition at line 43 of file pieDisplay.cpp.

References drawTriangle().

Referenced by paintEvent().

void pieDisplay::removeThreat ( int  idx  )  [slot]

Parameters:
idx The index, or "handle", of the threat to be removed from the display.

Definition at line 125 of file pieDisplay.cpp.

References tList.

QSizePolicy pieDisplay::sizePolicy (  )  const

Returns the size policy of the widget.

Definition at line 38 of file pieDisplay.cpp.


Member Data Documentation

int pieDisplay::threatIndex [private]

A counter that keeps track of the number of threats attached to the display.

Definition at line 77 of file pieDisplay.h.

Referenced by addThreat(), and pieDisplay().

std::list<threatListItem> pieDisplay::tList [private]

All created threats are stored in a STL list container.

Definition at line 73 of file pieDisplay.h.

Referenced by addThreat(), paintEvent(), and removeThreat().


The documentation for this class was generated from the following files:
Generated on Thu Aug 17 12:14:58 2006 for VisualODF by  doxygen 1.4.7