From ad01fe75bd4d7a31f3678186bc4c18597c06e196 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 16 Jul 2014 20:08:24 +0300 Subject: [PATCH] Apply button for dialog line. --HG-- branch : develop --- src/app/dialogs/tools/dialogline.cpp | 39 +++++++++++++++------ src/app/dialogs/tools/dialogline.h | 8 +++-- src/app/dialogs/tools/dialogline.ui | 16 ++++----- src/app/mainwindow.cpp | 18 +++++++--- src/app/mainwindow.h | 1 + src/app/tools/drawTools/vtoolline.cpp | 25 ++++++++----- src/app/tools/drawTools/vtoolline.h | 6 ++-- src/app/tools/drawTools/vtoollinepoint.cpp | 6 ++-- src/app/tools/vabstracttool.cpp | 2 +- src/app/tools/vabstracttool.h | 2 +- src/app/undocommands/vundocommand.cpp | 5 +-- src/app/visualization/vgraphicslineitem.cpp | 37 +++++++++++++------ src/app/visualization/vgraphicslineitem.h | 17 +++++---- 13 files changed, 120 insertions(+), 62 deletions(-) diff --git a/src/app/dialogs/tools/dialogline.cpp b/src/app/dialogs/tools/dialogline.cpp index e11a0bfdc..826053474 100644 --- a/src/app/dialogs/tools/dialogline.cpp +++ b/src/app/dialogs/tools/dialogline.cpp @@ -34,6 +34,7 @@ #include "../../visualization/vgraphicslineitem.h" #include "../../widgets/vapplication.h" #include "../../widgets/vmaingraphicsscene.h" +#include "../../tools/vabstracttool.h" //--------------------------------------------------------------------------------------------------------------------- /** @@ -46,7 +47,7 @@ DialogLine::DialogLine(const VContainer *data, QWidget *parent) line(nullptr) { ui->setupUi(this); - InitOkCancel(ui); + InitOkCancelApply(ui); FillComboBoxPoints(ui->comboBoxFirstPoint); FillComboBoxPoints(ui->comboBoxSecondPoint); @@ -58,6 +59,8 @@ DialogLine::DialogLine(const VContainer *data, QWidget *parent) this, &DialogLine::PointNameChanged); connect(ui->comboBoxSecondPoint, static_cast(&QComboBox::currentIndexChanged), this, &DialogLine::PointNameChanged); + + line = new VGraphicsLineItem(data); } //--------------------------------------------------------------------------------------------------------------------- @@ -75,6 +78,7 @@ DialogLine::~DialogLine() void DialogLine::setSecondPoint(const quint32 &value) { setPointId(ui->comboBoxSecondPoint, secondPoint, value, 0); + line->setPoint2Id(value); } //--------------------------------------------------------------------------------------------------------------------- @@ -86,6 +90,7 @@ void DialogLine::setTypeLine(const QString &value) { typeLine = value; SetupTypeLine(ui->comboBoxLineType, value); + line->setLineStyle(VAbstractTool::LineStyle(typeLine)); } //--------------------------------------------------------------------------------------------------------------------- @@ -96,6 +101,7 @@ void DialogLine::setTypeLine(const QString &value) void DialogLine::setFirstPoint(const quint32 &value) { setPointId(ui->comboBoxFirstPoint, firstPoint, value, 0); + line->setPoint1Id(value); } //--------------------------------------------------------------------------------------------------------------------- @@ -104,15 +110,19 @@ void DialogLine::setFirstPoint(const quint32 &value) */ void DialogLine::DialogAccepted() { - //TODO check if points different - qint32 index = ui->comboBoxFirstPoint->currentIndex(); - firstPoint = qvariant_cast(ui->comboBoxFirstPoint->itemData(index)); - index = ui->comboBoxSecondPoint->currentIndex(); - secondPoint = qvariant_cast(ui->comboBoxSecondPoint->itemData(index)); - typeLine = GetTypeLine(ui->comboBoxLineType); + this->SaveData(); DialogClosed(QDialog::Accepted); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogLine::DialogApply() +{ + this->SaveData(); + line->setLineStyle(VAbstractTool::LineStyle(typeLine)); + line->RefreshGeometry(); + emit DialogApplied(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogLine::PointNameChanged() { @@ -136,7 +146,7 @@ void DialogLine::PointNameChanged() void DialogLine::UpdateList() { /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. + * Does nothing. We redefine this slot because it is only one now way block update list of variables. * This dialog doesn't work with formula. Don't delete. Help avoid crash. */ } @@ -145,10 +155,19 @@ void DialogLine::UpdateList() void DialogLine::ShowVisualization() { VMainGraphicsScene *scene = qApp->getCurrentScene(); - line = new VGraphicsLineItem(data, getCurrentObjectId(ui->comboBoxFirstPoint), - getCurrentObjectId(ui->comboBoxSecondPoint)); connect(scene, &VMainGraphicsScene::NewFactor, line, &VGraphicsLineItem::SetFactor); scene->addItem(line); + line->RefreshGeometry(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLine::SaveData() +{ + qint32 index = ui->comboBoxFirstPoint->currentIndex(); + firstPoint = qvariant_cast(ui->comboBoxFirstPoint->itemData(index)); + index = ui->comboBoxSecondPoint->currentIndex(); + secondPoint = qvariant_cast(ui->comboBoxSecondPoint->itemData(index)); + typeLine = GetTypeLine(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/tools/dialogline.h b/src/app/dialogs/tools/dialogline.h index 170fefeec..86f4a8c99 100644 --- a/src/app/dialogs/tools/dialogline.h +++ b/src/app/dialogs/tools/dialogline.h @@ -59,10 +59,10 @@ public: public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void DialogAccepted(); - /** TODO ISSUE 79 : create real function + /** * @brief DialogApply apply data and emit signal about applied dialog. */ - virtual void DialogApply(){} + virtual void DialogApply(); virtual void PointNameChanged(); virtual void UpdateList(); protected: @@ -85,6 +85,10 @@ private: /** @brief typeLine type of line */ QString typeLine; VGraphicsLineItem *line; + /** + * @brief SaveData Put dialog data in local variables + */ + void SaveData(); }; //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/tools/dialogline.ui b/src/app/dialogs/tools/dialogline.ui index 02a0c73e7..f4e6d9d39 100644 --- a/src/app/dialogs/tools/dialogline.ui +++ b/src/app/dialogs/tools/dialogline.ui @@ -9,20 +9,20 @@ 0 0 - 267 - 154 + 286 + 151 - 267 - 154 + 286 + 151 - 267 - 154 + 286 + 151 @@ -43,7 +43,7 @@ 9 9 - 255 + 269 134 @@ -156,7 +156,7 @@ Qt::Horizontal - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 31bfed5dc..8393184ef 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -394,7 +394,7 @@ void MainWindow::ApplyDialog() void MainWindow::ToolEndLine(bool checked) { SetToolButtonWithApply(checked, Tool::EndLineTool, ":/cursor/endline_cursor.png", tr("Select point"), - &MainWindow::ClosedDialogEndLine, &MainWindow::ApplyDialogEndLine); + &MainWindow::ClosedDialogEndLine, &MainWindow::ApplyDialogEndLine); } //--------------------------------------------------------------------------------------------------------------------- @@ -423,8 +423,8 @@ void MainWindow::ClosedDialogEndLine(int result) */ void MainWindow::ToolLine(bool checked) { - SetToolButton(checked, Tool::LineTool, ":/cursor/line_cursor.png", tr("Select first point"), - &MainWindow::ClosedDialogLine); + SetToolButtonWithApply(checked, Tool::LineTool, ":/cursor/line_cursor.png", tr("Select first point"), + &MainWindow::ClosedDialogLine, &MainWindow::ApplyDialogLine); } //--------------------------------------------------------------------------------------------------------------------- @@ -434,7 +434,14 @@ void MainWindow::ToolLine(bool checked) */ void MainWindow::ClosedDialogLine(int result) { - ClosedDialog(result); + ClosedDialogWithApply(result); +} + + +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::ApplyDialogLine() +{ + ApplyDialog(); } //--------------------------------------------------------------------------------------------------------------------- @@ -445,7 +452,8 @@ void MainWindow::ClosedDialogLine(int result) void MainWindow::ToolAlongLine(bool checked) { SetToolButtonWithApply(checked, Tool::AlongLineTool, ":/cursor/alongline_cursor.png", - tr("Select point"), &MainWindow::ClosedDialogAlongLine, &MainWindow::ApplyDialogAlongLine); + tr("Select point"), &MainWindow::ClosedDialogAlongLine, + &MainWindow::ApplyDialogAlongLine); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/mainwindow.h b/src/app/mainwindow.h index 862f2e069..87ed9beac 100644 --- a/src/app/mainwindow.h +++ b/src/app/mainwindow.h @@ -108,6 +108,7 @@ public slots: void ClosedDialogEndLine(int result); void ApplyDialogEndLine(); void ClosedDialogLine(int result); + void ApplyDialogLine(); void ClosedDialogAlongLine(int result); void ApplyDialogAlongLine(); void ClosedDialogShoulderPoint(int result); diff --git a/src/app/tools/drawTools/vtoolline.cpp b/src/app/tools/drawTools/vtoolline.cpp index 87dd99d31..d1e6b8c7c 100644 --- a/src/app/tools/drawTools/vtoolline.cpp +++ b/src/app/tools/drawTools/vtoolline.cpp @@ -60,7 +60,7 @@ VToolLine::VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstP this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setFlag(QGraphicsItem::ItemIsFocusable, true); this->setAcceptHoverEvents(true); - this->setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle())); + this->setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle(typeLine))); if (typeCreation == Source::FromGui) { @@ -94,7 +94,7 @@ void VToolLine::setDialog() * @param doc dom document container. * @param data container with variables. */ -void VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolLine *VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogLine *dialogTool = qobject_cast(dialog); @@ -102,7 +102,14 @@ void VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern * const quint32 firstPoint = dialogTool->getFirstPoint(); const quint32 secondPoint = dialogTool->getSecondPoint(); const QString typeLine = dialogTool->getTypeLine(); - Create(0, firstPoint, secondPoint, typeLine, scene, doc, data, Document::FullParse, Source::FromGui); + + VToolLine *line = nullptr; + line = Create(0, firstPoint, secondPoint, typeLine, scene, doc, data, Document::FullParse, Source::FromGui); + if (line != nullptr) + { + line->dialog=dialogTool; + } + return line; } //--------------------------------------------------------------------------------------------------------------------- @@ -118,7 +125,7 @@ void VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern * * @param parse parser file mode. * @param typeCreation way we create this tool. */ -void VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, +VToolLine * VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { @@ -151,7 +158,9 @@ void VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, const quin doc->AddTool(id, line); doc->IncrementReferens(firstPoint); doc->IncrementReferens(secondPoint); + return line; } + return nullptr; } //--------------------------------------------------------------------------------------------------------------------- @@ -210,7 +219,7 @@ void VToolLine::ChangedActivDraw(const QString &newName) selectable = false; currentColor = Qt::gray; } - this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle())); + this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle(typeLine))); this->setAcceptHoverEvents (selectable); VDrawTool::ChangedActivDraw(newName); } @@ -263,7 +272,7 @@ void VToolLine::RefreshDataInFile() void VToolLine::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthMainLine())/factor, LineStyle())); + this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthMainLine())/factor, LineStyle(typeLine))); } //--------------------------------------------------------------------------------------------------------------------- @@ -274,7 +283,7 @@ void VToolLine::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void VToolLine::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle())); + this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle(typeLine))); } //--------------------------------------------------------------------------------------------------------------------- @@ -360,5 +369,5 @@ void VToolLine::RefreshGeometry() const VPointF *first = VAbstractTool::data.GeometricObject(firstPoint); const VPointF *second = VAbstractTool::data.GeometricObject(secondPoint); this->setLine(QLineF(first->toQPointF(), second->toQPointF())); - this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle())); + this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle(typeLine))); } diff --git a/src/app/tools/drawTools/vtoolline.h b/src/app/tools/drawTools/vtoolline.h index 97ab224a4..f588b93cf 100644 --- a/src/app/tools/drawTools/vtoolline.h +++ b/src/app/tools/drawTools/vtoolline.h @@ -41,9 +41,9 @@ class VToolLine: public VDrawTool, public QGraphicsLineItem public: VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, quint32 secondPoint, const QString &typeLine, const Source &typeCreation, QGraphicsItem * parent = nullptr); - virtual void setDialog(); - static void Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); - static void Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, + virtual void setDialog(); + static VToolLine *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolLine *Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static const QString TagName; diff --git a/src/app/tools/drawTools/vtoollinepoint.cpp b/src/app/tools/drawTools/vtoollinepoint.cpp index 688fda797..99cb6912d 100644 --- a/src/app/tools/drawTools/vtoollinepoint.cpp +++ b/src/app/tools/drawTools/vtoollinepoint.cpp @@ -52,7 +52,7 @@ VToolLinePoint::VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &i QPointF point1 = data->GeometricObject(basePointId)->toQPointF(); QPointF point2 = data->GeometricObject(id)->toQPointF(); mainLine = new QGraphicsLineItem(QLineF(point1 - point2, QPointF()), this); - mainLine->setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle())); + mainLine->setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle(typeLine))); mainLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); } @@ -71,7 +71,7 @@ void VToolLinePoint::ChangedActivDraw(const QString &newName) { currentColor = Qt::gray; } - mainLine->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle())); + mainLine->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle(typeLine))); VToolPoint::ChangedActivDraw(newName); } @@ -81,7 +81,7 @@ void VToolLinePoint::ChangedActivDraw(const QString &newName) */ void VToolLinePoint::RefreshGeometry() { - mainLine->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle())); + mainLine->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor, LineStyle(typeLine))); VToolPoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject(id)); QPointF point = VDrawTool::data.GeometricObject(id)->toQPointF(); QPointF basePoint = VDrawTool::data.GeometricObject(basePointId)->toQPointF(); diff --git a/src/app/tools/vabstracttool.cpp b/src/app/tools/vabstracttool.cpp index e4a774e8f..c81dbca55 100644 --- a/src/app/tools/vabstracttool.cpp +++ b/src/app/tools/vabstracttool.cpp @@ -261,7 +261,7 @@ void VAbstractTool::DeleteTool(bool ask) * @brief LineStyle return pen style for current line style. * @return pen style. */ -Qt::PenStyle VAbstractTool::LineStyle() +Qt::PenStyle VAbstractTool::LineStyle(const QString &typeLine) { QStringList styles = Styles(); switch (styles.indexOf(typeLine)) diff --git a/src/app/tools/vabstracttool.h b/src/app/tools/vabstracttool.h index 5c2047cb1..7f6a36afd 100644 --- a/src/app/tools/vabstracttool.h +++ b/src/app/tools/vabstracttool.h @@ -98,6 +98,7 @@ public: static const QString TypeLineDashDotDotLine; static const QStringList Styles(); static void AddRecord(const quint32 id, const Tool &toolType, VPattern *doc); + static Qt::PenStyle LineStyle(const QString &typeLine); public slots: /** * @brief FullUpdateFromFile update tool data form file. @@ -147,7 +148,6 @@ protected: */ virtual void RemoveReferens(){} virtual void DeleteTool(bool ask = true); - Qt::PenStyle LineStyle(); static int ConfirmDeletion(); private: Q_DISABLE_COPY(VAbstractTool) diff --git a/src/app/undocommands/vundocommand.cpp b/src/app/undocommands/vundocommand.cpp index f3fc7de7a..ef15ed022 100644 --- a/src/app/undocommands/vundocommand.cpp +++ b/src/app/undocommands/vundocommand.cpp @@ -33,15 +33,12 @@ VUndoCommand::VUndoCommand(const QDomElement &xml, VPattern *doc, QUndoCommand *parent) :QObject(), QUndoCommand(parent), xml(xml), doc(doc), nodeId(0), redoFlag(false) { - SCASSERT(xml.isNull() == false); SCASSERT(doc != nullptr); } //--------------------------------------------------------------------------------------------------------------------- VUndoCommand::~VUndoCommand() -{ - -} +{} //--------------------------------------------------------------------------------------------------------------------- void VUndoCommand::RedoFullParsing() diff --git a/src/app/visualization/vgraphicslineitem.cpp b/src/app/visualization/vgraphicslineitem.cpp index c7d459225..72762c4ed 100644 --- a/src/app/visualization/vgraphicslineitem.cpp +++ b/src/app/visualization/vgraphicslineitem.cpp @@ -32,20 +32,17 @@ #include "../widgets/vapplication.h" #include "../tools/drawTools/vdrawtool.h" +//--------------------------------------------------------------------------------------------------------------------- +VGraphicsLineItem::VGraphicsLineItem(const VContainer *data, QGraphicsItem *parent) + :QObject(), QGraphicsLineItem(parent), data(data), point1Id(0), point2Id(0), factor(VDrawTool::factor), + scenePos(QPointF()), color(Qt::red), lineStyle(Qt::SolidLine) +{} + //--------------------------------------------------------------------------------------------------------------------- VGraphicsLineItem::VGraphicsLineItem(const VContainer *data, const quint32 &pointId, const QPointF &scenePos, QGraphicsItem *parent) :QObject(), QGraphicsLineItem(parent), data(data), point1Id(pointId), point2Id(0), factor(VDrawTool::factor), - scenePos(scenePos), color(Qt::black) -{ - RefreshGeometry(); -} - -//--------------------------------------------------------------------------------------------------------------------- -VGraphicsLineItem::VGraphicsLineItem(const VContainer *data, const quint32 &p1Id, const quint32 &p2Id, - QGraphicsItem *parent) - :QObject(), QGraphicsLineItem(parent), data(data), point1Id(p1Id), point2Id(p2Id), factor(VDrawTool::factor), - scenePos(QPointF()), color(Qt::red) + scenePos(scenePos), color(Qt::black), lineStyle(Qt::SolidLine) { RefreshGeometry(); } @@ -74,6 +71,24 @@ void VGraphicsLineItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) QGraphicsLineItem::mouseMoveEvent(event); } +//--------------------------------------------------------------------------------------------------------------------- +void VGraphicsLineItem::setPoint2Id(const quint32 &value) +{ + point2Id = value; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VGraphicsLineItem::setPoint1Id(const quint32 &value) +{ + point1Id = value; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VGraphicsLineItem::setLineStyle(const Qt::PenStyle &value) +{ + lineStyle = value; +} + //--------------------------------------------------------------------------------------------------------------------- void VGraphicsLineItem::RefreshGeometry() { @@ -87,5 +102,5 @@ void VGraphicsLineItem::RefreshGeometry() const VPointF *second = data->GeometricObject(point2Id); this->setLine(QLineF(first->toQPointF(), second->toQPointF())); } - this->setPen(QPen(color, qApp->toPixel(qApp->widthHairLine())/factor, Qt::SolidLine)); + this->setPen(QPen(color, qApp->toPixel(qApp->widthHairLine())/factor, lineStyle)); } diff --git a/src/app/visualization/vgraphicslineitem.h b/src/app/visualization/vgraphicslineitem.h index a0f1971b3..5822af481 100644 --- a/src/app/visualization/vgraphicslineitem.h +++ b/src/app/visualization/vgraphicslineitem.h @@ -36,24 +36,29 @@ class VGraphicsLineItem : public QObject, public QGraphicsLineItem { Q_OBJECT public: + VGraphicsLineItem(const VContainer *data, QGraphicsItem * parent = 0); VGraphicsLineItem(const VContainer *data, const quint32 &pointId, const QPointF &scenePos, QGraphicsItem * parent = 0); - VGraphicsLineItem(const VContainer *data, const quint32 &p1Id, const quint32 &p2Id, QGraphicsItem * parent = 0); virtual ~VGraphicsLineItem(); + + void setLineStyle(const Qt::PenStyle &value); + void setPoint1Id(const quint32 &value); + void setPoint2Id(const quint32 &value); + void RefreshGeometry(); public slots: - void SetFactor(qreal factor); - void MousePos(const QPointF &scenePos); + void SetFactor(qreal factor); + void MousePos(const QPointF &scenePos); protected: virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event); private: Q_DISABLE_COPY(VGraphicsLineItem) const VContainer *data; - const quint32 point1Id; - const quint32 point2Id; + quint32 point1Id; + quint32 point2Id; qreal factor; QPointF scenePos; const QColor color; - void RefreshGeometry(); + Qt::PenStyle lineStyle; }; #endif // VGRAPHICSLINEITEM_H