Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
gva::WidgetPlanPositionIndicator Class Reference

Class defining the Plan Position Indicator. More...

#include <plan_position_indicator.h>

Inheritance diagram for gva::WidgetPlanPositionIndicator:
Inheritance graph
Collaboration diagram for gva::WidgetPlanPositionIndicator:
Collaboration graph

Data Structures

struct  ThreatType
 Threat structured data. More...
 

Public Member Functions

 WidgetPlanPositionIndicator (const RendererGva &renderer)
 Construct a new Widget Plan Position Indicator object.
 
std::string GetWidgetName () const final
 Get the Widget Name attribute.
 
void Draw () final
 The base overloaded Draw fuctions to draw this widget type.
 
void DrawPPI (widget::ModeEnum mode, int32_t x, int32_t y, int16_t degrees, int16_t sight_azimuth, int16_t weapon_azimuth) const
 Draw the Plan Position Indicator.
 
void SetBearing (int16_t bearing)
 Set the Bearing object.
 
void AddThreat (int16_t id, ThreatType threat)
 Add a threat onto the PPI.
 
void DeleteThreat (int16_t id)
 Delete a threat by ID.
 
void DeleteAllThreats ()
 Delete all threats.
 
void SetBearingSight (int16_t bearing_sight)
 Set the Bearing Sight object.
 
void SetWeaponAzimuth (int16_t weapon_azimuth)
 Set the Weapon Azimuth attribute.
 
int16_t GetBearing () const
 Get the Bearing object.
 
int16_t GetBearingSight () const
 Get the Bearing Sight object.
 
void SetMode (widget::ModeEnum mode)
 Set the Mode object.
 
- Public Member Functions inherited from gva::WidgetX
 WidgetX (const RendererGva &renderer, widget::WidgetEnum widget_type)
 Construct a new Widget X object.
 
virtual widget::WidgetEnum GetWidgetType () const
 Get the Widget Type attribute.
 
void SetVisible (bool visible)
 Set the Visible object.
 
bool GetVisible () const
 Get the Visible object.
 
virtual void SetX (uint32_t x)
 Set the X dimension.
 
uint32_t GetX () const
 Get the Y dimension.
 
virtual void SetY (uint32_t y)
 Set the Y dimension.
 
uint32_t GetY () const
 Get the Y dimension.
 
void SetWidth (uint32_t width)
 Set the Width.
 
uint32_t GetWidth () const
 Get the Width.
 
void SetHeight (uint32_t width)
 Set the Height.
 
uint32_t GetHeight () const
 Get the Height.
 
widget::WidgetEnum GetType () const
 Get the Type object.
 
RendererGvaGetRenderer () const
 Get the Renderer object.
 
void SetStateText (LabelStates state)
 Set the State Text of an on screen label.
 
void SetStateLabel (const LabelStates state)
 Set the State Label object.
 
uint32_t GetStateTextColour (LabelStates state) const
 Get the State Text Colour object.
 

Additional Inherited Members

- Data Fields inherited from gva::WidgetX
uint32_t x_ = 0
 The widget x location in pixels.
 
uint32_t y_ = 0
 The widget y location in pixels.
 
uint32_t width_ = 0
 The widget width in pixels.
 
uint32_t height_ = 0
 The widget height in pixels.
 

Detailed Description

Class defining the Plan Position Indicator.


Data Structure Documentation

◆ gva::WidgetPlanPositionIndicator::ThreatType

struct gva::WidgetPlanPositionIndicator::ThreatType

Threat structured data.

Collaboration diagram for gva::WidgetPlanPositionIndicator::ThreatType:
Collaboration graph
Data Fields
uint16_t bearing = 0 The threat bearing.
bool dotted = false Dotted if true.
bool flashing = false Flash if true.
string label = "" The label of the threat.
uint32_t rgb_value = 0x00FF0000
uint16_t size = 0 The azimuth of the threat.

Constructor & Destructor Documentation

◆ WidgetPlanPositionIndicator()

gva::WidgetPlanPositionIndicator::WidgetPlanPositionIndicator ( const RendererGva renderer)
explicit

Construct a new Widget Plan Position Indicator object.

Parameters
renderer

Member Function Documentation

◆ AddThreat()

void gva::WidgetPlanPositionIndicator::AddThreat ( int16_t  id,
ThreatType  threat 
)

Add a threat onto the PPI.

Parameters
idUnique ID of the threat
threatThe threat object

◆ DeleteThreat()

void gva::WidgetPlanPositionIndicator::DeleteThreat ( int16_t  id)

Delete a threat by ID.

Parameters
idThe ID of the threat to be deletes

◆ Draw()

void gva::WidgetPlanPositionIndicator::Draw ( )
finalvirtual

The base overloaded Draw fuctions to draw this widget type.

Implements gva::WidgetX.

◆ DrawPPI()

void gva::WidgetPlanPositionIndicator::DrawPPI ( widget::ModeEnum  mode,
int32_t  x,
int32_t  y,
int16_t  degrees,
int16_t  sight_azimuth,
int16_t  weapon_azimuth 
) const

Draw the Plan Position Indicator.

Parameters
modeThe PPI mode, different styles
xX pixel position
yY pixel position
degreesCompass heading
sight_azimuthCamera heading
weapon_azimuthWeapon heading

◆ GetBearing()

int16_t gva::WidgetPlanPositionIndicator::GetBearing ( ) const
inline

Get the Bearing object.

Returns
uint16_t

◆ GetBearingSight()

int16_t gva::WidgetPlanPositionIndicator::GetBearingSight ( ) const
inline

Get the Bearing Sight object.

Returns
uint16_t

◆ GetWidgetName()

std::string gva::WidgetPlanPositionIndicator::GetWidgetName ( ) const
inlinefinalvirtual

Get the Widget Name attribute.

Returns
std::string

Implements gva::WidgetX.

◆ SetBearing()

void gva::WidgetPlanPositionIndicator::SetBearing ( int16_t  bearing)
inline

Set the Bearing object.

Parameters
bearing

◆ SetBearingSight()

void gva::WidgetPlanPositionIndicator::SetBearingSight ( int16_t  bearing_sight)
inline

Set the Bearing Sight object.

Parameters
bearing_sightThe bearing sight

◆ SetMode()

void gva::WidgetPlanPositionIndicator::SetMode ( widget::ModeEnum  mode)
inline

Set the Mode object.

Parameters
mode

◆ SetWeaponAzimuth()

void gva::WidgetPlanPositionIndicator::SetWeaponAzimuth ( int16_t  weapon_azimuth)
inline

Set the Weapon Azimuth attribute.

Parameters
weapon_azimuth

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