33 #ifndef VISUALIZATION_H
34 #define VISUALIZATION_H
37 #include "../vgeometry/vabstractcurve.h"
38 #include "../vmisc/def.h"
39 #include "../vmisc/logging.h"
40 #include "../vmisc/vabstractapplication.h"
41 #include "../vwidgets/global.h"
42 #include "../vwidgets/scalesceneitems.h"
43 #include "../vwidgets/vcurvepathitem.h"
44 #include "../vwidgets/vmaingraphicsscene.h"
46 #include <qcompilerdetection.h>
47 #include <QGraphicsItem>
51 Q_DECLARE_LOGGING_CATEGORY(vVis)
74 virtual
void VisualMode(const quint32 &pointId);
85 static qreal
FindVal(const QString &expression, const
QHash<QString,
111 void DrawPoint(QGraphicsEllipseItem *point,
const QPointF &pos,
const QColor &color,
112 Qt::PenStyle style = Qt::SolidLine);
114 const qreal &
lineWeight, Qt::PenStyle style = Qt::SolidLine);
116 Qt::PenStyle style = Qt::SolidLine,
const qreal &weight = 0.35,
117 Qt::PenCapStyle cap = Qt::SquareCap);
120 Qt::PenStyle style = Qt::SolidLine,
const qreal &weight = 0.35,
121 Qt::PenCapStyle cap = Qt::SquareCap);
124 Qt::PenStyle style = Qt::SolidLine);
125 void drawArrow(
const QLineF &axis, QPainterPath &path,
const qreal &arrow_size);
127 template <
typename Item>
130 template <
class Item>
131 Item *
InitItem(
const QColor &color, QGraphicsItem *parent);
134 QGraphicsItem *parent);
142 template <
typename Item>
149 scene->addItem(item);
154 template <
class Item>
159 QPen pen = item->pen();
164 item->setFlags(QGraphicsItem::ItemStacksBehindParent);
165 item->setVisible(
false);
The VContainer class container of all variables.
The VMainGraphicsScene class main scene.
void mouseMove(const QPointF &scenePos)
mouseMove send new mouse position.
QString CurrentToolTip() const
void mousePos(const QPointF &scenePos)
void ToolTip(const QString &toolTip)
Visualization(const VContainer *data)
void setScenePos(const QPointF &value)
void DrawPoint(QGraphicsEllipseItem *point, const QPointF &pos, const QColor &color, Qt::PenStyle style=Qt::SolidLine)
void setLineWeight(const QString &value)
Item * InitItem(const QColor &color, QGraphicsItem *parent)
static qreal FindLength(const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars)
void drawArrow(const QLineF &axis, QPainterPath &path, const qreal &arrow_size)
void SetMode(const Mode &value)
virtual void VisualMode(const quint32 &pointId)
static VScaledEllipse * initPointItem(const QColor &color, QGraphicsItem *parent, qreal z=0)
void setData(const VContainer *data)
void DrawPath(VCurvePathItem *pathItem, const QPainterPath &path, const QColor &color, Qt::PenStyle style=Qt::SolidLine, const qreal &weight=0.35, Qt::PenCapStyle cap=Qt::SquareCap)
void setObject1Id(const quint32 &value)
static VScaledEllipse * GetPointItem(QVector< VScaledEllipse * > &points, quint32 i, const QColor &color, QGraphicsItem *parent)
const VContainer * getData() const
void drawArrowedLine(ArrowedLineItem *item, const QLineF &line, const QColor &color, Qt::PenStyle style=Qt::SolidLine)
virtual void RefreshGeometry()=0
virtual void DrawLine(VScaledLine *lineItem, const QLineF &line, const QColor &color, const qreal &lineWeight, Qt::PenStyle style=Qt::SolidLine)
VScaledEllipse * InitPoint(const QColor &color, QGraphicsItem *parent, qreal z=0) const
virtual void AddOnScene()=0
virtual ~Visualization() Q_DECL_EQ_DEFAULT
void setLineStyle(const Qt::PenStyle &value)
void setMainColor(const QColor &value)
static qreal FindVal(const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars)