mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Map updates:
Add left double click to add marker to 3D map. Add support for alititudeReference for polygon and polyline. Add support for plugins to set color of polygons.
This commit is contained in:
@@ -271,9 +271,16 @@ QVariant PolygonMapModel::data(const QModelIndex &index, int role) const
|
||||
case borderColorRole:
|
||||
return QVariant::fromValue(QColor(0x00, 0x00, 0x00, 0x00)); // Transparent
|
||||
case fillColorRole:
|
||||
if (m_items[row]->m_itemSettings->m_display2DTrack) {
|
||||
return QVariant::fromValue(QColor::fromRgba(m_items[row]->m_itemSettings->m_2DTrackColor));
|
||||
} else {
|
||||
if (polygonItem->m_itemSettings->m_display2DTrack)
|
||||
{
|
||||
if (polygonItem->m_colorValid) {
|
||||
return QVariant::fromValue(QColor::fromRgba(polygonItem->m_color));
|
||||
} else {
|
||||
return QVariant::fromValue(QColor::fromRgba(polygonItem->m_itemSettings->m_2DTrackColor));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return QVariant::fromValue(QColor(0x00, 0x00, 0x00, 0x00)); // Transparent
|
||||
}
|
||||
case polygonRole:
|
||||
@@ -308,7 +315,11 @@ QVariant PolylineMapModel::data(const QModelIndex &index, int role) const
|
||||
switch (role)
|
||||
{
|
||||
case lineColorRole:
|
||||
return QVariant::fromValue(QColor::fromRgba(m_items[row]->m_itemSettings->m_2DTrackColor));
|
||||
if (polylineItem->m_colorValid) {
|
||||
return QVariant::fromValue(QColor::fromRgba(polylineItem->m_color));
|
||||
} else {
|
||||
return QVariant::fromValue(QColor::fromRgba(polylineItem->m_itemSettings->m_2DTrackColor));
|
||||
}
|
||||
case coordinatesRole:
|
||||
return QVariant::fromValue(polylineItem->m_polyline);
|
||||
case boundsRole:
|
||||
|
||||
Reference in New Issue
Block a user