59 #include <QPushButton>
60 #include <QRegularExpression>
61 #include <QRegularExpressionMatch>
65 #include "../../visualization/visualization.h"
66 #include "../../visualization/line/vistooltruedarts.h"
67 #include "../ifc/xml/vabstractpattern.h"
68 #include "../qmuparser/qmudef.h"
69 #include "../vgeometry/../ifc/ifcdef.h"
70 #include "../vmisc/vabstractapplication.h"
71 #include "../vpatterndb/vcontainer.h"
73 #include "ui_dialogtruedarts.h"
87 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
88 setWindowIcon(QIcon(
":/toolicon/32x32/true_darts.png"));
90 ui->lineEditFirstNewDartPoint->setClearButtonEnabled(
true);
91 ui->lineEditSecondNewDartPoint->setClearButtonEnabled(
true);
95 ui->lineEditFirstNewDartPoint->setText(name1);
96 ui->lineEditSecondNewDartPoint->setText(name2);
135 ui->lineEditFirstNewDartPoint->blockSignals(
true);
136 ui->lineEditSecondNewDartPoint->blockSignals(
true);
144 ui->lineEditSecondNewDartPoint->blockSignals(
false);
145 ui->lineEditFirstNewDartPoint->blockSignals(
false);
254 if (
SetObject(
id,
ui->comboBoxFirstBasePoint, tr(
"Select the second base point")))
263 if (
SetObject(
id,
ui->comboBoxSecondBasePoint, tr(
"Select the first dart point")))
280 if (
SetObject(
id,
ui->comboBoxFirstDartPoint, tr(
"Select the second dart point")))
299 if (
SetObject(
id,
ui->comboBoxSecondDartPoint, tr(
"Select the third dart point")))
380 AddVisualization<VisToolTrueDarts>();
414 QLineEdit* secondPointName,
bool &flagName)
417 SCASSERT(secondPointName !=
nullptr)
418 QLineEdit* edit = qobject_cast<QLineEdit*>(sender());
438 const QString &pointD2Name, QLineEdit *secondPointName,
bool &flagName)
441 SCASSERT(secondPointName !=
nullptr)
444 const QString name = edit->text();
445 const QString secondName = secondPointName->text();
448 || secondName == name
449 || (pointD1Name != name && pointD2Name != name &&
data->
IsUnique(name) ==
false)
450 || rx.match(name).hasMatch() ==
false)
QString GetSecondNewDartPointName()
void SetSecondDartPointId(const quint32 &value)
void FillComboBoxs(const quint32 &ch1, const quint32 &ch2)
DialogTrueDarts(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
quint32 GetSecondDartPointId() const
virtual void ShowVisualization() Q_DECL_OVERRIDE
QString GetFirstNewDartPointName()
void NameDartPoint1Changed()
void CheckName(QLineEdit *edit, QLabel *labelEditNamePoint, const QString &pointD1Name, const QString &pointD2Name, QLineEdit *secondPointName, bool &flagName)
void SetNewDartPointNames(const QString &firstPoint, const QString &secondPoint)
void SetFirstDartPointId(const quint32 &value)
void SetSecondBasePointId(const quint32 &value)
void SetFirstBasePointId(const quint32 &value)
void SetThirdDartPointId(const quint32 &value)
quint32 GetFirstBasePointId() const
void NameDartPoint2Changed()
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
void NameChanged(QLabel *labelEditNamePoint, const QString &pointD1Name, const QString &pointD2Name, QLineEdit *secondPointName, bool &flagName)
quint32 GetThirdDartPointId() const
virtual void PointNameChanged() Q_DECL_OVERRIDE
void SetChildrenId(const quint32 &ch1, const quint32 &ch2)
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE
quint32 GetFirstDartPointId() const
quint32 GetSecondBasePointId() const
virtual void CheckState() Q_DECL_FINAL
CheckState enable, when all is correct, or disable, when something wrong, button ok.
The VContainer class container of all variables.
static bool IsUnique(const QString &name)
virtual void VisualMode(const quint32 &pointId)
void setObject1Id(const quint32 &value)