Browse Source

Minor compile fixes and cleanups

QGC4.4
lm 14 years ago
parent
commit
b1d0370f0a
  1. 2
      src/libs/opmapcontrol/src/mapwidget/trailitem.cpp
  2. 8
      src/ui/HUD.cc
  3. 1
      src/ui/HUD.h

2
src/libs/opmapcontrol/src/mapwidget/trailitem.cpp

@ -38,6 +38,8 @@ namespace mapcontrol @@ -38,6 +38,8 @@ namespace mapcontrol
void TrailItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
// painter->drawRect(QRectF(-3,-3,6,6));
painter->setBrush(m_brush);
painter->drawEllipse(-2,-2,4,4);

8
src/ui/HUD.cc

@ -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)
: QGLWidget(QGLFormat(QGL::SampleBuffers), parent),
u(NULL),
uas(NULL),
yawInt(0.0f),
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
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()
{
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());
}
}

1
src/ui/HUD.h

@ -219,7 +219,6 @@ protected: @@ -219,7 +219,6 @@ protected:
QAction* selectVideoChannelAction;
void paintEvent(QPaintEvent *event);
bool imageRequested;
UAS* u;
};

Loading…
Cancel
Save