QFlightInstruments

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Enumerations Enumerator Macros
qfi_NAV.h
Go to the documentation of this file.
1 /***************************************************************************/
48 #ifndef QFI_NAV_H
49 #define QFI_NAV_H
50
52
53 #include <QGraphicsView>
54 #include <QGraphicsSvgItem>
55
57
59 class qfi_NAV : public QGraphicsView
60 {
61 Q_OBJECT
62
63 public:
64
66 explicit qfi_NAV( QWidget *parent = 0 );
67
69 virtual ~qfi_NAV();
70
72 void reinit();
73
75 void update();
76
78 void setHeading( float heading );
79
81 void setHeadingBug( float headingBug );
82
84 void setCourse( float course );
85
87 void setBearing( float bearing, bool visible = false );
88
90 void setDeviation( float deviation, bool visible = false );
91
93 void setDistance( float distance, bool visible = false );
94
95 protected:
96
98 void resizeEvent( QResizeEvent *event );
99
100 private:
101
102 QGraphicsScene *m_scene;
103
104 QGraphicsSvgItem *m_itemBack;
105 QGraphicsSvgItem *m_itemMask;
106 QGraphicsSvgItem *m_itemMark;
107
108 QGraphicsSvgItem *m_itemBrgArrow;
109 QGraphicsSvgItem *m_itemCrsArrow;
110 QGraphicsSvgItem *m_itemDevBar;
111 QGraphicsSvgItem *m_itemDevScale;
112 QGraphicsSvgItem *m_itemHdgBug;
113 QGraphicsSvgItem *m_itemHdgScale;
114
115 QGraphicsTextItem *m_itemCrsText;
116 QGraphicsTextItem *m_itemHdgText;
117 QGraphicsTextItem *m_itemDmeText;
118
119 QColor m_crsTextColor;
120 QColor m_hdgTextColor;
121 QColor m_dmeTextColor;
122
123 QFont m_crsTextFont;
124 QFont m_hdgTextFont;
125 QFont m_dmeTextFont;
126
127 float m_heading;
128 float m_headingBug;
129 float m_course;
130 float m_bearing;
131 float m_deviation;
132 float m_distance;
133
134 bool m_bearingVisible;
135 bool m_deviationVisible;
136 bool m_distanceVisible;
137
138 float m_devBarDeltaX_new;
139 float m_devBarDeltaX_old;
140 float m_devBarDeltaY_new;
141 float m_devBarDeltaY_old;
142
143 float m_scaleX;
144 float m_scaleY;
145
146 float m_originalPixPerDev;
147
148 QPointF m_originalNavCtr;
149
150 QPointF m_originalCrsTextCtr;
151 QPointF m_originalHdgTextCtr;
152 QPointF m_originalDmeTextCtr;
153
154 const int m_originalHeight;
155 const int m_originalWidth;
156
157 const int m_backZ;
158 const int m_maskZ;
159 const int m_markZ;
160
161 const int m_brgArrowZ;
162 const int m_crsArrowZ;
163 const int m_crsTextZ;
164 const int m_devBarZ;
165 const int m_devScaleZ;
166 const int m_hdgBugZ;
167 const int m_hdgScaleZ;
168 const int m_hdgTextZ;
169 const int m_dmeTextZ;
170
172 void init();
173
175 void reset();
176
178 void updateView();
179 };
180
182
183 #endif // QFI_NAV_H
qfi_NAV::reinit
void reinit()
Definition: qfi_NAV.cpp:193
qfi_NAV::setBearing
void setBearing(float bearing, bool visible=false)
Definition: qfi_NAV.cpp:245
qfi_NAV::setCourse
void setCourse(float course)
Definition: qfi_NAV.cpp:235
qfi_NAV::setHeading
void setHeading(float heading)
Definition: qfi_NAV.cpp:215
qfi_NAV::setDistance
void setDistance(float distance, bool visible=false)
Definition: qfi_NAV.cpp:267
qfi_NAV::resizeEvent
void resizeEvent(QResizeEvent *event)
Definition: qfi_NAV.cpp:275
qfi_NAV
Definition: qfi_NAV.h:59
qfi_NAV::~qfi_NAV
virtual ~qfi_NAV()
Definition: qfi_NAV.cpp:179
qfi_NAV::update
void update()
Definition: qfi_NAV.cpp:205
qfi_NAV::setHeadingBug
void setHeadingBug(float headingBug)
Definition: qfi_NAV.cpp:225
qfi_NAV::qfi_NAV
qfi_NAV(QWidget *parent=0)
Definition: qfi_NAV.cpp:67
qfi_NAV::setDeviation
void setDeviation(float deviation, bool visible=false)
Definition: qfi_NAV.cpp:256