60 #include <QPlainTextEdit>
63 #include <QPushButton>
65 #include <QSharedPointer>
67 #include <QToolButton>
70 #include "../vgeometry/vpointf.h"
71 #include "../vpatterndb/vcontainer.h"
72 #include "../vpatterndb/vtranslatevars.h"
73 #include "../vwidgets/vmaingraphicsscene.h"
74 #include "../vwidgets/vabstractmainwindow.h"
75 #include "../../tools/vabstracttool.h"
76 #include "../../visualization/line/vistoollineintersectaxis.h"
77 #include "../../visualization/visualization.h"
78 #include "../ifc/xml/vabstractpattern.h"
79 #include "../support/edit_formula_dialog.h"
80 #include "../vmisc/vabstractapplication.h"
81 #include "../vmisc/vcommonsettings.h"
82 #include "ui_dialoglineintersectaxis.h"
89 formulaBaseHeightAngle(0),
93 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
94 setWindowIcon(QIcon(
":/toolicon/32x32/line_intersect_axis.png"));
96 ui->lineEditNamePoint->setClearButtonEnabled(
true);
102 ui->plainTextEditFormula->installEventFilter(
this);
112 int index =
ui->lineColor_ComboBox->findData(
qApp->getCurrentDocument()->getDefaultLineColor());
115 ui->lineColor_ComboBox->setCurrentIndex(index);
118 index =
ui->lineWeight_ComboBox->findData(
qApp->getCurrentDocument()->getDefaultLineWeight());
121 ui->lineWeight_ComboBox->setCurrentIndex(index);
124 index =
ui->lineType_ComboBox->findData(
qApp->getCurrentDocument()->getDefaultLineType());
127 ui->lineType_ComboBox->setCurrentIndex(index);
135 connect(
ui->comboBoxFirstLinePoint, &QComboBox::currentTextChanged,
137 connect(
ui->comboBoxSecondLinePoint, &QComboBox::currentTextChanged,
139 connect(
ui->comboBoxAxisPoint, &QComboBox::currentTextChanged,
189 vis->setLineWeight(value);
296 QLineF line = QLineF(
static_cast<QPointF
>(*point), scene->
getScenePos());
328 if (
SetObject(
id,
ui->comboBoxFirstLinePoint, tr(
"Select second point of line")))
340 if (
SetObject(
id,
ui->comboBoxSecondLinePoint, tr(
"Select axis point")))
420 dialog->setWindowTitle(tr(
"Edit angle"));
423 if (dialog->exec() == QDialog::Accepted)
433 AddVisualization<VisToolLineIntersectAxis>();
459 ui->plainTextEditFormula->blockSignals(
true);
virtual void PointNameChanged() Q_DECL_OVERRIDE
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
quint32 GetFirstPointId() const
QString getLineWeight() const
getLineWeight return weight of the lines
quint32 GetBasePointId() const
virtual void ShowDialog(bool click) Q_DECL_OVERRIDE
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE
quint32 GetSecondPointId() const
QString getLineType() const
void SetSecondPointId(const quint32 &value)
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
closeEvent handle when dialog cloded
void SetAngle(const QString &value)
void setLineColor(const QString &value)
int formulaBaseHeightAngle
void SetFirstPointId(const quint32 &value)
void setLineWeight(const QString &value)
setLineWeight set weight of the lines
void SetBasePointId(const quint32 &value)
DialogLineIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
void SetPointName(const QString &value)
virtual void ShowVisualization() Q_DECL_OVERRIDE
Ui::DialogLineIntersectAxis * ui
void setLineType(const QString &value)
void DeployAngleTextEdit()
QString getLineColor() const
virtual ~DialogLineIntersectAxis() Q_DECL_OVERRIDE
virtual void ShowToolTip(const QString &toolTip)=0
The VContainer class container of all variables.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
The VMainGraphicsScene class main scene.
QPointF getScenePos() const
The VPointF class keep data of point.
void ToolTip(const QString &toolTip)
void setLineWeight(const QString &value)
virtual void VisualMode(const quint32 &pointId)
void setObject1Id(const quint32 &value)
void setLineStyle(const Qt::PenStyle &value)
const QString degreeSymbol
const qreal defPointRadiusPixel
const QString LineTypeSolidLine
Qt::PenStyle lineTypeToPenStyle(const QString &lineType)
LineStyle return pen style for current line style.