54 #include <QDoubleSpinBox>
57 #include "../vmisc/def.h"
58 #include "../vmisc/vabstractapplication.h"
60 #include "ui_dialogsinglepoint.h"
73 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
74 setWindowIcon(QIcon(
":/toolicon/32x32/point_basepoint_icon.png"));
76 ui->lineEditName->setClearButtonEnabled(
true);
98 ui->doubleSpinBoxX->setValue(
qApp->fromPixel(scenePos.x()));
99 ui->doubleSpinBoxY->setValue(
qApp->fromPixel(scenePos.y()));
104 ui->doubleSpinBoxX->setValue(
qApp->fromPixel(scenePos.x()));
105 ui->doubleSpinBoxY->setValue(
qApp->fromPixel(scenePos.y()));
112 point = QPointF(
qApp->toPixel(
ui->doubleSpinBoxX->value()),
qApp->toPixel(
ui->doubleSpinBoxY->value()));
127 ui->lineEditName->setText(name);
128 ui->doubleSpinBoxX->setValue(
qApp->fromPixel(
point.x()));
129 ui->doubleSpinBoxY->setValue(
qApp->fromPixel(
point.y()));
The DialogSinglePoint class dialog for ToolSinglePoint. Help create point and edit option.
DialogSinglePoint(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
DialogSinglePoint create dialog.
QPointF GetPoint() const
getPoint return point
void SetData(const QString &name, const QPointF &point)
setData set name and point
void mousePress(const QPointF &scenePos)
mousePress get mouse position
QPointF point
point data of point
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
Ui::DialogSinglePoint * ui
ui keeps information about user interface
virtual ~DialogSinglePoint() Q_DECL_OVERRIDE
The VContainer class container of all variables.