QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MapMarkerGrouping Class Reference

#include <MapMarkerGrouping.h>

+ Inheritance diagram for MapMarkerGrouping:
+ Collaboration diagram for MapMarkerGrouping:

Public Member Functions

 MapMarkerGrouping (QObject *parent=nullptr)
 

Static Public Member Functions

static Q_INVOKABLE QList< int > representatives (const QList< QPointF > &points, double distance)
 

Detailed Description

Groups map markers drawn too close together on screen to click individually, for the overlapping-marker picker of both map engines (MissionItemIndicatorGroup and GeoMapMissionItems).

Definition at line 11 of file MapMarkerGrouping.h.

Constructor & Destructor Documentation

◆ MapMarkerGrouping()

MapMarkerGrouping::MapMarkerGrouping ( QObject *  parent = nullptr)
explicit

Definition at line 9 of file MapMarkerGrouping.cc.

Member Function Documentation

◆ representatives()

QList< int > MapMarkerGrouping::representatives ( const QList< QPointF > &  points,
double  distance 
)
static

Greedy in input order, so callers pass markers by priority: each point joins the group whose representative (first point) is nearest and within distance, ties going to the earlier group, else it starts its own group. Returns the representative's index for each point. A non-finite point is its own group, and a non-positive distance groups nothing.

Definition at line 13 of file MapMarkerGrouping.cc.


The documentation for this class was generated from the following files: