Commit b1d0370f authored by lm's avatar lm

Minor compile fixes and cleanups

parent fe3a27c7
...@@ -38,6 +38,8 @@ namespace mapcontrol ...@@ -38,6 +38,8 @@ namespace mapcontrol
void TrailItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void TrailItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(option);
Q_UNUSED(widget);
// painter->drawRect(QRectF(-3,-3,6,6)); // painter->drawRect(QRectF(-3,-3,6,6));
painter->setBrush(m_brush); painter->setBrush(m_brush);
painter->drawEllipse(-2,-2,4,4); painter->drawEllipse(-2,-2,4,4);
......
...@@ -75,7 +75,6 @@ inline bool isinf(T value) ...@@ -75,7 +75,6 @@ inline bool isinf(T value)
*/ */
HUD::HUD(int width, int height, QWidget* parent) HUD::HUD(int width, int height, QWidget* parent)
: QGLWidget(QGLFormat(QGL::SampleBuffers), parent), : QGLWidget(QGLFormat(QGL::SampleBuffers), parent),
u(NULL),
uas(NULL), uas(NULL),
yawInt(0.0f), yawInt(0.0f),
mode(tr("UNKNOWN MODE")), mode(tr("UNKNOWN MODE")),
...@@ -309,7 +308,6 @@ void HUD::setActiveUAS(UASInterface* uas) ...@@ -309,7 +308,6 @@ void HUD::setActiveUAS(UASInterface* uas)
// Set new UAS // Set new UAS
this->uas = uas; this->uas = uas;
this->u = dynamic_cast<UAS*>(this->uas);
} }
} }
...@@ -1631,5 +1629,9 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s ...@@ -1631,5 +1629,9 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s
void HUD::copyImage() void HUD::copyImage()
{ {
qDebug() << "HUD::copyImage()"; qDebug() << "HUD::copyImage()";
this->glImage = QGLWidget::convertToGLFormat(this->u->getImage()); UAS* u = dynamic_cast<UAS*>(this->uas);
if (u)
{
this->glImage = QGLWidget::convertToGLFormat(u->getImage());
}
} }
...@@ -219,7 +219,6 @@ protected: ...@@ -219,7 +219,6 @@ protected:
QAction* selectVideoChannelAction; QAction* selectVideoChannelAction;
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event);
bool imageRequested; bool imageRequested;
UAS* u;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment