parent
8563234dae
commit
64f0d13449
|
@ -36,7 +36,7 @@
|
||||||
* @param parent parent widget
|
* @param parent parent widget
|
||||||
*/
|
*/
|
||||||
DialogSinglePoint::DialogSinglePoint(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogSinglePoint::DialogSinglePoint(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogSinglePoint), name(QString()), point(QPointF())
|
:DialogTool(data, toolId, parent), ui(new Ui::DialogSinglePoint), point(QPointF())
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->doubleSpinBoxX->setRange(0, qApp->fromPixel(SceneSize));
|
ui->doubleSpinBoxX->setRange(0, qApp->fromPixel(SceneSize));
|
||||||
|
@ -44,10 +44,10 @@ DialogSinglePoint::DialogSinglePoint(const VContainer *data, const quint32 &tool
|
||||||
labelEditNamePoint = ui->labelEditName;
|
labelEditNamePoint = ui->labelEditName;
|
||||||
InitOkCancel(ui);
|
InitOkCancel(ui);
|
||||||
|
|
||||||
flagName = false;
|
flagName = true;
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogSinglePoint::NamePointChanged);
|
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogTool::NamePointChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -74,7 +74,7 @@ void DialogSinglePoint::mousePress(const QPointF &scenePos)
|
||||||
void DialogSinglePoint::SaveData()
|
void DialogSinglePoint::SaveData()
|
||||||
{
|
{
|
||||||
point = QPointF(qApp->toPixel(ui->doubleSpinBoxX->value()), qApp->toPixel(ui->doubleSpinBoxY->value()));
|
point = QPointF(qApp->toPixel(ui->doubleSpinBoxX->value()), qApp->toPixel(ui->doubleSpinBoxY->value()));
|
||||||
name = ui->lineEditName->text();
|
pointName = ui->lineEditName->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -94,7 +94,7 @@ void DialogSinglePoint::UpdateList()
|
||||||
*/
|
*/
|
||||||
void DialogSinglePoint::setData(const QString &name, const QPointF &point)
|
void DialogSinglePoint::setData(const QString &name, const QPointF &point)
|
||||||
{
|
{
|
||||||
this->name = name;
|
pointName = name;
|
||||||
this->point = point;
|
this->point = point;
|
||||||
isInitialized = true;
|
isInitialized = true;
|
||||||
ui->lineEditName->setText(name);
|
ui->lineEditName->setText(name);
|
||||||
|
|
|
@ -62,9 +62,6 @@ private:
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
Ui::DialogSinglePoint *ui;
|
Ui::DialogSinglePoint *ui;
|
||||||
|
|
||||||
/** @brief name name of point */
|
|
||||||
QString name;
|
|
||||||
|
|
||||||
/** @brief point data of point */
|
/** @brief point data of point */
|
||||||
QPointF point;
|
QPointF point;
|
||||||
};
|
};
|
||||||
|
@ -76,7 +73,7 @@ private:
|
||||||
*/
|
*/
|
||||||
inline QString DialogSinglePoint::getName() const
|
inline QString DialogSinglePoint::getName() const
|
||||||
{
|
{
|
||||||
return name;
|
return pointName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1407,6 +1407,7 @@ bool MainWindow::Save()
|
||||||
*/
|
*/
|
||||||
void MainWindow::Open()
|
void MainWindow::Open()
|
||||||
{
|
{
|
||||||
|
qCDebug(vMainWindow)<<"Openning new file.";
|
||||||
const QString filter(tr("Pattern files (*.val)"));
|
const QString filter(tr("Pattern files (*.val)"));
|
||||||
//Get list last open files
|
//Get list last open files
|
||||||
const QStringList files = qApp->getSettings()->GetRecentFileList();
|
const QStringList files = qApp->getSettings()->GetRecentFileList();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user