We don't need DialogTool::ShowVisToolTip slot anymore.

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-07-26 13:45:17 +03:00
parent d248c4f18a
commit f9c9cedfac
9 changed files with 29 additions and 17 deletions

View File

@ -1920,9 +1920,9 @@ void VPattern::ParseToolSpline(VMainGraphicsScene *scene, QDomElement &domElemen
if (spl != nullptr)
{
MainWindow *window = qobject_cast<MainWindow *>(qApp->getMainWindow());
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(spl, &VToolSpline::ToolTip, window, &MainWindow::ShowToolTip);
connect(spl, &VToolSpline::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
}
//Rewrite attribute formula. Need for situation when we have wrong formula.
@ -2109,9 +2109,9 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement
if (spl != nullptr)
{
MainWindow *window = qobject_cast<MainWindow *>(qApp->getMainWindow());
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(spl, &VToolSplinePath::ToolTip, window, &MainWindow::ShowToolTip);
connect(spl, &VToolSplinePath::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
}
//Rewrite attribute formula. Need for situation when we have wrong formula.

View File

@ -29,6 +29,7 @@
#include "dialogcubicbezierpath.h"
#include "ui_dialogcubicbezierpath.h"
#include "../../visualization/path/vistoolcubicbezierpath.h"
#include "../vwidgets/vabstractmainwindow.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
# include "../vmisc/vmath.h"
@ -129,7 +130,9 @@ void DialogCubicBezierPath::ChosenObject(quint32 id, const SceneObject &type)
if (path.CountPoints() == 1)
{
visPath->VisualMode(NULL_ID);
connect(visPath, &VisToolCubicBezierPath::ToolTip, this, &DialogTool::ShowVisToolTip);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(visPath, &VisToolCubicBezierPath::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
}
else
{

View File

@ -36,6 +36,7 @@
#include "../../../vwidgets/vmaingraphicsscene.h"
#include "../../tools/vabstracttool.h"
#include "../support/dialogeditwrongformula.h"
#include "../vwidgets/vabstractmainwindow.h"
#include <QTimer>
@ -218,7 +219,9 @@ void DialogCurveIntersectAxis::ChosenObject(quint32 id, const SceneObject &type)
{
number++;
line->VisualMode(id);
connect(line, &VisToolCurveIntersectAxis::ToolTip, this, &DialogTool::ShowVisToolTip);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(line, &VisToolCurveIntersectAxis::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
}
}
break;

View File

@ -36,6 +36,7 @@
#include "../../../vwidgets/vmaingraphicsscene.h"
#include "../../tools/vabstracttool.h"
#include "../support/dialogeditwrongformula.h"
#include "../vwidgets/vabstractmainwindow.h"
#include <QTimer>
//---------------------------------------------------------------------------------------------------------------------
@ -167,7 +168,9 @@ void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type)
if (SetObject(id, ui->comboBoxBasePoint, ""))
{
vis->VisualMode(id);
connect(vis, &Visualization::ToolTip, this, &DialogTool::ShowVisToolTip);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(vis, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
prepare = true;
}
}

View File

@ -36,6 +36,7 @@
#include "../../../vwidgets/vmaingraphicsscene.h"
#include "../../tools/vabstracttool.h"
#include "../support/dialogeditwrongformula.h"
#include "../vwidgets/vabstractmainwindow.h"
#include <QTimer>
@ -243,7 +244,9 @@ void DialogLineIntersectAxis::ChosenObject(quint32 id, const SceneObject &type)
{
number++;
line->VisualMode(id);
connect(line, &VisToolLineIntersectAxis::ToolTip, this, &DialogTool::ShowVisToolTip);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(line, &VisToolLineIntersectAxis::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
}
break;
case (1):

View File

@ -38,6 +38,7 @@
#include "../../visualization/line/vistoolrotation.h"
#include "../support/dialogeditwrongformula.h"
#include "../qmuparser/qmudef.h"
#include "../vwidgets/vabstractmainwindow.h"
//---------------------------------------------------------------------------------------------------------------------
DialogRotation::DialogRotation(const VContainer *data, const quint32 &toolId, QWidget *parent)
@ -217,7 +218,9 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type)
VisToolRotation *operation = qobject_cast<VisToolRotation *>(vis);
SCASSERT(operation != nullptr);
connect(operation, &Visualization::ToolTip, this, &DialogTool::ShowVisToolTip);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(operation, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
operation->SetOriginPointId(id);
operation->RefreshGeometry();

View File

@ -33,6 +33,7 @@
#include "../../visualization/path/vistoolsplinepath.h"
#include "../support/dialogeditwrongformula.h"
#include "../qmuparser/qmuparsererror.h"
#include "../vwidgets/vabstractmainwindow.h"
#include <QTimer>
@ -182,7 +183,10 @@ void DialogSplinePath::ChosenObject(quint32 id, const SceneObject &type)
if (path.CountPoints() == 1)
{
visPath->VisualMode(NULL_ID);
connect(visPath, &VisToolSplinePath::ToolTip, this, &DialogTool::ShowVisToolTip);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr);
connect(visPath, &VisToolSplinePath::ToolTip, window, &VAbstractMainWindow::ShowToolTip);
connect(visPath, &VisToolSplinePath::PathChanged, this, &DialogSplinePath::PathUpdated);
}
else

View File

@ -907,12 +907,6 @@ QString DialogTool::getPointName() const
return pointName;
}
//---------------------------------------------------------------------------------------------------------------------
void DialogTool::ShowVisToolTip(const QString &toolTip)
{
emit ToolTip(toolTip);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogTool::ShowDialog(bool click)
{

View File

@ -91,7 +91,6 @@ signals:
*/
void ToolTip(const QString &toolTip);
public slots:
void ShowVisToolTip(const QString &toolTip);
virtual void ChosenObject(quint32 id, const SceneObject &type);
virtual void SelectedObject(bool selected, quint32 object, quint32 tool);
void NamePointChanged();