Merge with develop.
--HG-- branch : DialogTools
This commit is contained in:
commit
3d0d616db0
6
README
6
README
|
@ -13,14 +13,14 @@ Supported Platforms
|
|||
The standalone binary packages support the following platforms:
|
||||
|
||||
Windows XP SP2 or later
|
||||
Ubuntu Linux 11.10 (32-bit) or later
|
||||
Ubuntu Linux 14.04 (32-bit) or later
|
||||
|
||||
Building the sources requires Qt 5.1.0 or later.
|
||||
Building the sources requires Qt 5.2.1 or later.
|
||||
|
||||
Compiling Valentina
|
||||
====================
|
||||
Prerequisites:
|
||||
* Qt 5.1.0 or later (On Unix development packages needed)
|
||||
* Qt 5.2.1 or later (On Unix development packages needed)
|
||||
* mercurial
|
||||
* On Unix:
|
||||
- ccache
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
include(Valentina.pri)
|
||||
|
||||
#version check qt
|
||||
!minQtVersion(5, 1, 0) {
|
||||
!minQtVersion(5, 2, 1) {
|
||||
message("Cannot build Valentina with Qt version $${QT_VERSION}.")
|
||||
error("Use at least Qt 5.1.0.")
|
||||
error("Use at least Qt 5.2.1.")
|
||||
}
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
|
14
dist/debian/valentina.1
vendored
14
dist/debian/valentina.1
vendored
|
@ -1,13 +1,19 @@
|
|||
.\" Manpage for valentina.
|
||||
.\" Contact dismine@gmail.com.in to correct errors.
|
||||
.TH man 1 "25 Nov 2013" "1.0" "valentina man page"
|
||||
.TH man 1 "29 May 2014" "valentina man page"
|
||||
.SH NAME
|
||||
valentina \- Pattern making program.
|
||||
.SH SYNOPSIS
|
||||
valentina
|
||||
valentina [options] file
|
||||
.SH DESCRIPTION
|
||||
Open source project of creating a pattern making program, whose allow create and modeling patterns of clothing.
|
||||
.SH OPTIONS
|
||||
The valentina does not take any options.
|
||||
-help Show summary of options.
|
||||
|
||||
-version
|
||||
Show version of program.
|
||||
|
||||
file
|
||||
Pattern file to load.
|
||||
.SH AUTHOR
|
||||
Roman Telezhinsky (dismine@gmail.com)
|
||||
This manual page was written by Roman Telezhynskyi <dismine@gmail.com>
|
||||
|
|
|
@ -219,9 +219,9 @@ for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
|
|||
|
||||
copyToDestdir($$st_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/standard))
|
||||
|
||||
win32:CONFIG(release, debug|release): LIBS += -L../libs/qmuparser/bin -lqmuparser2
|
||||
else:win32:CONFIG(debug, debug|release): LIBS += -L../libs/qmuparser/bin -lqmuparser2
|
||||
else:unix: LIBS += -L../libs/qmuparser/bin -lqmuparser
|
||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../libs/qmuparser/bin -lqmuparser2
|
||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../libs/qmuparser/bin -lqmuparser2
|
||||
else:unix: LIBS += -L$$OUT_PWD/../libs/qmuparser/bin -lqmuparser
|
||||
|
||||
INCLUDEPATH += ../libs/qmuparser
|
||||
DEPENDPATH += ../libs/qmuparser
|
||||
INCLUDEPATH += $$PWD/../libs/qmuparser
|
||||
DEPENDPATH += $$PWD/../libs/qmuparser
|
||||
|
|
|
@ -28,13 +28,24 @@
|
|||
|
||||
#include "calculator.h"
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
#include "../widgets/vapplication.h"
|
||||
|
||||
int Calculator::iVal = -1;
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief Calculator class constructor.
|
||||
* @brief Calculator class constructor. Make easy initialization math parser.
|
||||
*
|
||||
* This constructor hide initialization variables, operators, character sets.
|
||||
* Use this constuctor for evaluation formula. All formulas must be converted to internal look.
|
||||
* Example:
|
||||
*
|
||||
* const QString formula = qApp->FormulaFromUser(edit->text());
|
||||
* Calculator *cal = new Calculator(data);
|
||||
* const qreal result = cal->EvalFormula(formula);
|
||||
* delete cal;
|
||||
*
|
||||
* @param data pointer to a variable container.
|
||||
*/
|
||||
Calculator::Calculator(const VContainer *data)
|
||||
|
@ -55,6 +66,21 @@ Calculator::Calculator(const VContainer *data)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief Calculator class constructor. Make easy initialization math parser.
|
||||
*
|
||||
* This constructor hide initialization variables, operators, character sets.
|
||||
* Use this constuctor to get tokens from formula. All formulas must be converted to external look.
|
||||
* Example:
|
||||
*
|
||||
* Calculator *cal = new Calculator(formula, false);
|
||||
* tokens = cal->GetTokens();
|
||||
* numbers = cal->GetNumbers();
|
||||
* delete cal;
|
||||
*
|
||||
* @param data pointer to a variable container.
|
||||
* @param fromUser true if we parse formula from user
|
||||
*/
|
||||
Calculator::Calculator(const QString &formula, bool fromUser)
|
||||
:QmuParser(), vVarVal(nullptr)
|
||||
{
|
||||
|
@ -68,10 +94,22 @@ Calculator::Calculator(const QString &formula, bool fromUser)
|
|||
DefinePostfixOprt(qApp->PostfixOperator(mm_Oprt), MmUnit);
|
||||
DefinePostfixOprt(qApp->PostfixOperator(in_Oprt), InchUnit);
|
||||
|
||||
QLocale loc = QLocale::system();
|
||||
SetDecSep(loc.decimalPoint().toLatin1());
|
||||
SetThousandsSep(loc.groupSeparator().toLatin1());
|
||||
SetArgSep(';');
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
||||
QApplication::applicationName());
|
||||
bool osSeparatorValue = settings.value("configuration/osSeparator", 1).toBool();
|
||||
|
||||
if (osSeparatorValue)
|
||||
{
|
||||
QLocale loc = QLocale::system();
|
||||
SetDecSep(loc.decimalPoint().toLatin1());
|
||||
SetThousandsSep(loc.groupSeparator().toLatin1());
|
||||
SetArgSep(';');
|
||||
}
|
||||
else
|
||||
{
|
||||
SetArgSep(',');
|
||||
SetDecSep('.');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -84,14 +122,8 @@ Calculator::Calculator(const QString &formula, bool fromUser)
|
|||
}
|
||||
|
||||
SetExpr(formula);
|
||||
try
|
||||
{
|
||||
Eval();//Need run for making tokens
|
||||
}
|
||||
catch(qmu::QmuParserError &e)
|
||||
{
|
||||
return;//Ignore all warnings
|
||||
}
|
||||
//Need run for making tokens. Don't catch exception here, because it will show us in dialog that formula has error.
|
||||
Eval();
|
||||
}
|
||||
|
||||
Calculator::~Calculator()
|
||||
|
@ -204,15 +236,13 @@ void Calculator::InitVariables(const VContainer *data)
|
|||
if (qApp->patternType() == Pattern::Standard)
|
||||
{
|
||||
vVarVal[j] = i.value().GetValue(data->size(), data->height());
|
||||
DefineVar(i.key(), &vVarVal[j]);
|
||||
++j;
|
||||
}
|
||||
else
|
||||
{
|
||||
vVarVal[j] = i.value().GetValue();
|
||||
DefineVar(i.key(), &vVarVal[j]);
|
||||
++j;
|
||||
}
|
||||
DefineVar(i.key(), &vVarVal[j]);
|
||||
++j;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
@ -224,20 +254,19 @@ void Calculator::InitVariables(const VContainer *data)
|
|||
if (qApp->patternType() == Pattern::Standard)
|
||||
{
|
||||
vVarVal[j] = i.value().GetValue(data->size(), data->height());
|
||||
DefineVar(i.key(), &vVarVal[j]);
|
||||
++j;
|
||||
}
|
||||
else
|
||||
{
|
||||
vVarVal[j] = i.value().GetValue();
|
||||
DefineVar(i.key(), &vVarVal[j]);
|
||||
++j;
|
||||
}
|
||||
DefineVar(i.key(), &vVarVal[j]);
|
||||
++j;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void Calculator::InitCharacterSets()
|
||||
{
|
||||
//String with all unique symbols for supported alpabets.
|
||||
|
|
|
@ -34,6 +34,25 @@
|
|||
#include "../../libs/qmuparser/qmuparser.h"
|
||||
using namespace qmu;
|
||||
|
||||
/**
|
||||
* @brief The Calculator class for calculation formula.
|
||||
*
|
||||
* Main purpose make easy evaluate value of formula and get tokens.
|
||||
* Note. If created to many parser for different purpes in the same time parser can work wrong.
|
||||
* Example:
|
||||
* DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data);
|
||||
* dialog->setFormula(formula);
|
||||
* if (dialog->exec() == QDialog::Accepted)
|
||||
* {
|
||||
* formula = dialog->getFormula();
|
||||
* //Need delete dialog here because parser in dialog don't allow use correct separator for parsing here.
|
||||
* //Don't know why.
|
||||
* delete dialog;
|
||||
* Calculator *cal = new Calculator(data);
|
||||
* result = cal->EvalFormula(formula);
|
||||
* delete cal;//Here can be memory leak, but dialog already check this formula and probability very low.
|
||||
* }
|
||||
*/
|
||||
class Calculator:public QmuParser
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -136,8 +136,7 @@ void DialogStandardMeasurements::CheckState()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogStandardMeasurements::LoadStandardTables()
|
||||
{
|
||||
QStringList filters;
|
||||
filters << "*.vst";
|
||||
QStringList filters{"*.vst"};
|
||||
QDir tablesDir(qApp->pathToTables());
|
||||
tablesDir.setNameFilters(filters);
|
||||
tablesDir.setCurrent(qApp->pathToTables());
|
||||
|
|
|
@ -51,7 +51,7 @@ void ConfigurationPage::Apply()
|
|||
QApplication::applicationName());
|
||||
settings.setValue("configuration/autosave/state", autoSaveCheck->isChecked());
|
||||
settings.setValue("configuration/autosave/time", autoTime->value());
|
||||
//settings.setValue("configuration/osSeparator", osOptionCheck->isChecked());
|
||||
settings.setValue("configuration/osSeparator", osOptionCheck->isChecked());
|
||||
if (langChanged)
|
||||
{
|
||||
QString locale = qvariant_cast<QString>(langCombo->itemData(langCombo->currentIndex()));
|
||||
|
@ -157,10 +157,9 @@ QGroupBox *ConfigurationPage::LangGroup()
|
|||
|
||||
QLabel *separatorLabel = new QLabel(tr("Decimal separator parts"));
|
||||
|
||||
osOptionCheck = new QCheckBox(tr("With OS options (.)"));
|
||||
//bool osOptionValue = settings.value("configuration/osSeparator", 1).toBool();
|
||||
//osOptionCheck->setChecked(osOptionValue);
|
||||
osOptionCheck->setEnabled(false);
|
||||
osOptionCheck = new QCheckBox(tr("With OS options (%1)").arg(QLocale::system().decimalPoint().toLatin1()));
|
||||
bool osOptionValue = settings.value("configuration/osSeparator", 1).toBool();
|
||||
osOptionCheck->setChecked(osOptionValue);
|
||||
|
||||
QHBoxLayout *separatorLayout = new QHBoxLayout;
|
||||
separatorLayout->addWidget(separatorLabel);
|
||||
|
|
|
@ -29,7 +29,8 @@ HEADERS += \
|
|||
dialogs/app/dialogmeasurements.h \
|
||||
dialogs/app/dialogstandardmeasurements.h \
|
||||
dialogs/app/dialogindividualmeasurements.h \
|
||||
dialogs/app/dialogaboutapp.h
|
||||
dialogs/app/dialogaboutapp.h \
|
||||
dialogs/tools/dialogeditwrongformula.h
|
||||
|
||||
SOURCES += \
|
||||
dialogs/tools/dialogtriangle.cpp \
|
||||
|
@ -61,7 +62,8 @@ SOURCES += \
|
|||
dialogs/app/dialogmeasurements.cpp \
|
||||
dialogs/app/dialogstandardmeasurements.cpp \
|
||||
dialogs/app/dialogindividualmeasurements.cpp \
|
||||
dialogs/app/dialogaboutapp.cpp
|
||||
dialogs/app/dialogaboutapp.cpp \
|
||||
dialogs/tools/dialogeditwrongformula.cpp
|
||||
|
||||
FORMS += \
|
||||
dialogs/tools/dialogtriangle.ui \
|
||||
|
@ -90,4 +92,5 @@ FORMS += \
|
|||
dialogs/app/dialogmeasurements.ui \
|
||||
dialogs/app/dialogstandardmeasurements.ui \
|
||||
dialogs/app/dialogindividualmeasurements.ui \
|
||||
dialogs/app/dialogaboutapp.ui
|
||||
dialogs/app/dialogaboutapp.ui \
|
||||
dialogs/tools/dialogeditwrongformula.ui
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>470</width>
|
||||
<height>573</height>
|
||||
<height>675</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -252,6 +252,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxLineType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show line from first point to this point</string>
|
||||
</property>
|
||||
|
@ -270,6 +276,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -280,6 +292,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -287,6 +305,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -294,6 +318,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -304,6 +334,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -314,6 +350,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>501</width>
|
||||
<height>538</height>
|
||||
<height>705</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -447,6 +447,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -457,6 +463,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -464,6 +476,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -474,6 +492,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -484,6 +508,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -494,6 +524,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
@ -504,6 +540,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Angle of lines</string>
|
||||
</property>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>480</width>
|
||||
<height>587</height>
|
||||
<height>686</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -309,6 +309,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -319,6 +325,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -326,6 +338,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -336,6 +354,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -346,6 +370,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -356,6 +386,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
#include "ui_dialogcutarc.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief DialogCutArc create dialog.
|
||||
* @param data container with data
|
||||
* @param parent parent widget
|
||||
*/
|
||||
DialogCutArc::DialogCutArc(const VContainer *data, QWidget *parent) :
|
||||
DialogTool(data, parent), ui(new Ui::DialogCutArc), pointName(QString()), formula(QString()), arcId(0)
|
||||
{
|
||||
|
@ -62,6 +67,11 @@ DialogCutArc::~DialogCutArc()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
||||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
void DialogCutArc::ChoosedObject(quint32 id, const Valentina::Scenes &type)
|
||||
{
|
||||
if (type == Valentina::Arc)
|
||||
|
@ -74,6 +84,9 @@ void DialogCutArc::ChoosedObject(quint32 id, const Valentina::Scenes &type)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief DialogAccepted save data and emit signal about closed dialog.
|
||||
*/
|
||||
void DialogCutArc::DialogAccepted()
|
||||
{
|
||||
pointName = ui->lineEditNamePoint->text();
|
||||
|
@ -83,12 +96,21 @@ void DialogCutArc::DialogAccepted()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief setArcId set id of arc
|
||||
* @param value id
|
||||
* @param id don't show this id in list
|
||||
*/
|
||||
void DialogCutArc::setArcId(const quint32 &value, const quint32 &id)
|
||||
{
|
||||
setCurrentArcId(ui->comboBoxArc, arcId, value, id, ComboMode::CutArc);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief setFormula set string with formula length
|
||||
* @param value string with formula
|
||||
*/
|
||||
void DialogCutArc::setFormula(const QString &value)
|
||||
{
|
||||
formula = qApp->FormulaToUser(value);
|
||||
|
@ -96,8 +118,22 @@ void DialogCutArc::setFormula(const QString &value)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief setPointName set name point on arc
|
||||
* @param value name
|
||||
*/
|
||||
void DialogCutArc::setPointName(const QString &value)
|
||||
{
|
||||
pointName = value;
|
||||
ui->lineEditNamePoint->setText(pointName);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief getFormula return string with formula length
|
||||
* @return formula
|
||||
*/
|
||||
QString DialogCutArc::getFormula() const
|
||||
{
|
||||
return qApp->FormulaFromUser(formula);
|
||||
}
|
||||
|
|
|
@ -43,54 +43,17 @@ class DialogCutArc : public DialogTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* @brief DialogCutArc create dialog.
|
||||
* @param data container with data
|
||||
* @param parent parent widget
|
||||
*/
|
||||
|
||||
DialogCutArc(const VContainer *data, QWidget *parent = nullptr);
|
||||
~DialogCutArc();
|
||||
/**
|
||||
* @brief getPointName return name point on arc
|
||||
* @return name
|
||||
*/
|
||||
QString getPointName() const {return pointName;}
|
||||
/**
|
||||
* @brief setPointName set name point on arc
|
||||
* @param value name
|
||||
*/
|
||||
QString getPointName() const;
|
||||
void setPointName(const QString &value);
|
||||
/**
|
||||
* @brief getFormula return string with formula length
|
||||
* @return formula
|
||||
*/
|
||||
QString getFormula() const {return qApp->FormulaFromUser(formula);}
|
||||
/**
|
||||
* @brief setFormula set string with formula length
|
||||
* @param value string with formula
|
||||
*/
|
||||
QString getFormula() const;
|
||||
void setFormula(const QString &value);
|
||||
/**
|
||||
* @brief getArcId return id of arc
|
||||
* @return id
|
||||
*/
|
||||
quint32 getArcId() const {return arcId;}
|
||||
/**
|
||||
* @brief setArcId set id of arc
|
||||
* @param value id
|
||||
* @param id don't show this id in list
|
||||
*/
|
||||
quint32 getArcId() const;
|
||||
void setArcId(const quint32 &value, const quint32 &id);
|
||||
public slots:
|
||||
/**
|
||||
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
||||
* @param id id of point or detail
|
||||
* @param type type of object
|
||||
*/
|
||||
virtual void ChoosedObject(quint32 id, const Valentina::Scenes &type);
|
||||
/**
|
||||
* @brief DialogAccepted save data and emit signal about closed dialog.
|
||||
*/
|
||||
virtual void DialogAccepted();
|
||||
/** TODO ISSUE 79 : create real function
|
||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
||||
|
@ -116,4 +79,24 @@ private:
|
|||
quint32 arcId;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief getPointName return name point on arc
|
||||
* @return name
|
||||
*/
|
||||
inline QString DialogCutArc::getPointName() const
|
||||
{
|
||||
return pointName;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief getArcId return id of arc
|
||||
* @return id
|
||||
*/
|
||||
inline quint32 DialogCutArc::getArcId() const
|
||||
{
|
||||
return arcId;
|
||||
}
|
||||
|
||||
#endif // DIALOGCUTARC_H
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>507</width>
|
||||
<height>493</height>
|
||||
<height>597</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Cut arc</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
@ -236,6 +236,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -246,6 +252,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -253,6 +265,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -263,6 +281,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -273,6 +297,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -283,6 +313,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Cut curve</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
@ -236,6 +236,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -246,6 +252,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -253,6 +265,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -263,6 +281,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -273,6 +297,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -283,6 +313,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Cut curve path</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
@ -236,6 +236,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -246,6 +252,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -253,6 +265,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -263,6 +281,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -273,6 +297,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -283,6 +313,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
103
src/app/dialogs/tools/dialogeditwrongformula.cpp
Normal file
103
src/app/dialogs/tools/dialogeditwrongformula.cpp
Normal file
|
@ -0,0 +1,103 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file dialogeditwrongformula.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 29 5, 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) 2014 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 "dialogeditwrongformula.h"
|
||||
#include "ui_dialogeditwrongformula.h"
|
||||
|
||||
#include <container/calculator.h>
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, QWidget *parent)
|
||||
:DialogTool(data, parent), ui(new Ui::DialogEditWrongFormula), formula(QString())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
InitVariables(ui);
|
||||
labelResultCalculation = ui->labelResult;
|
||||
lineEditFormula = ui->lineEditFormula;
|
||||
labelEditFormula = ui->labelFormula;
|
||||
|
||||
InitOkCancel(ui);
|
||||
flagFormula = false;
|
||||
CheckState();
|
||||
|
||||
|
||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogEditWrongFormula::PutHere);
|
||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogEditWrongFormula::PutVal);
|
||||
|
||||
connect(ui->toolButtonEqual, &QPushButton::clicked, this, &DialogEditWrongFormula::EvalFormula);
|
||||
connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogEditWrongFormula::FormulaChanged);
|
||||
|
||||
//Disable Qt::WaitCursor
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogEditWrongFormula::~DialogEditWrongFormula()
|
||||
{
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
#endif
|
||||
delete ui;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogEditWrongFormula::DialogAccepted()
|
||||
{
|
||||
formula = ui->lineEditFormula->text();
|
||||
emit DialogClosed(QDialog::Accepted);
|
||||
accepted();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogEditWrongFormula::DialogRejected()
|
||||
{
|
||||
emit DialogClosed(QDialog::Rejected);
|
||||
rejected();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogEditWrongFormula::CheckState()
|
||||
{
|
||||
Q_CHECK_PTR(bOk);
|
||||
bOk->setEnabled(flagFormula);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogEditWrongFormula::setFormula(const QString &value)
|
||||
{
|
||||
formula = qApp->FormulaToUser(value);
|
||||
ui->lineEditFormula->setText(formula);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString DialogEditWrongFormula::getFormula() const
|
||||
{
|
||||
return qApp->FormulaFromUser(formula);
|
||||
}
|
69
src/app/dialogs/tools/dialogeditwrongformula.h
Normal file
69
src/app/dialogs/tools/dialogeditwrongformula.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file dialogeditwrongformula.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 29 5, 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) 2014 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 DIALOGEDITWRONGFORMULA_H
|
||||
#define DIALOGEDITWRONGFORMULA_H
|
||||
|
||||
#include "dialogtool.h"
|
||||
|
||||
namespace Ui {
|
||||
class DialogEditWrongFormula;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The DialogEditWrongFormula class dialog for editing wrong formula.
|
||||
*
|
||||
* When math parser find in formula error user can try fix issue. Dialog will show all variables that user can use in
|
||||
* this formula. Dialog check fixed variant of formula.
|
||||
*
|
||||
* Don't implemant button "Apply" for this dialog!!
|
||||
*/
|
||||
class DialogEditWrongFormula : public DialogTool
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DialogEditWrongFormula(const VContainer *data, QWidget *parent = nullptr);
|
||||
~DialogEditWrongFormula();
|
||||
QString getFormula() const;
|
||||
void setFormula(const QString &value);
|
||||
public slots:
|
||||
virtual void DialogAccepted();
|
||||
virtual void DialogRejected();
|
||||
protected:
|
||||
virtual void CheckState();
|
||||
private:
|
||||
Q_DISABLE_COPY(DialogEditWrongFormula)
|
||||
Ui::DialogEditWrongFormula *ui;
|
||||
/**
|
||||
* @brief formula string with formula
|
||||
*/
|
||||
QString formula;
|
||||
};
|
||||
|
||||
|
||||
#endif // DIALOGEDITWRONGFORMULA_H
|
347
src/app/dialogs/tools/dialogeditwrongformula.ui
Normal file
347
src/app/dialogs/tools/dialogeditwrongformula.ui
Normal file
|
@ -0,0 +1,347 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogEditWrongFormula</class>
|
||||
<widget class="QDialog" name="DialogEditWrongFormula">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>607</width>
|
||||
<height>535</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Edit wrong formula</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelFormula">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>159</red>
|
||||
<green>158</green>
|
||||
<blue>158</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Formula</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditFormula">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>First angle of arc counterclockwise</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonPutHere">
|
||||
<property name="toolTip">
|
||||
<string>Insert variable into formula</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../share/resources/icon.qrc">
|
||||
<normaloff>:/icon/24x24/putHereLeft.png</normaloff>:/icon/24x24/putHereLeft.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonEqual">
|
||||
<property name="toolTip">
|
||||
<string>Calculate value</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../share/resources/icon.qrc">
|
||||
<normaloff>:/icon/24x24/equal.png</normaloff>:/icon/24x24/equal.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelResult">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>87</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Value of first angle</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>_</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Input data</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonLineAngles">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Angle of lines</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="toolTip">
|
||||
<string>Variables</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelDescription">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../share/resources/icon.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>DialogEditWrongFormula</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>DialogEditWrongFormula</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -522,7 +522,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -538,7 +538,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -551,7 +551,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -567,7 +567,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -583,7 +583,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -599,7 +599,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Height</string>
|
||||
</property>
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
|
|
|
@ -484,6 +484,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -494,6 +500,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -501,6 +513,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -511,6 +529,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -521,6 +545,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -531,6 +561,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
|
@ -324,6 +324,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -334,6 +340,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -341,6 +353,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -351,6 +369,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -361,6 +385,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
|
@ -371,6 +401,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Point of intersection</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
|
|
@ -345,6 +345,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size and height</string>
|
||||
</property>
|
||||
|
@ -355,6 +361,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Standard table</string>
|
||||
</property>
|
||||
|
@ -362,6 +374,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Increments</string>
|
||||
</property>
|
||||
|
@ -372,6 +390,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -382,6 +406,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
</property>
|
||||
|
@ -392,6 +422,12 @@
|
|||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of curves</string>
|
||||
</property>
|
||||
|
|
|
@ -374,11 +374,24 @@ void DialogTool::Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label)
|
|||
try
|
||||
{
|
||||
const QString formula = qApp->FormulaFromUser(edit->text());
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
Calculator *cal = new Calculator(data);
|
||||
const qreal result = cal->EvalFormula(formula);
|
||||
delete cal;
|
||||
|
||||
QLocale loc = QLocale::system();
|
||||
label->setText(loc.toString(result));
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
||||
QApplication::applicationName());
|
||||
bool osSeparatorValue = settings.value("configuration/osSeparator", 1).toBool();
|
||||
|
||||
if (osSeparatorValue)
|
||||
{
|
||||
QLocale loc = QLocale::system();
|
||||
label->setText(loc.toString(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
QLocale loc = QLocale(QLocale::C);
|
||||
label->setText(loc.toString(result));
|
||||
}
|
||||
flag = true;
|
||||
palette.setColor(labelEditFormula->foregroundRole(), QColor(76, 76, 76));
|
||||
emit ToolTip("");
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Triangle</string>
|
||||
</property>
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Union details</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
|
|
|
@ -66,6 +66,10 @@ void VException::CriticalMessageBox(const QString &situation, QWidget * parent)
|
|||
QGridLayout* layout = static_cast<QGridLayout*>(msgBox.layout());
|
||||
Q_CHECK_PTR(layout);
|
||||
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
|
||||
//Disable Qt::WaitCursor for error message.
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
msgBox.exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -74,9 +74,8 @@ void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context, c
|
|||
switch (type)
|
||||
{
|
||||
case QtDebugMsg:
|
||||
fprintf(stderr, "Debug: %s\n", localMsg.constData());
|
||||
// fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line,
|
||||
// context.function);
|
||||
fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line,
|
||||
context.function);
|
||||
return;
|
||||
case QtWarningMsg:
|
||||
messageBox.setIcon(QMessageBox::Warning);
|
||||
|
@ -126,7 +125,7 @@ int main(int argc, char *argv[])
|
|||
Q_INIT_RESOURCE(schema);
|
||||
Q_INIT_RESOURCE(theme);
|
||||
|
||||
QT_REQUIRE_VERSION(argc, argv, "5.1.0");
|
||||
QT_REQUIRE_VERSION(argc, argv, "5.2.1");
|
||||
|
||||
VApplication app(argc, argv);
|
||||
#ifdef QT_DEBUG
|
||||
|
@ -175,36 +174,18 @@ int main(int argc, char *argv[])
|
|||
QObject::connect(&w, &MainWindow::ModelChosen, &table, &TableWindow::ModelChosen);
|
||||
QObject::connect(&table, &TableWindow::closed, &w, &MainWindow::tableClosed);
|
||||
|
||||
const QStringList args = app.arguments();
|
||||
QString fileName;
|
||||
QRegExp rxArgOpenFile("-o");//parameter open file
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QCoreApplication::translate("main", "Pattern making program."));
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.addPositionalArgument("filename", QCoreApplication::translate("main", "Pattern file."));
|
||||
parser.process(app);
|
||||
const QStringList args = parser.positionalArguments();
|
||||
if (args.size() > 0)
|
||||
{
|
||||
w.LoadPattern(args.at(0));
|
||||
|
||||
if (args.size()>1)
|
||||
{
|
||||
for (int i = 1; i < args.size(); ++i)
|
||||
{
|
||||
if (rxArgOpenFile.indexIn(args.at(i)) != -1 )
|
||||
{
|
||||
if (args.at(i+1).isEmpty() == false)
|
||||
{
|
||||
fileName = args.at(i+1);
|
||||
qDebug() << args.at(i)<< ":" << fileName;
|
||||
w.LoadPattern(fileName);
|
||||
}
|
||||
w.show();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "Uknown arg:" << args.at(i);
|
||||
w.show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
w.show();
|
||||
}
|
||||
w.show();
|
||||
return app.exec();
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
doc = new VPattern(pattern, comboBoxDraws, &mode);
|
||||
connect(doc, &VPattern::patternChanged, this, &MainWindow::PatternWasModified);
|
||||
connect(doc, &VPattern::ClearMainWindow, this, &MainWindow::Clear);
|
||||
|
||||
InitAutoSave();
|
||||
|
||||
|
@ -889,9 +890,8 @@ void MainWindow::ToolBarOption()
|
|||
{
|
||||
ui->toolBarOption->addWidget(new QLabel(tr("Height: ")));
|
||||
|
||||
QStringList list;
|
||||
list <<"92"<<"98"<<"104"<<"110"<<"116"<<"122"<<"128"<<"134"<<"140"<<"146"<<"152"<<"158"<<"164"<<"170"<<"176"
|
||||
<<"182"<<"188";
|
||||
QStringList list{"92", "98", "104", "110", "116", "122", "128", "134", "140", "146", "152", "158", "164", "170",
|
||||
"176", "182", "188"};
|
||||
QComboBox *comboBoxHeight = new QComboBox;
|
||||
comboBoxHeight->addItems(list);
|
||||
comboBoxHeight->setCurrentIndex(14);//176
|
||||
|
@ -1354,12 +1354,23 @@ void MainWindow::Open()
|
|||
dir = QFileInfo(files.first()).absolutePath();
|
||||
}
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Open file"), dir, filter);
|
||||
if (fileName.isEmpty() == false)
|
||||
if (fileName.isEmpty() == false && fileName != curFile)
|
||||
{
|
||||
LoadPattern(fileName);
|
||||
if (curFile.isEmpty())
|
||||
{
|
||||
LoadPattern(fileName);
|
||||
|
||||
VAbstractTool::NewSceneRect(sceneDraw, view);
|
||||
VAbstractTool::NewSceneRect(sceneDetails, view);
|
||||
VAbstractTool::NewSceneRect(sceneDraw, view);
|
||||
VAbstractTool::NewSceneRect(sceneDetails, view);
|
||||
}
|
||||
else
|
||||
{
|
||||
QProcess *v = new QProcess(this);
|
||||
QStringList arguments;
|
||||
arguments << fileName;
|
||||
v->startDetached(QCoreApplication::applicationFilePath(), arguments);
|
||||
delete v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1386,6 +1397,7 @@ void MainWindow::Clear()
|
|||
setCurrentFile("");
|
||||
pattern->Clear();
|
||||
doc->clear();
|
||||
doc->setPatternModified(false);
|
||||
sceneDraw->clear();
|
||||
sceneDetails->clear();
|
||||
CancelTool();
|
||||
|
@ -1408,9 +1420,12 @@ void MainWindow::Clear()
|
|||
*/
|
||||
void MainWindow::NewPattern()
|
||||
{
|
||||
QProcess *v = new QProcess(this);
|
||||
v->startDetached(QCoreApplication::applicationFilePath ());
|
||||
delete v;
|
||||
if (doc->isPatternModified() || curFile.isEmpty() == false)
|
||||
{
|
||||
QProcess *v = new QProcess(this);
|
||||
v->startDetached(QCoreApplication::applicationFilePath ());
|
||||
delete v;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -1978,6 +1993,25 @@ void MainWindow::LoadPattern(const QString &fileName)
|
|||
Clear();
|
||||
return;
|
||||
}
|
||||
catch (const std::bad_alloc &)
|
||||
{
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle(tr("Error!"));
|
||||
msgBox.setText(tr("Error parsing file."));
|
||||
msgBox.setInformativeText("std::bad_alloc");
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.exec();
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
#endif
|
||||
Clear();
|
||||
return;
|
||||
}
|
||||
connect(comboBoxDraws, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, &MainWindow::currentDrawChanged);
|
||||
QString nameDraw = doc->GetNameActivDraw();
|
||||
|
@ -1996,7 +2030,14 @@ void MainWindow::LoadPattern(const QString &fileName)
|
|||
}
|
||||
SetEnableWidgets(true);
|
||||
|
||||
bool patternModified = doc->isPatternModified();
|
||||
setCurrentFile(fileName);
|
||||
if (patternModified)
|
||||
{
|
||||
//For situation where was fixed wrong formula need return for document status was modified.
|
||||
doc->setPatternModified(patternModified);
|
||||
PatternWasModified();
|
||||
}
|
||||
helpLabel->setText(tr("File loaded"));
|
||||
}
|
||||
|
||||
|
|
|
@ -56,25 +56,32 @@ public:
|
|||
void LoadPattern(const QString &curFile);
|
||||
public slots:
|
||||
void mouseMove(const QPointF &scenePos);
|
||||
|
||||
void ActionAroowTool();
|
||||
void ActionDraw(bool checked);
|
||||
void ActionDetails(bool checked);
|
||||
void ActionNewDraw();
|
||||
void ActionLayout(bool checked);
|
||||
void ActionTable(bool checked);
|
||||
void ActionHistory(bool checked);
|
||||
|
||||
void tableClosed();
|
||||
void ClosedActionTable();
|
||||
void ClosedActionHistory();
|
||||
|
||||
bool SaveAs();
|
||||
bool Save();
|
||||
void Open();
|
||||
void Options();
|
||||
void NewPattern();
|
||||
void ActionTable(bool checked);
|
||||
void ActionHistory(bool checked);
|
||||
void ActionLayout(bool checked);
|
||||
|
||||
void currentDrawChanged( int index );
|
||||
void OptionDraw();
|
||||
void PatternWasModified();
|
||||
void ChangedSize(const QString &text);
|
||||
void ChangedHeight(const QString & text);
|
||||
void ClosedActionTable();
|
||||
void ClosedActionHistory();
|
||||
|
||||
void PatternWasModified();
|
||||
|
||||
void ToolEndLine(bool checked);
|
||||
void ToolLine(bool checked);
|
||||
void ToolAlongLine(bool checked);
|
||||
|
@ -94,6 +101,7 @@ public slots:
|
|||
void ToolPointOfIntersection(bool checked);
|
||||
void ToolUnionDetails(bool checked);
|
||||
void ToolCutArc(bool checked);
|
||||
|
||||
void ClosedDialogEndLine(int result);
|
||||
void ApplyDialogEndLine();
|
||||
void ClosedDialogLine(int result);
|
||||
|
@ -114,12 +122,14 @@ public slots:
|
|||
void ClosedDialogUnionDetails(int result);
|
||||
void ClosedDialogCutSpline(int result);
|
||||
void ClosedDialogCutArc(int result);
|
||||
|
||||
void About();
|
||||
void AboutQt();
|
||||
void ShowToolTip(const QString &toolTip);
|
||||
void tableClosed();
|
||||
void OpenRecentFile();
|
||||
void PatternProperties();
|
||||
|
||||
void ShowToolTip(const QString &toolTip);
|
||||
void OpenRecentFile();
|
||||
void Clear();
|
||||
signals:
|
||||
/**
|
||||
* @brief ModelChosen emit after calculation all details.
|
||||
|
@ -131,80 +141,63 @@ protected:
|
|||
virtual void keyPressEvent ( QKeyEvent * event );
|
||||
virtual void showEvent( QShowEvent *event );
|
||||
virtual void closeEvent( QCloseEvent * event );
|
||||
void Clear();
|
||||
private:
|
||||
Q_DISABLE_COPY(MainWindow)
|
||||
/**
|
||||
* @brief ui keeps information about user interface
|
||||
*/
|
||||
/** @brief ui keeps information about user interface */
|
||||
Ui::MainWindow *ui;
|
||||
/**
|
||||
* @brief pattern container with data (points, arcs, splines, spline paths, variables)
|
||||
*/
|
||||
|
||||
/** @brief pattern container with data (points, arcs, splines, spline paths, variables) */
|
||||
VContainer *pattern;
|
||||
/**
|
||||
* @brief doc dom document container
|
||||
*/
|
||||
|
||||
/** @brief doc dom document container */
|
||||
VPattern *doc;
|
||||
/**
|
||||
* @brief tool current tool
|
||||
*/
|
||||
|
||||
/** @brief tool current tool */
|
||||
Valentina::Tools tool;
|
||||
/**
|
||||
* @brief currentScene pointer to current scene.
|
||||
*/
|
||||
|
||||
/** @brief currentScene pointer to current scene. */
|
||||
VMainGraphicsScene *currentScene;
|
||||
/**
|
||||
* @brief sceneDraw draw scene.
|
||||
*/
|
||||
|
||||
/** @brief sceneDraw draw scene. */
|
||||
VMainGraphicsScene *sceneDraw;
|
||||
/**
|
||||
* @brief sceneDetails details scene.
|
||||
*/
|
||||
|
||||
/** @brief sceneDetails details scene. */
|
||||
VMainGraphicsScene *sceneDetails;
|
||||
/**
|
||||
* @brief mouseCoordinate pointer to label who show mouse coordinate.
|
||||
*/
|
||||
|
||||
/** @brief mouseCoordinate pointer to label who show mouse coordinate. */
|
||||
QLabel *mouseCoordinate;
|
||||
/**
|
||||
* @brief helpLabel help show tooltip.
|
||||
*/
|
||||
|
||||
/** @brief helpLabel help show tooltip. */
|
||||
QLabel *helpLabel;
|
||||
/**
|
||||
* @brief view show current scene.
|
||||
*/
|
||||
|
||||
/** @brief view show current scene. */
|
||||
VMainGraphicsView *view;
|
||||
/**
|
||||
* @brief isInitialized true after first show window.
|
||||
*/
|
||||
|
||||
/** @brief isInitialized true after first show window. */
|
||||
bool isInitialized;
|
||||
|
||||
DialogIncrements *dialogTable;
|
||||
DialogTool *dialogTool;
|
||||
DialogHistory *dialogHistory;
|
||||
/**
|
||||
* @brief comboBoxDraws comboc who show name of pattern peaces.
|
||||
*/
|
||||
|
||||
/** @brief comboBoxDraws comboc who show name of pattern peaces. */
|
||||
QComboBox *comboBoxDraws;
|
||||
/**
|
||||
* @brief fileName name current pattern file.
|
||||
*/
|
||||
|
||||
/** @brief fileName name current pattern file. */
|
||||
QString curFile;
|
||||
/**
|
||||
* @brief mode keep current draw mode.
|
||||
*/
|
||||
|
||||
/** @brief mode keep current draw mode. */
|
||||
Valentina::Draws mode;
|
||||
/**
|
||||
* @brief currentDrawIndex save current selected pattern peace.
|
||||
*/
|
||||
|
||||
/** @brief currentDrawIndex save current selected pattern peace. */
|
||||
qint32 currentDrawIndex;
|
||||
/**
|
||||
* @brief currentToolBoxIndex save current set of tools.
|
||||
*/
|
||||
|
||||
/** @brief currentToolBoxIndex save current set of tools. */
|
||||
qint32 currentToolBoxIndex;
|
||||
/**
|
||||
* @brief drawMode true if we current draw scene.
|
||||
*/
|
||||
|
||||
/** @brief drawMode true if we current draw scene. */
|
||||
bool drawMode;
|
||||
|
||||
enum { MaxRecentFiles = 5 };
|
||||
QAction *recentFileActs[MaxRecentFiles];
|
||||
QAction *separatorAct;
|
||||
|
@ -218,6 +211,8 @@ private:
|
|||
void SetEnableTool(bool enable);
|
||||
void SaveCurrentScene();
|
||||
void RestoreCurrentScene();
|
||||
void MinimumScrollBar();
|
||||
|
||||
template <typename Dialog, typename Func>
|
||||
// TODO ISSUE 79 : delete
|
||||
void SetToolButton(bool checked, Valentina::Tools t, const QString &cursor, const QString &toolTip,
|
||||
|
@ -226,7 +221,6 @@ private:
|
|||
// TODO ISSUE 79 : copy
|
||||
void SetToolButton2(bool checked, Valentina::Tools t, const QString &cursor, const QString &toolTip,
|
||||
Func closeDialogSlot, Func2 applyDialogSlot);
|
||||
void MinimumScrollBar();
|
||||
template <typename DrawTool>
|
||||
void ClosedDialog(int result);
|
||||
template <typename DrawTool>
|
||||
|
|
|
@ -7,147 +7,147 @@
|
|||
<height base="1760"/>
|
||||
<body-measurements>
|
||||
<head_and_neck>
|
||||
<head_girth value="576" size_increace="4" height_increase ="4"/><!--Огол(Обхват головы)-->
|
||||
<mid_neck_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<neck_base_girth value="404" size_increace="8" height_increase ="2"/><!--Ош(Обхват шеи)-->
|
||||
<head_and_neck_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<head_girth value="576" size_increase="4" height_increase ="4"/><!--Огол(Обхват головы)-->
|
||||
<mid_neck_girth value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<neck_base_girth value="404" size_increase="8" height_increase ="2"/><!--Ош(Обхват шеи)-->
|
||||
<head_and_neck_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
</head_and_neck>
|
||||
<torso>
|
||||
<center_front_waist_length value="0.0" size_increace="" height_increase=""/><!--Нету перевода-->
|
||||
<center_back_waist_length value="438" size_increace="2" height_increase ="10"/><!--Дтс(Длина спины до талии с учетом выступа лопаток)-->
|
||||
<shoulder_length value="160" size_increace="1" height_increase ="4"/><!--Шп(Длина плечевого ската)-->
|
||||
<side_waist_length value="0.0" size_increace="0" height_increase="0"/><!--Дб(Длина боковой части)-->
|
||||
<trunk_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<upper_chest_girth value="1034" size_increace="36" height_increase ="4"/><!--ОгI(Обхват груди первый)-->
|
||||
<bust_girth value="1044" size_increace="38" height_increase ="2"/><!--ОгII(Обхват груди второй)-->
|
||||
<under_bust_girth value="1000" size_increace="40" height_increase ="0"/><!--ОгIII(Обхват груди третий)-->
|
||||
<waist_girth value="780" size_increace="40" height_increase ="0"/><!--От(Обхват талии)-->
|
||||
<high_hip_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hip_girth value="984" size_increace="30" height_increase ="10"/><!--Об(Обхват бедер с учетом выступания живота)-->
|
||||
<upper_front_chest_width value="0.0" size_increace="0" height_increase="0"/><!--Шг1(Ширина груди первая)-->
|
||||
<front_chest_width value="0.0" size_increace="0" height_increase="0"/><!--Шг2(Ширина груди вторая)-->
|
||||
<across_front_shoulder_width value="412" size_increace="5" height_increase ="8"/><!--dпл(Плечевой диаметр)-->
|
||||
<across_back_shoulder_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<upper_back_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_width value="416" size_increace="10" height_increase ="2"/><!--Шс(Ширина спины)-->
|
||||
<bustpoint_to_bustpoint value="224" size_increace="6" height_increase ="0"/><!--Цг(Расстояние между сосковыми точками)-->
|
||||
<halter_bustpoint_to_bustpoint value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<neck_to_bustpoint value="262" size_increace="8" height_increase ="3"/><!--Вг(Расстояние от точки основания шеи сбоку до сосковой точки (высота груди))-->
|
||||
<crotch_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<rise_height value="316" size_increace="4" height_increase ="7"/><!--Дпс(Расстояние от линии талии до подъягодичной складки)-->
|
||||
<shoulder_drop value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_slope_degrees value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_shoulder_slope_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_shoulder_slope_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_shoulder_to_waist_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_shoulder_to_waist_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_neck_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper_chest_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper_chest_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_waist_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_waist_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<chest_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_waist_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_waist_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_to_upper_chest_height value="0.0" size_increace="0" height_increase=""/><!--Нету перевода-->
|
||||
<front_neck_to_bust_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<center_front_waist_length value="0.0" size_increase="" height_increase=""/><!--Нету перевода-->
|
||||
<center_back_waist_length value="438" size_increase="2" height_increase ="10"/><!--Дтс(Длина спины до талии с учетом выступа лопаток)-->
|
||||
<shoulder_length value="160" size_increase="1" height_increase ="4"/><!--Шп(Длина плечевого ската)-->
|
||||
<side_waist_length value="0.0" size_increase="0" height_increase="0"/><!--Дб(Длина боковой части)-->
|
||||
<trunk_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_girth value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<upper_chest_girth value="1034" size_increase="36" height_increase ="4"/><!--ОгI(Обхват груди первый)-->
|
||||
<bust_girth value="1044" size_increase="38" height_increase ="2"/><!--ОгII(Обхват груди второй)-->
|
||||
<under_bust_girth value="1000" size_increase="40" height_increase ="0"/><!--ОгIII(Обхват груди третий)-->
|
||||
<waist_girth value="780" size_increase="40" height_increase ="0"/><!--От(Обхват талии)-->
|
||||
<high_hip_girth value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hip_girth value="984" size_increase="30" height_increase ="10"/><!--Об(Обхват бедер с учетом выступания живота)-->
|
||||
<upper_front_chest_width value="0.0" size_increase="0" height_increase="0"/><!--Шг1(Ширина груди первая)-->
|
||||
<front_chest_width value="0.0" size_increase="0" height_increase="0"/><!--Шг2(Ширина груди вторая)-->
|
||||
<across_front_shoulder_width value="412" size_increase="5" height_increase ="8"/><!--dпл(Плечевой диаметр)-->
|
||||
<across_back_shoulder_width value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<upper_back_width value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_width value="416" size_increase="10" height_increase ="2"/><!--Шс(Ширина спины)-->
|
||||
<bustpoint_to_bustpoint value="224" size_increase="6" height_increase ="0"/><!--Цг(Расстояние между сосковыми точками)-->
|
||||
<halter_bustpoint_to_bustpoint value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<neck_to_bustpoint value="262" size_increase="8" height_increase ="3"/><!--Вг(Расстояние от точки основания шеи сбоку до сосковой точки (высота груди))-->
|
||||
<crotch_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<rise_height value="316" size_increase="4" height_increase ="7"/><!--Дпс(Расстояние от линии талии до подъягодичной складки)-->
|
||||
<shoulder_drop value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_slope_degrees value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_shoulder_slope_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_shoulder_slope_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_shoulder_to_waist_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_shoulder_to_waist_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_neck_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper_chest_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper_chest_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_waist_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_waist_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper_hip_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper_hip_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_hip_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_hip_arc value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<chest_slope value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_slope value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_waist_slope value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_waist_slope value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_to_upper_chest_height value="0.0" size_increase="0" height_increase=""/><!--Нету перевода-->
|
||||
<front_neck_to_bust_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
</torso>
|
||||
<arm>
|
||||
<armscye_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<elbow_girth value="0.0" size_increace="0" height_increase="0"/><!--Олк(Обхват локтя)-->
|
||||
<upper_arm_girth value="316" size_increace="12" height_increase ="0"/><!--Оп(Обхват плеча)-->
|
||||
<wrist_girth value="180" size_increace="4" height_increase ="0"/><!--Озап(Обхват запястья)-->
|
||||
<scye_depth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_and_arm_length value="768" size_increace="2" height_increase ="24"/><!--Дзап(Расстояние от точки основания шеи сбоку до линии обхвата запястья)-->
|
||||
<underarm_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<cervicale_to_wrist_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_to_elbow_length value="338" size_increace="2" height_increase ="12"/><!--Дрлок(Длина руки до локтя)-->
|
||||
<arm_length value="594" size_increace="3" height_increase ="19"/><!--Дрзап(Длина рукава до линии обхвата запястья)-->
|
||||
<armscye_girth value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<elbow_girth value="0.0" size_increase="0" height_increase="0"/><!--Олк(Обхват локтя)-->
|
||||
<upper_arm_girth value="316" size_increase="12" height_increase ="0"/><!--Оп(Обхват плеча)-->
|
||||
<wrist_girth value="180" size_increase="4" height_increase ="0"/><!--Озап(Обхват запястья)-->
|
||||
<scye_depth value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_and_arm_length value="768" size_increase="2" height_increase ="24"/><!--Дзап(Расстояние от точки основания шеи сбоку до линии обхвата запястья)-->
|
||||
<underarm_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<cervicale_to_wrist_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_to_elbow_length value="338" size_increase="2" height_increase ="12"/><!--Дрлок(Длина руки до локтя)-->
|
||||
<arm_length value="594" size_increase="3" height_increase ="19"/><!--Дрзап(Длина рукава до линии обхвата запястья)-->
|
||||
</arm>
|
||||
<hand>
|
||||
<hand_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hand_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hand_girth value="263" size_increace="3" height_increase ="3"/><!--Окис(Обхват кисти)-->
|
||||
<hand_width value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hand_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hand_girth value="263" size_increase="3" height_increase ="3"/><!--Окис(Обхват кисти)-->
|
||||
</hand>
|
||||
<leg>
|
||||
<thigh_girth value="566" size_increace="18" height_increase ="6"/><!--Обед(Обхват бедра)-->
|
||||
<mid_thigh_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<knee_girth value="386" size_increace="8" height_increase ="8"/><!--Ок(Обхват колена)-->
|
||||
<calf_girth value="380" size_increace="8" height_increase ="6"/><!--Ои(Обхват икры)-->
|
||||
<ankle_girth value="234" size_increace="4" height_increase ="4"/><!--Ощ(Обхват щиколотки)-->
|
||||
<knee_height value="503" size_increace="0" height_increase ="22"/><!--Вк(Высота коленной точки)-->
|
||||
<ankle_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<thigh_girth value="566" size_increase="18" height_increase ="6"/><!--Обед(Обхват бедра)-->
|
||||
<mid_thigh_girth value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<knee_girth value="386" size_increase="8" height_increase ="8"/><!--Ок(Обхват колена)-->
|
||||
<calf_girth value="380" size_increase="8" height_increase ="6"/><!--Ои(Обхват икры)-->
|
||||
<ankle_girth value="234" size_increase="4" height_increase ="4"/><!--Ощ(Обхват щиколотки)-->
|
||||
<knee_height value="503" size_increase="0" height_increase ="22"/><!--Вк(Высота коленной точки)-->
|
||||
<ankle_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
</leg>
|
||||
<foot>
|
||||
<foot_width value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<foot_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<foot_width value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<foot_length value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
</foot>
|
||||
<heights>
|
||||
<cervicale_height value="1522" size_increace="2" height_increase ="54"/><!--Вшт(Высота точки основания шеи сзади)-->
|
||||
<cervicale_to_knee_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<waist_height value="1102" size_increace="0" height_increase ="43"/><!--Влт(Высота линии талии)-->
|
||||
<high_hip_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hip_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<waist_to_hip_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<waist_to_knee_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<crotch_height value="826" size_increace="-3" height_increase ="37"/><!--Дн(Длина ноги по внутренней поверхности)-->
|
||||
<cervicale_height value="1522" size_increase="2" height_increase ="54"/><!--Вшт(Высота точки основания шеи сзади)-->
|
||||
<cervicale_to_knee_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<waist_height value="1102" size_increase="0" height_increase ="43"/><!--Влт(Высота линии талии)-->
|
||||
<high_hip_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<hip_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<waist_to_hip_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<waist_to_knee_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<crotch_height value="826" size_increase="-3" height_increase ="37"/><!--Дн(Длина ноги по внутренней поверхности)-->
|
||||
</heights>
|
||||
<extended>
|
||||
<height_front_neck_base_point value="1450" size_increace="2" height_increase ="51"/><!--Втос(Высота точки основания шеи спереди)-->
|
||||
<height_base_neck_side_point value="1506" size_increace="2" height_increase ="54"/><!--Втош(Высота точки основания шеи сбоку)-->
|
||||
<height_shoulder_point value="1438" size_increace="3" height_increase ="52"/><!--Впт(Высота плечевой точки)-->
|
||||
<height_nipple_point value="1257" size_increace="-1" height_increase ="49"/><!--Вст(Высота сосковой точки)-->
|
||||
<height_back_angle_axilla value="1328" size_increace="0" height_increase ="49"/><!--Взу(Высота заднего угла подмышечной впадины)-->
|
||||
<height_scapular_point value="1320" size_increace="0" height_increase ="49"/><!--Влоп(Высота лопаточной точки)-->
|
||||
<height_under_buttock_folds value="811" size_increace="-1" height_increase ="36"/><!--Впс(Высота подъягодичной складки)-->
|
||||
<hips_excluding_protruding_abdomen value="964" size_increace="24" height_increase ="12"/><!--ОбI(Обхват бедер без учета выступания живота)-->
|
||||
<girth_foot_instep value="350" size_increace="2" height_increase ="8"/><!--Ос(Обхват подъема стопы)-->
|
||||
<side_waist_to_floor value="1120" size_increace="0" height_increase ="44"/><!--Дсб(Расстояние от линии талии до пола сбоку)-->
|
||||
<front_waist_to_floor value="1110" size_increace="0" height_increase ="43"/><!--Дсп(Расстояние от линии талии до пола спереди)-->
|
||||
<arc_through_groin_area value="783" size_increace="14" height_increase ="15"/><!--Дпоб(Дуга через паховую область)-->
|
||||
<waist_to_plane_seat value="260" size_increace="1" height_increase ="6"/><!--Дс(Расстояние от линии талии до плоскости сидения)-->
|
||||
<neck_to_radial_point value="500" size_increace="2" height_increase ="15"/><!--Длуч(Расстояние от точки основания шеи сбоку до лучевой точки)-->
|
||||
<neck_to_third_finger value="970" size_increace="2" height_increase ="29"/><!--ДIIIп(Расстояние от точки основания шеи сбоку до конца третьего пальца)-->
|
||||
<neck_to_first_line_chest_circumference value="214" size_increace="3" height_increase ="3"/><!--Впрп(Расстояние от точки основания шеи сбоку до линии обхвата груди первого спереди)-->
|
||||
<front_waist_length value="460" size_increace="7" height_increase ="9"/><!--Дтп(Расстояние от точки основания шеи сбоку до линии талии спереди (длани талии спереди))-->
|
||||
<arc_through_shoulder_joint value="355" size_increace="5" height_increase ="5"/><!--Дп(Дуга через высшую точку плечевого сустава)-->
|
||||
<neck_to_back_line_chest_circumference value="208" size_increace="3" height_increase ="5"/><!--Впрз(Расстояние от точки основания шеи сзади до линии обхватов груди первого и второго с учетом выступа лопаток)-->
|
||||
<waist_to_neck_side value="469" size_increace="2" height_increase ="10"/><!--ДтсI(Расстояние от линии талии сзади до точки основания шеи сбоку)-->
|
||||
<arc_length_upper_body value="929" size_increace="9" height_increase ="19"/><!--Двчт(Длина дуги верхней части туловища через точку основания шеи сбоку)-->
|
||||
<chest_width value="370" size_increace="14" height_increase ="4"/><!--Шг(Ширина груди)-->
|
||||
<anteroposterior_diameter_hands value="121" size_increace="6" height_increase ="0"/><!--dпзр(Передне-задний диаметр руки)-->
|
||||
<height_clavicular_point value="1454" size_increace="2" height_increase ="52"/><!--Вкт(Высота ключичной точки)-->
|
||||
<height_armhole_slash value="324" size_increace="7" height_increase ="2"/><!--Впрк(Расстояние от шейной точки до уровня заднего угла подмышечной впадины спереди (высота проймы косая))-->
|
||||
<slash_shoulder_height value="495" size_increace="5" height_increase ="7"/><!--Впк(Высота плеча косая)-->
|
||||
<half_girth_neck value="202" size_increace="4" height_increase ="2"/><!--Сш(Полуобхват шеи)-->
|
||||
<half_girth_neck_for_shirts value="205" size_increace="5" height_increase ="0"/><!--Сш1(Полуобхват шеи для сорочек)-->
|
||||
<half_girth_chest_first value="517" size_increace="18" height_increase ="2"/><!--СгI(Полуобхват груди первый)-->
|
||||
<half_girth_chest_second value="522" size_increace="19" height_increase ="1"/><!--СгII(Полуобхват груди второй)-->
|
||||
<half_girth_chest_third value="500" size_increace="20" height_increase ="0"/><!--СгIII(Полуобхват груди третий)-->
|
||||
<half_girth_waist value="390" size_increace="20" height_increase ="0"/><!--Ст(Полуобхват талии)-->
|
||||
<half_girth_hips_considering_protruding_abdomen value="492" size_increace="15" height_increase ="5"/><!--Сб(Полуобхват бедер с учетом выступания живота)-->
|
||||
<half_girth_hips_excluding_protruding_abdomen value="482" size_increace="12" height_increase ="6"/><!--СбI(Полуобхват бедер без учета выступания живота)-->
|
||||
<girth_knee_flexed_feet value="399" size_increace="9" height_increase ="8"/><!--Окс(Обхват колена в согнутом положении ноги)-->
|
||||
<neck_transverse_diameter value="130" size_increace="2" height_increase ="2"/><!--dш(Поперечный диаметр шеи)-->
|
||||
<front_slash_shoulder_height value="453" size_increace="7" height_increase ="8"/><!--Впкп(Высота плеча косая спереди)-->
|
||||
<neck_to_front_waist_line value="449" size_increace="6" height_increase ="8"/><!--Дтн1(Расстояние от точки основания шеи до линии талии спереди)-->
|
||||
<hand_vertical_diameter value="128" size_increace="2" height_increase ="2"/><!--dвр(Вертикальный диаметр руки)-->
|
||||
<neck_to_knee_point value="1019" size_increace="0" height_increase ="34"/><!--Дшк(Расстояние от шейной точки до колена)-->
|
||||
<waist_to_knee value="603" size_increace="-2" height_increase ="24"/><!--Дтк(Расстояние от линии талии до колена)-->
|
||||
<shoulder_height value="67" size_increace="0" height_increase ="2"/><!--Вп(Высота плеча)-->
|
||||
<head_height value="246" size_increace="-2" height_increase ="6"/><!--Вгол(Высота головы)-->
|
||||
<body_position value="84" size_increace="0" height_increase ="3"/><!--Пкор(Положение корпуса)-->
|
||||
<arc_behind_shoulder_girdle value="535" size_increace="7" height_increase ="7"/><!--Дпз(Дуга плечевого пояса сзади)-->
|
||||
<neck_to_neck_base value="109" size_increace="1" height_increase ="0"/><!--Дшош(Расстояние от шейной точки до точки основания шеи сбоку по линии измерения обхвата шеи)-->
|
||||
<depth_waist_first value="64" size_increace="-1" height_increase ="0"/><!--Гт1(Глубина талии первая)-->
|
||||
<depth_waist_second value="37" size_increace="0" height_increase ="0"/><!--ГтII(Глубина талии вторая)-->
|
||||
<height_front_neck_base_point value="1450" size_increase="2" height_increase ="51"/><!--Втос(Высота точки основания шеи спереди)-->
|
||||
<height_base_neck_side_point value="1506" size_increase="2" height_increase ="54"/><!--Втош(Высота точки основания шеи сбоку)-->
|
||||
<height_shoulder_point value="1438" size_increase="3" height_increase ="52"/><!--Впт(Высота плечевой точки)-->
|
||||
<height_nipple_point value="1257" size_increase="-1" height_increase ="49"/><!--Вст(Высота сосковой точки)-->
|
||||
<height_back_angle_axilla value="1328" size_increase="0" height_increase ="49"/><!--Взу(Высота заднего угла подмышечной впадины)-->
|
||||
<height_scapular_point value="1320" size_increase="0" height_increase ="49"/><!--Влоп(Высота лопаточной точки)-->
|
||||
<height_under_buttock_folds value="811" size_increase="-1" height_increase ="36"/><!--Впс(Высота подъягодичной складки)-->
|
||||
<hips_excluding_protruding_abdomen value="964" size_increase="24" height_increase ="12"/><!--ОбI(Обхват бедер без учета выступания живота)-->
|
||||
<girth_foot_instep value="350" size_increase="2" height_increase ="8"/><!--Ос(Обхват подъема стопы)-->
|
||||
<side_waist_to_floor value="1120" size_increase="0" height_increase ="44"/><!--Дсб(Расстояние от линии талии до пола сбоку)-->
|
||||
<front_waist_to_floor value="1110" size_increase="0" height_increase ="43"/><!--Дсп(Расстояние от линии талии до пола спереди)-->
|
||||
<arc_through_groin_area value="783" size_increase="14" height_increase ="15"/><!--Дпоб(Дуга через паховую область)-->
|
||||
<waist_to_plane_seat value="260" size_increase="1" height_increase ="6"/><!--Дс(Расстояние от линии талии до плоскости сидения)-->
|
||||
<neck_to_radial_point value="500" size_increase="2" height_increase ="15"/><!--Длуч(Расстояние от точки основания шеи сбоку до лучевой точки)-->
|
||||
<neck_to_third_finger value="970" size_increase="2" height_increase ="29"/><!--ДIIIп(Расстояние от точки основания шеи сбоку до конца третьего пальца)-->
|
||||
<neck_to_first_line_chest_circumference value="214" size_increase="3" height_increase ="3"/><!--Впрп(Расстояние от точки основания шеи сбоку до линии обхвата груди первого спереди)-->
|
||||
<front_waist_length value="460" size_increase="7" height_increase ="9"/><!--Дтп(Расстояние от точки основания шеи сбоку до линии талии спереди (длани талии спереди))-->
|
||||
<arc_through_shoulder_joint value="355" size_increase="5" height_increase ="5"/><!--Дп(Дуга через высшую точку плечевого сустава)-->
|
||||
<neck_to_back_line_chest_circumference value="208" size_increase="3" height_increase ="5"/><!--Впрз(Расстояние от точки основания шеи сзади до линии обхватов груди первого и второго с учетом выступа лопаток)-->
|
||||
<waist_to_neck_side value="469" size_increase="2" height_increase ="10"/><!--ДтсI(Расстояние от линии талии сзади до точки основания шеи сбоку)-->
|
||||
<arc_length_upper_body value="929" size_increase="9" height_increase ="19"/><!--Двчт(Длина дуги верхней части туловища через точку основания шеи сбоку)-->
|
||||
<chest_width value="370" size_increase="14" height_increase ="4"/><!--Шг(Ширина груди)-->
|
||||
<anteroposterior_diameter_hands value="121" size_increase="6" height_increase ="0"/><!--dпзр(Передне-задний диаметр руки)-->
|
||||
<height_clavicular_point value="1454" size_increase="2" height_increase ="52"/><!--Вкт(Высота ключичной точки)-->
|
||||
<height_armhole_slash value="324" size_increase="7" height_increase ="2"/><!--Впрк(Расстояние от шейной точки до уровня заднего угла подмышечной впадины спереди (высота проймы косая))-->
|
||||
<slash_shoulder_height value="495" size_increase="5" height_increase ="7"/><!--Впк(Высота плеча косая)-->
|
||||
<half_girth_neck value="202" size_increase="4" height_increase ="2"/><!--Сш(Полуобхват шеи)-->
|
||||
<half_girth_neck_for_shirts value="205" size_increase="5" height_increase ="0"/><!--Сш1(Полуобхват шеи для сорочек)-->
|
||||
<half_girth_chest_first value="517" size_increase="18" height_increase ="2"/><!--СгI(Полуобхват груди первый)-->
|
||||
<half_girth_chest_second value="522" size_increase="19" height_increase ="1"/><!--СгII(Полуобхват груди второй)-->
|
||||
<half_girth_chest_third value="500" size_increase="20" height_increase ="0"/><!--СгIII(Полуобхват груди третий)-->
|
||||
<half_girth_waist value="390" size_increase="20" height_increase ="0"/><!--Ст(Полуобхват талии)-->
|
||||
<half_girth_hips_considering_protruding_abdomen value="492" size_increase="15" height_increase ="5"/><!--Сб(Полуобхват бедер с учетом выступания живота)-->
|
||||
<half_girth_hips_excluding_protruding_abdomen value="482" size_increase="12" height_increase ="6"/><!--СбI(Полуобхват бедер без учета выступания живота)-->
|
||||
<girth_knee_flexed_feet value="399" size_increase="9" height_increase ="8"/><!--Окс(Обхват колена в согнутом положении ноги)-->
|
||||
<neck_transverse_diameter value="130" size_increase="2" height_increase ="2"/><!--dш(Поперечный диаметр шеи)-->
|
||||
<front_slash_shoulder_height value="453" size_increase="7" height_increase ="8"/><!--Впкп(Высота плеча косая спереди)-->
|
||||
<neck_to_front_waist_line value="449" size_increase="6" height_increase ="8"/><!--Дтн1(Расстояние от точки основания шеи до линии талии спереди)-->
|
||||
<hand_vertical_diameter value="128" size_increase="2" height_increase ="2"/><!--dвр(Вертикальный диаметр руки)-->
|
||||
<neck_to_knee_point value="1019" size_increase="0" height_increase ="34"/><!--Дшк(Расстояние от шейной точки до колена)-->
|
||||
<waist_to_knee value="603" size_increase="-2" height_increase ="24"/><!--Дтк(Расстояние от линии талии до колена)-->
|
||||
<shoulder_height value="67" size_increase="0" height_increase ="2"/><!--Вп(Высота плеча)-->
|
||||
<head_height value="246" size_increase="-2" height_increase ="6"/><!--Вгол(Высота головы)-->
|
||||
<body_position value="84" size_increase="0" height_increase ="3"/><!--Пкор(Положение корпуса)-->
|
||||
<arc_behind_shoulder_girdle value="535" size_increase="7" height_increase ="7"/><!--Дпз(Дуга плечевого пояса сзади)-->
|
||||
<neck_to_neck_base value="109" size_increase="1" height_increase ="0"/><!--Дшош(Расстояние от шейной точки до точки основания шеи сбоку по линии измерения обхвата шеи)-->
|
||||
<depth_waist_first value="64" size_increase="-1" height_increase ="0"/><!--Гт1(Глубина талии первая)-->
|
||||
<depth_waist_second value="37" size_increase="0" height_increase ="0"/><!--ГтII(Глубина талии вторая)-->
|
||||
</extended>
|
||||
</body-measurements>
|
||||
</vst>
|
||||
|
|
|
@ -228,8 +228,7 @@ void TableWindow::saveScene()
|
|||
shadowPaper->setVisible(false);
|
||||
paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));
|
||||
QFileInfo fi( name );
|
||||
QStringList suffix;
|
||||
suffix << "svg" << "png" << "pdf" << "eps" << "ps";
|
||||
QStringList suffix{"svg", "png", "pdf", "eps", "ps"};
|
||||
switch (suffix.indexOf(fi.suffix()))
|
||||
{
|
||||
case 0: //svg
|
||||
|
@ -510,10 +509,7 @@ void TableWindow::EpsFile(const QString &name) const
|
|||
if (tmp.open())
|
||||
{
|
||||
PdfFile(tmp.fileName());
|
||||
|
||||
QStringList params;
|
||||
params << "-eps" << tmp.fileName() << name;
|
||||
|
||||
QStringList params{"-eps", tmp.fileName(), name};
|
||||
PdfToPs(params);
|
||||
}
|
||||
}
|
||||
|
@ -525,10 +521,7 @@ void TableWindow::PsFile(const QString &name) const
|
|||
if (tmp.open())
|
||||
{
|
||||
PdfFile(tmp.fileName());
|
||||
|
||||
QStringList params;
|
||||
params << tmp.fileName() << name;
|
||||
|
||||
QStringList params{tmp.fileName(), name};
|
||||
PdfToPs(params);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,22 @@
|
|||
|
||||
#include "vdrawtool.h"
|
||||
|
||||
#include <qmuparsererror.h>
|
||||
|
||||
#include <dialogs/tools/dialogeditwrongformula.h>
|
||||
|
||||
#include <container/calculator.h>
|
||||
|
||||
qreal VDrawTool::factor = 1;
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief VDrawTool constructor.
|
||||
* @param doc dom document container.
|
||||
* @param data container with variables.
|
||||
* @param id object id in container.
|
||||
* @param parent parent object.
|
||||
*/
|
||||
VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id)
|
||||
:VAbstractTool(doc, data, id), ignoreContextMenuEvent(false), ignoreFullUpdate(false),
|
||||
nameActivDraw(doc->GetNameActivDraw()), dialog(nullptr)
|
||||
|
@ -47,6 +60,12 @@ VDrawTool::~VDrawTool()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief ShowTool highlight tool.
|
||||
* @param id object id in container.
|
||||
* @param color highlight color.
|
||||
* @param enable enable or disable highlight.
|
||||
*/
|
||||
void VDrawTool::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
|
||||
{
|
||||
Q_UNUSED(id);
|
||||
|
@ -55,6 +74,10 @@ void VDrawTool::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
|
||||
* @param newName new name active pattern peace. name new active pattern peace.
|
||||
*/
|
||||
void VDrawTool::ChangedActivDraw(const QString &newName)
|
||||
{
|
||||
if (nameActivDraw == newName)
|
||||
|
@ -68,6 +91,11 @@ void VDrawTool::ChangedActivDraw(const QString &newName)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief ChangedNameDraw save new name active pattern peace.
|
||||
* @param oldName old name.
|
||||
* @param newName new name active pattern peace. new name.
|
||||
*/
|
||||
void VDrawTool::ChangedNameDraw(const QString &oldName, const QString &newName)
|
||||
{
|
||||
if (nameActivDraw == oldName)
|
||||
|
@ -77,6 +105,10 @@ void VDrawTool::ChangedNameDraw(const QString &oldName, const QString &newName)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromGui refresh tool data after change in options.
|
||||
* @param result keep result working dialog.
|
||||
*/
|
||||
void VDrawTool::FullUpdateFromGui(int result)
|
||||
{
|
||||
if (result == QDialog::Accepted)
|
||||
|
@ -114,6 +146,10 @@ void VDrawTool::DialogLinkDestroy()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
* @param factor scene scale factor.
|
||||
*/
|
||||
void VDrawTool::SetFactor(qreal factor)
|
||||
{
|
||||
if (factor <= 2 && factor >= 0.5)
|
||||
|
@ -123,6 +159,55 @@ void VDrawTool::SetFactor(qreal factor)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief CheckFormula check formula.
|
||||
*
|
||||
* Try calculate formula. If find error show dialog that allow user try fix formula. If user can't throw exception. In
|
||||
* successes case return result calculation and fixed formula string. If formula ok don't touch formula.
|
||||
* @param formula [in|out] string with formula.
|
||||
* @param data [in] container with variables. Need for math parser.
|
||||
* @throw QmuParserError.
|
||||
* @return result of calculation formula.
|
||||
*/
|
||||
qreal VDrawTool::CheckFormula(QString &formula, VContainer *data)
|
||||
{
|
||||
qreal result = 0;
|
||||
Calculator *cal = nullptr;
|
||||
try
|
||||
{
|
||||
cal = new Calculator(data);
|
||||
result = cal->EvalFormula(formula);
|
||||
delete cal;
|
||||
}
|
||||
catch(qmu::QmuParserError &e)
|
||||
{
|
||||
delete cal;
|
||||
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data);
|
||||
dialog->setFormula(formula);
|
||||
if (dialog->exec() == QDialog::Accepted)
|
||||
{
|
||||
formula = dialog->getFormula();
|
||||
//Need delete dialog here because parser in dialog don't allow use correct separator for parsing here.
|
||||
//Don't know why.
|
||||
delete dialog;
|
||||
Calculator *cal = new Calculator(data);
|
||||
result = cal->EvalFormula(formula);
|
||||
delete cal;//Here can be memory leak, but dialog already check this formula and probability very low.
|
||||
}
|
||||
else
|
||||
{
|
||||
delete dialog;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief AddToCalculation add tool to calculation tag in pattern file.
|
||||
* @param domElement tag in xml tree.
|
||||
*/
|
||||
void VDrawTool::AddToCalculation(const QDomElement &domElement)
|
||||
{
|
||||
QDomElement calcElement;
|
||||
|
|
|
@ -42,91 +42,50 @@ class VDrawTool : public VAbstractTool
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* @brief VDrawTool constructor.
|
||||
* @param doc dom document container.
|
||||
* @param data container with variables.
|
||||
* @param id object id in container.
|
||||
* @param parent parent object.
|
||||
*/
|
||||
VDrawTool(VPattern *doc, VContainer *data, quint32 id);
|
||||
|
||||
VDrawTool(VPattern *doc, VContainer *data, quint32 id);
|
||||
virtual ~VDrawTool();
|
||||
/**
|
||||
* @brief setDialog set dialog when user want change tool option.
|
||||
*/
|
||||
|
||||
/** @brief setDialog set dialog when user want change tool option. */
|
||||
virtual void setDialog() {}
|
||||
/**
|
||||
* @brief DialogLinkDestroy removes dialog pointer
|
||||
*/
|
||||
* @brief DialogLinkDestroy removes dialog pointer
|
||||
*/
|
||||
virtual void DialogLinkDestroy();
|
||||
/**
|
||||
* @brief ignoreContextMenu set ignore contect menu tool.
|
||||
* @param enable true - ignore.
|
||||
*/
|
||||
void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;}
|
||||
|
||||
void ignoreContextMenu(bool enable);
|
||||
static qreal CheckFormula(QString &formula, VContainer *data);
|
||||
public slots:
|
||||
/**
|
||||
* @brief ShowTool highlight tool.
|
||||
* @param id object id in container.
|
||||
* @param color highlight color.
|
||||
* @param enable enable or disable highlight.
|
||||
*/
|
||||
virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable);
|
||||
/**
|
||||
* @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
|
||||
* @param newName new name active pattern peace. name new active pattern peace.
|
||||
*/
|
||||
virtual void ChangedActivDraw(const QString &newName);
|
||||
/**
|
||||
* @brief ChangedNameDraw save new name active pattern peace.
|
||||
* @param oldName old name.
|
||||
* @param newName new name active pattern peace. new name.
|
||||
*/
|
||||
void ChangedNameDraw(const QString &oldName, const QString &newName);
|
||||
/**
|
||||
* @brief FullUpdateFromGui refresh tool data after change in options.
|
||||
* @param result keep result working dialog.
|
||||
*/
|
||||
virtual void FullUpdateFromGui(int result);
|
||||
/**
|
||||
* @brief FullUpdateFromGuiApply refresh tool data after change in options but do not delete dialog
|
||||
*/
|
||||
virtual void FullUpdateFromGuiApply();
|
||||
/**
|
||||
* @brief SetFactor set current scale factor of scene.
|
||||
* @param factor scene scale factor.
|
||||
*/
|
||||
virtual void SetFactor(qreal factor);
|
||||
protected:
|
||||
/**
|
||||
* @brief ignoreContextMenuEvent ignore or not context menu events.
|
||||
*/
|
||||
/** @brief ignoreContextMenuEvent ignore or not context menu events. */
|
||||
bool ignoreContextMenuEvent;
|
||||
/**
|
||||
* @brief ignoreFullUpdate ignore or not full updates.
|
||||
*/
|
||||
|
||||
/** @brief ignoreFullUpdate ignore or not full updates. */
|
||||
bool ignoreFullUpdate;
|
||||
/**
|
||||
* @brief nameActivDraw name of tool's pattern peace.
|
||||
*/
|
||||
|
||||
/** @brief nameActivDraw name of tool's pattern peace. */
|
||||
QString nameActivDraw;
|
||||
/**
|
||||
* @brief factor scene scale factor.
|
||||
*/
|
||||
|
||||
/** @brief factor scene scale factor. */
|
||||
static qreal factor;
|
||||
/**
|
||||
* @brief dialog dialog options.
|
||||
*/
|
||||
|
||||
/** @brief dialog dialog options.*/
|
||||
DialogTool *dialog;
|
||||
/**
|
||||
* @brief AddToCalculation add tool to calculation tag in pattern file.
|
||||
* @param domElement tag in xml tree.
|
||||
*/
|
||||
|
||||
void AddToCalculation(const QDomElement &domElement);
|
||||
/**
|
||||
* @brief SaveDialog save options into file after change in dialog.
|
||||
*/
|
||||
|
||||
/** @brief SaveDialog save options into file after change in dialog. */
|
||||
virtual void SaveDialog(QDomElement &domElement)=0;
|
||||
|
||||
template <typename Dialog, typename Tool>
|
||||
/**
|
||||
* @brief ContextMenu show context menu for tool.
|
||||
|
@ -212,4 +171,14 @@ private:
|
|||
Q_DISABLE_COPY(VDrawTool)
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief ignoreContextMenu set ignore contect menu tool.
|
||||
* @param enable true - ignore.
|
||||
*/
|
||||
inline void VDrawTool::ignoreContextMenu(bool enable)
|
||||
{
|
||||
ignoreContextMenuEvent = enable;
|
||||
}
|
||||
|
||||
#endif // VDRAWTOOL_H
|
||||
|
|
|
@ -164,27 +164,25 @@ void VToolAlongLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPatt
|
|||
DialogAlongLine *dialogTool = qobject_cast<DialogAlongLine*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString formula = dialogTool->getFormula();
|
||||
quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
QString typeLine = dialogTool->getTypeLine();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
const quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
const QString typeLine = dialogTool->getTypeLine();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
Create(0, pointName, typeLine, formula, firstPointId, secondPointId, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolAlongLine::Create(const quint32 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
void VToolAlongLine::Create(const quint32 _id, const QString &pointName, const QString &typeLine, QString &formula,
|
||||
const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
{
|
||||
const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId);
|
||||
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId);
|
||||
QLineF line = QLineF(firstPoint->toQPointF(), secondPoint->toQPointF());
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
line.setLength(qApp->toPixel(result));
|
||||
line.setLength(qApp->toPixel(CheckFormula(formula, data)));
|
||||
|
||||
quint32 id = _id;
|
||||
if (typeCreation == Valentina::FromGui)
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &formula,
|
||||
static void Create(const quint32 _id, const QString &pointName, const QString &typeLine, QString &formula,
|
||||
const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
|
|
|
@ -73,13 +73,12 @@ void VToolArc::setDialog()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data)
|
||||
void VToolArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data)
|
||||
{
|
||||
Q_CHECK_PTR(dialog);
|
||||
DialogArc *dialogTool = qobject_cast<DialogArc*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
quint32 center = dialogTool->GetCenter();
|
||||
const quint32 center = dialogTool->GetCenter();
|
||||
QString radius = dialogTool->GetRadius();
|
||||
QString f1 = dialogTool->GetF1();
|
||||
QString f2 = dialogTool->GetF2();
|
||||
|
@ -87,19 +86,16 @@ void VToolArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *d
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolArc::Create(const quint32 _id, const quint32 ¢er, const QString &radius, const QString &f1,
|
||||
const QString &f2, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
void VToolArc::Create(const quint32 _id, const quint32 ¢er, QString &radius, QString &f1, QString &f2,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||
const Valentina::Sources &typeCreation)
|
||||
{
|
||||
qreal calcRadius = 0, calcF1 = 0, calcF2 = 0;
|
||||
|
||||
Calculator cal(data);
|
||||
calcRadius = qApp->toPixel(CheckFormula(radius, data));
|
||||
|
||||
qreal result = cal.EvalFormula(radius);
|
||||
calcRadius = qApp->toPixel(result);
|
||||
|
||||
calcF1 = cal.EvalFormula(f1);
|
||||
calcF2 = cal.EvalFormula(f2);
|
||||
calcF1 = CheckFormula(f1, data);
|
||||
calcF2 = CheckFormula(f2, data);
|
||||
|
||||
VPointF c = *data->GeometricObject<const VPointF *>(center);
|
||||
VArc *arc = new VArc(c, calcRadius, radius, calcF1, f1, calcF2, f2 );
|
||||
|
|
|
@ -75,9 +75,9 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const quint32 ¢er, const QString &radius, const QString &f1,
|
||||
const QString &f2, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
static void Create(const quint32 _id, const quint32 ¢er, QString &radius, QString &f1, QString &f2,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||
const Valentina::Sources &typeCreation);
|
||||
static const QString TagName;
|
||||
static const QString ToolType;
|
||||
public slots:
|
||||
|
|
|
@ -94,17 +94,17 @@ void VToolBisector::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPatte
|
|||
DialogBisector *dialogTool = qobject_cast<DialogBisector*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString formula = dialogTool->getFormula();
|
||||
quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
quint32 thirdPointId = dialogTool->getThirdPointId();
|
||||
QString typeLine = dialogTool->getTypeLine();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
const quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
const quint32 thirdPointId = dialogTool->getThirdPointId();
|
||||
const QString typeLine = dialogTool->getTypeLine();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
Create(0, formula, firstPointId, secondPointId, thirdPointId, typeLine, pointName, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolBisector::Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
|
||||
void VToolBisector::Create(const quint32 _id, QString &formula, const quint32 &firstPointId,
|
||||
const quint32 &secondPointId, const quint32 &thirdPointId, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
|
@ -114,8 +114,7 @@ void VToolBisector::Create(const quint32 _id, const QString &formula, const quin
|
|||
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId);
|
||||
const VPointF *thirdPoint = data->GeometricObject<const VPointF *>(thirdPointId);
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
const qreal result = CheckFormula(formula, data);
|
||||
|
||||
QPointF fPoint = VToolBisector::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
|
||||
thirdPoint->toQPointF(), qApp->toPixel(result));
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
|
||||
static void Create(const quint32 _id, QString &formula, const quint32 &firstPointId,
|
||||
const quint32 &secondPointId, const quint32 &thirdPointId, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||
VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||
|
|
|
@ -83,21 +83,20 @@ void VToolCutArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogCutArc *dialogTool = qobject_cast<DialogCutArc*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
QString formula = dialogTool->getFormula();
|
||||
quint32 arcId = dialogTool->getArcId();
|
||||
const quint32 arcId = dialogTool->getArcId();
|
||||
Create(0, pointName, formula, arcId, 5, 10, scene, doc, data, Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCutArc::Create(const quint32 _id, const QString &pointName, const QString &formula, const quint32 &arcId,
|
||||
void VToolCutArc::Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &arcId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
{
|
||||
const VArc *arc = data->GeometricObject<const VArc *>(arcId);
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
const qreal result = CheckFormula(formula, data);
|
||||
|
||||
VArc arc1;
|
||||
VArc arc2;
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &pointName, const QString &formula, const quint32 &arcId,
|
||||
static void Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &arcId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
static const QString ToolType;
|
||||
|
|
|
@ -83,22 +83,20 @@ void VToolCutSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene,
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogCutSpline *dialogTool = qobject_cast<DialogCutSpline*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
QString formula = dialogTool->getFormula();
|
||||
quint32 splineId = dialogTool->getSplineId();
|
||||
const quint32 splineId = dialogTool->getSplineId();
|
||||
Create(0, pointName, formula, splineId, 5, 10, scene, doc, data, Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCutSpline::Create(const quint32 _id, const QString &pointName,
|
||||
const QString &formula, const quint32 &splineId, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
void VToolCutSpline::Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &splineId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
{
|
||||
const VSpline *spl = data->GeometricObject<const VSpline *>(splineId);
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
const qreal result = CheckFormula(formula, data);
|
||||
|
||||
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
|
||||
QPointF point = spl->CutSpline(qApp->toPixel(result), spl1p2, spl1p3, spl2p2, spl2p3);
|
||||
|
|
|
@ -78,9 +78,8 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &pointName,
|
||||
const QString &formula, const quint32 &splineId, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
static void Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &splineId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
static const QString ToolType;
|
||||
static const QString AttrSpline;
|
||||
|
|
|
@ -83,14 +83,14 @@ void VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphicsScene *scene, V
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogCutSplinePath *dialogTool = qobject_cast<DialogCutSplinePath*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
QString formula = dialogTool->getFormula();
|
||||
quint32 splinePathId = dialogTool->getSplinePathId();
|
||||
const quint32 splinePathId = dialogTool->getSplinePathId();
|
||||
Create(0, pointName, formula, splinePathId, 5, 10, scene, doc, data, Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, const QString &formula,
|
||||
void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, QString &formula,
|
||||
const quint32 &splinePathId, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
|
@ -98,8 +98,7 @@ void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, con
|
|||
const VSplinePath *splPath = data->GeometricObject<const VSplinePath *>(splinePathId);
|
||||
Q_CHECK_PTR(splPath);
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
const qreal result = CheckFormula(formula, data);
|
||||
|
||||
quint32 id = _id;
|
||||
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
|
||||
|
|
|
@ -81,10 +81,9 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &pointName, const QString &formula,
|
||||
const quint32 &splinePathId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||
VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||
const Valentina::Sources &typeCreation);
|
||||
static void Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &splinePathId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
static const QString ToolType;
|
||||
static const QString AttrSplinePath;
|
||||
public slots:
|
||||
|
|
|
@ -71,16 +71,17 @@ VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogEndLine *dialogTool = qobject_cast<DialogEndLine*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString pointName = dialogTool->getPointName();
|
||||
QString typeLine = dialogTool->getTypeLine();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
const QString typeLine = dialogTool->getTypeLine();
|
||||
QString formula = dialogTool->getFormula();
|
||||
qreal angle = dialogTool->getAngle();
|
||||
quint32 basePointId = dialogTool->getBasePointId();
|
||||
const qreal angle = dialogTool->getAngle();
|
||||
const quint32 basePointId = dialogTool->getBasePointId();
|
||||
|
||||
VToolEndLine *point = nullptr;
|
||||
point=Create(0, pointName, typeLine, formula, angle, basePointId, 5, 10, scene, doc, data, Document::FullParse,
|
||||
Valentina::FromGui);
|
||||
if (point != nullptr) {
|
||||
if (point != nullptr)
|
||||
{
|
||||
point->dialog=dialogTool;
|
||||
}
|
||||
return point;
|
||||
|
@ -88,17 +89,14 @@ VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qreal &angle, const quint32 &basePointId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
QString &formula, const qreal &angle, const quint32 &basePointId,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
{
|
||||
const VPointF *basePoint = data->GeometricObject<const VPointF *>(basePointId);
|
||||
QLineF line = QLineF(basePoint->toQPointF(), QPointF(basePoint->x()+100, basePoint->y()));
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
|
||||
line.setLength(qApp->toPixel(result));
|
||||
line.setLength(qApp->toPixel(CheckFormula(formula, data)));
|
||||
line.setAngle(angle);
|
||||
quint32 id = _id;
|
||||
if (typeCreation == Valentina::FromGui)
|
||||
|
@ -114,15 +112,6 @@ VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName,
|
|||
{
|
||||
doc->UpdateToolData(id, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
data->UpdateGObject(id, new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
|
||||
data->AddLine(basePointId, id);
|
||||
if (parse != Document::FullParse)
|
||||
{
|
||||
doc->UpdateToolData(id, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
VDrawTool::AddRecord(id, Valentina::EndLineTool, doc);
|
||||
if (parse == Document::FullParse)
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
* @return the created tool
|
||||
*/
|
||||
static VToolEndLine *Create(const quint32 _id, const QString &pointName, const QString &typeLine,
|
||||
const QString &formula, const qreal &angle, const quint32 &basePointId, const qreal &mx,
|
||||
QString &formula, const qreal &angle, const quint32 &basePointId, const qreal &mx,
|
||||
const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
static const QString ToolType;
|
||||
|
|
|
@ -70,11 +70,11 @@ void VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
|
|||
DialogHeight *dialogTool = qobject_cast<DialogHeight*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogHeight::UpdateList);
|
||||
QString pointName = dialogTool->getPointName();
|
||||
QString typeLine = dialogTool->getTypeLine();
|
||||
quint32 basePointId = dialogTool->getBasePointId();
|
||||
quint32 p1LineId = dialogTool->getP1LineId();
|
||||
quint32 p2LineId = dialogTool->getP2LineId();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
const QString typeLine = dialogTool->getTypeLine();
|
||||
const quint32 basePointId = dialogTool->getBasePointId();
|
||||
const quint32 p1LineId = dialogTool->getP1LineId();
|
||||
const quint32 p2LineId = dialogTool->getP2LineId();
|
||||
Create(0, pointName, typeLine, basePointId, p1LineId, p2LineId, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
|
|
@ -76,9 +76,9 @@ void VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogLine *dialogTool = qobject_cast<DialogLine*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
quint32 firstPoint = dialogTool->getFirstPoint();
|
||||
quint32 secondPoint = dialogTool->getSecondPoint();
|
||||
QString typeLine = dialogTool->getTypeLine();
|
||||
const quint32 firstPoint = dialogTool->getFirstPoint();
|
||||
const quint32 secondPoint = dialogTool->getSecondPoint();
|
||||
const QString typeLine = dialogTool->getTypeLine();
|
||||
Create(0, firstPoint, secondPoint, typeLine, scene, doc, data, Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,11 +70,11 @@ void VToolLineIntersect::Create(DialogTool *dialog, VMainGraphicsScene *scene, V
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogLineIntersect *dialogTool = qobject_cast<DialogLineIntersect*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
quint32 p1Line1Id = dialogTool->getP1Line1();
|
||||
quint32 p2Line1Id = dialogTool->getP2Line1();
|
||||
quint32 p1Line2Id = dialogTool->getP1Line2();
|
||||
quint32 p2Line2Id = dialogTool->getP2Line2();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const quint32 p1Line1Id = dialogTool->getP1Line1();
|
||||
const quint32 p2Line1Id = dialogTool->getP2Line1();
|
||||
const quint32 p1Line2Id = dialogTool->getP1Line2();
|
||||
const quint32 p2Line2Id = dialogTool->getP2Line2();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
Create(0, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, pointName, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
|
|
@ -72,17 +72,17 @@ void VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
|
|||
DialogNormal *dialogTool = qobject_cast<DialogNormal*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString formula = dialogTool->getFormula();
|
||||
quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
QString typeLine = dialogTool->getTypeLine();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
qreal angle = dialogTool->getAngle();
|
||||
const quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
const quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
const QString typeLine = dialogTool->getTypeLine();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
const qreal angle = dialogTool->getAngle();
|
||||
Create(0, formula, firstPointId, secondPointId, typeLine, pointName, angle, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolNormal::Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
|
||||
void VToolNormal::Create(const quint32 _id, QString &formula, const quint32 &firstPointId,
|
||||
const quint32 &secondPointId, const QString &typeLine, const QString &pointName,
|
||||
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||
VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||
|
@ -91,8 +91,7 @@ void VToolNormal::Create(const quint32 _id, const QString &formula, const quint3
|
|||
const VPointF *firstPoint = data->GeometricObject<const VPointF *>(firstPointId);
|
||||
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(secondPointId);
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
const qreal result = CheckFormula(formula, data);
|
||||
|
||||
QPointF fPoint = VToolNormal::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
|
||||
qApp->toPixel(result), angle);
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
|
||||
static void Create(const quint32 _id, QString &formula, const quint32 &firstPointId,
|
||||
const quint32 &secondPointId, const QString &typeLine, const QString &pointName,
|
||||
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
|
||||
VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||
|
|
|
@ -98,27 +98,25 @@ void VToolPointOfContact::Create(DialogTool *dialog, VMainGraphicsScene *scene,
|
|||
DialogPointOfContact *dialogTool = qobject_cast<DialogPointOfContact*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString radius = dialogTool->getRadius();
|
||||
quint32 center = dialogTool->getCenter();
|
||||
quint32 firstPointId = dialogTool->getFirstPoint();
|
||||
quint32 secondPointId = dialogTool->getSecondPoint();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const quint32 center = dialogTool->getCenter();
|
||||
const quint32 firstPointId = dialogTool->getFirstPoint();
|
||||
const quint32 secondPointId = dialogTool->getSecondPoint();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
Create(0, radius, center, firstPointId, secondPointId, pointName, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolPointOfContact::Create(const quint32 _id, const QString &radius, const quint32 ¢er,
|
||||
const quint32 &firstPointId, const quint32 &secondPointId,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
void VToolPointOfContact::Create(const quint32 _id, QString &radius, const quint32 ¢er, const quint32 &firstPointId,
|
||||
const quint32 &secondPointId, const QString &pointName, const qreal &mx,
|
||||
const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation)
|
||||
{
|
||||
const VPointF *centerP = data->GeometricObject<const VPointF *>(center);
|
||||
const VPointF *firstP = data->GeometricObject<const VPointF *>(firstPointId);
|
||||
const VPointF *secondP = data->GeometricObject<const VPointF *>(secondPointId);
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(radius);
|
||||
const qreal result = CheckFormula(radius, data);
|
||||
|
||||
QPointF fPoint = VToolPointOfContact::FindPoint(qApp->toPixel(result), centerP->toQPointF(),
|
||||
firstP->toQPointF(), secondP->toQPointF());
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &arcRadius, const quint32 ¢er,
|
||||
static void Create(const quint32 _id, QString &arcRadius, const quint32 ¢er,
|
||||
const quint32 &firstPointId, const quint32 &secondPointId, const QString &pointName,
|
||||
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
|
|
|
@ -67,9 +67,9 @@ void VToolPointOfIntersection::Create(DialogTool *dialog, VMainGraphicsScene *sc
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogPointOfIntersection *dialogTool = qobject_cast<DialogPointOfIntersection*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
const quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
Create(0, pointName, firstPointId, secondPointId, 5, 10, scene, doc, data, Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ void VToolShoulderPoint::setDialog()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
//TODO find better way calculate point.
|
||||
QPointF VToolShoulderPoint::FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder,
|
||||
const qreal &length)
|
||||
{
|
||||
|
@ -99,17 +100,17 @@ void VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphicsScene *scene, V
|
|||
DialogShoulderPoint *dialogTool = qobject_cast<DialogShoulderPoint*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
QString formula = dialogTool->getFormula();
|
||||
quint32 p1Line = dialogTool->getP1Line();
|
||||
quint32 p2Line = dialogTool->getP2Line();
|
||||
quint32 pShoulder = dialogTool->getPShoulder();
|
||||
QString typeLine = dialogTool->getTypeLine();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const quint32 p1Line = dialogTool->getP1Line();
|
||||
const quint32 p2Line = dialogTool->getP2Line();
|
||||
const quint32 pShoulder = dialogTool->getPShoulder();
|
||||
const QString typeLine = dialogTool->getTypeLine();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
Create(0, formula, p1Line, p2Line, pShoulder, typeLine, pointName, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolShoulderPoint::Create(const quint32 _id, const QString &formula, const quint32 &p1Line,
|
||||
void VToolShoulderPoint::Create(const quint32 _id, QString &formula, const quint32 &p1Line,
|
||||
const quint32 &p2Line, const quint32 &pShoulder, const QString &typeLine,
|
||||
const QString &pointName, const qreal &mx, const qreal &my,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
|
@ -119,8 +120,7 @@ void VToolShoulderPoint::Create(const quint32 _id, const QString &formula, const
|
|||
const VPointF *secondPoint = data->GeometricObject<const VPointF *>(p2Line);
|
||||
const VPointF *shoulderPoint = data->GeometricObject<const VPointF *>(pShoulder);
|
||||
|
||||
Calculator cal(data);
|
||||
const qreal result = cal.EvalFormula(formula);
|
||||
const qreal result = CheckFormula(formula, data);
|
||||
|
||||
QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
|
||||
shoulderPoint->toQPointF(), qApp->toPixel(result));
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const QString &formula, const quint32 &p1Line, const quint32 &p2Line,
|
||||
static void Create(const quint32 _id, QString &formula, const quint32 &p1Line, const quint32 &p2Line,
|
||||
const quint32 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx,
|
||||
const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Valentina::Sources &typeCreation);
|
||||
|
|
|
@ -95,13 +95,13 @@ void VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogSpline *dialogTool = qobject_cast<DialogSpline*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
quint32 p1 = dialogTool->getP1();
|
||||
quint32 p4 = dialogTool->getP4();
|
||||
qreal kAsm1 = dialogTool->getKAsm1();
|
||||
qreal kAsm2 = dialogTool->getKAsm2();
|
||||
qreal angle1 = dialogTool->getAngle1();
|
||||
qreal angle2 = dialogTool->getAngle2();
|
||||
qreal kCurve = dialogTool->getKCurve();
|
||||
const quint32 p1 = dialogTool->getP1();
|
||||
const quint32 p4 = dialogTool->getP4();
|
||||
const qreal kAsm1 = dialogTool->getKAsm1();
|
||||
const qreal kAsm2 = dialogTool->getKAsm2();
|
||||
const qreal angle1 = dialogTool->getAngle1();
|
||||
const qreal angle2 = dialogTool->getAngle2();
|
||||
const qreal kCurve = dialogTool->getKCurve();
|
||||
Create(0, p1, p4, kAsm1, kAsm2, angle1, angle2, kCurve, scene, doc, data, Document::FullParse,
|
||||
Valentina::FromGui);
|
||||
}
|
||||
|
|
|
@ -70,11 +70,11 @@ void VToolTriangle::Create(DialogTool *dialog, VMainGraphicsScene *scene,
|
|||
Q_CHECK_PTR(dialog);
|
||||
DialogTriangle *dialogTool = qobject_cast<DialogTriangle*>(dialog);
|
||||
Q_CHECK_PTR(dialogTool);
|
||||
quint32 axisP1Id = dialogTool->getAxisP1Id();
|
||||
quint32 axisP2Id = dialogTool->getAxisP2Id();
|
||||
quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
QString pointName = dialogTool->getPointName();
|
||||
const quint32 axisP1Id = dialogTool->getAxisP1Id();
|
||||
const quint32 axisP2Id = dialogTool->getAxisP2Id();
|
||||
const quint32 firstPointId = dialogTool->getFirstPointId();
|
||||
const quint32 secondPointId = dialogTool->getSecondPointId();
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
Create(0, pointName, axisP1Id, axisP2Id, firstPointId, secondPointId, 5, 10, scene, doc, data,
|
||||
Document::FullParse, Valentina::FromGui);
|
||||
}
|
||||
|
|
|
@ -309,9 +309,8 @@ void VAbstractTool::LineCoefficients(const QLineF &line, qreal *a, qreal *b, qre
|
|||
const QStringList VAbstractTool::Styles()
|
||||
{
|
||||
//Keep synchronize with DialogTool lineStyles list!!!
|
||||
QStringList styles;
|
||||
styles << TypeLineNone << TypeLineLine << TypeLineDashLine << TypeLineDotLine << TypeLineDashDotLine
|
||||
<< TypeLineDashDotDotLine;
|
||||
QStringList styles{TypeLineNone, TypeLineLine, TypeLineDashLine, TypeLineDotLine, TypeLineDashDotLine,
|
||||
TypeLineDashDotDotLine};
|
||||
return styles;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QSettings>
|
||||
|
||||
#include <container/calculator.h>
|
||||
|
||||
|
@ -1721,23 +1722,10 @@ QString VApplication::FormulaFromUser(const QString &formula)
|
|||
{
|
||||
QString newFormula = formula;
|
||||
|
||||
QMap<int, QString> tokens;
|
||||
QMap<int, QString> numbers;
|
||||
try
|
||||
{
|
||||
Calculator cal(formula);
|
||||
tokens = cal.GetTokens();
|
||||
numbers = cal.GetNumbers();
|
||||
}
|
||||
catch(qmu::QmuParserError &e)
|
||||
{
|
||||
qDebug() << "\nMath parser error:\n"
|
||||
<< "--------------------------------------\n"
|
||||
<< "Message: " << e.GetMsg() << "\n"
|
||||
<< "Expression: " << e.GetExpr() << "\n"
|
||||
<< "--------------------------------------";
|
||||
return newFormula;
|
||||
}
|
||||
Calculator *cal = new Calculator(formula);
|
||||
QMap<int, QString> tokens = cal->GetTokens();
|
||||
QMap<int, QString> numbers = cal->GetNumbers();
|
||||
delete cal;
|
||||
|
||||
QList<int> tKeys = tokens.keys();
|
||||
QList<QString> tValues = tokens.values();
|
||||
|
@ -1789,12 +1777,16 @@ QString VApplication::FormulaFromUser(const QString &formula)
|
|||
}
|
||||
}
|
||||
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
||||
QApplication::applicationName());
|
||||
bool osSeparatorValue = settings.value("configuration/osSeparator", 1).toBool();
|
||||
|
||||
QLocale loc = QLocale::system();
|
||||
if(loc != QLocale(QLocale::C))
|
||||
if(loc != QLocale(QLocale::C) && osSeparatorValue)
|
||||
{
|
||||
QList<int> nKeys = numbers.keys();
|
||||
QList<QString> nValues = numbers.values();
|
||||
for (int i = 0; i < tKeys.size(); ++i)
|
||||
for (int i = 0; i < nKeys.size(); ++i)
|
||||
{
|
||||
bool ok = false;
|
||||
qreal d = loc.toDouble(nValues.at(i), &ok);
|
||||
|
@ -1833,9 +1825,10 @@ QString VApplication::FormulaToUser(const QString &formula)
|
|||
QMap<int, QString> numbers;
|
||||
try
|
||||
{
|
||||
Calculator cal(formula, false);
|
||||
tokens = cal.GetTokens();
|
||||
numbers = cal.GetNumbers();
|
||||
Calculator *cal = new Calculator(formula, false);
|
||||
tokens = cal->GetTokens();
|
||||
numbers = cal->GetNumbers();
|
||||
delete cal;
|
||||
}
|
||||
catch (qmu::QmuParserError &e)
|
||||
{
|
||||
|
@ -1903,12 +1896,16 @@ QString VApplication::FormulaToUser(const QString &formula)
|
|||
}
|
||||
}
|
||||
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
|
||||
QApplication::applicationName());
|
||||
bool osSeparatorValue = settings.value("configuration/osSeparator", 1).toBool();
|
||||
|
||||
QLocale loc = QLocale::system();
|
||||
if(loc != QLocale::C)
|
||||
if(loc != QLocale::C && osSeparatorValue)
|
||||
{
|
||||
QList<int> nKeys = numbers.keys();
|
||||
QList<QString> nValues = numbers.values();
|
||||
for (int i = 0; i < tKeys.size(); ++i)
|
||||
for (int i = 0; i < nKeys.size(); ++i)
|
||||
{
|
||||
QLocale loc = QLocale(QLocale::C);
|
||||
bool ok = false;
|
||||
|
|
|
@ -338,8 +338,7 @@ void VDomDocument::setContent(const QString &fileName)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
Valentina::Units VDomDocument::StrToUnits(const QString &unit)
|
||||
{
|
||||
QStringList units;
|
||||
units << UnitMM << UnitCM << UnitINCH;
|
||||
QStringList units{UnitMM, UnitCM, UnitINCH};
|
||||
Valentina::Units result = Valentina::Cm;
|
||||
switch (units.indexOf(unit))
|
||||
{
|
||||
|
|
|
@ -305,8 +305,7 @@ QString VIndividualMeasurements::GenderToStr(const VIndividualMeasurements::Gend
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VIndividualMeasurements::Genders VIndividualMeasurements::StrToGender(const QString &sex)
|
||||
{
|
||||
QStringList genders;
|
||||
genders << SexMale << SexFemale;
|
||||
QStringList genders{SexMale, SexFemale};
|
||||
switch (genders.indexOf(sex))
|
||||
{
|
||||
case 0: // SexMale
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
#include "vindividualmeasurements.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <qmuparsererror.h>
|
||||
#include "../../libs/qmuparser/qmuparsererror.h"
|
||||
#include <exception/vexceptionemptyparameter.h>
|
||||
|
||||
const QString VPattern::TagPattern = QStringLiteral("pattern");
|
||||
const QString VPattern::TagCalculation = QStringLiteral("calculation");
|
||||
|
@ -214,9 +215,8 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
|
|||
const QDomElement domElement = domNode.toElement();
|
||||
if (domElement.isNull() == false)
|
||||
{
|
||||
QStringList tags;
|
||||
tags << TagDraw << TagIncrements << TagAuthor << TagDescription << TagNotes << TagMeasurements
|
||||
<< TagVersion;
|
||||
QStringList tags{TagDraw, TagIncrements, TagAuthor, TagDescription, TagNotes, TagMeasurements,
|
||||
TagVersion};
|
||||
switch (tags.indexOf(domElement.tagName()))
|
||||
{
|
||||
case 0: // TagDraw
|
||||
|
@ -487,8 +487,7 @@ Valentina::Units VPattern::MUnit() const
|
|||
QDomElement element = list.at(0).toElement();
|
||||
if (element.isElement())
|
||||
{
|
||||
QStringList units;
|
||||
units << "mm" << "cm" << "inch";
|
||||
QStringList units{"mm", "cm", "inch"};
|
||||
QString unit = GetParametrString(element, AttrUnit);
|
||||
switch (units.indexOf(unit))
|
||||
{
|
||||
|
@ -520,8 +519,7 @@ Pattern::Measurements VPattern::MType() const
|
|||
if (element.isElement())
|
||||
{
|
||||
QString type = GetParametrString(element, AttrType);
|
||||
QStringList types;
|
||||
types << "standard" << "individual";
|
||||
QStringList types{"standard", "individual"};
|
||||
switch (types.indexOf(type))
|
||||
{
|
||||
case 0:// standard
|
||||
|
@ -559,14 +557,53 @@ bool VPattern::SaveDocument(const QString &fileName)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::FullUpdateTree()
|
||||
{
|
||||
VMainGraphicsScene *scene = new VMainGraphicsScene();
|
||||
VMainGraphicsScene *scene = nullptr;
|
||||
try
|
||||
{
|
||||
scene = new VMainGraphicsScene();
|
||||
Parse(Document::LiteParse, scene, scene);
|
||||
}
|
||||
catch (const VExceptionObjectError &e)
|
||||
{
|
||||
delete scene;
|
||||
e.CriticalMessageBox(tr("Error parsing file."));
|
||||
emit ClearMainWindow();
|
||||
return;
|
||||
}
|
||||
catch (const VExceptionConversionError &e)
|
||||
{
|
||||
delete scene;
|
||||
e.CriticalMessageBox(tr("Error can't convert value."));
|
||||
emit ClearMainWindow();
|
||||
return;
|
||||
}
|
||||
catch (const VExceptionEmptyParameter &e)
|
||||
{
|
||||
delete scene;
|
||||
e.CriticalMessageBox(tr("Error empty parameter."));
|
||||
emit ClearMainWindow();
|
||||
return;
|
||||
}
|
||||
catch (const VExceptionWrongId &e)
|
||||
{
|
||||
delete scene;
|
||||
e.CriticalMessageBox(tr("Error wrong id."));
|
||||
emit ClearMainWindow();
|
||||
return;
|
||||
}
|
||||
catch (VException &e)
|
||||
{
|
||||
delete scene;
|
||||
e.CriticalMessageBox(tr("Error parsing file."));
|
||||
emit ClearMainWindow();
|
||||
return;
|
||||
}
|
||||
catch (const std::bad_alloc &)
|
||||
{
|
||||
delete scene;
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle(tr("Error!"));
|
||||
msgBox.setText(tr("Error parsing file."));
|
||||
|
@ -575,13 +612,12 @@ void VPattern::FullUpdateTree()
|
|||
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.exec();
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
#endif
|
||||
emit ClearMainWindow();
|
||||
return;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
delete scene;
|
||||
throw;
|
||||
}
|
||||
|
||||
delete scene;
|
||||
setCurrentData();
|
||||
|
@ -613,8 +649,7 @@ void VPattern::ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphicsScen
|
|||
const QDomElement domElement = domNode.toElement();
|
||||
if (domElement.isNull() == false)
|
||||
{
|
||||
QStringList tags;
|
||||
tags << TagCalculation << TagModeling << TagDetails;
|
||||
QStringList tags{TagCalculation, TagModeling, TagDetails};
|
||||
switch (tags.indexOf(domElement.tagName()))
|
||||
{
|
||||
case 0: // TagCalculation
|
||||
|
@ -656,11 +691,10 @@ void VPattern::ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *
|
|||
const qint32 num = nodeList.size();
|
||||
for (qint32 i = 0; i < num; ++i)
|
||||
{
|
||||
const QDomElement domElement = nodeList.at(i).toElement();
|
||||
QDomElement domElement = nodeList.at(i).toElement();
|
||||
if (domElement.isNull() == false)
|
||||
{
|
||||
QStringList tags;
|
||||
tags << TagPoint << TagLine << TagSpline << TagArc << TagTools;
|
||||
QStringList tags{TagPoint, TagLine, TagSpline, TagArc, TagTools};
|
||||
switch (tags.indexOf(domElement.tagName()))
|
||||
{
|
||||
case 0: // TagPoint
|
||||
|
@ -719,9 +753,8 @@ void VPattern::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomEle
|
|||
|
||||
const QString t = GetParametrString(element, AttrType, "NodePoint");
|
||||
Valentina::Tools tool;
|
||||
QStringList types;
|
||||
types << VToolDetail::NodePoint << VToolDetail::NodeArc << VToolDetail::NodeSpline <<
|
||||
VToolDetail::NodeSplinePath;
|
||||
QStringList types{VToolDetail::NodePoint, VToolDetail::NodeArc, VToolDetail::NodeSpline,
|
||||
VToolDetail::NodeSplinePath};
|
||||
switch (types.indexOf(t))
|
||||
{
|
||||
case 0: // VToolDetail::NodePoint
|
||||
|
@ -779,7 +812,7 @@ void VPattern::ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &domElement,
|
||||
void VPattern::ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElement,
|
||||
const Document::Documents &parse, const QString &type)
|
||||
{
|
||||
Q_CHECK_PTR(scene);
|
||||
|
@ -787,12 +820,11 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of point is empty");
|
||||
|
||||
|
||||
QStringList points;
|
||||
points << VToolSinglePoint::ToolType << VToolEndLine::ToolType << VToolAlongLine::ToolType
|
||||
<< VToolShoulderPoint::ToolType << VToolNormal::ToolType << VToolBisector::ToolType
|
||||
<< VToolLineIntersect::ToolType << VToolPointOfContact::ToolType << VNodePoint::ToolType
|
||||
<< VToolHeight::ToolType << VToolTriangle::ToolType << VToolPointOfIntersection::ToolType
|
||||
<< VToolCutSpline::ToolType << VToolCutSplinePath::ToolType << VToolCutArc::ToolType;
|
||||
QStringList points{VToolSinglePoint::ToolType, VToolEndLine::ToolType, VToolAlongLine::ToolType,
|
||||
VToolShoulderPoint::ToolType, VToolNormal::ToolType, VToolBisector::ToolType,
|
||||
VToolLineIntersect::ToolType, VToolPointOfContact::ToolType, VNodePoint::ToolType,
|
||||
VToolHeight::ToolType, VToolTriangle::ToolType, VToolPointOfIntersection::ToolType,
|
||||
VToolCutSpline::ToolType, VToolCutSplinePath::ToolType, VToolCutArc::ToolType};
|
||||
switch (points.indexOf(type))
|
||||
{
|
||||
case 0: //VToolSinglePoint::ToolType
|
||||
|
@ -842,11 +874,19 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
|
||||
VAbstractTool::TypeLineLine);
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
|
||||
const quint32 basePointId = GetParametrUInt(domElement, VAbstractTool::AttrBasePoint, "0");
|
||||
const qreal angle = GetParametrDouble(domElement, VAbstractTool::AttrAngle, "0.0");
|
||||
|
||||
VToolEndLine::Create(id, name, typeLine, formula, angle, basePointId,
|
||||
VToolEndLine::Create(id, name, typeLine, f, angle, basePointId,
|
||||
mx, my, scene, this, data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -873,11 +913,18 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
|
||||
VAbstractTool::TypeLineLine);
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
|
||||
const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
|
||||
|
||||
VToolAlongLine::Create(id, name, typeLine, formula, firstPointId, secondPointId, mx, my, scene, this,
|
||||
VToolAlongLine::Create(id, name, typeLine, f, firstPointId, secondPointId, mx, my, scene, this,
|
||||
data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -904,12 +951,19 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
|
||||
VAbstractTool::TypeLineLine);
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
const quint32 p1Line = GetParametrUInt(domElement, VAbstractTool::AttrP1Line, "0");
|
||||
const quint32 p2Line = GetParametrUInt(domElement, VAbstractTool::AttrP2Line, "0");
|
||||
const quint32 pShoulder = GetParametrUInt(domElement, VAbstractTool::AttrPShoulder, "0");
|
||||
|
||||
VToolShoulderPoint::Create(id, formula, p1Line, p2Line, pShoulder, typeLine, name, mx, my, scene, this,
|
||||
VToolShoulderPoint::Create(id, f, p1Line, p2Line, pShoulder, typeLine, name, mx, my, scene, this,
|
||||
data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -936,12 +990,19 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
|
||||
VAbstractTool::TypeLineLine);
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
|
||||
const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
|
||||
const qreal angle = GetParametrDouble(domElement, VAbstractTool::AttrAngle, "0.0");
|
||||
|
||||
VToolNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name, angle, mx, my, scene,
|
||||
VToolNormal::Create(id, f, firstPointId, secondPointId, typeLine, name, angle, mx, my, scene,
|
||||
this, data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -968,12 +1029,19 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
|
||||
VAbstractTool::TypeLineLine);
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
|
||||
const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
|
||||
const quint32 thirdPointId = GetParametrUInt(domElement, VAbstractTool::AttrThirdPoint, "0");
|
||||
|
||||
VToolBisector::Create(id, formula, firstPointId, secondPointId, thirdPointId,
|
||||
VToolBisector::Create(id, f, firstPointId, secondPointId, thirdPointId,
|
||||
typeLine, name, mx, my, scene, this, data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -1020,12 +1088,19 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const qreal mx = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
|
||||
const qreal my = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
|
||||
const QString radius = GetParametrString(domElement, VAbstractTool::AttrRadius, "0");
|
||||
QString f = radius;//need for saving fixed formula;
|
||||
const quint32 center = GetParametrUInt(domElement, VAbstractTool::AttrCenter, "0");
|
||||
const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
|
||||
const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
|
||||
|
||||
VToolPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name, mx, my, scene, this,
|
||||
VToolPointOfContact::Create(id, f, center, firstPointId, secondPointId, name, mx, my, scene, this,
|
||||
data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != radius)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrRadius, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -1135,10 +1210,16 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const qreal mx = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
|
||||
const qreal my = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
const quint32 splineId = GetParametrUInt(domElement, VToolCutSpline::AttrSpline, "0");
|
||||
|
||||
VToolCutSpline::Create(id, name, formula, splineId, mx, my, scene, this, data, parse,
|
||||
Valentina::FromFile);
|
||||
VToolCutSpline::Create(id, name, f, splineId, mx, my, scene, this, data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -1163,10 +1244,17 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const qreal mx = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
|
||||
const qreal my = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
const quint32 splinePathId = GetParametrUInt(domElement, VToolCutSplinePath::AttrSplinePath, "0");
|
||||
|
||||
VToolCutSplinePath::Create(id, name, formula, splinePathId, mx, my,
|
||||
scene, this, data, parse, Valentina::FromFile);
|
||||
VToolCutSplinePath::Create(id, name, f, splinePathId, mx, my, scene, this, data, parse,
|
||||
Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -1191,9 +1279,16 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const qreal mx = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
|
||||
const qreal my = qApp->toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
|
||||
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "0");
|
||||
QString f = formula;//need for saving fixed formula;
|
||||
const quint32 arcId = GetParametrUInt(domElement, VToolCutArc::AttrArc, "0");
|
||||
|
||||
VToolCutArc::Create(id, name, formula, arcId, mx, my, scene, this, data, parse, Valentina::FromFile);
|
||||
VToolCutArc::Create(id, name, f, arcId, mx, my, scene, this, data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (f != formula)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrLength, f);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -1248,8 +1343,8 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
|
|||
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
|
||||
Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of spline is empty");
|
||||
|
||||
QStringList splines;
|
||||
splines << VToolSpline::ToolType << VToolSplinePath::ToolType << VNodeSpline::ToolType << VNodeSplinePath::ToolType;
|
||||
QStringList splines{VToolSpline::ToolType, VToolSplinePath::ToolType, VNodeSpline::ToolType,
|
||||
VNodeSplinePath::ToolType};
|
||||
switch (splines.indexOf(type))
|
||||
{
|
||||
case 0: //VToolSpline::ToolType
|
||||
|
@ -1363,15 +1458,14 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &domElement,
|
||||
const Document::Documents &parse, const QString &type)
|
||||
void VPattern::ParseArcElement(VMainGraphicsScene *scene, QDomElement &domElement, const Document::Documents &parse,
|
||||
const QString &type)
|
||||
{
|
||||
Q_CHECK_PTR(scene);
|
||||
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
|
||||
Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of spline is empty");
|
||||
|
||||
QStringList arcs;
|
||||
arcs << VToolArc::ToolType << VNodeArc::ToolType;
|
||||
QStringList arcs{VToolArc::ToolType, VNodeArc::ToolType};
|
||||
|
||||
switch (arcs.indexOf(type))
|
||||
{
|
||||
|
@ -1381,10 +1475,21 @@ void VPattern::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &dom
|
|||
const quint32 id = GetParametrId(domElement);
|
||||
const quint32 center = GetParametrUInt(domElement, VAbstractTool::AttrCenter, "0");
|
||||
const QString radius = GetParametrString(domElement, VAbstractTool::AttrRadius, "10");
|
||||
QString r = radius;//need for saving fixed formula;
|
||||
const QString f1 = GetParametrString(domElement, VAbstractTool::AttrAngle1, "180");
|
||||
QString f1Fix = f1;//need for saving fixed formula;
|
||||
const QString f2 = GetParametrString(domElement, VAbstractTool::AttrAngle2, "270");
|
||||
QString f2Fix = f2;//need for saving fixed formula;
|
||||
|
||||
VToolArc::Create(id, center, radius, f1, f2, scene, this, data, parse, Valentina::FromFile);
|
||||
VToolArc::Create(id, center, r, f1Fix, f2Fix, scene, this, data, parse, Valentina::FromFile);
|
||||
//Rewrite attribute formula. Need for situation when we have wrong formula.
|
||||
if (r != radius || f1Fix != f1 || f2Fix != f2)
|
||||
{
|
||||
SetAttribute(domElement, VAbstractTool::AttrRadius, r);
|
||||
SetAttribute(domElement, VAbstractTool::AttrAngle1, f1Fix);
|
||||
SetAttribute(domElement, VAbstractTool::AttrAngle2, f2Fix);
|
||||
haveLiteChange();
|
||||
}
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -1434,8 +1539,7 @@ void VPattern::ParseToolsElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
|
||||
Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of spline is empty");
|
||||
|
||||
QStringList tools;
|
||||
tools << VToolUnionDetails::ToolType;
|
||||
QStringList tools{VToolUnionDetails::ToolType};
|
||||
|
||||
switch (tools.indexOf(type))
|
||||
{
|
||||
|
|
|
@ -236,6 +236,7 @@ signals:
|
|||
* @param id tool id.
|
||||
*/
|
||||
void ChangedCursor(quint32 id);
|
||||
void ClearMainWindow();
|
||||
public slots:
|
||||
/**
|
||||
* @brief FullUpdateTree lite parse file.
|
||||
|
@ -334,7 +335,7 @@ private:
|
|||
* @param type type of point.
|
||||
* @param mode draw mode.
|
||||
*/
|
||||
void ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement,
|
||||
void ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElement,
|
||||
const Document::Documents &parse, const QString &type);
|
||||
/**
|
||||
* @brief ParseLineElement parse line tag.
|
||||
|
@ -363,7 +364,7 @@ private:
|
|||
* @param type type of spline.
|
||||
* @param mode draw mode.
|
||||
*/
|
||||
void ParseArcElement(VMainGraphicsScene *scene, const QDomElement& domElement,
|
||||
void ParseArcElement(VMainGraphicsScene *scene, QDomElement &domElement,
|
||||
const Document::Documents &parse, const QString& type);
|
||||
/**
|
||||
* @brief ParseToolsElement parse tools tag.
|
||||
|
|
|
@ -34,7 +34,7 @@ const QString VStandardMeasurements::TagDescription = QStringLiteral("descr
|
|||
const QString VStandardMeasurements::TagSize = QStringLiteral("size");
|
||||
const QString VStandardMeasurements::TagHeight = QStringLiteral("height");
|
||||
const QString VStandardMeasurements::AttrValue = QStringLiteral("value");
|
||||
const QString VStandardMeasurements::AttrSize_increace = QStringLiteral("size_increace");
|
||||
const QString VStandardMeasurements::AttrSize_increase = QStringLiteral("size_increase");
|
||||
const QString VStandardMeasurements::AttrHeight_increase = QStringLiteral("height_increase");
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -217,17 +217,17 @@ void VStandardMeasurements::Measurement(const QString &tag)
|
|||
if (domElement.isNull() == false)
|
||||
{
|
||||
const qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
|
||||
const qreal size_increace = GetParametrDouble(domElement, AttrSize_increace, "0.0");
|
||||
const qreal size_increase = GetParametrDouble(domElement, AttrSize_increase, "0.0");
|
||||
const qreal height_increase = GetParametrDouble(domElement, AttrHeight_increase, "0.0");
|
||||
|
||||
if (Unit() == Valentina::Mm)// Convert to Cm.
|
||||
{
|
||||
data->AddMeasurement(tag, VMeasurement(value/10.0, size_increace/10.0, height_increase/10.0,
|
||||
data->AddMeasurement(tag, VMeasurement(value/10.0, size_increase/10.0, height_increase/10.0,
|
||||
qApp->GuiText(tag), qApp->Description(tag), tag));
|
||||
}
|
||||
else// Cm or inch.
|
||||
{
|
||||
data->AddMeasurement(tag, VMeasurement(value, size_increace, height_increase, qApp->GuiText(tag),
|
||||
data->AddMeasurement(tag, VMeasurement(value, size_increase, height_increase, qApp->GuiText(tag),
|
||||
qApp->Description(tag), tag));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
static const QString TagSize;
|
||||
static const QString TagHeight;
|
||||
static const QString AttrValue;
|
||||
static const QString AttrSize_increace;
|
||||
static const QString AttrSize_increase;
|
||||
static const QString AttrHeight_increase;
|
||||
private:
|
||||
void Measurement(const QString &tag);
|
||||
|
|
3
src/libs/libs.pro
Normal file
3
src/libs/libs.pro
Normal file
|
@ -0,0 +1,3 @@
|
|||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
SUBDIRS = qmuparser
|
|
@ -245,9 +245,9 @@ QmuParser::QmuParser():QmuParserBase()
|
|||
*/
|
||||
void QmuParser::InitCharSets()
|
||||
{
|
||||
DefineNameChars( "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" );
|
||||
DefineOprtChars( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-*^/?<>=#!$%&|~'_{}" );
|
||||
DefineInfixOprtChars( "/+-*^?<>=#!$%&|~'_" );
|
||||
DefineNameChars( QStringLiteral("0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") );
|
||||
DefineOprtChars( QStringLiteral("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-*^/?<>=#!$%&|~'_{}") );
|
||||
DefineInfixOprtChars( QStringLiteral("/+-*^?<>=#!$%&|~'_") );
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -50,9 +50,8 @@ bool QmuParserBase::g_DbgDumpStack = false;
|
|||
* When defining custom binary operators with #AddOprt(...) make sure not to choose
|
||||
* names conflicting with these definitions.
|
||||
*/
|
||||
const QStringList QmuParserBase::c_DefaultOprt = QStringList() << "<=" << ">=" << "!=" << "==" << "<" << ">"
|
||||
<< "+" << "-" << "*" << "/" << "^" << "&&"
|
||||
<< "||" << "=" << "(" << ")" << "?" << ":";
|
||||
const QStringList QmuParserBase::c_DefaultOprt{"<=", ">=", "!=", "==", "<", ">", "+", "-", "*", "/", "^", "&&", "||",
|
||||
"=", "(", ")", "?", ":"};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
|
|
|
@ -541,8 +541,7 @@ bool QmuParserTokenReader::IsEOF ( token_type &a_Tok )
|
|||
}
|
||||
catch (qmu::QmuParserError &e)
|
||||
{
|
||||
qDebug() << "\n "
|
||||
<< " Code:" << e.GetCode() << "(" << e.GetMsg() << ")";
|
||||
qDebug() << " Code:" << e.GetCode() << "(" << e.GetMsg() << ")";
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
55
src/src.pro
55
src/src.pro
|
@ -1,52 +1,7 @@
|
|||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS = \
|
||||
sub_app \
|
||||
sub_lib_qmuparser \
|
||||
test/ParserTest
|
||||
|
||||
sub_lib_qmuparser.file = libs/qmuparser/qmuparser.pro
|
||||
sub_parser_tests.file = test/ParserTest/ParserTest.pro
|
||||
sub_parser_tests.depends = sub_lib_qmuparser
|
||||
sub_app.file = app/app.pro
|
||||
sub_app.depends = sub_lib_qmuparser
|
||||
|
||||
|
||||
#This makes it possible to use make -j 4 on your fancy quad-core system with a project that consists of several
|
||||
#components that depend on each other. To simplify the process a bit, the following test function can be defined:
|
||||
|
||||
# addSubdirs(subdirs,deps): Adds directories to the project that depend on
|
||||
# other directories
|
||||
defineTest(addSubdirs) {
|
||||
for(subdirs, 1) {
|
||||
entries = $$files($$subdirs)
|
||||
for(entry, entries) {
|
||||
name = $$replace(entry, [/\\\\], _)
|
||||
SUBDIRS += $$name
|
||||
eval ($${name}.subdir = $$entry)
|
||||
for(dep, 2):eval ($${name}.depends += $$replace(dep, [/\\\\], _))
|
||||
export ($${name}.subdir)
|
||||
export ($${name}.depends)
|
||||
}
|
||||
}
|
||||
export (SUBDIRS)
|
||||
}
|
||||
#You can then use it like to define a project that has:
|
||||
|
||||
#several contributed modules that should be compiled first
|
||||
#addSubdirs (contrib/*)
|
||||
|
||||
#a kernel lib for non-gui related stuff that depends on some contrib modules
|
||||
#addSubdirs (src/lib/kernel, contrib/module1 contrib/module2)
|
||||
|
||||
#a gui lib that depends on the kernel lib and some other contrib modules
|
||||
#addSubdirs (src/lib/gui, src/lib/kernel contrib/module3 contrib/module4)
|
||||
|
||||
#test benches for the kernel and gui libs
|
||||
#addSubdirs (src/tests/kernel, src/lib/kernel)
|
||||
#addSubdirs (src/tests/gui, src/lib/gui)
|
||||
|
||||
#a main program that uses the gui and kernel libs
|
||||
#addSubdirs (src/main, src/lib/gui src/lib/kernel)
|
||||
|
||||
#several modules that only depend on the kernel lib
|
||||
#addSubdirs (src/modules/*, src/lib/kernel)
|
||||
libs \
|
||||
app \
|
||||
test
|
||||
|
|
|
@ -58,9 +58,10 @@ CONFIG(debug, debug|release){
|
|||
QMAKE_DISTCLEAN += $${DESTDIR}/* \
|
||||
$${OBJECTS_DIR}/*
|
||||
|
||||
win32:CONFIG(release, debug|release): LIBS += -L../../libs/qmuparser/bin -lqmuparser2
|
||||
else:win32:CONFIG(debug, debug|release): LIBS += -L../../libs/qmuparser/bin -lqmuparser2
|
||||
else:unix: LIBS += -L../../libs/qmuparser/bin -lqmuparser
|
||||
|
||||
INCLUDEPATH += ../../libs/qmuparser
|
||||
DEPENDPATH += ../../libs/qmuparser
|
||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
||||
else:unix: LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser
|
||||
|
||||
INCLUDEPATH += $$PWD/../../libs/qmuparser
|
||||
DEPENDPATH += $$PWD/../../libs/qmuparser
|
||||
|
|
3
src/test/test.pro
Normal file
3
src/test/test.pro
Normal file
|
@ -0,0 +1,3 @@
|
|||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
SUBDIRS = ParserTest
|
Loading…
Reference in New Issue
Block a user