Use for each tool correct method Disable.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-02-06 16:25:04 +02:00
parent 25691639d4
commit b8e7cbd1ac
15 changed files with 20 additions and 20 deletions

View File

@ -205,7 +205,7 @@ VToolBisector* VToolBisector::Create(const quint32 _id, QString &formula, const
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolBisector::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolBisector::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);

View File

@ -131,8 +131,8 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(const quint32 _id, cons
curveId, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCurveIntersectAxis::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCurveIntersectAxis::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(basePointId);
doc->IncrementReferens(curveId);

View File

@ -171,7 +171,7 @@ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QS
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutArc::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutArc::Disable);
doc->AddTool(id, point);
doc->AddTool(arc1id, point);
doc->AddTool(arc2id, point);

View File

@ -178,7 +178,7 @@ VToolCutSpline* VToolCutSpline::Create(const quint32 _id, const QString &pointNa
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutSpline::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutSpline::Disable);
doc->AddTool(id, point);
doc->AddTool(spl1id, point);
doc->AddTool(spl2id, point);

View File

@ -226,8 +226,8 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString
splPath2id, typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolCutSplinePath::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolCutSplinePath::Disable);
doc->AddTool(id, point);
doc->AddTool(splPath1id, point);
doc->AddTool(splPath2id, point);

View File

@ -166,8 +166,8 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName,
typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolEndLine::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolEndLine::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(basePointId);
return point;

View File

@ -164,8 +164,8 @@ VToolHeight* VToolHeight::Create(const quint32 _id, const QString &pointName, co
typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolHeight::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolHeight::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(basePointId);
doc->IncrementReferens(p1LineId);

View File

@ -175,7 +175,7 @@ VToolLineIntersect* VToolLineIntersect::Create(const quint32 _id, const quint32
scene->addItem(point);
connect(point, &VToolLineIntersect::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolLineIntersect::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolLineIntersect::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(p1Line1Id);
doc->IncrementReferens(p2Line1Id);

View File

@ -143,8 +143,8 @@ VToolLineIntersectAxis *VToolLineIntersectAxis::Create(const quint32 _id, const
typeCreation);
scene->addItem(point);
connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPoint::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolLineIntersectAxis::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolLineIntersectAxis::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(basePointId);
doc->IncrementReferens(firstPointId);

View File

@ -166,7 +166,7 @@ VToolNormal* VToolNormal::Create(const quint32 _id, QString &formula, const quin
scene->addItem(point);
connect(point, &VToolNormal::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolNormal::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolNormal::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);

View File

@ -209,7 +209,7 @@ VToolPointOfContact* VToolPointOfContact::Create(const quint32 _id, QString &rad
scene->addItem(point);
connect(point, &VToolPointOfContact::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPointOfContact::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPointOfContact::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(center);
doc->IncrementReferens(firstPointId);

View File

@ -150,7 +150,7 @@ VToolPointOfIntersection *VToolPointOfIntersection::Create(const quint32 _id, co
scene->addItem(point);
connect(point, &VToolPointOfIntersection::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolPointOfIntersection::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPointOfIntersection::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(firstPointId);
doc->IncrementReferens(secondPointId);

View File

@ -209,7 +209,7 @@ VToolShoulderPoint* VToolShoulderPoint::Create(const quint32 _id, QString &formu
scene->addItem(point);
connect(point, &VToolShoulderPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolShoulderPoint::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolShoulderPoint::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(p1Line);
doc->IncrementReferens(p2Line);

View File

@ -161,7 +161,7 @@ VToolTriangle* VToolTriangle::Create(const quint32 _id, const QString &pointName
scene->addItem(point);
connect(point, &VToolTriangle::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, point, &VToolTriangle::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolTriangle::Disable);
doc->AddTool(id, point);
doc->IncrementReferens(axisP1Id);
doc->IncrementReferens(axisP2Id);

View File

@ -1161,7 +1161,7 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElem
scene->addItem(spoint);
connect(spoint, &VToolSinglePoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
connect(scene, &VMainGraphicsScene::NewFactor, spoint, &VToolSinglePoint::SetFactor);
connect(scene, &VMainGraphicsScene::DisableItem, spoint, &VToolPoint::Disable);
connect(scene, &VMainGraphicsScene::DisableItem, spoint, &VToolSinglePoint::Disable);
tools[id] = spoint;
}
}