Commit e6905e43 authored by roangel's avatar roangel
Browse files

Compiling. Markers with all info correctly. Next: implement CFs

parent 1b650fe3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.0.2, 2017-05-11T18:09:24. -->
<!-- Written by QtCreator 4.0.2, 2017-05-12T16:06:37. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
......@@ -23,7 +23,7 @@ using namespace d_fall_pps;
class Marker : public QGraphicsEllipseItem
{
public:
explicit Marker(const UnlabeledMarker::ConstPtr& marker_msg, QGraphicsItem *parent = 0);
explicit Marker(const UnlabeledMarker* p_marker_msg, QGraphicsItem *parent = 0);
~Marker();
void setHighlighted(void);
......@@ -32,7 +32,7 @@ public:
bool getHighlighted(void);
void updateMarker(const UnlabeledMarker::ConstPtr& marker_msg);
void updateMarker(const UnlabeledMarker* p_marker_msg);
private:
// info to fill by message
......
......@@ -4,10 +4,10 @@
#include <QBrush>
Marker::Marker(const UnlabeledMarker::ConstPtr& marker_msg, QGraphicsItem * parent)
Marker::Marker(const UnlabeledMarker* p_marker_msg, QGraphicsItem * parent)
: QGraphicsEllipseItem(-MARKER_DIAMETER/2, - MARKER_DIAMETER/2, MARKER_DIAMETER, MARKER_DIAMETER, parent)
{
updateMarker(marker_msg);
updateMarker(p_marker_msg);
_highlighted = false;
_highlight_diameter = HIGHLIGHT_DIAMETER;
......@@ -25,11 +25,11 @@ Marker::Marker(const UnlabeledMarker::ConstPtr& marker_msg, QGraphicsItem * pare
this->setZValue(10); // max z value, should always be seen
}
void Marker::updateMarker(const UnlabeledMarker::ConstPtr& marker_msg)
void Marker::updateMarker(const UnlabeledMarker* p_marker_msg)
{
m_x = marker_msg->x;
m_y = marker_msg->y;
m_z = marker_msg->z;
m_x = p_marker_msg->x;
m_y = p_marker_msg->y;
m_z = p_marker_msg->z;
this->setPos(m_x * FROM_MILIMETERS_TO_UNITS, -m_y * FROM_MILIMETERS_TO_UNITS); // - y because of coordinates
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment