Allow a user to select a curve covered by visualization.
--HG-- branch : feature
This commit is contained in:
parent
59c9a0b400
commit
970762d0b3
|
@ -30,6 +30,8 @@
|
||||||
#include "../vwidgets/vsimplepoint.h"
|
#include "../vwidgets/vsimplepoint.h"
|
||||||
#include "../vgeometry/vpointf.h"
|
#include "../vgeometry/vpointf.h"
|
||||||
|
|
||||||
|
#include <QGraphicsSceneMouseEvent>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VisToolPiecePath::VisToolPiecePath(const VContainer *data, QGraphicsItem *parent)
|
VisToolPiecePath::VisToolPiecePath(const VContainer *data, QGraphicsItem *parent)
|
||||||
: VisPath(data, parent),
|
: VisPath(data, parent),
|
||||||
|
@ -80,6 +82,12 @@ void VisToolPiecePath::SetPath(const VPiecePath &path)
|
||||||
m_path = path;
|
m_path = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VisToolPiecePath::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
|
{
|
||||||
|
event->ignore();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VSimplePoint *VisToolPiecePath::GetPoint(quint32 i, const QColor &color)
|
VSimplePoint *VisToolPiecePath::GetPoint(quint32 i, const QColor &color)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,6 +49,9 @@ public:
|
||||||
virtual int type() const Q_DECL_OVERRIDE {return Type;}
|
virtual int type() const Q_DECL_OVERRIDE {return Type;}
|
||||||
enum { Type = UserType + static_cast<int>(Vis::ToolPiecePath)};
|
enum { Type = UserType + static_cast<int>(Vis::ToolPiecePath)};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void mousePressEvent( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(VisToolPiecePath)
|
Q_DISABLE_COPY(VisToolPiecePath)
|
||||||
QVector<VSimplePoint *> m_points;
|
QVector<VSimplePoint *> m_points;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user