Added ToolTip for editing simple curve.
--HG-- branch : feature
This commit is contained in:
parent
01f66d3c34
commit
2cf2275365
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user