Initial commit for classes working with measurements tables.
--HG-- branch : feature
This commit is contained in:
parent
d06bc59000
commit
e3f412567e
|
@ -324,6 +324,150 @@
|
|||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_neck_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_neck_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_upper-bust_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_upper-bust_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_waist_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_waist_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_upper-hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_upper-hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="chest_slope">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_slope">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_waist_slope">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_waist_slope">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front-neck_to_upper-chest_height">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front-neck_to_bust_height">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="gui_text" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="ignore" type="xs:boolean"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
|
|
@ -58,6 +58,8 @@
|
|||
<back_slope name="" value="0.0" gui_text="" description="" ignore="true"/>
|
||||
<front_waist_slope name="" value="0.0" gui_text="" description="" ignore="true"/>
|
||||
<back_waist_slope name="" value="0.0" gui_text="" description="" ignore="true"/>
|
||||
<front-neck_to_upper-chest_height name="" value="0.0" gui_text="" description="" ignore="true"/>
|
||||
<front-neck_to_bust_height name="" value="0.0" gui_text="" description="" ignore="true"/>
|
||||
</torso>
|
||||
<arm>
|
||||
<armscye_girth name="" value="0.0" gui_text="" description="" ignore="true"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Pattern peace name</string>
|
||||
<string>Pattern piece name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -54,7 +54,9 @@
|
|||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="document-open"/>
|
||||
<iconset theme="document-open">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -88,7 +90,9 @@
|
|||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="document-new"/>
|
||||
<iconset theme="document-new">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pattern peace name</string>
|
||||
<string>Pattern piece name</string>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
|
|
|
@ -54,5 +54,8 @@
|
|||
#include "app/dialogincrements.h"
|
||||
#include "app/configdialog.h"
|
||||
#include "app/dialogpatternproperties.h"
|
||||
#include "app/dialogmeasurements.h"
|
||||
#include "app/dialogindividualmeasurements.h"
|
||||
#include "app/dialogstandardmeasurements.h"
|
||||
|
||||
#endif // DIALOGS_H
|
||||
|
|
|
@ -114,10 +114,43 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
void MainWindow::ActionNewDraw()
|
||||
{
|
||||
const QString nameDraw = PatternPieceName(QString(tr("Pattern piece %1")).arg(comboBoxDraws->count()+1));
|
||||
if (nameDraw.isEmpty())
|
||||
QString nameDraw;
|
||||
if (comboBoxDraws->count() == 0)
|
||||
{
|
||||
return;
|
||||
DialogMeasurements measurements(this);
|
||||
measurements.exec();
|
||||
if (measurements.type() == Measurements::Standard)
|
||||
{
|
||||
DialogStandardMeasurements stMeasurements(this);
|
||||
if (stMeasurements.exec() == QDialog::Accepted)
|
||||
{
|
||||
nameDraw = stMeasurements.name();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DialogIndividualMeasurements indMeasurements(this);
|
||||
if (indMeasurements.exec() == QDialog::Accepted)
|
||||
{
|
||||
nameDraw = indMeasurements.name();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nameDraw = PatternPieceName(QString(tr("Pattern piece %1")).arg(comboBoxDraws->count()+1));
|
||||
if (nameDraw.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (doc->appendDraw(nameDraw) == false)
|
||||
{
|
||||
|
|
33
src/xml/vindividualmeasurements.cpp
Normal file
33
src/xml/vindividualmeasurements.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vindividualmeasurements.cpp
|
||||
** @author Roman Telezhinsky <dismine@gmail.com>
|
||||
** @date 8 3, 2014
|
||||
**
|
||||
** @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) 2013 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> 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 <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "vindividualmeasurements.h"
|
||||
|
||||
VIndividualMeasurements::VIndividualMeasurements(VContainer *data):VDomDocument(data)
|
||||
{
|
||||
}
|
40
src/xml/vindividualmeasurements.h
Normal file
40
src/xml/vindividualmeasurements.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vindividualmeasurements.h
|
||||
** @author Roman Telezhinsky <dismine@gmail.com>
|
||||
** @date 8 3, 2014
|
||||
**
|
||||
** @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) 2013 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> 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 <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef VINDIVIDUALMEASUREMENTS_H
|
||||
#define VINDIVIDUALMEASUREMENTS_H
|
||||
|
||||
#include "vdomdocument.h"
|
||||
|
||||
class VIndividualMeasurements:public VDomDocument
|
||||
{
|
||||
public:
|
||||
VIndividualMeasurements(VContainer *data);
|
||||
};
|
||||
|
||||
#endif // VINDIVIDUALMEASUREMENTS_H
|
33
src/xml/vstandardmeasurements.cpp
Normal file
33
src/xml/vstandardmeasurements.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vstandardmeasurements.cpp
|
||||
** @author Roman Telezhinsky <dismine@gmail.com>
|
||||
** @date 8 3, 2014
|
||||
**
|
||||
** @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) 2013 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> 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 <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "vstandardmeasurements.h"
|
||||
|
||||
VStandardMeasurements::VStandardMeasurements(VContainer *data):VDomDocument(data)
|
||||
{
|
||||
}
|
40
src/xml/vstandardmeasurements.h
Normal file
40
src/xml/vstandardmeasurements.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vstandardmeasurements.h
|
||||
** @author Roman Telezhinsky <dismine@gmail.com>
|
||||
** @date 8 3, 2014
|
||||
**
|
||||
** @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) 2013 Valentina project
|
||||
** <https://bitbucket.org/dismine/valentina> 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 <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef VSTANDARDMEASUREMENTS_H
|
||||
#define VSTANDARDMEASUREMENTS_H
|
||||
|
||||
#include "vdomdocument.h"
|
||||
|
||||
class VStandardMeasurements:public VDomDocument
|
||||
{
|
||||
public:
|
||||
VStandardMeasurements(VContainer *data);
|
||||
};
|
||||
|
||||
#endif // VSTANDARDMEASUREMENTS_H
|
|
@ -1,9 +1,13 @@
|
|||
HEADERS += \
|
||||
src/xml/vtoolrecord.h \
|
||||
src/xml/vdomdocument.h \
|
||||
src/xml/vpattern.h
|
||||
src/xml/vpattern.h \
|
||||
src/xml/vstandardmeasurements.h \
|
||||
src/xml/vindividualmeasurements.h
|
||||
|
||||
SOURCES += \
|
||||
src/xml/vtoolrecord.cpp \
|
||||
src/xml/vdomdocument.cpp \
|
||||
src/xml/vpattern.cpp
|
||||
src/xml/vpattern.cpp \
|
||||
src/xml/vstandardmeasurements.cpp \
|
||||
src/xml/vindividualmeasurements.cpp
|
||||
|
|
Loading…
Reference in New Issue
Block a user