No need get chosen object for dialog anymore for just showing options.
--HG-- branch : develop
This commit is contained in:
parent
0c42eb06b2
commit
4b9e40175a
|
@ -112,7 +112,7 @@ DialogAlongLine::~DialogAlongLine()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogAlongLine::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogAlongLine::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
quint32 getSecondPointId() const;
|
||||
void setSecondPointId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -176,7 +176,7 @@ void DialogArc::SetRadius(const QString &value)
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogArc::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogArc::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
QString GetF2() const;
|
||||
void SetF2(const QString &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -123,7 +123,7 @@ DialogBisector::~DialogBisector()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogBisector::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogBisector::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
quint32 getThirdPointId() const;
|
||||
void setThirdPointId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -88,7 +88,7 @@ DialogCutArc::~DialogCutArc()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogCutArc::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogCutArc::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Arc)
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
quint32 getArcId() const;
|
||||
void setArcId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -114,7 +114,7 @@ void DialogCutSpline::setSplineId(const quint32 &value, const quint32 &id)
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogCutSpline::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogCutSpline::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Spline)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
quint32 getSplineId() const;
|
||||
void setSplineId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -114,7 +114,7 @@ void DialogCutSplinePath::setSplinePathId(const quint32 &value, const quint32 &i
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogCutSplinePath::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogCutSplinePath::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::SplinePath)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
quint32 getSplinePathId() const;
|
||||
void setSplinePathId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -80,7 +80,7 @@ DialogDetail::DialogDetail(const VContainer *data, QWidget *parent)
|
|||
* @param id id of objects (points, arcs, splines, spline paths)
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogDetail::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogDetail::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type != SceneObject::Line && type != SceneObject::Detail)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
VDetail getDetails() const;
|
||||
void setDetails(const VDetail &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -84,7 +84,7 @@ void DialogEndLine::DeployFormulaTextEdit()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogEndLine::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
quint32 getBasePointId() const;
|
||||
void setBasePointId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -130,7 +130,7 @@ void DialogHeight::setP2LineId(const quint32 &value, const quint32 &id)
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogHeight::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogHeight::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
quint32 getP2LineId() const;
|
||||
void setP2LineId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -157,7 +157,7 @@ void DialogLine::ShowVisualization()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogLine::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogLine::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
QString getTypeLine() const;
|
||||
void setTypeLine(const QString &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -76,7 +76,7 @@ DialogLineIntersect::~DialogLineIntersect()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogLineIntersect::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogLineIntersect::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
QString getPointName() const;
|
||||
void setPointName(const QString &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -112,7 +112,7 @@ DialogNormal::~DialogNormal()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogNormal::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogNormal::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
quint32 getSecondPointId() const;
|
||||
void setSecondPointId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -130,7 +130,7 @@ void DialogPointOfContact::DeployFormulaTextEdit()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogPointOfContact::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogPointOfContact::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
quint32 getSecondPoint() const;
|
||||
void setSecondPoint(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -82,7 +82,7 @@ void DialogPointOfIntersection::setSecondPointId(const quint32 &value, const qui
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogPointOfIntersection::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogPointOfIntersection::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
quint32 getSecondPointId() const;
|
||||
void setSecondPointId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -121,7 +121,7 @@ DialogShoulderPoint::~DialogShoulderPoint()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogShoulderPoint::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogShoulderPoint::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
quint32 getPShoulder() const;
|
||||
void setPShoulder(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -75,7 +75,7 @@ quint32 DialogSpline::getP1() const
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogSpline::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogSpline::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
qreal getKCurve() const;
|
||||
void setKCurve(const qreal &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -88,7 +88,7 @@ void DialogSplinePath::SetPath(const VSplinePath &value)
|
|||
* @param id id of point or detail
|
||||
* @param type don't show this id in list
|
||||
*/
|
||||
void DialogSplinePath::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogSplinePath::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
VSplinePath GetPath() const;
|
||||
void SetPath(const VSplinePath &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -642,11 +642,11 @@ void DialogTool::CheckState()
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
||||
* @brief ChosenObject gets id and type of selected object. Save right data and ignore wrong.
|
||||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogTool::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogTool::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
Q_UNUSED(id);
|
||||
Q_UNUSED(type);
|
||||
|
|
|
@ -75,7 +75,7 @@ signals:
|
|||
*/
|
||||
void ToolTip(const QString &toolTip);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
void NamePointChanged();
|
||||
virtual void DialogAccepted();
|
||||
/**
|
||||
|
|
|
@ -76,7 +76,7 @@ DialogTriangle::~DialogTriangle()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogTriangle::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogTriangle::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (type == SceneObject::Point)
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
QString getPointName() const;
|
||||
void setPointName(const QString &value);
|
||||
public slots:
|
||||
virtual void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -57,7 +57,7 @@ DialogUnionDetails::~DialogUnionDetails()
|
|||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogUnionDetails::ChoosedObject(quint32 id, const SceneObject &type)
|
||||
void DialogUnionDetails::ChosenObject(quint32 id, const SceneObject &type)
|
||||
{
|
||||
if (numberD == 0)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
ptrdiff_t getIndexD1() const;
|
||||
ptrdiff_t getIndexD2() const;
|
||||
public slots:
|
||||
void ChoosedObject(quint32 id, const SceneObject &type);
|
||||
void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
|
|
@ -264,7 +264,7 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons
|
|||
view->setCursor(cur);
|
||||
helpLabel->setText(toolTip);
|
||||
dialogTool = new Dialog(pattern, this);
|
||||
connect(currentScene, &VMainGraphicsScene::ChoosedObject, dialogTool, &DialogTool::ChoosedObject);
|
||||
connect(currentScene, &VMainGraphicsScene::ChoosedObject, dialogTool, &DialogTool::ChosenObject);
|
||||
connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||
connect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList);
|
||||
|
@ -302,7 +302,7 @@ void MainWindow::SetToolButtonWithApply(bool checked, Tool t, const QString &cur
|
|||
view->setCursor(cur);
|
||||
helpLabel->setText(toolTip);
|
||||
dialogTool = new Dialog(pattern, this);
|
||||
connect(currentScene, &VMainGraphicsScene::ChoosedObject, dialogTool, &DialogTool::ChoosedObject);
|
||||
connect(currentScene, &VMainGraphicsScene::ChoosedObject, dialogTool, &DialogTool::ChosenObject);
|
||||
connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||
connect(dialogTool, &DialogTool::DialogApplied, this, applyDialogSlot);
|
||||
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||
|
|
|
@ -121,8 +121,6 @@ protected:
|
|||
dialog = new Dialog(getData(), qApp->getMainWindow());
|
||||
dialog->setModal(true);
|
||||
|
||||
connect(qobject_cast< VMainGraphicsScene * >(tool->scene()),
|
||||
&VMainGraphicsScene::ChoosedObject, dialog, &DialogTool::ChoosedObject);
|
||||
connect(dialog, &DialogTool::DialogClosed, tool, &Tool::FullUpdateFromGuiOk);
|
||||
connect(dialog, &DialogTool::DialogApplied, tool, &Tool::FullUpdateFromGuiApply);
|
||||
if (ignoreFullUpdate == false)
|
||||
|
|
|
@ -408,7 +408,7 @@ void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
|||
dialog = new DialogDetail(getData(), qApp->getMainWindow());
|
||||
dialog->setModal(true);
|
||||
connect(qobject_cast< VMainGraphicsScene * >(this->scene()), &VMainGraphicsScene::ChoosedObject,
|
||||
dialog, &DialogTool::ChoosedObject);
|
||||
dialog, &DialogTool::ChosenObject);
|
||||
connect(dialog, &DialogTool::DialogClosed, this, &VToolDetail::FullUpdateFromGuiOk);
|
||||
setDialog();
|
||||
dialog->show();
|
||||
|
|
Loading…
Reference in New Issue
Block a user