56 #include <QPlainTextEdit>
58 #include <QPushButton>
59 #include <QToolButton>
61 #include "../vpatterndb/vtranslatevars.h"
62 #include "../../visualization/path/vistoolcutspline.h"
63 #include "../../visualization/visualization.h"
64 #include "../ifc/xml/vabstractpattern.h"
65 #include "../ifc/xml/vdomdocument.h"
66 #include "../support/edit_formula_dialog.h"
67 #include "../vmisc/vabstractapplication.h"
68 #include "../vmisc/vcommonsettings.h"
69 #include "ui_dialogcutspline.h"
81 , formulaBaseHeight(0)
84 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
85 setWindowIcon(QIcon(
":/toolicon/32x32/spline_cut_point.png"));
87 ui->lineEditNamePoint->setClearButtonEnabled(
true);
93 ui->plainTextEditFormula->installEventFilter(
this);
133 formula =
qApp->TrVars()->FormulaToUser(value,
qApp->Settings()->GetOsSeparator());
140 ui->plainTextEditFormula->setPlainText(
formula);
179 this->setModal(
true);
190 formula =
ui->plainTextEditFormula->toPlainText();
204 ui->plainTextEditFormula->blockSignals(
true);
218 dialog->setWindowTitle(tr(
"Edit length"));
221 if (dialog->exec() == QDialog::Accepted)
231 AddVisualization<VisToolCutSpline>();
241 return qApp->TrVars()->TryFormulaFromUser(
formula,
qApp->Settings()->GetOsSeparator());
The DialogCutSpline class dialog for ToolCutSpline.
void SetPointName(const QString &value)
SetPointName set name of point.
int formulaBaseHeight
formulaBaseHeight base height defined by dialogui
void DeployFormulaTextEdit()
DeployFormulaTextEdit grow or shrink formula input.
void SetFormula(const QString &value)
SetFormula set string of formula.
virtual ~DialogCutSpline() Q_DECL_OVERRIDE
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE
ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
Ui::DialogCutSpline * ui
ui keeps information about user interface
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
QString formula
formula string with formula
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
closeEvent handle when dialog cloded
void setSplineId(const quint32 &value)
setSplineId set id spline
DialogCutSpline(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
DialogCutSpline create dialog.
virtual void ShowVisualization() Q_DECL_OVERRIDE
QString GetFormula() const
GetFormula return string of formula.
quint32 getSplineId() const
getSplineId return id base point of line
The VContainer class container of all variables.
void setObject1Id(const quint32 &value)
QString UnitsToStr(const Unit &unit, const bool translate)
UnitsToStr translate unit to string.