Dialog Measurements.

--HG--
branch : feature
This commit is contained in:
dismine 2014-02-21 14:04:07 +02:00
parent a00df0fc49
commit 49a45e9d57
7 changed files with 266 additions and 3 deletions

View file

@ -50,5 +50,7 @@
<file>icon/flags/he_IL.png</file>
<file>icon/flags/ru.png</file>
<file>icon/flags/uk.png</file>
<file>icon/Graduation.png</file>
<file>icon/individual.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,60 @@
/************************************************************************
**
** @file dialogpatterntype.cpp
** @author Roman Telezhinsky <dismine@gmail.com>
** @date 21 2, 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 "dialogmeasurements.h"
#include "ui_dialogmeasurements.h"
DialogMeasurements::DialogMeasurements(QWidget *parent) :
QDialog(parent), ui(new Ui::DialogMeasurements), result(Measurements::Individual)
{
ui->setupUi(this);
connect(ui->toolButtonStandard, &QToolButton::clicked, this, &DialogMeasurements::StandardMeasurements);
connect(ui->toolButtonIndividual, &QToolButton::clicked, this, &DialogMeasurements::IndividualMeasurements);
}
DialogMeasurements::~DialogMeasurements()
{
delete ui;
}
Measurements::Type DialogMeasurements::type() const
{
return result;
}
void DialogMeasurements::StandardMeasurements()
{
result = Measurements::Standard;
accept();
}
void DialogMeasurements::IndividualMeasurements()
{
result = Measurements::Individual;
accept();
}

View file

@ -0,0 +1,63 @@
/************************************************************************
**
** @file dialogpatterntype.h
** @author Roman Telezhinsky <dismine@gmail.com>
** @date 21 2, 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 DIALOGMEASUREMENTS_H
#define DIALOGMEASUREMENTS_H
#include <QDialog>
namespace Ui {
class DialogMeasurements;
}
namespace Measurements
{
/**
* @brief The Type enum pattern measurements.
*/
enum Type { Standard, Individual };
Q_DECLARE_FLAGS(Types, Type)
}
Q_DECLARE_OPERATORS_FOR_FLAGS( Measurements::Types )
class DialogMeasurements : public QDialog
{
Q_OBJECT
public:
explicit DialogMeasurements(QWidget *parent = 0);
~DialogMeasurements();
Measurements::Type type() const;
private:
Q_DISABLE_COPY(DialogMeasurements)
Ui::DialogMeasurements *ui;
Measurements::Type result;
void StandardMeasurements();
void IndividualMeasurements();
};
#endif // DIALOGMEASUREMENTS_H

View file

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogMeasurements</class>
<widget class="QDialog" name="DialogMeasurements">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>385</width>
<height>244</height>
</rect>
</property>
<property name="windowTitle">
<string>Measurements</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:18pt;&quot;&gt;Please, choose pattern type.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>13</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<widget class="QToolButton" name="toolButtonStandard">
<property name="text">
<string>Graduation</string>
</property>
<property name="icon">
<iconset resource="../../share/resources/icon.qrc">
<normaloff>:/icon/Graduation.png</normaloff>:/icon/Graduation.png</iconset>
</property>
<property name="iconSize">
<size>
<width>160</width>
<height>120</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Use for creation pattern standard measurement table</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<widget class="QToolButton" name="toolButtonIndividual">
<property name="text">
<string>Individual</string>
</property>
<property name="icon">
<iconset resource="../../share/resources/icon.qrc">
<normaloff>:/icon/individual.png</normaloff>:/icon/individual.png</iconset>
</property>
<property name="iconSize">
<size>
<width>160</width>
<height>120</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Use for creation pattern individual measurements</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../../share/resources/icon.qrc"/>
</resources>
<connections/>
</ui>

View file

@ -25,7 +25,8 @@ HEADERS += \
src/dialogs/dialogcutarc.h \
src/dialogs/configdialog.h \
src/dialogs/pages.h \
src/dialogs/dialogpatternproperties.h
src/dialogs/dialogpatternproperties.h \
src/dialogs/dialogmeasurements.h
SOURCES += \
src/dialogs/dialogtriangle.cpp \
@ -53,7 +54,8 @@ SOURCES += \
src/dialogs/dialogcutarc.cpp \
src/dialogs/configdialog.cpp \
src/dialogs/pages.cpp \
src/dialogs/dialogpatternproperties.cpp
src/dialogs/dialogpatternproperties.cpp \
src/dialogs/dialogmeasurements.cpp
FORMS += \
src/dialogs/dialogtriangle.ui \
@ -78,4 +80,5 @@ FORMS += \
src/dialogs/dialogcutsplinepath.ui \
src/dialogs/dialoguniondetails.ui \
src/dialogs/dialogcutarc.ui \
src/dialogs/dialogpatternproperties.ui
src/dialogs/dialogpatternproperties.ui \
src/dialogs/dialogmeasurements.ui