From f1e49a7fd63fb8306392045241d108c4949d0872 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Sep 2021 09:04:11 +0300 Subject: [PATCH] Create and update manual layout from Valentina. --- src/app/puzzle/carousel/vpcarrousel.ui | 3 +++ src/app/valentina/mainwindow.cpp | 19 +++++++++++++++---- .../dialogs/tools/piece/tabs/tabpaths.ui | 12 ++++++------ 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/app/puzzle/carousel/vpcarrousel.ui b/src/app/puzzle/carousel/vpcarrousel.ui index f0a03552f..3c198cc24 100644 --- a/src/app/puzzle/carousel/vpcarrousel.ui +++ b/src/app/puzzle/carousel/vpcarrousel.ui @@ -34,6 +34,9 @@ 0 + + QComboBox::AdjustToMinimumContentsLength + diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 65f611438..c57d987bf 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -69,6 +69,7 @@ #include "../vmisc/backport/qoverload.h" #include "../vlayout/vlayoutexporter.h" #include "../vwidgets/vgraphicssimpletextitem.h" +#include "../vlayout/dialogs/dialoglayoutscale.h" #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) #include "../vmisc/backport/qscopeguard.h" @@ -3419,10 +3420,15 @@ void MainWindow::on_actionCreateManualLayout_triggered() return; } + DialogLayoutScale layoutScale(false, this); + layoutScale.SetXScale(1); + layoutScale.SetYScale(1); + layoutScale.exec(); + VLayoutExporter exporter; exporter.SetFileName(rldFile.fileName()); -// exporter.SetXScale(m_dialogSaveLayout->GetXScale()); -// exporter.SetYScale(m_dialogSaveLayout->GetYScale()); + exporter.SetXScale(layoutScale.GetXScale()); + exporter.SetYScale(layoutScale.GetYScale()); exporter.ExportToRLD(listDetails); QStringList arguments {"-r", rldFile.fileName()}; @@ -3501,10 +3507,15 @@ void MainWindow::on_actionUpdateManualLayout_triggered() return; } + DialogLayoutScale layoutScale(false, this); + layoutScale.SetXScale(1); + layoutScale.SetYScale(1); + layoutScale.exec(); + VLayoutExporter exporter; exporter.SetFileName(rldFile.fileName()); -// exporter.SetXScale(m_dialogSaveLayout->GetXScale()); -// exporter.SetYScale(m_dialogSaveLayout->GetYScale()); + exporter.SetXScale(layoutScale.GetXScale()); + exporter.SetYScale(layoutScale.GetYScale()); exporter.ExportToRLD(listDetails); QStringList arguments {filePath, "-r", rldFile.fileName()}; diff --git a/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui b/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui index bdea248e8..5810d5331 100644 --- a/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui +++ b/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui @@ -36,7 +36,7 @@ - 1 + 0 @@ -1127,16 +1127,16 @@ - - VPlainTextEdit - QPlainTextEdit -
vplaintextedit.h
-
VLineEdit QLineEdit
vlineedit.h
+ + VPlainTextEdit + QPlainTextEdit +
vplaintextedit.h
+