6 #ifndef SWIFT_GUI_COMPONENTS_RADARCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_RADARCOMPONENT_H
10 #include <QGraphicsItemGroup>
11 #include <QGraphicsScene>
12 #include <QScopedPointer>
22 class CRadarComponent;
47 void refreshTargets();
50 void toggleGrid(
bool checked);
53 void changeRangeInSteps(
bool zoomIn);
54 void changeRangeFromUserSelection(
int index);
55 void updateFont(
int pointSize);
57 static QPointF polarPoint(
double distance,
double angleRadians);
60 void onInfoAreaTabBarChanged(
int index);
62 QScopedPointer<Ui::CRadarComponent> ui;
63 QGraphicsScene m_scene;
64 QGraphicsItemGroup m_radarTargets;
65 QGraphicsItemGroup m_center;
66 QGraphicsItemGroup m_macroGraticule;
67 QGraphicsItemGroup m_microGraticule;
68 QGraphicsItemGroup m_radials;
70 QPen m_radarTargetPen = { Qt::green, 1 };
71 qreal m_rangeNM = 10.0;
72 int m_rotatenAngle = 0;
74 QTimer m_headingTimer;
79 swift::misc::input::radarZoomInHotkeyIcon(),
this,
80 &CRadarComponent::rangeZoomIn };
82 swift::misc::input::radarZoomOutHotkeyIcon(),
this,
83 &CRadarComponent::rangeZoomOut };
84 void rangeZoomIn(
bool keydown)
86 if (keydown) { changeRangeInSteps(
true); }
88 void rangeZoomOut(
bool keydown)
90 if (keydown) { changeRangeInSteps(
false); }
CActionBind binds a member function to an action.
GUI displaying a radar like view with aircrafts nearby.
High level reusable GUI components.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.