//============================================================== MetarWidget::MetarWidget (const Airport &airport, Projection *proj, QWidget *parent) : QLabel (parent) { this->proj = proj; this->airport = airport; QPixmap pixmap (Util::pathImg("airport.png")); setPixmap (pixmap); resize (pixmap.width(), pixmap.height()); setToolTip ("METAR station: "+airport.icao+" - "+airport.name); adjustGeometry (); connect (proj, SIGNAL(projectionUpdated()), this, SLOT(projectionUpdated()) ); }
//-------------------------------------------------------------- void Projection::updateBoundaries () { // Extrémités de la zone double x0,y0, x1,y1; screen2map(-1, -1, &x0, &y0); screen2map(W+1, H+1, &x1, &y1); xmin = x0; xmax = x1; if (y0 < y1) { double a = y1; y1 = y0; y0 = a; } ymin = y1; ymax = y0; //printf("Projection::updateBoundaries X(%f %f) Y(%f %f)\n", xmin,xmax, ymin,ymax); if (W*H != 0) coefremp = 10000.0*fabs( ((xmax-xmin)*(ymax-ymin)) / (W*H) ); else coefremp = 10000.0; emit projectionUpdated(); }
vlmPointGraphic::vlmPointGraphic(ROUTAGE * routage,int isoNb, int pointIsoNb,double lon, double lat, Projection * proj, QGraphicsScene * myScene,int z_level) : QGraphicsWidget() { this->proj=proj; this->myScene=myScene; this->lon=lon; this->lat=lat; connect(proj,SIGNAL(projectionUpdated()),this,SLOT(slot_showMe())); myScene->addItem(this); this->setZValue(z_level); this->isoNb=isoNb; this->pointIsoNb=pointIsoNb; this->routage=routage; debug=""; setData(0,7); show(); }