1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-572 Ressource cleannup lib/opmap - Fix UAV markers size and WP marker names

This commit is contained in:
Laurent Lalanne 2017-12-28 12:57:39 +01:00
parent 1ab7956c1a
commit 5a18205f36
13 changed files with 20 additions and 27 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,25 +1,21 @@
<RCC>
<qresource prefix="/markers">
<file>images/bigMarkerGreen.png</file>
<file>images/marker.png</file>
<file>images/wp_marker_green.png</file>
<file>images/wp_marker_orange.png</file>
<file>images/wp_marker_red.png</file>
<file>images/compas.svg</file>
<file>images/airplane.svg</file>
<file>images/home2.svg</file>
<file>images/nav.svg</file>
<file>images/home.png</file>
<file>images/home.svg</file>
<file>images/nav.svg</file>
<file>images/home2.svg</file>
<file>images/airplanepip.png</file>
<file>images/EasystarBlue.png</file>
<file>images/mapquad.png</file>
<file>images/dragons1.jpg</file>
<file>images/dragons2.jpeg</file>
<file>images/waypoint_marker1.png</file>
<file>images/waypoint_marker2.png</file>
<file>images/waypoint_marker3.png</file>
</qresource>
<qresource prefix="/uavs">
<file>images/airplanepip.png</file>
<file>images/EasystarBlue.png</file>
<file>images/mapquad.png</file>
<file>images/airplanepip.png</file>
<file>images/airplane.png</file>
<file>images/EasystarBlue.png</file>
</qresource>
</RCC>

View File

@ -35,7 +35,7 @@ WayPointItem::WayPointItem(const internals::PointLatLng &coord, int const & alti
text = 0;
numberI = 0;
isMagic = false;
picture.load(QString::fromUtf8(":/markers/images/marker.png"));
picture.load(":/markers/images/wp_marker_red.png");
number = WayPointItem::snumber;
++WayPointItem::snumber;
this->setFlag(QGraphicsItem::ItemIsMovable, true);
@ -64,7 +64,7 @@ WayPointItem::WayPointItem(MapGraphicItem *map, bool magicwaypoint) : reached(fa
myType = relative;
if (magicwaypoint) {
isMagic = true;
picture.load(QString::fromUtf8(":/opmap/images/waypoint_marker3.png"));
picture.load(":/markers/images/wp_marker_green.png");
number = -1;
} else {
isMagic = false;
@ -95,7 +95,7 @@ WayPointItem::WayPointItem(const internals::PointLatLng &coord, int const & alti
text = 0;
numberI = 0;
isMagic = false;
picture.load(QString::fromUtf8(":/markers/images/marker.png"));
picture.load(":/markers/images/wp_marker_red.png");
number = WayPointItem::snumber;
++WayPointItem::snumber;
this->setFlag(QGraphicsItem::ItemIsMovable, true);
@ -128,7 +128,7 @@ WayPointItem::WayPointItem(const distBearingAltitude &relativeCoordenate, const
text = 0;
numberI = 0;
isMagic = false;
picture.load(QString::fromUtf8(":/markers/images/marker.png"));
picture.load(":/markers/images/wp_marker_red.png");
number = WayPointItem::snumber;
++WayPointItem::snumber;
this->setFlag(QGraphicsItem::ItemIsMovable, true);
@ -301,16 +301,16 @@ void WayPointItem::SetReached(const bool &value)
reached = value;
emit WPValuesChanged(this);
if (value) {
picture.load(QString::fromUtf8(":/markers/images/bigMarkerGreen.png"));
picture.load(":/markers/images/bigMarkerGreen.png");
} else {
if (!isMagic) {
if ((this->flags() & QGraphicsItem::ItemIsMovable) == QGraphicsItem::ItemIsMovable) {
picture.load(QString::fromUtf8(":/markers/images/marker.png"));
picture.load(":/markers/images/wp_marker_red.png");
} else {
picture.load(QString::fromUtf8(":/markers/images/waypoint_marker2.png"));
picture.load(":/markers/images/wp_marker_orange.png");
}
} else {
picture.load(QString::fromUtf8(":/opmap/images/waypoint_marker3.png"));
picture.load(":/markers/images/wp_marker_green.png");
}
}
this->update();
@ -436,9 +436,9 @@ void WayPointItem::setFlag(QGraphicsItem::GraphicsItemFlag flag, bool enabled)
return;
} else if (flag == QGraphicsItem::ItemIsMovable) {
if (enabled) {
picture.load(QString::fromUtf8(":/markers/images/marker.png"));
picture.load(":/markers/images/wp_marker_red.png");
} else {
picture.load(QString::fromUtf8(":/markers/images/waypoint_marker2.png"));
picture.load(":/markers/images/wp_marker_orange.png");
}
}
QGraphicsItem::setFlag(flag, enabled);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -14,14 +14,11 @@
<file>images/hold.png</file>
<file>images/go.png</file>
<file>images/combobox_down_arrow.png</file>
<file>images/waypoint_marker2.png</file>
<file>images/waypoint_marker1.png</file>
<file>images/uav_heading.png</file>
<file>images/uav_trail.png</file>
<file>images/uav_trail_clear.png</file>
<file>images/minus.png</file>
<file>images/plus.png</file>
<file>images/waypoint_marker3.png</file>
<file>images/home_wp.png</file>
<file>images/move_to_wp.png</file>
<file>images/center_wp.png</file>

View File

@ -1984,9 +1984,9 @@ void OPMapGadgetWidget::onLockWayPointAct_triggered()
m_mouse_waypoint->setFlag(QGraphicsItem::ItemIsMovable, locked);
if (!locked) {
m_mouse_waypoint->picture.load(QString::fromUtf8(":/opmap/images/waypoint_marker2.png"));
m_mouse_waypoint->picture.load(":/markers/images/wp_marker_orange.png");
} else {
m_mouse_waypoint->picture.load(QString::fromUtf8(":/opmap/images/waypoint_marker1.png"));
m_mouse_waypoint->picture.load(":/markers/images/wp_marker_red.png");
}
m_mouse_waypoint->update();