New option "Seam line on drawing".

There are two ways to export a sew line to DXF-AAMA: on Draw layer or Sew line layer. The second is not standard, but preferable way for most CAD systems.
This commit is contained in:
Roman Telezhynskyi 2022-11-04 17:16:50 +02:00
parent acc8d73271
commit 52c8e47e60
21 changed files with 96 additions and 15 deletions

View File

@ -468,6 +468,7 @@ void VPLayoutFileReader::ReadPiece(const VPPiecePtr &piece)
piece->SetMirror(ReadAttributeBool(attribs, ML::AttrMirrored, falseStr)); piece->SetMirror(ReadAttributeBool(attribs, ML::AttrMirrored, falseStr));
piece->SetForbidFlipping(ReadAttributeBool(attribs, ML::AttrForbidFlipping, falseStr)); piece->SetForbidFlipping(ReadAttributeBool(attribs, ML::AttrForbidFlipping, falseStr));
piece->SetForceFlipping(ReadAttributeBool(attribs, ML::AttrForceFlipping, falseStr)); piece->SetForceFlipping(ReadAttributeBool(attribs, ML::AttrForceFlipping, falseStr));
piece->SetSewLineOnDrawing(ReadAttributeBool(attribs, ML::AttrSewLineOnDrawing, falseStr));
piece->SetMatrix(StringToTransfrom(ReadAttributeEmptyString(attribs, ML::AttrTransform))); piece->SetMatrix(StringToTransfrom(ReadAttributeEmptyString(attribs, ML::AttrTransform)));
const QStringList tags const QStringList tags

View File

@ -259,6 +259,8 @@ void VPLayoutFileWriter::WritePiece(const VPPiecePtr &piece)
[](bool forbid) noexcept {return not forbid;}); [](bool forbid) noexcept {return not forbid;});
SetAttributeOrRemoveIf<bool>(ML::AttrForceFlipping, piece->IsForceFlipping(), SetAttributeOrRemoveIf<bool>(ML::AttrForceFlipping, piece->IsForceFlipping(),
[](bool force) noexcept {return not force;}); [](bool force) noexcept {return not force;});
SetAttributeOrRemoveIf<bool>(ML::AttrSewLineOnDrawing, piece->IsSewLineOnDrawing(),
[](bool value) noexcept {return not value;});
SetAttribute(ML::AttrTransform, TransformToString(piece->GetMatrix())); SetAttribute(ML::AttrTransform, TransformToString(piece->GetMatrix()));
SetAttributeOrRemoveIf<QString>(ML::AttrGradationLabel, piece->GetGradationId(), SetAttributeOrRemoveIf<QString>(ML::AttrGradationLabel, piece->GetGradationId(),
[](const QString &label) noexcept {return label.isEmpty();}); [](const QString &label) noexcept {return label.isEmpty();});

View File

@ -80,6 +80,7 @@ const QString AttrID = QStringLiteral("id"); // NOLINT(cert-er
const QString AttrMirrored = QStringLiteral("mirrored"); // NOLINT(cert-err58-cpp) const QString AttrMirrored = QStringLiteral("mirrored"); // NOLINT(cert-err58-cpp)
const QString AttrForbidFlipping = QStringLiteral("forbidFlipping"); // NOLINT(cert-err58-cpp) const QString AttrForbidFlipping = QStringLiteral("forbidFlipping"); // NOLINT(cert-err58-cpp)
const QString AttrForceFlipping = QStringLiteral("forceFlipping"); // NOLINT(cert-err58-cpp) const QString AttrForceFlipping = QStringLiteral("forceFlipping"); // NOLINT(cert-err58-cpp)
const QString AttrSewLineOnDrawing = QStringLiteral("sewLineOnDrawing"); // NOLINT(cert-err58-cpp)
const QString AttrTransform = QStringLiteral("transform"); // NOLINT(cert-err58-cpp) const QString AttrTransform = QStringLiteral("transform"); // NOLINT(cert-err58-cpp)
const QString AttrShowSeamline = QStringLiteral("showSeamline"); // NOLINT(cert-err58-cpp) const QString AttrShowSeamline = QStringLiteral("showSeamline"); // NOLINT(cert-err58-cpp)
const QString AttrEnabled = QStringLiteral("enabled"); // NOLINT(cert-err58-cpp) const QString AttrEnabled = QStringLiteral("enabled"); // NOLINT(cert-err58-cpp)

View File

@ -85,6 +85,7 @@ extern const QString AttrID;
extern const QString AttrMirrored; extern const QString AttrMirrored;
extern const QString AttrForbidFlipping; extern const QString AttrForbidFlipping;
extern const QString AttrForceFlipping; extern const QString AttrForceFlipping;
extern const QString AttrSewLineOnDrawing;
extern const QString AttrTransform; extern const QString AttrTransform;
extern const QString AttrShowSeamline; extern const QString AttrShowSeamline;
extern const QString AttrEnabled; extern const QString AttrEnabled;

View File

@ -108,6 +108,7 @@ PreferencesPatternPage::PreferencesPatternPage(QWidget *parent)
InitLabelDateTimeFormats(); InitLabelDateTimeFormats();
ui->forbidFlippingCheck->setChecked(settings->GetForbidWorkpieceFlipping()); ui->forbidFlippingCheck->setChecked(settings->GetForbidWorkpieceFlipping());
ui->checkBoxSewLineOnDrawing->setChecked(settings->GetSewLineOnDrawing());
ui->doublePassmarkCheck->setChecked(settings->IsDoublePassmark()); ui->doublePassmarkCheck->setChecked(settings->IsDoublePassmark());
ui->checkBoxHideMainPath->setChecked(settings->IsHideMainPath()); ui->checkBoxHideMainPath->setChecked(settings->IsHideMainPath());
ui->fontComboBoxLabelFont->setCurrentFont(settings->GetLabelFont()); ui->fontComboBoxLabelFont->setCurrentFont(settings->GetLabelFont());
@ -162,6 +163,7 @@ auto PreferencesPatternPage::Apply() -> QStringList
settings->SetDefaultSeamAllowance(ui->defaultSeamAllowance->value()); settings->SetDefaultSeamAllowance(ui->defaultSeamAllowance->value());
settings->SetForbidWorkpieceFlipping(ui->forbidFlippingCheck->isChecked()); settings->SetForbidWorkpieceFlipping(ui->forbidFlippingCheck->isChecked());
settings->SetSewLineOnDrawing(ui->checkBoxSewLineOnDrawing->isChecked());
settings->SetHideMainPath(ui->checkBoxHideMainPath->isChecked()); settings->SetHideMainPath(ui->checkBoxHideMainPath->isChecked());
settings->SetLabelFont(ui->fontComboBoxLabelFont->currentFont()); settings->SetLabelFont(ui->fontComboBoxLabelFont->currentFont());

View File

@ -196,6 +196,16 @@ This option will take an affect after restart.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="checkBoxSewLineOnDrawing">
<property name="toolTip">
<string>By default export to DXF-AAMA sew line on Draw layer for all new created workpieces</string>
</property>
<property name="text">
<string>Sew line on drawing</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="doublePassmarkCheck"> <widget class="QCheckBox" name="doublePassmarkCheck">
<property name="toolTip"> <property name="toolTip">

View File

@ -946,6 +946,9 @@ void VPattern::ParseDetailElement(QDomElement &domElement, const Document &parse
initData.detail.SetForceFlipping(GetParametrBool(domElement, AttrForceFlipping, initData.detail.SetForceFlipping(GetParametrBool(domElement, AttrForceFlipping,
QString().setNum(VAbstractValApplication::VApp() QString().setNum(VAbstractValApplication::VApp()
->ValentinaSettings()->GetForceWorkpieceFlipping()))); ->ValentinaSettings()->GetForceWorkpieceFlipping())));
initData.detail.SetSewLineOnDrawing(GetParametrBool(domElement, AttrSewLineOnDrawing,
QString().setNum(VAbstractValApplication::VApp()
->ValentinaSettings()->GetSewLineOnDrawing())));
initData.detail.SetInLayout(GetParametrBool(domElement, AttrInLayout, trueStr)); initData.detail.SetInLayout(GetParametrBool(domElement, AttrInLayout, trueStr));
initData.detail.SetUnited(GetParametrBool(domElement, VToolSeamAllowance::AttrUnited, falseStr)); initData.detail.SetUnited(GetParametrBool(domElement, VToolSeamAllowance::AttrUnited, falseStr));
initData.detail.SetPriority(GetParametrUInt(domElement, VToolSeamAllowance::AttrPiecePriority, QChar('0'))); initData.detail.SetPriority(GetParametrUInt(domElement, VToolSeamAllowance::AttrPiecePriority, QChar('0')));

View File

@ -126,6 +126,7 @@ const QString AttrIdObject = QStringLiteral("idObject");
const QString AttrInLayout = QStringLiteral("inLayout"); const QString AttrInLayout = QStringLiteral("inLayout");
const QString AttrForbidFlipping = QStringLiteral("forbidFlipping"); const QString AttrForbidFlipping = QStringLiteral("forbidFlipping");
const QString AttrForceFlipping = QStringLiteral("forceFlipping"); const QString AttrForceFlipping = QStringLiteral("forceFlipping");
const QString AttrSewLineOnDrawing = QStringLiteral("sewLineOnDrawing");
const QString AttrRotationAngle = QStringLiteral("rotationAngle"); const QString AttrRotationAngle = QStringLiteral("rotationAngle");
const QString AttrClosed = QStringLiteral("closed"); const QString AttrClosed = QStringLiteral("closed");
const QString AttrShowLabel = QStringLiteral("showLabel"); const QString AttrShowLabel = QStringLiteral("showLabel");

View File

@ -146,6 +146,7 @@ extern const QString AttrIdObject;
extern const QString AttrInLayout; extern const QString AttrInLayout;
extern const QString AttrForbidFlipping; extern const QString AttrForbidFlipping;
extern const QString AttrForceFlipping; extern const QString AttrForceFlipping;
extern const QString AttrSewLineOnDrawing;
extern const QString AttrClosed; extern const QString AttrClosed;
extern const QString AttrShowLabel; extern const QString AttrShowLabel;
extern const QString AttrShowLabel1; extern const QString AttrShowLabel1;

View File

@ -220,6 +220,7 @@
<xs:attribute type="xs:boolean" name="mirrored"/> <xs:attribute type="xs:boolean" name="mirrored"/>
<xs:attribute type="xs:boolean" name="forbidFlipping"/> <xs:attribute type="xs:boolean" name="forbidFlipping"/>
<xs:attribute type="xs:boolean" name="forceFlipping"/> <xs:attribute type="xs:boolean" name="forceFlipping"/>
<xs:attribute type="xs:boolean" name="sewLineOnDrawing"/>
<xs:attribute type="Transformation" name="transform"/> <xs:attribute type="Transformation" name="transform"/>
<xs:attribute type="xs:string" name="gradationLabel"/> <xs:attribute type="xs:string" name="gradationLabel"/>
<xs:attribute type="xs:unsignedInt" name="copyNumber"/> <xs:attribute type="xs:unsignedInt" name="copyNumber"/>
@ -413,6 +414,7 @@
<xs:attribute type="xs:boolean" name="mirrored"/> <xs:attribute type="xs:boolean" name="mirrored"/>
<xs:attribute type="xs:boolean" name="forbidFlipping"/> <xs:attribute type="xs:boolean" name="forbidFlipping"/>
<xs:attribute type="xs:boolean" name="forceFlipping"/> <xs:attribute type="xs:boolean" name="forceFlipping"/>
<xs:attribute type="xs:boolean" name="sewLineOnDrawing"/>
<xs:attribute type="Transformation" name="transform"/> <xs:attribute type="Transformation" name="transform"/>
<xs:attribute type="xs:string" name="gradationLabel"/> <xs:attribute type="xs:string" name="gradationLabel"/>
<xs:attribute type="xs:unsignedInt" name="copyNumber"/> <xs:attribute type="xs:unsignedInt" name="copyNumber"/>

View File

@ -751,6 +751,7 @@
<xs:attribute name="bufferInLayout" type="xs:boolean"/> <xs:attribute name="bufferInLayout" type="xs:boolean"/>
<xs:attribute name="forbidFlipping" type="xs:boolean"/> <xs:attribute name="forbidFlipping" type="xs:boolean"/>
<xs:attribute name="forceFlipping" type="xs:boolean"/> <xs:attribute name="forceFlipping" type="xs:boolean"/>
<xs:attribute name="sewLineOnDrawing" type="xs:boolean"/>
<xs:attribute name="width" type="xs:string"/> <xs:attribute name="width" type="xs:string"/>
<xs:attribute name="bufferVisible" type="xs:string"/> <xs:attribute name="bufferVisible" type="xs:string"/>
<xs:attribute name="bufferWidth" type="xs:string"/> <xs:attribute name="bufferWidth" type="xs:string"/>

View File

@ -760,7 +760,9 @@ void VDxfEngine::ExportAAMADraw(const QSharedPointer<dx_ifaceBlock> &detailBlock
if (detail.IsSeamAllowance() && not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn()) if (detail.IsSeamAllowance() && not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn())
{ {
QVector<VLayoutPoint> points = detail.GetMappedContourPoints(); QVector<VLayoutPoint> points = detail.GetMappedContourPoints();
if (DRW_Entity *e = AAMAPolygon(detail.GetMappedContourPoints(), *layer8, true)) const UTF8STRING &layer = not detail.IsSewLineOnDrawing() ? *layer14 : *layer8;
if (DRW_Entity *e = AAMAPolygon(points, layer, true))
{ {
detailBlock->ent.push_back(e); detailBlock->ent.push_back(e);
} }

View File

@ -1027,6 +1027,18 @@ void VAbstractPiece::SetHideMainPath(bool value)
d->m_hideMainPath = value; d->m_hideMainPath = value;
} }
//---------------------------------------------------------------------------------------------------------------------
bool VAbstractPiece::IsSewLineOnDrawing() const
{
return d->m_onDrawing;
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractPiece::SetSewLineOnDrawing(bool value)
{
d->m_onDrawing = value;
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
auto VAbstractPiece::GetSAWidth() const -> qreal auto VAbstractPiece::GetSAWidth() const -> qreal
{ {

View File

@ -82,6 +82,9 @@ public:
auto IsHideMainPath() const -> bool; auto IsHideMainPath() const -> bool;
void SetHideMainPath(bool value); void SetHideMainPath(bool value);
auto IsSewLineOnDrawing() const -> bool;
void SetSewLineOnDrawing(bool value);
auto GetSAWidth() const -> qreal; auto GetSAWidth() const -> qreal;
void SetSAWidth(qreal value); void SetSAWidth(qreal value);

View File

@ -72,12 +72,13 @@ public:
qreal m_my{0}; // NOLINT (misc-non-private-member-variables-in-classes) qreal m_my{0}; // NOLINT (misc-non-private-member-variables-in-classes)
uint m_priority{0}; // NOLINT (misc-non-private-member-variables-in-classes) uint m_priority{0}; // NOLINT (misc-non-private-member-variables-in-classes)
QUuid m_uuid{QUuid::createUuid()}; // NOLINT (misc-non-private-member-variables-in-classes) QUuid m_uuid{QUuid::createUuid()}; // NOLINT (misc-non-private-member-variables-in-classes)
bool m_onDrawing{false}; // NOLINT (misc-non-private-member-variables-in-classes)
private: private:
Q_DISABLE_ASSIGN_MOVE(VAbstractPieceData) // NOLINT Q_DISABLE_ASSIGN_MOVE(VAbstractPieceData) // NOLINT
static constexpr quint32 streamHeader = 0x05CDD73A; // CRC-32Q string "VAbstractPieceData" static constexpr quint32 streamHeader = 0x05CDD73A; // CRC-32Q string "VAbstractPieceData"
static constexpr quint16 classVersion = 3; static constexpr quint16 classVersion = 4;
}; };
QT_WARNING_POP QT_WARNING_POP
@ -105,6 +106,9 @@ inline auto operator<<(QDataStream &dataStream, const VAbstractPieceData &piece)
// Added in classVersion = 3 // Added in classVersion = 3
dataStream << piece.m_uuid; dataStream << piece.m_uuid;
// Added in classVersion = 4
dataStream << piece.m_onDrawing;
return dataStream; return dataStream;
} }
@ -154,6 +158,11 @@ inline auto operator>>(QDataStream &dataStream, VAbstractPieceData &piece) -> QD
dataStream >> piece.m_uuid; dataStream >> piece.m_uuid;
} }
if (actualClassVersion >= 4)
{
dataStream >> piece.m_onDrawing;
}
return dataStream; return dataStream;
} }

View File

@ -640,6 +640,7 @@ auto VLayoutPiece::Create(const VPiece &piece, vidtype id, const VContainer *pat
det.SetSAWidth(VAbstractValApplication::VApp()->toPixel(piece.GetSAWidth())); det.SetSAWidth(VAbstractValApplication::VApp()->toPixel(piece.GetSAWidth()));
det.SetForbidFlipping(piece.IsForbidFlipping()); det.SetForbidFlipping(piece.IsForbidFlipping());
det.SetForceFlipping(piece.IsForceFlipping()); det.SetForceFlipping(piece.IsForceFlipping());
det.SetSewLineOnDrawing(piece.IsSewLineOnDrawing());
det.SetId(id); det.SetId(id);
if (not futureSeamAllowanceValid.result()) if (not futureSeamAllowanceValid.result())

View File

@ -96,6 +96,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingConfigurationDontUseNativeDialog
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternUndo, (QLatin1String("pattern/undo"))) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternUndo, (QLatin1String("pattern/undo"))) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternForbidFlipping, (QLatin1String("pattern/forbidFlipping"))) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternForbidFlipping, (QLatin1String("pattern/forbidFlipping"))) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternForceFlipping, (QLatin1String("pattern/forceFlipping"))) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternForceFlipping, (QLatin1String("pattern/forceFlipping"))) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternSewLineOnDrawing, (QLatin1String("pattern/sewLineOnDrawing"))) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternHideMainPath, (QLatin1String("pattern/hideMainPath"))) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternHideMainPath, (QLatin1String("pattern/hideMainPath"))) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDoublePassmark, (QLatin1String("pattern/doublePassmark"))) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDoublePassmark, (QLatin1String("pattern/doublePassmark"))) // NOLINT
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternDefaultSeamAllowance, (QLatin1String("pattern/defaultSeamAllowance"))) // NOLINT Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPatternDefaultSeamAllowance, (QLatin1String("pattern/defaultSeamAllowance"))) // NOLINT
@ -922,6 +923,18 @@ void VCommonSettings::SetForceWorkpieceFlipping(bool value)
} }
} }
//---------------------------------------------------------------------------------------------------------------------
auto VCommonSettings::GetSewLineOnDrawing() const -> bool
{
return value(*settingPatternSewLineOnDrawing, false).toBool();
}
//---------------------------------------------------------------------------------------------------------------------
void VCommonSettings::SetSewLineOnDrawing(bool value)
{
setValue(*settingPatternSewLineOnDrawing, value);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
auto VCommonSettings::IsHideMainPath() const -> bool auto VCommonSettings::IsHideMainPath() const -> bool
{ {

View File

@ -179,6 +179,9 @@ public:
auto GetForceWorkpieceFlipping() const -> bool; auto GetForceWorkpieceFlipping() const -> bool;
void SetForceWorkpieceFlipping(bool value); void SetForceWorkpieceFlipping(bool value);
auto GetSewLineOnDrawing() const -> bool;
void SetSewLineOnDrawing(bool value);
auto IsHideMainPath() const -> bool; auto IsHideMainPath() const -> bool;
void SetHideMainPath(bool value); void SetHideMainPath(bool value);

View File

@ -350,6 +350,7 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece)
uiTabPaths->checkBoxForbidFlipping->setChecked(piece.IsForbidFlipping()); uiTabPaths->checkBoxForbidFlipping->setChecked(piece.IsForbidFlipping());
uiTabPaths->checkBoxForceFlipping->setChecked(piece.IsForceFlipping()); uiTabPaths->checkBoxForceFlipping->setChecked(piece.IsForceFlipping());
uiTabPaths->checkBoxOnDrawing->setChecked(piece.IsSewLineOnDrawing());
uiTabPaths->checkBoxSeams->setChecked(piece.IsSeamAllowance()); uiTabPaths->checkBoxSeams->setChecked(piece.IsSeamAllowance());
uiTabPaths->checkBoxBuiltIn->setChecked(piece.IsSeamAllowanceBuiltIn()); uiTabPaths->checkBoxBuiltIn->setChecked(piece.IsSeamAllowanceBuiltIn());
uiTabPaths->lineEditName->setText(piece.GetName()); uiTabPaths->lineEditName->setText(piece.GetName());
@ -2591,6 +2592,7 @@ VPiece DialogSeamAllowance::CreatePiece() const
piece.SetPlaceLabels(GetListInternals<quint32>(uiTabPlaceLabels->listWidgetPlaceLabels)); piece.SetPlaceLabels(GetListInternals<quint32>(uiTabPlaceLabels->listWidgetPlaceLabels));
piece.SetForbidFlipping(uiTabPaths->checkBoxForbidFlipping->isChecked()); piece.SetForbidFlipping(uiTabPaths->checkBoxForbidFlipping->isChecked());
piece.SetForceFlipping(uiTabPaths->checkBoxForceFlipping->isChecked()); piece.SetForceFlipping(uiTabPaths->checkBoxForceFlipping->isChecked());
piece.SetSewLineOnDrawing(uiTabPaths->checkBoxOnDrawing->isChecked());
piece.SetSeamAllowance(uiTabPaths->checkBoxSeams->isChecked()); piece.SetSeamAllowance(uiTabPaths->checkBoxSeams->isChecked());
piece.SetSeamAllowanceBuiltIn(uiTabPaths->checkBoxBuiltIn->isChecked()); piece.SetSeamAllowanceBuiltIn(uiTabPaths->checkBoxBuiltIn->isChecked());
piece.SetHideMainPath(uiTabPaths->checkBoxHideMainPath->isChecked()); piece.SetHideMainPath(uiTabPaths->checkBoxHideMainPath->isChecked());
@ -3045,10 +3047,10 @@ void DialogSeamAllowance::InitPieceTab()
} }
}); });
uiTabPaths->checkBoxForbidFlipping->setChecked( VCommonSettings *settings = VAbstractApplication::VApp()->Settings();
VAbstractApplication::VApp()->Settings()->GetForbidWorkpieceFlipping()); uiTabPaths->checkBoxForbidFlipping->setChecked(settings->GetForbidWorkpieceFlipping());
uiTabPaths->checkBoxForceFlipping->setChecked( uiTabPaths->checkBoxForceFlipping->setChecked(settings->GetForceWorkpieceFlipping());
VAbstractApplication::VApp()->Settings()->GetForceWorkpieceFlipping()); uiTabPaths->checkBoxOnDrawing->setChecked(settings->GetSewLineOnDrawing());
connect(uiTabPaths->lineEditUUID, &QLineEdit::textChanged, this, &DialogSeamAllowance::DetailUUIDChanged); connect(uiTabPaths->lineEditUUID, &QLineEdit::textChanged, this, &DialogSeamAllowance::DetailUUIDChanged);

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>422</width> <width>427</width>
<height>624</height> <height>651</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -28,8 +28,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>394</width> <width>407</width>
<height>612</height> <height>631</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -83,6 +83,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="checkBoxOnDrawing">
<property name="toolTip">
<string>Export to DXF-AAMA sew line on Draw layer </string>
</property>
<property name="text">
<string>On drawing</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QListWidget" name="listWidgetMainPath"> <widget class="QListWidget" name="listWidgetMainPath">
<property name="dragDropMode"> <property name="dragDropMode">
@ -1127,16 +1137,16 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>VPlainTextEdit</class>
<extends>QPlainTextEdit</extends>
<header location="global">vplaintextedit.h</header>
</customwidget>
<customwidget> <customwidget>
<class>VLineEdit</class> <class>VLineEdit</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>
<header>vlineedit.h</header> <header>vlineedit.h</header>
</customwidget> </customwidget>
<customwidget>
<class>VPlainTextEdit</class>
<extends>QPlainTextEdit</extends>
<header>vplaintextedit.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../../../vmisc/share/resources/icon.qrc"/> <include location="../../../../../vmisc/share/resources/icon.qrc"/>

View File

@ -361,6 +361,7 @@ void VToolSeamAllowance::AddAttributes(VAbstractPattern *doc, QDomElement &domEl
[](bool inLayout) noexcept {return inLayout;}); [](bool inLayout) noexcept {return inLayout;});
doc->SetAttribute(domElement, AttrForbidFlipping, piece.IsForbidFlipping()); doc->SetAttribute(domElement, AttrForbidFlipping, piece.IsForbidFlipping());
doc->SetAttribute(domElement, AttrForceFlipping, piece.IsForceFlipping()); doc->SetAttribute(domElement, AttrForceFlipping, piece.IsForceFlipping());
doc->SetAttribute(domElement, AttrSewLineOnDrawing, piece.IsSewLineOnDrawing());
doc->SetAttributeOrRemoveIf<bool>(domElement, AttrSeamAllowance, piece.IsSeamAllowance(), doc->SetAttributeOrRemoveIf<bool>(domElement, AttrSeamAllowance, piece.IsSeamAllowance(),
[](bool seamAllowance) noexcept {return not seamAllowance;}); [](bool seamAllowance) noexcept {return not seamAllowance;});
doc->SetAttribute(domElement, AttrHideMainPath, piece.IsHideMainPath()); doc->SetAttribute(domElement, AttrHideMainPath, piece.IsHideMainPath());