Ignore children in list.
--HG-- branch : feature
This commit is contained in:
parent
b866e7b91e
commit
bb89e681a2
|
@ -43,7 +43,8 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogCutArc::DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogCutArc::DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
: DialogTool(data, toolId, parent), ui(new Ui::DialogCutArc), formula(QString()), formulaBaseHeight(0)
|
: DialogTool(data, toolId, parent), ui(new Ui::DialogCutArc), formula(QString()), formulaBaseHeight(0),
|
||||||
|
ch1(NULL_ID), ch2(NULL_ID)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
|
@ -56,7 +57,7 @@ DialogCutArc::DialogCutArc(const VContainer *data, const quint32 &toolId, QWidge
|
||||||
flagFormula = false;
|
flagFormula = false;
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
FillComboBoxArcs(ui->comboBoxArc);
|
FillComboBoxArcs(ui->comboBoxArc, FillComboBox::NoChildren, ch1, ch2);
|
||||||
FillComboBoxLineColors(ui->comboBoxColor);
|
FillComboBoxLineColors(ui->comboBoxColor);
|
||||||
|
|
||||||
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutArc::FXLength);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutArc::FXLength);
|
||||||
|
@ -157,7 +158,7 @@ void DialogCutArc::closeEvent(QCloseEvent *event)
|
||||||
*/
|
*/
|
||||||
void DialogCutArc::setArcId(const quint32 &value)
|
void DialogCutArc::setArcId(const quint32 &value)
|
||||||
{
|
{
|
||||||
setCurrentArcId(ui->comboBoxArc, value, FillComboBox::NoChildren);
|
setCurrentArcId(ui->comboBoxArc, value, FillComboBox::NoChildren, ch1, ch2);
|
||||||
|
|
||||||
VisToolCutArc *path = qobject_cast<VisToolCutArc *>(vis);
|
VisToolCutArc *path = qobject_cast<VisToolCutArc *>(vis);
|
||||||
SCASSERT(path != nullptr);
|
SCASSERT(path != nullptr);
|
||||||
|
@ -176,6 +177,14 @@ void DialogCutArc::SetColor(const QString &value)
|
||||||
ChangeCurrentData(ui->comboBoxColor, value);
|
ChangeCurrentData(ui->comboBoxColor, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogCutArc::SetChildrenId(const quint32 &ch1, const quint32 &ch2)
|
||||||
|
{
|
||||||
|
this->ch1 = ch1;
|
||||||
|
this->ch2 = ch2;
|
||||||
|
FillComboBoxArcs(ui->comboBoxArc, FillComboBox::NoChildren, ch1, ch2);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief SetFormula set string with formula length
|
* @brief SetFormula set string with formula length
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
|
|
||||||
QString GetColor() const;
|
QString GetColor() const;
|
||||||
void SetColor(const QString &value);
|
void SetColor(const QString &value);
|
||||||
|
|
||||||
|
void SetChildrenId(const quint32 &ch1, const quint32 &ch2);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
/**
|
/**
|
||||||
|
@ -85,6 +87,9 @@ private:
|
||||||
|
|
||||||
/** @brief formulaBaseHeight base height defined by dialogui */
|
/** @brief formulaBaseHeight base height defined by dialogui */
|
||||||
int formulaBaseHeight;
|
int formulaBaseHeight;
|
||||||
|
|
||||||
|
quint32 ch1;
|
||||||
|
quint32 ch2;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGCUTARC_H
|
#endif // DIALOGCUTARC_H
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogCutSpline::DialogCutSpline(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogCutSpline::DialogCutSpline(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogCutSpline), formula(QString()), formulaBaseHeight(0)
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogCutSpline), formula(QString()), formulaBaseHeight(0),
|
||||||
|
ch1(NULL_ID), ch2(NULL_ID)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
|
@ -55,7 +56,7 @@ DialogCutSpline::DialogCutSpline(const VContainer *data, const quint32 &toolId,
|
||||||
flagFormula = false;
|
flagFormula = false;
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
FillComboBoxSplines(ui->comboBoxSpline);
|
FillComboBoxSplines(ui->comboBoxSpline, FillComboBox::NoChildren, ch1, ch2);
|
||||||
FillComboBoxLineColors(ui->comboBoxColor);
|
FillComboBoxLineColors(ui->comboBoxColor);
|
||||||
|
|
||||||
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutSpline::FXLength);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutSpline::FXLength);
|
||||||
|
@ -114,7 +115,7 @@ void DialogCutSpline::SetFormula(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogCutSpline::setSplineId(const quint32 &value)
|
void DialogCutSpline::setSplineId(const quint32 &value)
|
||||||
{
|
{
|
||||||
setCurrentSplineId(ui->comboBoxSpline, value, FillComboBox::NoChildren);
|
setCurrentSplineId(ui->comboBoxSpline, value, FillComboBox::NoChildren, ch1, ch2);
|
||||||
|
|
||||||
VisToolCutSpline *path = qobject_cast<VisToolCutSpline *>(vis);
|
VisToolCutSpline *path = qobject_cast<VisToolCutSpline *>(vis);
|
||||||
SCASSERT(path != nullptr);
|
SCASSERT(path != nullptr);
|
||||||
|
@ -133,6 +134,14 @@ void DialogCutSpline::SetColor(const QString &value)
|
||||||
ChangeCurrentData(ui->comboBoxColor, value);
|
ChangeCurrentData(ui->comboBoxColor, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogCutSpline::SetChildrenId(const quint32 &ch1, const quint32 &ch2)
|
||||||
|
{
|
||||||
|
this->ch1 = ch1;
|
||||||
|
this->ch2 = ch2;
|
||||||
|
FillComboBoxSplines(ui->comboBoxSpline, FillComboBox::NoChildren, ch1, ch2);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
||||||
|
|
|
@ -56,6 +56,8 @@ public:
|
||||||
|
|
||||||
QString GetColor() const;
|
QString GetColor() const;
|
||||||
void SetColor(const QString &value);
|
void SetColor(const QString &value);
|
||||||
|
|
||||||
|
void SetChildrenId(const quint32 &ch1, const quint32 &ch2);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
/**
|
/**
|
||||||
|
@ -81,6 +83,9 @@ private:
|
||||||
|
|
||||||
/** @brief formulaBaseHeight base height defined by dialogui */
|
/** @brief formulaBaseHeight base height defined by dialogui */
|
||||||
int formulaBaseHeight;
|
int formulaBaseHeight;
|
||||||
|
|
||||||
|
quint32 ch1;
|
||||||
|
quint32 ch2;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGCUTSPLINE_H
|
#endif // DIALOGCUTSPLINE_H
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogCutSplinePath::DialogCutSplinePath(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogCutSplinePath::DialogCutSplinePath(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogCutSplinePath), formula(QString()), formulaBaseHeight(0)
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogCutSplinePath), formula(QString()), formulaBaseHeight(0),
|
||||||
|
ch1(NULL_ID), ch2(NULL_ID)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
|
@ -55,7 +56,7 @@ DialogCutSplinePath::DialogCutSplinePath(const VContainer *data, const quint32 &
|
||||||
flagFormula = false;
|
flagFormula = false;
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
FillComboBoxSplinesPath(ui->comboBoxSplinePath);
|
FillComboBoxSplinesPath(ui->comboBoxSplinePath, FillComboBox::NoChildren, ch1, ch2);
|
||||||
FillComboBoxLineColors(ui->comboBoxColor);
|
FillComboBoxLineColors(ui->comboBoxColor);
|
||||||
|
|
||||||
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutSplinePath::FXLength);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutSplinePath::FXLength);
|
||||||
|
@ -114,7 +115,7 @@ void DialogCutSplinePath::SetFormula(const QString &value)
|
||||||
*/
|
*/
|
||||||
void DialogCutSplinePath::setSplinePathId(const quint32 &value)
|
void DialogCutSplinePath::setSplinePathId(const quint32 &value)
|
||||||
{
|
{
|
||||||
setCurrentSplinePathId(ui->comboBoxSplinePath, value, FillComboBox::NoChildren);
|
setCurrentSplinePathId(ui->comboBoxSplinePath, value, FillComboBox::NoChildren, ch1, ch2);
|
||||||
|
|
||||||
VisToolCutSplinePath *path = qobject_cast<VisToolCutSplinePath *>(vis);
|
VisToolCutSplinePath *path = qobject_cast<VisToolCutSplinePath *>(vis);
|
||||||
SCASSERT(path != nullptr);
|
SCASSERT(path != nullptr);
|
||||||
|
@ -133,6 +134,14 @@ void DialogCutSplinePath::SetColor(const QString &value)
|
||||||
ChangeCurrentData(ui->comboBoxColor, value);
|
ChangeCurrentData(ui->comboBoxColor, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogCutSplinePath::SetChildrenId(const quint32 &ch1, const quint32 &ch2)
|
||||||
|
{
|
||||||
|
this->ch1 = ch1;
|
||||||
|
this->ch2 = ch2;
|
||||||
|
FillComboBoxSplinesPath(ui->comboBoxSplinePath, FillComboBox::NoChildren, ch1, ch2);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
||||||
|
|
|
@ -56,6 +56,8 @@ public:
|
||||||
|
|
||||||
QString GetColor() const;
|
QString GetColor() const;
|
||||||
void SetColor(const QString &value);
|
void SetColor(const QString &value);
|
||||||
|
|
||||||
|
void SetChildrenId(const quint32 &ch1, const quint32 &ch2);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
/**
|
/**
|
||||||
|
@ -81,6 +83,9 @@ private:
|
||||||
|
|
||||||
/** @brief formulaBaseHeight base height defined by dialogui */
|
/** @brief formulaBaseHeight base height defined by dialogui */
|
||||||
int formulaBaseHeight;
|
int formulaBaseHeight;
|
||||||
|
|
||||||
|
quint32 ch1;
|
||||||
|
quint32 ch2;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGCUTSPLINEPATH_H
|
#endif // DIALOGCUTSPLINEPATH_H
|
||||||
|
|
|
@ -70,6 +70,7 @@ void VToolCutArc::setDialog()
|
||||||
DialogCutArc *dialogTool = qobject_cast<DialogCutArc*>(dialog);
|
DialogCutArc *dialogTool = qobject_cast<DialogCutArc*>(dialog);
|
||||||
SCASSERT(dialogTool != nullptr);
|
SCASSERT(dialogTool != nullptr);
|
||||||
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
|
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
|
||||||
|
dialogTool->SetChildrenId(curve1id, curve2id);
|
||||||
dialogTool->SetFormula(formula);
|
dialogTool->SetFormula(formula);
|
||||||
dialogTool->setArcId(curveCutId);
|
dialogTool->setArcId(curveCutId);
|
||||||
dialogTool->SetPointName(point->name());
|
dialogTool->SetPointName(point->name());
|
||||||
|
|
|
@ -69,6 +69,7 @@ void VToolCutSpline::setDialog()
|
||||||
DialogCutSpline *dialogTool = qobject_cast<DialogCutSpline*>(dialog);
|
DialogCutSpline *dialogTool = qobject_cast<DialogCutSpline*>(dialog);
|
||||||
SCASSERT(dialogTool != nullptr);
|
SCASSERT(dialogTool != nullptr);
|
||||||
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
|
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
|
||||||
|
dialogTool->SetChildrenId(curve1id, curve2id);
|
||||||
dialogTool->SetFormula(formula);
|
dialogTool->SetFormula(formula);
|
||||||
dialogTool->setSplineId(curveCutId);
|
dialogTool->setSplineId(curveCutId);
|
||||||
dialogTool->SetPointName(point->name());
|
dialogTool->SetPointName(point->name());
|
||||||
|
|
|
@ -72,6 +72,7 @@ void VToolCutSplinePath::setDialog()
|
||||||
DialogCutSplinePath *dialogTool = qobject_cast<DialogCutSplinePath*>(dialog);
|
DialogCutSplinePath *dialogTool = qobject_cast<DialogCutSplinePath*>(dialog);
|
||||||
SCASSERT(dialogTool != nullptr);
|
SCASSERT(dialogTool != nullptr);
|
||||||
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
|
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(id);
|
||||||
|
dialogTool->SetChildrenId(curve1id, curve2id);
|
||||||
dialogTool->SetFormula(formula);
|
dialogTool->SetFormula(formula);
|
||||||
dialogTool->setSplinePathId(curveCutId);
|
dialogTool->setSplinePathId(curveCutId);
|
||||||
dialogTool->SetPointName(point->name());
|
dialogTool->SetPointName(point->name());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user