1
0
Fork 0
flightgear/utils/fgqcanvas/fgqcanvasmap.cpp
James Turner bd5a266e9f Qt-based remote canvas application.
Work-in-progress, currently performance is sub-optimal (software
rendering via QPainter API).
2016-12-17 14:24:28 +00:00

40 lines
871 B
C++

#include "fgqcanvasmap.h"
#include <QDebug>
#include "localprop.h"
#include "fgcanvaspaintcontext.h"
FGQCanvasMap::FGQCanvasMap(FGCanvasGroup* pr, LocalProp* prop) :
FGCanvasGroup(pr, prop)
{
}
void FGQCanvasMap::doPaint(FGCanvasPaintContext *context) const
{
FGCanvasGroup::doPaint(context);
}
bool FGQCanvasMap::onChildAdded(LocalProp *prop)
{
const QByteArray nm = prop->name();
if ((nm == "ref-lon") || (nm == "ref-lat") || (nm == "hdg") || (nm == "range")
|| (nm == "screen-range")) {
connect(prop, &LocalProp::valueChanged, this, &FGQCanvasMap::markProjectionDirty);
return true;
}
if (FGCanvasGroup::onChildAdded(prop)) {
return true;
}
qDebug() << Q_FUNC_INFO << "deal with:" << prop->name();
return false;
}
void FGQCanvasMap::markProjectionDirty()
{
_projectionChanged = true;
}