Seamly2D
Code documentation
dialogarcwithlength.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  * @file dialogarcwithlength.cpp
3  ** @author Douglas S Caskey
4  ** @date 21 Mar, 2023
5  **
6  ** @brief
7  ** @copyright
8  ** This source code is part of the Seamly2D project, a pattern making
9  ** program to create and model patterns of clothing.
10  ** Copyright (C) 2017-2023 Seamly2D project
11  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
12  **
13  ** Seamly2D is free software: you can redistribute it and/or modify
14  ** You should have received a copy of the GNU General Public License
15  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
16  **
17  *****************************************************************************/
18 
19 /************************************************************************
20  **
21  ** @file dialogarcwithlength.cpp
22  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
23  ** @date 9 6, 2015
24  **
25  ** @brief
26  ** @copyright
27  ** This source code is part of the Valentine project, a pattern making
28  ** program, whose allow create and modeling patterns of clothing.
29  ** Copyright (C) 2015 Seamly2D project
30  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
31  **
32  ** Seamly2D is free software: you can redistribute it and/or modify
33  ** it under the terms of the GNU General Public License as published by
34  ** the Free Software Foundation, either version 3 of the License, or
35  ** (at your option) any later version.
36  **
37  ** Seamly2D is distributed in the hope that it will be useful,
38  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
39  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40  ** GNU General Public License for more details.
41  **
42  ** You should have received a copy of the GNU General Public License
43  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
44  **
45  *************************************************************************/
46 
47 #include "dialogarcwithlength.h"
48 
49 #include <limits.h>
50 #include <QDialog>
51 #include <QLabel>
52 #include <QPlainTextEdit>
53 #include <QPointer>
54 #include <QPushButton>
55 #include <QTimer>
56 #include <QToolButton>
57 #include <Qt>
58 
59 #include "../ifc/xml/vdomdocument.h"
60 #include "../support/edit_formula_dialog.h"
61 #include "../vmisc/vabstractapplication.h"
62 #include "../vmisc/vcommonsettings.h"
63 #include "../vpatterndb/vtranslatevars.h"
64 #include "../../visualization/visualization.h"
65 #include "../../visualization/path/vistoolarcwithlength.h"
66 
67 #include "ui_dialogarcwithlength.h"
68 
69 //---------------------------------------------------------------------------------------------------------------------
70 DialogArcWithLength::DialogArcWithLength(const VContainer *data, const quint32 &toolId, QWidget *parent)
71  : DialogTool(data, toolId, parent)
72  , ui(new Ui::DialogArcWithLength)
73  , flagRadius(false)
74  , flagF1(false)
75  , flagLength(false)
76  , timerRadius(nullptr)
77  , timerF1(nullptr)
78  , timerLength(nullptr)
79  , radius(QString())
80  , f1(QString())
81  , length(QString())
82  , formulaBaseHeightRadius(0)
83  , formulaBaseHeightF1(0)
84  , formulaBaseHeightLength(0)
85  , angleF1(INT_MIN)
86  , m_arc()
87  , m_Id()
88  , newDuplicate(-1)
89 {
90  ui->setupUi(this);
91  setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
92  setWindowIcon(QIcon(":/toolicon/32x32/arc_with_length.png"));
93 
94  m_Id = data->getId() + 1;
95 
96  plainTextEditFormula = ui->plainTextEditRadius;
97  this->formulaBaseHeightLength = ui->plainTextEditRadius->height();
98  this->formulaBaseHeightF1 = ui->plainTextEditF1->height();
99  this->formulaBaseHeightLength = ui->plainTextEditLength->height();
100 
101  ui->plainTextEditRadius->installEventFilter(this);
102  ui->plainTextEditF1->installEventFilter(this);
103  ui->plainTextEditLength->installEventFilter(this);
104 
105  timerRadius = new QTimer(this);
106  connect(timerRadius, &QTimer::timeout, this, &DialogArcWithLength::Radius);
107 
108  timerF1 = new QTimer(this);
109  connect(timerF1, &QTimer::timeout, this, &DialogArcWithLength::EvalF);
110 
111  timerLength = new QTimer(this);
112  connect(timerLength, &QTimer::timeout, this, &DialogArcWithLength::Length);
113 
115 
116  FillComboBoxPoints(ui->centerPoint_ComboBox);
117 
118  int index = ui->lineType_ComboBox->findData(LineTypeNone);
119  if (index != -1)
120  {
121  ui->lineType_ComboBox->removeItem(index);
122  }
123 
124  index = ui->lineColor_ComboBox->findData(qApp->getCurrentDocument()->getDefaultLineColor());
125  if (index != -1)
126  {
127  ui->lineColor_ComboBox->setCurrentIndex(index);
128  }
129 
130  index = ui->lineWeight_ComboBox->findData(qApp->getCurrentDocument()->getDefaultLineWeight());
131  if (index != -1)
132  {
133  ui->lineWeight_ComboBox->setCurrentIndex(index);
134  }
135 
136  index = ui->lineType_ComboBox->findData(qApp->getCurrentDocument()->getDefaultLineType());
137  if (index != -1)
138  {
139  ui->lineType_ComboBox->setCurrentIndex(index);
140  }
141 
142  CheckState();
143 
144  connect(ui->toolButtonExprRadius, &QPushButton::clicked, this, &DialogArcWithLength::FXRadius);
145  connect(ui->toolButtonExprF1, &QPushButton::clicked, this, &DialogArcWithLength::FXF1);
146  connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogArcWithLength::FXLength);
147 
148  connect(ui->plainTextEditRadius, &QPlainTextEdit::textChanged, this, &DialogArcWithLength::RadiusChanged);
149  connect(ui->plainTextEditF1, &QPlainTextEdit::textChanged, this, &DialogArcWithLength::F1Changed);
150  connect(ui->plainTextEditLength, &QPlainTextEdit::textChanged, this, &DialogArcWithLength::LengthChanged);
151 
152  connect(ui->pushButtonGrowLengthRadius, &QPushButton::clicked, this, &DialogArcWithLength::DeployRadiusTextEdit);
153  connect(ui->pushButtonGrowLengthF1, &QPushButton::clicked, this, &DialogArcWithLength::DeployF1TextEdit);
154  connect(ui->pushButtonGrowLengthArcLength, &QPushButton::clicked, this, &DialogArcWithLength::DeployLengthTextEdit);
155 
156  connect(ui->centerPoint_ComboBox, &QComboBox::currentTextChanged, this, &DialogArcWithLength::pointNameChanged);
157 
159 }
160 
161 //---------------------------------------------------------------------------------------------------------------------
163 {
164  delete ui;
165 }
166 
167 //---------------------------------------------------------------------------------------------------------------------
169 {
170  return m_arc;
171 }
172 
173 //---------------------------------------------------------------------------------------------------------------------
175 {
176  m_arc = arc;
177  ui->name_LineEdit->setText(qApp->TrVars()->VarToUser(m_arc.name()));
178 }
179 
180 //---------------------------------------------------------------------------------------------------------------------
182 {
183  return getCurrentObjectId(ui->centerPoint_ComboBox);
184 }
185 
186 //---------------------------------------------------------------------------------------------------------------------
187 void DialogArcWithLength::SetCenter(const quint32 &value)
188 {
189  ChangeCurrentData(ui->centerPoint_ComboBox, value);
190  vis->setObject1Id(value);
191 }
192 
193 //---------------------------------------------------------------------------------------------------------------------
195 {
196  return qApp->TrVars()->TryFormulaFromUser(radius, qApp->Settings()->GetOsSeparator());
197 }
198 
199 //---------------------------------------------------------------------------------------------------------------------
200 void DialogArcWithLength::SetRadius(const QString &value)
201 {
202  radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator());
203  // increase height if needed.
204  if (radius.length() > 80)
205  {
206  this->DeployRadiusTextEdit();
207  }
208  ui->plainTextEditRadius->setPlainText(radius);
209 
210  VisToolArcWithLength *path = qobject_cast<VisToolArcWithLength *>(vis);
211  SCASSERT(path != nullptr)
212  path->setRadius(radius);
213 
214  MoveCursorToEnd(ui->plainTextEditRadius);
215 }
216 
217 //---------------------------------------------------------------------------------------------------------------------
219 {
220  return qApp->TrVars()->TryFormulaFromUser(f1, qApp->Settings()->GetOsSeparator());
221 }
222 
223 void DialogArcWithLength::SetF1(const QString &value)
224 {
225  f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator());
226  // increase height if needed.
227  if (f1.length() > 80)
228  {
229  this->DeployF1TextEdit();
230  }
231  ui->plainTextEditF1->setPlainText(f1);
232 
233  VisToolArcWithLength *path = qobject_cast<VisToolArcWithLength *>(vis);
234  SCASSERT(path != nullptr)
235  path->setF1(f1);
236 
237  MoveCursorToEnd(ui->plainTextEditF1);
238 }
239 
240 //---------------------------------------------------------------------------------------------------------------------
242 {
243  return qApp->TrVars()->TryFormulaFromUser(length, qApp->Settings()->GetOsSeparator());
244 }
245 
246 //---------------------------------------------------------------------------------------------------------------------
247 void DialogArcWithLength::SetLength(const QString &value)
248 {
249  length = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator());
250  // increase height if needed.
251  if (length.length() > 80)
252  {
253  this->DeployLengthTextEdit();
254  }
255  ui->plainTextEditLength->setPlainText(length);
256 
257  VisToolArcWithLength *path = qobject_cast<VisToolArcWithLength *>(vis);
258  SCASSERT(path != nullptr)
259  path->setLength(radius);
260 
261  MoveCursorToEnd(ui->plainTextEditLength);
262 }
263 
264 //---------------------------------------------------------------------------------------------------------------------
266 {
267  return GetComboBoxCurrentData(ui->lineType_ComboBox, LineTypeSolidLine);
268 }
269 
270 //---------------------------------------------------------------------------------------------------------------------
271 void DialogArcWithLength::setPenStyle(const QString &value)
272 {
273  ChangeCurrentData(ui->lineType_ComboBox, value);
274 }
275 
276 //---------------------------------------------------------------------------------------------------------------------
277 /**
278  * @brief getLineWeight return weight of the lines
279  * @return type
280  */
282 {
283  return GetComboBoxCurrentData(ui->lineWeight_ComboBox, "0.35");
284 }
285 
286 //---------------------------------------------------------------------------------------------------------------------
287 /**
288  * @brief setLineWeight set weight of the lines
289  * @param value type
290  */
291 void DialogArcWithLength::setLineWeight(const QString &value)
292 {
293  ChangeCurrentData(ui->lineWeight_ComboBox, value);
294 }
295 
296 //---------------------------------------------------------------------------------------------------------------------
298 {
299  return GetComboBoxCurrentData(ui->lineColor_ComboBox, ColorBlack);
300 }
301 
302 //---------------------------------------------------------------------------------------------------------------------
303 void DialogArcWithLength::setLineColor(const QString &value)
304 {
305  ChangeCurrentData(ui->lineColor_ComboBox, value);
306 }
307 
308 //---------------------------------------------------------------------------------------------------------------------
309 void DialogArcWithLength::ChosenObject(quint32 id, const SceneObject &type)
310 {
311  if (prepare == false)// After first choose we ignore all objects
312  {
313  if (type == SceneObject::Point)
314  {
315  if (SetObject(id, ui->centerPoint_ComboBox, ""))
316  {
317  vis->VisualMode(id);
318  prepare = true;
319  this->setModal(true);
320  this->show();
321  }
322  }
323  }
324 }
325 
326 //---------------------------------------------------------------------------------------------------------------------
328 {
329  DeployFormula(ui->plainTextEditRadius, ui->pushButtonGrowLengthArcLength, formulaBaseHeightRadius);
330 }
331 
332 //---------------------------------------------------------------------------------------------------------------------
334 {
335  DeployFormula(ui->plainTextEditF1, ui->pushButtonGrowLengthF1, formulaBaseHeightF1);
336 }
337 
338 //---------------------------------------------------------------------------------------------------------------------
340 {
341  DeployFormula(ui->plainTextEditLength, ui->pushButtonGrowLengthArcLength, formulaBaseHeightLength);
342 }
343 
344 //---------------------------------------------------------------------------------------------------------------------
346 {
347  labelEditFormula = ui->labelEditRadius;
348  labelResultCalculation = ui->labelResultRadius;
349  const QString postfix = UnitsToStr(qApp->patternUnit(), true);
350  ValFormulaChanged(flagRadius, ui->plainTextEditRadius, timerRadius, postfix);
351 }
352 
353 //---------------------------------------------------------------------------------------------------------------------
355 {
356  labelEditFormula = ui->labelEditF1;
357  labelResultCalculation = ui->labelResultF1;
358  ValFormulaChanged(flagF1, ui->plainTextEditF1, timerF1, degreeSymbol);
359 }
360 
361 //---------------------------------------------------------------------------------------------------------------------
363 {
364  labelEditFormula = ui->labelEditLength;
365  labelResultCalculation = ui->labelResultLength;
366  const QString postfix = UnitsToStr(qApp->patternUnit(), true);
367  ValFormulaChanged(flagLength, ui->plainTextEditLength, timerLength, postfix);
368 }
369 
370 //---------------------------------------------------------------------------------------------------------------------
372 {
373  EditFormulaDialog *dialog = new EditFormulaDialog(data, toolId, this);
374  dialog->setWindowTitle(tr("Edit radius"));
375  dialog->SetFormula(GetRadius());
376  dialog->setPostfix(UnitsToStr(qApp->patternUnit(), true));
377  if (dialog->exec() == QDialog::Accepted)
378  {
379  SetRadius(dialog->GetFormula());
380  }
381  delete dialog;
382 }
383 
384 //---------------------------------------------------------------------------------------------------------------------
386 {
387  EditFormulaDialog *dialog = new EditFormulaDialog(data, toolId, this);
388  dialog->setWindowTitle(tr("Edit the first angle"));
389  dialog->SetFormula(GetF1());
390  dialog->setPostfix(degreeSymbol);
391  if (dialog->exec() == QDialog::Accepted)
392  {
393  SetF1(dialog->GetFormula());
394  }
395  delete dialog;
396 }
397 
398 //---------------------------------------------------------------------------------------------------------------------
400 {
401  EditFormulaDialog *dialog = new EditFormulaDialog(data, toolId, this);
402  dialog->setWindowTitle(tr("Edit the arc length"));
403  dialog->SetFormula(GetLength());
404  dialog->setPostfix(UnitsToStr(qApp->patternUnit(), true));
405  if (dialog->exec() == QDialog::Accepted)
406  {
407  SetLength(dialog->GetFormula());
408  }
409  delete dialog;
410 }
411 
412 //---------------------------------------------------------------------------------------------------------------------
414 {
415  QColor color = okColor;
416 
417  flagError = true;
418  color = okColor;
419 
420  if (getCurrentObjectId(ui->centerPoint_ComboBox) == m_arc.GetCenter().id())
421  {
422  newDuplicate = -1;
423  ui->name_LineEdit->setText(qApp->TrVars()->VarToUser(m_arc.name()));
424  }
425  else
426  {
427  VArc arc(*data->GeometricObject<VPointF>(getCurrentObjectId(ui->centerPoint_ComboBox)),
428  GetRadius().toDouble(),
429  GetF1().toDouble(),
430  GetLength().toDouble());
431 
432  if (!data->IsUnique(arc.name()))
433  {
434  newDuplicate = static_cast<qint32>(DNumber(arc.name()));
435  arc.SetDuplicate(static_cast<quint32>(newDuplicate));
436  }
437  ui->name_LineEdit->setText(qApp->TrVars()->VarToUser(arc.name() + "_" + QString().setNum(m_Id)));
438  }
439 
440  ChangeColor(ui->name_Label, color);
441  ChangeColor(ui->centerPoint_Label, color);
442  CheckState();
443 }
444 
445 //---------------------------------------------------------------------------------------------------------------------
447 {
448  SCASSERT(ok_Button != nullptr)
449  ok_Button->setEnabled(flagRadius && flagF1 && flagLength);
450  // In case dialog hasn't apply button
451  if (apply_Button != nullptr)
452  {
453  apply_Button->setEnabled(ok_Button->isEnabled());
454  }
455 }
456 
457 //---------------------------------------------------------------------------------------------------------------------
459 {
460  AddVisualization<VisToolArcWithLength>();
461 }
462 
463 //---------------------------------------------------------------------------------------------------------------------
465 {
466  radius = ui->plainTextEditRadius->toPlainText();
467  radius.replace("\n", " ");
468 
469  f1 = ui->plainTextEditF1->toPlainText();
470  f1.replace("\n", " ");
471 
472  length = ui->plainTextEditLength->toPlainText();
473  length.replace("\n", " ");
474 
475  VisToolArcWithLength *path = qobject_cast<VisToolArcWithLength *>(vis);
476  SCASSERT(path != nullptr)
477 
478  path->setObject1Id(GetCenter());
479  path->setRadius(radius);
480  path->setF1(f1);
481  path->setLength(length);
482  path->RefreshGeometry();
483 }
484 
485 //---------------------------------------------------------------------------------------------------------------------
486 void DialogArcWithLength::closeEvent(QCloseEvent *event)
487 {
488  ui->plainTextEditRadius->blockSignals(true);
489  ui->plainTextEditF1->blockSignals(true);
490  ui->plainTextEditLength->blockSignals(true);
491  DialogTool::closeEvent(event);
492 }
493 
494 //---------------------------------------------------------------------------------------------------------------------
496 {
497  labelEditFormula = ui->labelEditRadius;
498  const QString postfix = UnitsToStr(qApp->patternUnit(), true);
499  const qreal radius = Eval(ui->plainTextEditRadius->toPlainText(), flagRadius, ui->labelResultRadius, postfix);
500 
501  if (radius < 0)
502  {
503  flagRadius = false;
504  ChangeColor(labelEditFormula, Qt::red);
505  ui->labelResultRadius->setText(tr("Error"));
506  ui->labelResultRadius->setToolTip(tr("Radius can't be negative"));
507 
509  }
510 }
511 
512 //---------------------------------------------------------------------------------------------------------------------
514 {
515  labelEditFormula = ui->labelEditLength;
516  const QString postfix = UnitsToStr(qApp->patternUnit(), true);
517  const qreal length = Eval(ui->plainTextEditLength->toPlainText(), flagLength, ui->labelResultLength, postfix);
518 
519  if (qFuzzyIsNull(length))
520  {
521  flagLength = false;
522  ChangeColor(labelEditFormula, Qt::red);
523  ui->labelResultLength->setText(tr("Error"));
524  ui->labelResultLength->setToolTip(tr("Length can't be equal 0"));
525 
527  }
528 }
529 
530 //---------------------------------------------------------------------------------------------------------------------
532 {
533  labelEditFormula = ui->labelEditF1;
534  angleF1 = Eval(ui->plainTextEditF1->toPlainText(), flagF1, ui->labelResultF1, degreeSymbol, false);
535 }
QTimer * timerF1
timerF1 timer of check formula of first angle
void setArc(const VArc &arc)
virtual void ShowVisualization() Q_DECL_OVERRIDE
QString radius
radius formula of radius
DialogArcWithLength(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
virtual void CheckState() Q_DECL_FINAL
CheckState enable, when all is correct, or disable, when something wrong, button ok.
bool flagF1
flagF1 true if value of first angle is correct
void SetF1(const QString &value)
void setLineColor(const QString &value)
bool flagRadius
flagRadius true if value of radius is correct
void setPenStyle(const QString &value)
QString getLineWeight() const
getLineWeight return weight of the lines
void SetRadius(const QString &value)
int formulaBaseHeightRadius
formulaBaseHeight base height defined by dialogui
QTimer * timerRadius
timerRadius timer of check formula of radius
void SetLength(const QString &value)
void setLineWeight(const QString &value)
setLineWeight set weight of the lines
Ui::DialogArcWithLength * ui
void SetCenter(const quint32 &value)
QString f1
f1 formula of first angle
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
void DeployRadiusTextEdit()
DeployFormulaTextEdit grow or shrink formula input.
QString getLineColor() const
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
closeEvent handle when dialog cloded
The DialogTool class parent for all dialog of tools.
Definition: dialogtool.h:107
void ChangeCurrentData(QComboBox *box, const QVariant &value) const
ChangeCurrentData select item in combobox by id.
Definition: dialogtool.cpp:419
quint32 DNumber(const QString &baseName) const
Definition: dialogtool.cpp:476
const QColor okColor
Definition: dialogtool.h:219
void FillComboBoxPoints(QComboBox *box, FillComboBox rule=FillComboBox::Whole, const quint32 &ch1=NULL_ID, const quint32 &ch2=NULL_ID) const
FillComboBoxPoints fill comboBox list of points.
Definition: dialogtool.cpp:242
void MoveCursorToEnd(QPlainTextEdit *plainTextEdit) const
Definition: dialogtool.cpp:432
QPushButton * ok_Button
ok_Button button ok
Definition: dialogtool.h:199
qreal Eval(const QString &text, bool &flag, QLabel *label, const QString &postfix, bool checkZero=true, bool checkLessThanZero=false)
Eval evaluate formula and show result.
Definition: dialogtool.cpp:805
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
closeEvent handle when dialog cloded
Definition: dialogtool.cpp:192
void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer *timer, const QString &postfix=QString())
ValFormulaChanged handle change formula.
Definition: dialogtool.cpp:744
bool SetObject(const quint32 &id, QComboBox *box, const QString &toolTip)
Definition: dialogtool.cpp:974
QPushButton * apply_Button
apply_Button button apply
Definition: dialogtool.h:202
quint32 toolId
Definition: dialogtool.h:225
QLabel * labelEditFormula
labelEditFormula label used when need show wrong formula
Definition: dialogtool.h:217
void initializeOkCancelApply(T *ui)
initializeOkCancelApply initialize OK / Cancel and Apply buttons
Definition: dialogtool.h:365
bool flagError
flagError use this flag if for you do not enought
Definition: dialogtool.h:193
const VContainer * data
data container with data
Definition: dialogtool.h:177
QPlainTextEdit * plainTextEditFormula
plainTextEditFormula formula
Definition: dialogtool.h:208
QString GetComboBoxCurrentData(const QComboBox *box, const QString &def) const
Definition: dialogtool.cpp:400
bool prepare
prepare show if we prepare. Show dialog after finish working with visual part of tool
Definition: dialogtool.h:228
QLabel * labelResultCalculation
labelResultCalculation label with result of calculation
Definition: dialogtool.h:211
QPointer< Visualization > vis
Definition: dialogtool.h:236
void ChangeColor(QWidget *widget, const QColor &color)
void DeployFormula(QPlainTextEdit *formula, QPushButton *buttonGrowLength, int formulaBaseHeight)
Definition: dialogtool.cpp:992
quint32 getCurrentObjectId(QComboBox *box) const
getCurrentPointId return current point id stored in combobox
Definition: dialogtool.cpp:959
The EditFormulaDialog class dialog for editing wrong formula.
QString GetFormula() const
void SetFormula(const QString &value)
void setPostfix(const QString &value)
virtual VPointF GetCenter() const
void SetDuplicate(quint32 number)
VArc class for anticlockwise arc.
Definition: varc.h:74
The VContainer class container of all variables.
Definition: vcontainer.h:141
static bool IsUnique(const QString &name)
Definition: vcontainer.cpp:585
static quint32 getId()
Definition: vcontainer.cpp:241
const QSharedPointer< T > GeometricObject(const quint32 &id) const
Definition: vcontainer.h:266
virtual QString name() const
name return name graphical object.
Definition: vgobject.cpp:148
quint32 id() const
id return id object.
Definition: vgobject.cpp:205
The VPointF class keep data of point.
Definition: vpointf.h:75
virtual void RefreshGeometry() Q_DECL_OVERRIDE
void setF1(const QString &expression)
void setLength(const QString &expression)
void setRadius(const QString &expression)
void setObject1Id(const quint32 &value)
const QString degreeSymbol
Definition: def.cpp:196
QString UnitsToStr(const Unit &unit, const bool translate)
UnitsToStr translate unit to string.
Definition: def.cpp:702
#define SCASSERT(cond)
Definition: def.h:317
SceneObject
Definition: def.h:103
const QString LineTypeSolidLine
Definition: ifcdef.cpp:159
const QString ColorBlack
Definition: ifcdef.cpp:373
const QString LineTypeNone
Definition: ifcdef.cpp:158
#define qApp
Definition: vapplication.h:67