From 31ed3d526c47031848cd7697179d1b6b5e2570a8 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 25 Jun 2016 16:17:50 +0300 Subject: [PATCH 1/8] Fixed code style. --HG-- branch : feature --- src/app/valentina/mainwindowsnogui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 436211ad1..29c97abcd 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -457,7 +457,7 @@ void MainWindowsNoGUI::PrintTiled() void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash *details) { SCASSERT(details != nullptr) - if (details->count() == 0) + if (details->count() == 0) { listDetails.clear(); return; From 39c84aa2c2c0386f3bb32100e3bee2bd5f1cc99e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 25 Jun 2016 17:16:20 +0300 Subject: [PATCH 2/8] Refactoring. Use C++11 lambdas. --HG-- branch : feature --- src/app/valentina/mainwindow.cpp | 21 ++++++--------------- src/app/valentina/mainwindow.h | 3 --- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 4da6d58e2..fdacde006 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -2973,18 +2973,6 @@ void MainWindow::ChangedHeight(const QString &text) } } -//--------------------------------------------------------------------------------------------------------------------- -void MainWindow::DockToolOptionsVisibilityChanged(bool visible) -{ - isDockToolOptionsVisible = visible; -} - -//--------------------------------------------------------------------------------------------------------------------- -void MainWindow::DockGropsVisibilityChanged(bool visible) -{ - isDockGroupsVisible = visible; -} - //--------------------------------------------------------------------------------------------------------------------- void MainWindow::SetDefaultHeight() { @@ -3610,12 +3598,15 @@ void MainWindow::AddDocks() //Add dock actionDockWidgetToolOptions = ui->dockWidgetToolOptions->toggleViewAction(); ui->menuPatternPiece->insertAction(ui->actionPattern_properties, actionDockWidgetToolOptions); - connect(ui->dockWidgetToolOptions, &QDockWidget::visibilityChanged, this, - &MainWindow::DockToolOptionsVisibilityChanged); + connect(ui->dockWidgetToolOptions, &QDockWidget::visibilityChanged, [this](bool visible){ + isDockToolOptionsVisible = visible; + }); actionDockWidgetGroups = ui->dockWidgetGroups->toggleViewAction(); ui->menuPatternPiece->insertAction(ui->actionPattern_properties, actionDockWidgetGroups); - connect(ui->dockWidgetGroups, &QDockWidget::visibilityChanged, this, &MainWindow::DockGropsVisibilityChanged); + connect(ui->dockWidgetGroups, &QDockWidget::visibilityChanged, [this](bool visible){ + isDockGroupsVisible = visible; + }); separatorAct = new QAction(this); separatorAct->setSeparator(true); diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index 943245dc9..828766427 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -207,9 +207,6 @@ private slots: void ChangedSize(const QString &text); void ChangedHeight(const QString & text); - void DockToolOptionsVisibilityChanged(bool visible); - void DockGropsVisibilityChanged(bool visible); - private: Q_DISABLE_COPY(MainWindow) /** @brief ui keeps information about user interface */ From 93836ddf3505a4f02f3d0563cefe2cd137970b83 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 26 Jun 2016 14:33:34 +0300 Subject: [PATCH 3/8] Refactoring MainWindowsNoGUI::PrepareDetailsForLayout. Use const iterator. --HG-- branch : feature --- src/app/valentina/mainwindowsnogui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 29c97abcd..b3e6b9e72 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -464,18 +464,18 @@ void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash *de } listDetails.clear(); - QHashIterator idetail(*details); - while (idetail.hasNext()) + QHash::const_iterator i = details->constBegin(); + while (i != details->constEnd()) { - idetail.next(); VLayoutDetail det = VLayoutDetail(); - const VDetail &d = idetail.value(); + const VDetail d = i.value(); det.SetCountourPoints(d.ContourPoints(pattern)); det.SetSeamAllowencePoints(d.SeamAllowancePoints(pattern), d.getSeamAllowance(), d.getClosed()); det.setName(d.getName()); det.setWidth(qApp->toPixel(d.getWidth())); listDetails.append(det); + ++i; } } From 1608599795de14fa9e7b67f5355d60235f6af0c0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 26 Jun 2016 14:36:12 +0300 Subject: [PATCH 4/8] Added list "Details in layout". --HG-- branch : feature --- src/app/valentina/dialogs/dialogs.pri | 9 +- src/app/valentina/dialogs/vwidgetdetails.cpp | 125 +++++++++++++++++ src/app/valentina/dialogs/vwidgetdetails.h | 66 +++++++++ src/app/valentina/dialogs/vwidgetdetails.ui | 58 ++++++++ src/app/valentina/dialogs/vwidgetgroups.ui | 10 +- src/app/valentina/mainwindow.cpp | 106 ++++++++------ src/app/valentina/mainwindow.h | 5 +- src/app/valentina/mainwindow.ui | 5 +- src/app/valentina/xml/vpattern.cpp | 1 + src/libs/ifc/ifcdef.cpp | 1 + src/libs/ifc/ifcdef.h | 1 + src/libs/vmisc/share/resources/icon.qrc | 4 + .../resources/icon/16x16/allow_detail.png | Bin 0 -> 3315 bytes .../resources/icon/16x16/allow_detail@2x.png | Bin 0 -> 4137 bytes .../resources/icon/16x16/forbid_detail.png | Bin 0 -> 3519 bytes .../resources/icon/16x16/forbid_detail@2x.png | Bin 0 -> 5175 bytes src/libs/vpatterndb/vdetail.cpp | 12 ++ src/libs/vpatterndb/vdetail.h | 3 + src/libs/vpatterndb/vdetail_p.h | 8 +- .../undocommands/toggledetailinlayout.cpp | 132 ++++++++++++++++++ .../undocommands/toggledetailinlayout.h | 57 ++++++++ src/libs/vtools/undocommands/undocommands.pri | 6 +- src/libs/vtools/undocommands/vundocommand.h | 3 +- 23 files changed, 552 insertions(+), 60 deletions(-) create mode 100644 src/app/valentina/dialogs/vwidgetdetails.cpp create mode 100644 src/app/valentina/dialogs/vwidgetdetails.h create mode 100644 src/app/valentina/dialogs/vwidgetdetails.ui create mode 100644 src/libs/vmisc/share/resources/icon/16x16/allow_detail.png create mode 100644 src/libs/vmisc/share/resources/icon/16x16/allow_detail@2x.png create mode 100644 src/libs/vmisc/share/resources/icon/16x16/forbid_detail.png create mode 100644 src/libs/vmisc/share/resources/icon/16x16/forbid_detail@2x.png create mode 100644 src/libs/vtools/undocommands/toggledetailinlayout.cpp create mode 100644 src/libs/vtools/undocommands/toggledetailinlayout.h diff --git a/src/app/valentina/dialogs/dialogs.pri b/src/app/valentina/dialogs/dialogs.pri index c5910f074..edc6d002c 100644 --- a/src/app/valentina/dialogs/dialogs.pri +++ b/src/app/valentina/dialogs/dialogs.pri @@ -18,7 +18,8 @@ HEADERS += \ $$PWD/dialoglayoutsettings.h \ $$PWD/dialoglayoutprogress.h \ $$PWD/dialogsavelayout.h \ - $$PWD/vwidgetgroups.h + $$PWD/vwidgetgroups.h \ + $$PWD/vwidgetdetails.h SOURCES += \ $$PWD/dialogincrements.cpp \ @@ -35,7 +36,8 @@ SOURCES += \ $$PWD/dialoglayoutsettings.cpp \ $$PWD/dialoglayoutprogress.cpp \ $$PWD/dialogsavelayout.cpp \ - $$PWD/vwidgetgroups.cpp + $$PWD/vwidgetgroups.cpp \ + $$PWD/vwidgetdetails.cpp FORMS += \ $$PWD/dialogincrements.ui \ @@ -47,4 +49,5 @@ FORMS += \ $$PWD/dialoglayoutsettings.ui \ $$PWD/dialoglayoutprogress.ui \ $$PWD/dialogsavelayout.ui \ - $$PWD/vwidgetgroups.ui + $$PWD/vwidgetgroups.ui \ + $$PWD/vwidgetdetails.ui diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp new file mode 100644 index 000000000..c8b636727 --- /dev/null +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -0,0 +1,125 @@ +/************************************************************************ + ** + ** @file vwidgetdetails.cpp + ** @author Roman Telezhynskyi + ** @date 25 6, 2016 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2016 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "vwidgetdetails.h" +#include "ui_vwidgetdetails.h" +#include "../ifc/xml/vabstractpattern.h" +#include "../vpatterndb/vcontainer.h" +#include "../vmisc/vabstractapplication.h" +#include "../vtools/undocommands/toggledetailinlayout.h" + +#include + +//--------------------------------------------------------------------------------------------------------------------- +VWidgetDetails::VWidgetDetails(VContainer *data, VAbstractPattern *doc, QWidget *parent) + : QWidget(parent), + ui(new Ui::VWidgetDetails), + m_doc(doc), + m_data(data) +{ + ui->setupUi(this); + + FillTable(m_data->DataDetails()); + + connect(ui->tableWidget, &QTableWidget::cellClicked, this, &VWidgetDetails::InLayoutStateChanged); +} + +//--------------------------------------------------------------------------------------------------------------------- +VWidgetDetails::~VWidgetDetails() +{ + delete ui; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VWidgetDetails::UpdateList() +{ + FillTable(m_data->DataDetails()); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VWidgetDetails::InLayoutStateChanged(int row, int column) +{ + if (column != 0) + { + return; + } + + QTableWidgetItem *item = ui->tableWidget->item(row, column); + const quint32 id = item->data(Qt::UserRole).toUInt(); + const QHash *allDetails = m_data->DataDetails(); + const bool inLayout = not allDetails->value(id).IsInLayout(); + + ToggleDetailInLayout *togglePrint = new ToggleDetailInLayout(id, inLayout, m_data, m_doc); + connect(togglePrint, &ToggleDetailInLayout::NeedLiteParsing, m_doc, &VAbstractPattern::LiteParseTree); + qApp->getUndoStack()->push(togglePrint); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VWidgetDetails::FillTable(const QHash *details) +{ + const int selectedRow = ui->tableWidget->currentRow(); + ui->tableWidget->clear(); + + ui->tableWidget->setColumnCount(2); + ui->tableWidget->setRowCount(details->size()); + qint32 currentRow = -1; + auto i = details->constBegin(); + while (i != details->constEnd()) + { + ++currentRow; + const VDetail det = i.value(); + + QTableWidgetItem *item = new QTableWidgetItem(); + item->setTextAlignment(Qt::AlignHCenter); + if (det.IsInLayout()) + { + item->setIcon(QIcon("://icon/16x16/allow_detail.png")); + } + else + { + item->setIcon(QIcon("://icon/16x16/forbid_detail.png")); + } + item->setData(Qt::UserRole, i.key()); + ui->tableWidget->setItem(currentRow, 0, item); + + QString name = det.getName(); + if (name.isEmpty()) + { + name = tr("Unnamed"); + } + + item = new QTableWidgetItem(name); + item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter); + ui->tableWidget->setItem(currentRow, 1, item); + ++i; + } + ui->tableWidget->resizeColumnsToContents(); + ui->tableWidget->resizeRowsToContents(); + + ui->tableWidget->setCurrentCell(selectedRow, 0); +} diff --git a/src/app/valentina/dialogs/vwidgetdetails.h b/src/app/valentina/dialogs/vwidgetdetails.h new file mode 100644 index 000000000..c59147007 --- /dev/null +++ b/src/app/valentina/dialogs/vwidgetdetails.h @@ -0,0 +1,66 @@ +/************************************************************************ + ** + ** @file vwidgetdetails.h + ** @author Roman Telezhynskyi + ** @date 25 6, 2016 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2016 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef VWIDGETDETAILS_H +#define VWIDGETDETAILS_H + +#include + +class VAbstractPattern; +class VContainer; +class VDetail; + +namespace Ui +{ + class VWidgetDetails; +} + +class VWidgetDetails : public QWidget +{ + Q_OBJECT + +public: + explicit VWidgetDetails(VContainer *data, VAbstractPattern *doc, QWidget *parent = nullptr); + virtual ~VWidgetDetails(); + +public slots: + void UpdateList(); + +private slots: + void InLayoutStateChanged(int row, int column); + +private: + Q_DISABLE_COPY(VWidgetDetails) + Ui::VWidgetDetails *ui; + VAbstractPattern *m_doc; + VContainer *m_data; + + void FillTable(const QHash *details); +}; + +#endif // VWIDGETDETAILS_H diff --git a/src/app/valentina/dialogs/vwidgetdetails.ui b/src/app/valentina/dialogs/vwidgetdetails.ui new file mode 100644 index 000000000..fb6fc341a --- /dev/null +++ b/src/app/valentina/dialogs/vwidgetdetails.ui @@ -0,0 +1,58 @@ + + + VWidgetDetails + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + false + + + 16 + + + false + + + true + + + false + + + false + + + 10 + + + + + + + + diff --git a/src/app/valentina/dialogs/vwidgetgroups.ui b/src/app/valentina/dialogs/vwidgetgroups.ui index 3bd6c417e..006e30e6c 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.ui +++ b/src/app/valentina/dialogs/vwidgetgroups.ui @@ -11,7 +11,11 @@ - Form + + + + + :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png @@ -53,6 +57,8 @@ - + + + diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index fdacde006..cc5b835b6 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -56,6 +56,7 @@ #include "dialogs/dialogs.h" #include "dialogs/vwidgetgroups.h" #include "../vtools/undocommands/addgroup.h" +#include "dialogs/vwidgetdetails.h" #include #include @@ -122,6 +123,7 @@ MainWindow::MainWindow(QWidget *parent) gradationHeights(nullptr), gradationSizes(nullptr), gradationHeightsLabel(nullptr), gradationSizesLabel(nullptr), toolOptions(nullptr), groupsWidget(nullptr), + detailsWidget(nullptr), lock(nullptr) { for (int i = 0; i < MaxRecentFiles; ++i) @@ -137,7 +139,12 @@ MainWindow::MainWindow(QWidget *parent) connect(doc, &VPattern::patternChanged, this, &MainWindow::PatternWasModified); connect(doc, &VPattern::UndoCommand, this, &MainWindow::FullParseFile); connect(doc, &VPattern::SetEnabledGUI, this, &MainWindow::SetEnabledGUI); - connect(doc, &VPattern::CheckLayout, this, &MainWindow::Layout); + connect(doc, &VPattern::CheckLayout, [this](){ + if (pattern->DataDetails()->count() == 0) + { + ActionDraw(true); + } + }); connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP); qApp->setCurrentDocument(doc); @@ -1320,7 +1327,8 @@ void MainWindow::CleanLayout() shadows.clear(); papers.clear(); ui->listWidget->clear(); - SetLayoutModeActions(false); + listDetails.clear(); + SetLayoutModeActions(); } //--------------------------------------------------------------------------------------------------------------------- @@ -1335,7 +1343,7 @@ void MainWindow::PrepareSceneList() if (not scenes.isEmpty()) { ui->listWidget->setCurrentRow(0); - SetLayoutModeActions(true); + SetLayoutModeActions(); } } @@ -2109,7 +2117,10 @@ void MainWindow::ActionDraw(bool checked) ui->dockWidgetLayoutPages->setVisible(false); ui->dockWidgetToolOptions->setVisible(isDockToolOptionsVisible); + + ui->dockWidgetGroups->setWidget(groupsWidget); ui->dockWidgetGroups->setVisible(isDockGroupsVisible); + ui->dockWidgetGroups->setToolTip(tr("Contains all visibility groups")); } else { @@ -2149,11 +2160,13 @@ void MainWindow::ActionDetails(bool checked) QMessageBox::information(this, tr("Detail mode"), tr("You can't use now the Detail mode. " "Please, create at least one workpiece."), QMessageBox::Ok, QMessageBox::Ok); - Layout(); + ActionDraw(true); return; } } + detailsWidget->UpdateList(); + qCDebug(vMainWindow, "Show details scene"); SaveCurrentScene(); @@ -2179,7 +2192,10 @@ void MainWindow::ActionDetails(bool checked) ui->dockWidgetLayoutPages->setVisible(false); ui->dockWidgetToolOptions->setVisible(isDockToolOptionsVisible); + + ui->dockWidgetGroups->setWidget(detailsWidget); ui->dockWidgetGroups->setVisible(isDockGroupsVisible); + ui->dockWidgetGroups->setToolTip(tr("Show which details will go in layout")); helpLabel->setText(""); } @@ -2214,17 +2230,39 @@ void MainWindow::ActionLayout(bool checked) ui->actionDetails->setChecked(false); ui->actionLayout->setChecked(true); - const QHash *details = pattern->DataDetails(); + QHash details; if(not qApp->getOpeningPattern()) { - if (details->count() == 0) + const QHash *allDetails = pattern->DataDetails(); + if (allDetails->count() == 0) { QMessageBox::information(this, tr("Layout mode"), tr("You can't use now the Layout mode. " "Please, create at least one workpiece."), QMessageBox::Ok, QMessageBox::Ok); - Layout(); + ActionDraw(true); return; } + else + { + QHash::const_iterator i = allDetails->constBegin(); + while (i != allDetails->constEnd()) + { + if (i.value().IsInLayout()) + { + details.insert(i.key(), i.value()); + } + ++i; + } + + if (details.count() == 0) + { + QMessageBox::information(this, tr("Layout mode"), tr("You can't use now the Layout mode. Please, " + "include at least one detail in layout."), + QMessageBox::Ok, QMessageBox::Ok); + mode == Draw::Calculation ? ActionDraw(true) : ActionDetails(true); + return; + } + } } comboBoxDraws->setCurrentIndex(-1);// Hide pattern pieces @@ -2233,7 +2271,7 @@ void MainWindow::ActionLayout(bool checked) SaveCurrentScene(); - PrepareDetailsForLayout(details); + PrepareDetailsForLayout(&details); currentScene = tempSceneLayout; ui->view->itemClicked(nullptr); @@ -2514,7 +2552,7 @@ void MainWindow::Clear() #ifndef QT_NO_CURSOR QApplication::restoreOverrideCursor(); #endif - Layout(); + CleanLayout(); #ifdef Q_OS_WIN32 qt_ntfs_permission_lookup--; // turn it off again @@ -2781,29 +2819,6 @@ void MainWindow::ClickEndVisualization() EndVisualization(true); } -//--------------------------------------------------------------------------------------------------------------------- -void MainWindow::Layout() -{ - if (pattern->DataDetails()->size() > 0) - { - SetLayoutModeActions(true); - } - else - { - listDetails.clear(); - if (not ui->actionDraw->isChecked()) - { - ActionDraw(true); - } - else - { - ui->actionDetails->setChecked(false); - ui->actionLayout->setChecked(false); - } - SetLayoutModeActions(false); - } -} - //--------------------------------------------------------------------------------------------------------------------- void MainWindow::UpdateGradation() { @@ -3154,19 +3169,16 @@ void MainWindow::SetEnableTool(bool enable) } //--------------------------------------------------------------------------------------------------------------------- -void MainWindow::SetLayoutModeActions(bool enable) +void MainWindow::SetLayoutModeActions() { - bool value = enable; - if (scenes.isEmpty()) - { - value = false; - } - ui->actionExportAs->setEnabled(value); - ui->actionPrintPreview->setEnabled(value); - ui->actionPrintPreviewTiled->setEnabled(value); - ui->actionSaveAsTiledPDF->setEnabled(value); - ui->actionPrint->setEnabled(value); - ui->actionPrintTiled->setEnabled(value); + const bool enabled = not scenes.isEmpty(); + + ui->actionExportAs->setEnabled(enabled); + ui->actionPrintPreview->setEnabled(enabled); + ui->actionPrintPreviewTiled->setEnabled(enabled); + ui->actionSaveAsTiledPDF->setEnabled(enabled); + ui->actionPrint->setEnabled(enabled); + ui->actionPrintTiled->setEnabled(enabled); } //--------------------------------------------------------------------------------------------------------------------- @@ -3625,6 +3637,10 @@ void MainWindow::InitDocksContain() qCDebug(vMainWindow, "Initialization groups dock."); groupsWidget = new VWidgetGroups(doc, this); ui->dockWidgetGroups->setWidget(groupsWidget); + + detailsWidget = new VWidgetDetails(pattern, doc, this); + connect(doc, &VPattern::FullUpdateFromFile, detailsWidget, &VWidgetDetails::UpdateList); + detailsWidget->setVisible(false); } //--------------------------------------------------------------------------------------------------------------------- @@ -3983,12 +3999,10 @@ void MainWindow::ShowPaper(int index) if (index < 0 || index >= scenes.size()) { ui->view->setScene(tempSceneLayout); - SetLayoutModeActions(false); } else { ui->view->setScene(scenes.at(index)); - SetLayoutModeActions(true); } ui->view->fitInView(ui->view->scene()->sceneRect(), Qt::KeepAspectRatio); diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index 828766427..1f8b5cd91 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -49,6 +49,7 @@ class DialogIncrements; class DialogTool; class DialogHistory; class VWidgetGroups; +class VWidgetDetails; /** * @brief The MainWindow class main windows. @@ -152,7 +153,6 @@ public slots: void SetEnabledGUI(bool enabled); void ClickEndVisualization(); - void Layout(); void UpdateGradation(); void GlobalChangePP(const QString &patternPiece); void WindowsLocale(); @@ -277,6 +277,7 @@ private: QPointer gradationSizesLabel; VToolOptionsPropertyBrowser *toolOptions; VWidgetGroups *groupsWidget; + VWidgetDetails *detailsWidget; std::shared_ptr> lock; void SetDefaultHeight(); @@ -291,7 +292,7 @@ private: void SetEnableWidgets(bool enable); void SetEnableTool(bool enable); - void SetLayoutModeActions(bool enable); + void SetLayoutModeActions(); void SaveCurrentScene(); void RestoreCurrentScene(); diff --git a/src/app/valentina/mainwindow.ui b/src/app/valentina/mainwindow.ui index f0904c225..d1e500848 100644 --- a/src/app/valentina/mainwindow.ui +++ b/src/app/valentina/mainwindow.ui @@ -1518,8 +1518,11 @@ true + + + - Groups + Group 2 diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 339d2f53c..abaac899c 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -590,6 +590,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document detail.setSeamAllowance(GetParametrUInt(domElement, VToolDetail::AttrSupplement, "1")); detail.setWidth(GetParametrDouble(domElement, VToolDetail::AttrWidth, "10.0")); detail.setClosed(GetParametrUInt(domElement, VToolDetail::AttrClosed, "1")); + detail.SetInLayout(GetParametrBool(domElement, AttrInLayout, trueStr)); QStringList types = QStringList() << VToolDetail::NodePoint << VToolDetail::NodeArc << VToolDetail::NodeSpline << VToolDetail::NodeSplinePath; diff --git a/src/libs/ifc/ifcdef.cpp b/src/libs/ifc/ifcdef.cpp index 53b3e1587..1228e41e4 100644 --- a/src/libs/ifc/ifcdef.cpp +++ b/src/libs/ifc/ifcdef.cpp @@ -130,6 +130,7 @@ const QString AttrCRadius = QStringLiteral("cRadius"); const QString AttrArc = QStringLiteral("arc"); const QString AttrSuffix = QStringLiteral("suffix"); const QString AttrIdObject = QStringLiteral("idObject"); +const QString AttrInLayout = QStringLiteral("inLayout"); const QString TypeLineNone = QStringLiteral("none"); const QString TypeLineLine = QStringLiteral("hair"); diff --git a/src/libs/ifc/ifcdef.h b/src/libs/ifc/ifcdef.h index 93399b39d..0ce6dddd9 100644 --- a/src/libs/ifc/ifcdef.h +++ b/src/libs/ifc/ifcdef.h @@ -132,6 +132,7 @@ extern const QString AttrCRadius; extern const QString AttrArc; extern const QString AttrSuffix; extern const QString AttrIdObject; +extern const QString AttrInLayout; extern const QString TypeLineNone; extern const QString TypeLineLine; diff --git a/src/libs/vmisc/share/resources/icon.qrc b/src/libs/vmisc/share/resources/icon.qrc index 8abf44308..74cb170cd 100644 --- a/src/libs/vmisc/share/resources/icon.qrc +++ b/src/libs/vmisc/share/resources/icon.qrc @@ -61,5 +61,9 @@ icon/16x16/closed_eye@2x.png icon/16x16/open_eye.png icon/16x16/open_eye@2x.png + icon/16x16/allow_detail.png + icon/16x16/allow_detail@2x.png + icon/16x16/forbid_detail.png + icon/16x16/forbid_detail@2x.png diff --git a/src/libs/vmisc/share/resources/icon/16x16/allow_detail.png b/src/libs/vmisc/share/resources/icon/16x16/allow_detail.png new file mode 100644 index 0000000000000000000000000000000000000000..6bd8724f669783e2f49cf51b6a9c59277a9c2603 GIT binary patch literal 3315 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e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^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0008&NklN8KZ{8qb5~}CR)8T9!&9~HXc0C1u6oi1%z3cWp-z0=KI4#g=BedpXBp; zZjZ3mvYYxu-~jJPw{WpgEI;Qsp089E<*nwl)#~#nCbxfJU&L-feIht19QVsZM~2UO z(|TBEbP4ItA_9$BMF7yshcg#t%LPZ8H=FUEJ@WM^CRT|->Kt{iPJ8AiCcKNIayqf0or(Ki zQJz2dZ9LsICLu%>C=HfG_2Z}fcPoN3IyGe}z#_1oh?Y`*duzJ$0nh<7puVMhP}002ovPDHLkV1i-0n;8HA literal 0 HcmV?d00001 diff --git a/src/libs/vmisc/share/resources/icon/16x16/forbid_detail@2x.png b/src/libs/vmisc/share/resources/icon/16x16/forbid_detail@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..ee46abafba9772f146e66216cbc8577b8afb963b GIT binary patch literal 5175 zcmV-76v*p|P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i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)Iyqc|^l4`kNJMXM?+I{QDscGa2ibM|N|HVA(VL2~R)~$@DM4Aq z*rbXa-~Z9z)t9B};zqyc)Rlg|N8OojbRJ&3D4~*ABCA1ZlpkQ+6xos?Diy(Tandcg z3p%hfIg-L8wo)W;6browtspklvkkR9Ug$p> z2I_}>9R`a~jKQElJ2=`!I|^+rQ4$j+f}@1M0Y`xmh%HzV90iTOLabunhz9hp*512$ zOK|nWrMc7b2?hYXy4t@>!vj4X#>u3hoIojpWOf#i>M2essSY1=7IZZ)EsbfRDJ?h}Jhytl zv=$NraRS+C#Y|ZfTQzZ@Bv0JEGyYQ{A*ybJC)`Fv3JUOQz}Z{RF=7FbN;|lBoZ^0S zWky}x8>;03r&}#3Q7BuLakwIr6BRz(mb0HdchI~C%m8J;)P5~c0&+kMBqEYkHJ}m^ l!~fw@N_jP7L`3Yr2LQX2Fw_euuWkSU002ovPDHLkV1l`_xt{<4 literal 0 HcmV?d00001 diff --git a/src/libs/vpatterndb/vdetail.cpp b/src/libs/vpatterndb/vdetail.cpp index d7a2e8db2..2d9d87e2f 100644 --- a/src/libs/vpatterndb/vdetail.cpp +++ b/src/libs/vpatterndb/vdetail.cpp @@ -175,6 +175,18 @@ void VDetail::setId(const quint32 &id) d->_id = id; } +//--------------------------------------------------------------------------------------------------------------------- +bool VDetail::IsInLayout() const +{ + return d->inLayout; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDetail::SetInLayout(bool inLayout) +{ + d->inLayout = inLayout; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief OnEdge checks if two poins located on the edge. Edge is line between two points. If between two points diff --git a/src/libs/vpatterndb/vdetail.h b/src/libs/vpatterndb/vdetail.h index fb57ab56e..5ef7f34c1 100644 --- a/src/libs/vpatterndb/vdetail.h +++ b/src/libs/vpatterndb/vdetail.h @@ -67,6 +67,9 @@ public: quint32 id() const; void setId(const quint32 &id); + bool IsInLayout() const; + void SetInLayout(bool inLayout); + QVector getNodes() const; void setNodes(const QVector &value); diff --git a/src/libs/vpatterndb/vdetail_p.h b/src/libs/vpatterndb/vdetail_p.h index 72aff357a..b22d094da 100644 --- a/src/libs/vpatterndb/vdetail_p.h +++ b/src/libs/vpatterndb/vdetail_p.h @@ -42,15 +42,15 @@ class VDetailData : public QSharedData { public: VDetailData() - :_id(NULL_ID), nodes(QVector()), mx(0), my(0) + :_id(NULL_ID), nodes(QVector()), mx(0), my(0), inLayout(true) {} explicit VDetailData(const QVector &nodes) - :_id(NULL_ID), nodes(nodes), mx(0), my(0) + :_id(NULL_ID), nodes(nodes), mx(0), my(0), inLayout(true) {} VDetailData(const VDetailData &detail) - :QSharedData(detail), _id(NULL_ID), nodes(detail.nodes), mx(detail.mx), my(detail.my) + :QSharedData(detail), _id(NULL_ID), nodes(detail.nodes), mx(detail.mx), my(detail.my), inLayout(detail.inLayout) {} ~VDetailData() {} @@ -67,6 +67,8 @@ public: /** @brief my bias y axis. */ qreal my; + bool inLayout; + private: VDetailData &operator=(const VDetailData &) Q_DECL_EQ_DELETE; }; diff --git a/src/libs/vtools/undocommands/toggledetailinlayout.cpp b/src/libs/vtools/undocommands/toggledetailinlayout.cpp new file mode 100644 index 000000000..4b13fd15f --- /dev/null +++ b/src/libs/vtools/undocommands/toggledetailinlayout.cpp @@ -0,0 +1,132 @@ +/************************************************************************ + ** + ** @file toggledetailinlayout.cpp + ** @author Roman Telezhynskyi + ** @date 25 6, 2016 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2016 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "toggledetailinlayout.h" +#include "../vpatterndb/vdetail.h" +#include "../vpatterndb/vcontainer.h" + +//--------------------------------------------------------------------------------------------------------------------- +ToggleDetailInLayout::ToggleDetailInLayout(quint32 id, bool state, VContainer *data, VAbstractPattern *doc, + QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + m_id(id), + m_data(data), + m_oldState(m_data->DataDetails()->value(m_id).IsInLayout()), + m_newState(state) +{ + setText(tr("detail in layout list")); +} + +//--------------------------------------------------------------------------------------------------------------------- +ToggleDetailInLayout::~ToggleDetailInLayout() +{ +} + +//--------------------------------------------------------------------------------------------------------------------- +void ToggleDetailInLayout::undo() +{ + qCDebug(vUndo, "ToggleDetailInLayout::undo()."); + + if (m_newState != m_oldState) + { + Do(m_oldState); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void ToggleDetailInLayout::redo() +{ + qCDebug(vUndo, "ToggleDetailInLayout::redo()."); + + if (m_newState != m_oldState) + { + Do(m_newState); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +bool ToggleDetailInLayout::mergeWith(const QUndoCommand *command) +{ + const ToggleDetailInLayout *stateCommand = static_cast(command); + SCASSERT(stateCommand != nullptr); + const quint32 id = stateCommand->getDetId(); + + if (id != m_id) + { + return false; + } + + m_newState = stateCommand->getNewState(); + return true; +} + +//--------------------------------------------------------------------------------------------------------------------- +int ToggleDetailInLayout::id() const +{ + return static_cast(UndoCommand::ToggleDetailInLayout); +} + +//--------------------------------------------------------------------------------------------------------------------- +quint32 ToggleDetailInLayout::getDetId() const +{ + return m_id; +} + +//--------------------------------------------------------------------------------------------------------------------- +bool ToggleDetailInLayout::getNewState() const +{ + return m_newState; +} + +//--------------------------------------------------------------------------------------------------------------------- +void ToggleDetailInLayout::Do(bool state) +{ + QDomElement detail = doc->elementById(m_id); + if (detail.isElement()) + { + if (state == false) + { + doc->SetAttribute(detail, AttrInLayout, state); + } + else + { + detail.removeAttribute(AttrInLayout); + } + + VDetail det = m_data->DataDetails()->value(m_id); + det.SetInLayout(state); + m_data->UpdateDetail(m_id, det); + + emit NeedLiteParsing(Document::LiteParse); + } + else + { + qDebug("Can't get detail by id = %u.", m_id); + return; + } +} diff --git a/src/libs/vtools/undocommands/toggledetailinlayout.h b/src/libs/vtools/undocommands/toggledetailinlayout.h new file mode 100644 index 000000000..ca9833ce0 --- /dev/null +++ b/src/libs/vtools/undocommands/toggledetailinlayout.h @@ -0,0 +1,57 @@ +/************************************************************************ + ** + ** @file toggledetailinlayout.h + ** @author Roman Telezhynskyi + ** @date 25 6, 2016 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2016 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef TOGGLEDETAILINLAYOUT_H +#define TOGGLEDETAILINLAYOUT_H + +#include "vundocommand.h" + +class ToggleDetailInLayout : public VUndoCommand +{ + Q_OBJECT +public: + ToggleDetailInLayout(quint32 id, bool state, VContainer *data, VAbstractPattern *doc, + QUndoCommand *parent = nullptr); + virtual ~ToggleDetailInLayout(); + virtual void undo() Q_DECL_OVERRIDE; + virtual void redo() Q_DECL_OVERRIDE; + virtual bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE; + virtual int id() const Q_DECL_OVERRIDE; + quint32 getDetId() const; + bool getNewState() const; +private: + Q_DISABLE_COPY(ToggleDetailInLayout) + quint32 m_id; + VContainer *m_data; + bool m_oldState; + bool m_newState; + + void Do(bool state); +}; + +#endif // TOGGLEDETAILINLAYOUT_H diff --git a/src/libs/vtools/undocommands/undocommands.pri b/src/libs/vtools/undocommands/undocommands.pri index a20f58d15..39a455dc1 100644 --- a/src/libs/vtools/undocommands/undocommands.pri +++ b/src/libs/vtools/undocommands/undocommands.pri @@ -22,7 +22,8 @@ HEADERS += \ $$PWD/addgroup.h \ $$PWD/delgroup.h \ $$PWD/label/rotationmovelabel.h \ - undocommands/label/moveabstractlabel.h + $$PWD/label/moveabstractlabel.h \ + $$PWD/toggledetailinlayout.h SOURCES += \ $$PWD/addtocalc.cpp \ @@ -45,4 +46,5 @@ SOURCES += \ $$PWD/addgroup.cpp \ $$PWD/delgroup.cpp \ $$PWD/label/rotationmovelabel.cpp \ - undocommands/label/moveabstractlabel.cpp + $$PWD/label/moveabstractlabel.cpp \ + $$PWD/toggledetailinlayout.cpp diff --git a/src/libs/vtools/undocommands/vundocommand.h b/src/libs/vtools/undocommands/vundocommand.h index e86cfce82..241288ad2 100644 --- a/src/libs/vtools/undocommands/vundocommand.h +++ b/src/libs/vtools/undocommands/vundocommand.h @@ -50,7 +50,8 @@ enum class UndoCommand: char { AddPatternPiece, RenamePP, MoveLabel, MoveDoubleLabel, - RotationMoveLabel + RotationMoveLabel, + ToggleDetailInLayout }; class VPattern; From 7450ddf7900336e21e8da28bf75f99e05842b15d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 26 Jun 2016 14:38:44 +0300 Subject: [PATCH 5/8] Set the item non-editable (view only), and non-selectable --HG-- branch : feature --- src/app/valentina/dialogs/vwidgetdetails.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp index c8b636727..fd4ec5cb3 100644 --- a/src/app/valentina/dialogs/vwidgetdetails.cpp +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -115,6 +115,12 @@ void VWidgetDetails::FillTable(const QHash *details) item = new QTableWidgetItem(name); item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter); + + // set the item non-editable (view only), and non-selectable + Qt::ItemFlags flags = item->flags(); + flags &= ~(Qt::ItemIsEditable); // reset/clear the flag + item->setFlags(flags); + ui->tableWidget->setItem(currentRow, 1, item); ++i; } From 5306415d92d7b8171adec35ae905efd09a549712 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 26 Jun 2016 14:45:39 +0300 Subject: [PATCH 6/8] Conversion to new file format. --HG-- branch : feature --- src/libs/ifc/schema.qrc | 1 + src/libs/ifc/schema/pattern/v0.3.2.xsd | 516 +++++++++++++++++++++++++ src/libs/ifc/xml/vpatternconverter.cpp | 17 +- src/libs/ifc/xml/vpatternconverter.h | 1 + 4 files changed, 533 insertions(+), 2 deletions(-) create mode 100644 src/libs/ifc/schema/pattern/v0.3.2.xsd diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc index 5868055e2..fe077d4dc 100644 --- a/src/libs/ifc/schema.qrc +++ b/src/libs/ifc/schema.qrc @@ -15,6 +15,7 @@ schema/pattern/v0.2.7.xsd schema/pattern/v0.3.0.xsd schema/pattern/v0.3.1.xsd + schema/pattern/v0.3.2.xsd schema/standard_measurements/v0.3.0.xsd schema/standard_measurements/v0.4.0.xsd schema/standard_measurements/v0.4.1.xsd diff --git a/src/libs/ifc/schema/pattern/v0.3.2.xsd b/src/libs/ifc/schema/pattern/v0.3.2.xsd new file mode 100644 index 000000000..c4167817b --- /dev/null +++ b/src/libs/ifc/schema/pattern/v0.3.2.xsd @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index 5068702ef..cb16a65fc 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -43,8 +43,8 @@ */ const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.0"); -const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.3.1"); -const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.3.1.xsd"); +const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.3.2"); +const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.3.2.xsd"); //--------------------------------------------------------------------------------------------------------------------- VPatternConverter::VPatternConverter(const QString &fileName) @@ -115,6 +115,8 @@ QString VPatternConverter::XSDSchema(int ver) const case (0x000300): return QStringLiteral("://schema/pattern/v0.3.0.xsd"); case (0x000301): + return QStringLiteral("://schema/pattern/v0.3.1.xsd"); + case (0x000302): return CurrentSchema; default: InvalidVersion(ver); @@ -186,6 +188,10 @@ void VPatternConverter::ApplyPatches() ValidateXML(XSDSchema(0x000301), fileName); V_FALLTHROUGH case (0x000301): + ToV0_3_2(); + ValidateXML(XSDSchema(0x000302), fileName); + V_FALLTHROUGH + case (0x000302): break; default: break; @@ -322,6 +328,13 @@ void VPatternConverter::ToV0_3_1() Save(); } +//--------------------------------------------------------------------------------------------------------------------- +void VPatternConverter::ToV0_3_2() +{ + SetVersion(QStringLiteral("0.3.2")); + Save(); +} + //--------------------------------------------------------------------------------------------------------------------- void VPatternConverter::TagUnitToV0_2_0() { diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 55be6f196..99f3f5638 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -70,6 +70,7 @@ private: void ToV0_2_7(); void ToV0_3_0(); void ToV0_3_1(); + void ToV0_3_2(); void TagUnitToV0_2_0(); void TagIncrementToV0_2_0(); From ca693d8d40607b5c22a9f61a9aa0539e6ca2a061 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 26 Jun 2016 14:50:52 +0300 Subject: [PATCH 7/8] Updated changelog. --HG-- branch : feature --- ChangeLog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 0584eaf8a..4084280d0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -32,6 +32,7 @@ - [#180] New feature: Search field in tape app and dialog Increments. - [#514] Read only setting not working properly. - [#480] New tool: Midpoint between two points. +- [#496] Selector for selecting which pieces to print. # Version 0.4.5 - [#435] Valentina doesn't change the cursor. From 1a7d582a73544c401d55eeab416aab2c10d360e0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 26 Jun 2016 14:51:05 +0300 Subject: [PATCH 8/8] Close feature branch. --HG-- branch : feature