Don't show section "Size and Height".
--HG-- branch : develop
This commit is contained in:
parent
0838cf2817
commit
4e21bf05e0
|
@ -617,13 +617,6 @@ QStringList VMeasurements::ListAll() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == MeasurementsType::Standard)
|
|
||||||
{
|
|
||||||
// Additionaly each standard table provide size and height
|
|
||||||
listNames.append(size_M);
|
|
||||||
listNames.append(height_M);
|
|
||||||
}
|
|
||||||
|
|
||||||
return listNames;
|
return listNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,12 +641,6 @@ bool VMeasurements::IsDefinedKnownNamesValid() const
|
||||||
{
|
{
|
||||||
QStringList names = AllGroupNames();
|
QStringList names = AllGroupNames();
|
||||||
|
|
||||||
if (type == MeasurementsType::Standard)
|
|
||||||
{
|
|
||||||
names.append(size_M);
|
|
||||||
names.append(height_M);
|
|
||||||
}
|
|
||||||
|
|
||||||
QSet<QString> set;
|
QSet<QString> set;
|
||||||
foreach (const QString &var, names)
|
foreach (const QString &var, names)
|
||||||
{
|
{
|
||||||
|
@ -676,14 +663,12 @@ bool VMeasurements::IsDefinedKnownNamesValid() const
|
||||||
void VMeasurements::SetDataSize()
|
void VMeasurements::SetDataSize()
|
||||||
{
|
{
|
||||||
data->SetSize(UnitConvertor(BaseSize(), MUnit(), *data->GetPatternUnit()));
|
data->SetSize(UnitConvertor(BaseSize(), MUnit(), *data->GetPatternUnit()));
|
||||||
data->SetSizeName(size_M);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VMeasurements::SetDataHeight()
|
void VMeasurements::SetDataHeight()
|
||||||
{
|
{
|
||||||
data->SetHeight(UnitConvertor(BaseHeight(), MUnit(), *data->GetPatternUnit()));
|
data->SetHeight(UnitConvertor(BaseHeight(), MUnit(), *data->GetPatternUnit()));
|
||||||
data->SetHeightName(height_M);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
|
|
||||||
// Keep synchronize all names with initialization in VTranslateVars class!!!!!
|
// Keep synchronize all names with initialization in VTranslateVars class!!!!!
|
||||||
//measurements
|
//measurements
|
||||||
// Need for standard table
|
|
||||||
const QString size_M = QStringLiteral("size");
|
|
||||||
// A
|
// A
|
||||||
const QString height_M = QStringLiteral("height"); // A01
|
const QString height_M = QStringLiteral("height"); // A01
|
||||||
const QString heightNeckBack_M = QStringLiteral("height_neck_back"); // A02
|
const QString heightNeckBack_M = QStringLiteral("height_neck_back"); // A02
|
||||||
|
|
|
@ -192,8 +192,6 @@ enum class GSizes : unsigned char { ALL,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// measurements
|
// measurements
|
||||||
// Need for standard table
|
|
||||||
extern const QString size_M;
|
|
||||||
// A
|
// A
|
||||||
extern const QString height_M; // A01
|
extern const QString height_M; // A01
|
||||||
extern const QString heightNeckBack_M; // A02
|
extern const QString heightNeckBack_M; // A02
|
||||||
|
|
|
@ -507,7 +507,7 @@ const QHash<QString, qreal *> VContainer::PlainVariables() const
|
||||||
{
|
{
|
||||||
QHash<QString, qreal *> vars;
|
QHash<QString, qreal *> vars;
|
||||||
|
|
||||||
QHash<QString, QSharedPointer<VInternalVariable>>::const_iterator i = d->variables.constBegin();
|
auto i = d->variables.constBegin();
|
||||||
while (i != d->variables.constEnd())
|
while (i != d->variables.constEnd())
|
||||||
{
|
{
|
||||||
QSharedPointer<VInternalVariable> var = i.value();
|
QSharedPointer<VInternalVariable> var = i.value();
|
||||||
|
@ -522,12 +522,6 @@ const QHash<QString, qreal *> VContainer::PlainVariables() const
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qApp->patternType() == MeasurementsType::Standard)
|
|
||||||
{
|
|
||||||
vars.insert(SizeName(), rsize());
|
|
||||||
vars.insert(HeightName(), rheight());
|
|
||||||
}
|
|
||||||
|
|
||||||
return vars;
|
return vars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,12 +596,6 @@ void VContainer::SetSize(qreal size)
|
||||||
_size = size;
|
_size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void VContainer::SetSizeName(const QString &name)
|
|
||||||
{
|
|
||||||
d->sizeName = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief SetGrowth set value of growth
|
* @brief SetGrowth set value of growth
|
||||||
|
@ -618,12 +606,6 @@ void VContainer::SetHeight(qreal height)
|
||||||
_height = height;
|
_height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void VContainer::SetHeightName(const QString &name)
|
|
||||||
{
|
|
||||||
d->heightName = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief size return size
|
* @brief size return size
|
||||||
|
@ -640,12 +622,6 @@ qreal *VContainer::rsize()
|
||||||
return &_size;
|
return &_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
QString VContainer::SizeName() const
|
|
||||||
{
|
|
||||||
return d->sizeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief height return height
|
* @brief height return height
|
||||||
|
@ -662,12 +638,6 @@ qreal *VContainer::rheight()
|
||||||
return &_height;
|
return &_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
QString VContainer::HeightName() const
|
|
||||||
{
|
|
||||||
return d->heightName;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief data container with datagObjects return container of gObjects
|
* @brief data container with datagObjects return container of gObjects
|
||||||
|
|
|
@ -54,20 +54,18 @@ class VContainerData : public QSharedData //-V690
|
||||||
public:
|
public:
|
||||||
|
|
||||||
VContainerData(const VTranslateVars *trVars, const Unit *patternUnit)
|
VContainerData(const VTranslateVars *trVars, const Unit *patternUnit)
|
||||||
:sizeName(size_M), heightName(height_M), gObjects(QHash<quint32, QSharedPointer<VGObject> >()),
|
:gObjects(QHash<quint32, QSharedPointer<VGObject> >()),
|
||||||
variables(QHash<QString, QSharedPointer<VInternalVariable> > ()), details(QHash<quint32, VDetail>()),
|
variables(QHash<QString, QSharedPointer<VInternalVariable> > ()), details(QHash<quint32, VDetail>()),
|
||||||
trVars(trVars), patternUnit(patternUnit)
|
trVars(trVars), patternUnit(patternUnit)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
VContainerData(const VContainerData &data)
|
VContainerData(const VContainerData &data)
|
||||||
:QSharedData(data), sizeName(data.sizeName), heightName(data.heightName), gObjects(data.gObjects),
|
:QSharedData(data), gObjects(data.gObjects),
|
||||||
variables(data.variables), details(data.details), trVars(data.trVars), patternUnit(data.patternUnit)
|
variables(data.variables), details(data.details), trVars(data.trVars), patternUnit(data.patternUnit)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~VContainerData();
|
virtual ~VContainerData();
|
||||||
|
|
||||||
QString sizeName;
|
|
||||||
QString heightName;
|
|
||||||
/**
|
/**
|
||||||
* @brief gObjects graphicals objects of pattern.
|
* @brief gObjects graphicals objects of pattern.
|
||||||
*/
|
*/
|
||||||
|
@ -141,15 +139,11 @@ public:
|
||||||
static void ClearUniqueNames();
|
static void ClearUniqueNames();
|
||||||
|
|
||||||
static void SetSize(qreal size);
|
static void SetSize(qreal size);
|
||||||
void SetSizeName(const QString &name);
|
|
||||||
static void SetHeight(qreal height);
|
static void SetHeight(qreal height);
|
||||||
void SetHeightName(const QString &name);
|
|
||||||
static qreal size();
|
static qreal size();
|
||||||
static qreal *rsize();
|
static qreal *rsize();
|
||||||
QString SizeName() const;
|
|
||||||
static qreal height();
|
static qreal height();
|
||||||
static qreal *rheight();
|
static qreal *rheight();
|
||||||
QString HeightName()const;
|
|
||||||
|
|
||||||
bool VariableExist(const QString& name);
|
bool VariableExist(const QString& name);
|
||||||
|
|
||||||
|
|
|
@ -120,23 +120,6 @@ void DialogEditWrongFormula::ValChenged(int row)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QListWidgetItem *item = ui->listWidget->item( row );
|
QListWidgetItem *item = ui->listWidget->item( row );
|
||||||
if (ui->radioButtonSizeGrowth->isChecked())
|
|
||||||
{
|
|
||||||
if (item->text()==data->HeightName())
|
|
||||||
{
|
|
||||||
SetDescription(item->text(), data->height(), VDomDocument::UnitsToStr(qApp->patternUnit(), true),
|
|
||||||
tr("Height"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item->text()==data->SizeName())
|
|
||||||
{
|
|
||||||
SetDescription(item->text(), data->size(), VDomDocument::UnitsToStr(qApp->patternUnit(), true),
|
|
||||||
tr("Size"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if (ui->radioButtonStandardTable->isChecked())
|
if (ui->radioButtonStandardTable->isChecked())
|
||||||
{
|
{
|
||||||
const QString name = qApp->TrVars()->VarFromUser(item->text());
|
const QString name = qApp->TrVars()->VarFromUser(item->text());
|
||||||
|
@ -203,31 +186,6 @@ void DialogEditWrongFormula::ValChenged(int row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief SizeHeight show in list base variables
|
|
||||||
*/
|
|
||||||
void DialogEditWrongFormula::SizeHeight()
|
|
||||||
{
|
|
||||||
ui->checkBoxHideEmpty->setEnabled(false);
|
|
||||||
|
|
||||||
ui->listWidget->blockSignals(true);
|
|
||||||
ui->listWidget->clear();
|
|
||||||
|
|
||||||
{
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(data->HeightName());
|
|
||||||
item->setFont(QFont("Times", 12, QFont::Bold));
|
|
||||||
ui->listWidget->addItem(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(data->SizeName());
|
|
||||||
item->setFont(QFont("Times", 12, QFont::Bold));
|
|
||||||
ui->listWidget->addItem(item);
|
|
||||||
|
|
||||||
ui->listWidget->blockSignals(false);
|
|
||||||
ui->listWidget->setCurrentRow (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief PutHere put variable into edit
|
* @brief PutHere put variable into edit
|
||||||
|
@ -386,17 +344,9 @@ void DialogEditWrongFormula::InitVariables()
|
||||||
{
|
{
|
||||||
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &DialogEditWrongFormula::ValChenged);
|
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &DialogEditWrongFormula::ValChenged);
|
||||||
|
|
||||||
if (qApp->patternType() == MeasurementsType::Standard)
|
|
||||||
{
|
|
||||||
SizeHeight();
|
|
||||||
connect(ui->radioButtonSizeGrowth, &QRadioButton::clicked, this, &DialogEditWrongFormula::SizeHeight);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui->radioButtonSizeGrowth->setEnabled(false);
|
|
||||||
ui->radioButtonStandardTable->setChecked(true);
|
ui->radioButtonStandardTable->setChecked(true);
|
||||||
Measurements();
|
Measurements();
|
||||||
}
|
|
||||||
connect(ui->radioButtonStandardTable, &QRadioButton::clicked, this, &DialogEditWrongFormula::Measurements);
|
connect(ui->radioButtonStandardTable, &QRadioButton::clicked, this, &DialogEditWrongFormula::Measurements);
|
||||||
connect(ui->radioButtonIncrements, &QRadioButton::clicked, this, &DialogEditWrongFormula::Increments);
|
connect(ui->radioButtonIncrements, &QRadioButton::clicked, this, &DialogEditWrongFormula::Increments);
|
||||||
connect(ui->radioButtonLengthLine, &QRadioButton::clicked, this, &DialogEditWrongFormula::LengthLines);
|
connect(ui->radioButtonLengthLine, &QRadioButton::clicked, this, &DialogEditWrongFormula::LengthLines);
|
||||||
|
|
|
@ -64,7 +64,6 @@ public slots:
|
||||||
void DeployFormulaTextEdit();
|
void DeployFormulaTextEdit();
|
||||||
virtual void EvalFormula() Q_DECL_OVERRIDE;
|
virtual void EvalFormula() Q_DECL_OVERRIDE;
|
||||||
void ValChenged(int row);
|
void ValChenged(int row);
|
||||||
void SizeHeight();
|
|
||||||
void PutHere();
|
void PutHere();
|
||||||
void PutVal(QListWidgetItem * item);
|
void PutVal(QListWidgetItem * item);
|
||||||
|
|
||||||
|
|
|
@ -224,22 +224,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
<widget class="QRadioButton" name="radioButtonStandardTable">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -251,6 +235,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Measurements</string>
|
<string>Measurements</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -404,7 +391,6 @@
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
<tabstop>toolButtonPutHere</tabstop>
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
<tabstop>radioButtonStandardTable</tabstop>
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
<tabstop>radioButtonIncrements</tabstop>
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
<tabstop>radioButtonLengthLine</tabstop>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user