VToolRotation::SetFactor.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-05-17 13:02:01 +03:00
parent 35c1267672
commit 18d3a297cd
2 changed files with 24 additions and 0 deletions

View File

@ -419,6 +419,29 @@ void VToolRotation::FullUpdateFromFile()
SetVisualization();
}
//---------------------------------------------------------------------------------------------------------------------
void VToolRotation::SetFactor(qreal factor)
{
VDrawTool::SetFactor(factor);
QMapIterator<quint32, VAbstractSimple *> i(rObjects);
while (i.hasNext())
{
i.next();
if (i.value()->GetType() == GOType::Point)
{
VSimplePoint *item = qobject_cast<VSimplePoint *>(i.value());
SCASSERT(item != nullptr);
item->RefreshGeometry(*VAbstractTool::data.GeometricObject<VPointF>(i.key()));
}
else
{
VSimpleCurve *item = qobject_cast<VSimpleCurve *>(i.value());
SCASSERT(item != nullptr);
item->RefreshGeometry(VAbstractTool::data.GeometricObject<VAbstractCurve>(i.key()));
}
}
}
//---------------------------------------------------------------------------------------------------------------------
void VToolRotation::AllowHover(bool enabled)
{

View File

@ -78,6 +78,7 @@ public:
public slots:
virtual void FullUpdateFromFile() Q_DECL_OVERRIDE;
virtual void SetFactor(qreal factor) Q_DECL_OVERRIDE;
virtual void AllowHover(bool enabled) Q_DECL_OVERRIDE;
virtual void AllowSelecting(bool enabled) Q_DECL_OVERRIDE;