63 #include <QSharedPointer>
66 #include "../../visualization/line/vistoolheight.h"
67 #include "../../visualization/visualization.h"
68 #include "../../visualization/line/visline.h"
69 #include "../ifc/xml/vabstractpattern.h"
70 #include "../vgeometry/vgobject.h"
71 #include "../vgeometry/vpointf.h"
72 #include "../vmisc/vabstractapplication.h"
73 #include "../vpatterndb/vcontainer.h"
75 #include "ui_dialogheight.h"
87 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
88 setWindowIcon(QIcon(
":/toolicon/32x32/height.png"));
90 ui->lineEditNamePoint->setClearButtonEnabled(
true);
101 int index =
ui->lineColor_ComboBox->findData(
qApp->getCurrentDocument()->getDefaultLineColor());
104 ui->lineColor_ComboBox->setCurrentIndex(index);
107 index =
ui->lineWeight_ComboBox->findData(
qApp->getCurrentDocument()->getDefaultLineWeight());
110 ui->lineWeight_ComboBox->setCurrentIndex(index);
113 index =
ui->lineType_ComboBox->findData(
qApp->getCurrentDocument()->getDefaultLineType());
116 ui->lineType_ComboBox->setCurrentIndex(index);
186 vis->setLineWeight(value);
261 if (
SetObject(
id,
ui->comboBoxBasePoint, tr(
"Select first point of line")))
270 if (
SetObject(
id,
ui->comboBoxP1Line, tr(
"Select second point of line")))
328 set.insert(basePointId);
329 set.insert(p1LineId);
330 set.insert(p2LineId);
356 AddVisualization<VisLine>();
The DialogHeight class dialog for ToolHeight. Help create point and edit option.
virtual void ShowVisualization() Q_DECL_OVERRIDE
DialogHeight(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
DialogHeight create dialog.
QString getLineType() const
getLineType return type of line
virtual ~DialogHeight() Q_DECL_OVERRIDE
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
void SetP1LineId(const quint32 &value)
SetP1LineId set id first point of line.
void setLineColor(const QString &value)
void setLineWeight(const QString &value)
setLineWeight set weight of the lines
void SetPointName(const QString &value)
SetPointName set name of point.
Ui::DialogHeight * ui
ui keeps information about user interface
void SetP2LineId(const quint32 &value)
SetP2LineId set id second point of line.
QString getLineWeight() const
getLineWeight return weight of the lines
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.
void setLineType(const QString &value)
setLineType set type of line
quint32 GetP1LineId() const
GetP1LineId return id first point of line.
quint32 GetBasePointId() const
GetBasePointId return id base point of height.
QString getLineColor() const
void SetBasePointId(const quint32 &value)
SetBasePointId set id base point of height.
virtual void PointNameChanged() Q_DECL_OVERRIDE
quint32 GetP2LineId() const
GetP2LineId return id second point of line.
The VContainer class container of all variables.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
static QPointF ClosestPoint(const QLineF &line, const QPointF &point)
ClosestPoint find point projection of point onto line.
The VPointF class keep data of point.
void setLineWeight(const QString &value)
virtual void VisualMode(const quint32 &pointId)
void setObject1Id(const quint32 &value)
void setLineStyle(const Qt::PenStyle &value)
const QString LineTypeSolidLine
const QString LineTypeDashLine
Qt::PenStyle lineTypeToPenStyle(const QString &lineType)
LineStyle return pen style for current line style.