56 #include <QPlainTextEdit>
58 #include <QPushButton>
59 #include <QToolButton>
61 #include "../vpatterndb/vtranslatevars.h"
62 #include "../../visualization/path/vistoolcutarc.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_dialogcutarc.h"
81 , formulaBaseHeight(0)
84 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
85 setWindowIcon(QIcon(
":/toolicon/32x32/arc_cut.png"));
87 ui->lineEditNamePoint->setClearButtonEnabled(
true);
93 ui->plainTextEditFormula->installEventFilter(
this);
119 dialog->setWindowTitle(tr(
"Edit length"));
122 if (dialog->exec() == QDialog::Accepted)
132 AddVisualization<VisToolCutArc>();
163 this->setModal(
true);
174 formula =
ui->plainTextEditFormula->toPlainText();
188 ui->plainTextEditFormula->blockSignals(
true);
213 formula =
qApp->TrVars()->FormulaToUser(value,
qApp->Settings()->GetOsSeparator());
219 ui->plainTextEditFormula->setPlainText(
formula);
246 return qApp->TrVars()->TryFormulaFromUser(
formula,
qApp->Settings()->GetOsSeparator());
The DialogCutArc class dialog for ToolCutArc.
virtual ~DialogCutArc() Q_DECL_OVERRIDE
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
closeEvent handle when dialog cloded
void FormulaTextChanged()
FormulaTextChanged when formula text changes for validation and calc.
virtual void ShowVisualization() Q_DECL_OVERRIDE
DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
DialogCutArc create dialog.
void DeployFormulaTextEdit()
DeployFormulaTextEdit grow or shrink formula input.
void SetFormula(const QString &value)
SetFormula set string with formula length.
void SetPointName(const QString &value)
SetPointName set name point on arc.
quint32 getArcId() const
getArcId return id of arc
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.
QString formula
formula string with formula
Ui::DialogCutArc * ui
ui keeps information about user interface
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
QString GetFormula() const
GetFormula return string with formula length.
void setArcId(const quint32 &value)
setArcId set id of arc
int formulaBaseHeight
formulaBaseHeight base height defined by dialogui
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.