Added ToolTip for editing simple curve.

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-07-13 14:05:37 +03:00
parent 01f66d3c34
commit 2cf2275365
3 changed files with 9 additions and 1 deletions

View File

@ -698,6 +698,7 @@ void MainWindow::ClosedDialogWithApply(int result)
{
VDrawTool *vtool= static_cast<VDrawTool *>(dialogTool->GetAssociatedTool());
vtool->DialogLinkDestroy();
connect(vtool, &VDrawTool::ToolTip, this, &MainWindow::ShowToolTip);
}
ArrowTool();
}

View File

@ -95,6 +95,8 @@ signals:
* @brief FullUpdateTree emit if need reparse pattern file.
*/
void LiteUpdateTree(const Document &parse);
void ToolTip(const QString &toolTip);
protected:
/** @brief doc dom document container */
VAbstractPattern *doc;
@ -166,6 +168,7 @@ inline void VAbstractTool::AddVisualization()
scene->addItem(visual);
vis = visual;
connect(vis, &Visualization::ToolTip, [=] (const QString &toolTip) {emit ToolTip(toolTip);});
}
#endif // VABSTRACTTOOL_H

View File

@ -66,7 +66,9 @@ VisToolSpline::VisToolSpline(const VContainer *data, QGraphicsItem *parent)
//---------------------------------------------------------------------------------------------------------------------
VisToolSpline::~VisToolSpline()
{}
{
emit ToolTip("");
}
//---------------------------------------------------------------------------------------------------------------------
void VisToolSpline::RefreshGeometry()
@ -150,6 +152,8 @@ void VisToolSpline::RefreshGeometry()
{
VSpline spline(*first, *second, angle1, angle2, kAsm1, kAsm2, kCurve);
DrawPath(this, spline.GetPath(PathDirection::Show), mainColor, Qt::SolidLine, Qt::RoundCap);
Visualization::toolTip = tr("Use <b>Shift</b> for sticking angle!");
emit ToolTip(Visualization::toolTip);
}
}
}