Create and update manual layout from Valentina.

This commit is contained in:
Roman Telezhynskyi 2021-09-13 09:04:11 +03:00
parent 3fea813b9c
commit f1e49a7fd6
3 changed files with 24 additions and 10 deletions

View File

@ -34,6 +34,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
</widget>
</item>
<item>

View File

@ -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()};

View File

@ -36,7 +36,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabMainPath">
<attribute name="title">
@ -1127,16 +1127,16 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>VPlainTextEdit</class>
<extends>QPlainTextEdit</extends>
<header location="global">vplaintextedit.h</header>
</customwidget>
<customwidget>
<class>VLineEdit</class>
<extends>QLineEdit</extends>
<header>vlineedit.h</header>
</customwidget>
<customwidget>
<class>VPlainTextEdit</class>
<extends>QPlainTextEdit</extends>
<header>vplaintextedit.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../../../../../vmisc/share/resources/icon.qrc"/>