Init all pin comboboxes.
--HG-- branch : feature
This commit is contained in:
parent
a3d27bf9db
commit
ff2d9c28fe
|
@ -172,6 +172,8 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece)
|
||||||
NewPin(piece.GetPins().at(i));
|
NewPin(piece.GetPins().at(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InitAllPinComboboxes();
|
||||||
|
|
||||||
ui->comboBoxStartPoint->blockSignals(true);
|
ui->comboBoxStartPoint->blockSignals(true);
|
||||||
ui->comboBoxStartPoint->clear();
|
ui->comboBoxStartPoint->clear();
|
||||||
ui->comboBoxStartPoint->blockSignals(false);
|
ui->comboBoxStartPoint->blockSignals(false);
|
||||||
|
@ -194,8 +196,8 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece)
|
||||||
m_my = piece.GetMy();
|
m_my = piece.GetMy();
|
||||||
|
|
||||||
ui->lineEditLetter->setText(piece.GetPatternPieceData().GetLetter());
|
ui->lineEditLetter->setText(piece.GetPatternPieceData().GetLetter());
|
||||||
ui->checkBoxDetail->setChecked(piece.GetPatternPieceData().IsVisible());
|
ui->groupBoxDetailLabel->setChecked(piece.GetPatternPieceData().IsVisible());
|
||||||
ui->checkBoxPattern->setChecked(piece.GetPatternInfo().IsVisible());
|
ui->groupBoxPatternLabel->setChecked(piece.GetPatternInfo().IsVisible());
|
||||||
|
|
||||||
m_conMCP.clear();
|
m_conMCP.clear();
|
||||||
for (int i = 0; i < piece.GetPatternPieceData().GetMCPCount(); ++i)
|
for (int i = 0; i < piece.GetPatternPieceData().GetMCPCount(); ++i)
|
||||||
|
@ -385,11 +387,7 @@ void DialogSeamAllowance::AddUpdate()
|
||||||
MaterialCutPlacement mcp;
|
MaterialCutPlacement mcp;
|
||||||
QStringList qslUserMaterials = qApp->Settings()->GetUserDefinedMaterials();
|
QStringList qslUserMaterials = qApp->Settings()->GetUserDefinedMaterials();
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
const int i = CURRENT_DATA(ui->comboBoxMaterial).toInt();
|
||||||
int i = ui->comboBoxMaterial->itemData(ui->comboBoxMaterial->currentIndex()).toInt();
|
|
||||||
#else
|
|
||||||
int i = ui->comboBoxMaterial->currentData().toInt();
|
|
||||||
#endif
|
|
||||||
QString qsMat = ui->comboBoxMaterial->currentText();
|
QString qsMat = ui->comboBoxMaterial->currentText();
|
||||||
if (i < m_qslMaterials.count() && qsMat == m_qslMaterials[i])
|
if (i < m_qslMaterials.count() && qsMat == m_qslMaterials[i])
|
||||||
{
|
{
|
||||||
|
@ -627,6 +625,7 @@ void DialogSeamAllowance::ShowPinsContextMenu(const QPoint &pos)
|
||||||
{
|
{
|
||||||
delete ui->listWidgetPins->item(row);
|
delete ui->listWidgetPins->item(row);
|
||||||
TabChanged(ui->tabWidget->currentIndex());
|
TabChanged(ui->tabWidget->currentIndex());
|
||||||
|
InitAllPinComboboxes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,13 +672,8 @@ void DialogSeamAllowance::NodeChanged(int index)
|
||||||
|
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
|
||||||
const quint32 id = ui->comboBoxNodes->itemData(index).toUInt();
|
|
||||||
#else
|
|
||||||
const quint32 id = ui->comboBoxNodes->currentData().toUInt();
|
|
||||||
#endif
|
|
||||||
const VPiece piece = CreatePiece();
|
const VPiece piece = CreatePiece();
|
||||||
const int nodeIndex = piece.GetPath().indexOfNode(id);
|
const int nodeIndex = piece.GetPath().indexOfNode(CURRENT_DATA(ui->comboBoxNodes).toUInt());
|
||||||
if (nodeIndex != -1)
|
if (nodeIndex != -1)
|
||||||
{
|
{
|
||||||
const VPieceNode &node = piece.GetPath().at(nodeIndex);
|
const VPieceNode &node = piece.GetPath().at(nodeIndex);
|
||||||
|
@ -733,71 +727,54 @@ void DialogSeamAllowance::NodeChanged(int index)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::CSAStartPointChanged(int index)
|
void DialogSeamAllowance::CSAStartPointChanged(int index)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(index);
|
||||||
|
|
||||||
const int row = ui->listWidgetCustomSA->currentRow();
|
const int row = ui->listWidgetCustomSA->currentRow();
|
||||||
if (ui->listWidgetCustomSA->count() == 0 || row == -1 || row >= ui->listWidgetCustomSA->count())
|
if (ui->listWidgetCustomSA->count() == 0 || row == -1 || row >= ui->listWidgetCustomSA->count())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
|
||||||
const quint32 startPoint = ui->comboBoxStartPoint->itemData(index).toUInt();
|
|
||||||
#else
|
|
||||||
Q_UNUSED(index);
|
|
||||||
const quint32 startPoint = ui->comboBoxStartPoint->currentData().toUInt();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row);
|
QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row);
|
||||||
SCASSERT(rowItem != nullptr);
|
SCASSERT(rowItem != nullptr);
|
||||||
CustomSARecord record = qvariant_cast<CustomSARecord>(rowItem->data(Qt::UserRole));
|
CustomSARecord record = qvariant_cast<CustomSARecord>(rowItem->data(Qt::UserRole));
|
||||||
record.startPoint = startPoint;
|
record.startPoint = CURRENT_DATA(ui->comboBoxStartPoint).toUInt();
|
||||||
rowItem->setData(Qt::UserRole, QVariant::fromValue(record));
|
rowItem->setData(Qt::UserRole, QVariant::fromValue(record));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::CSAEndPointChanged(int index)
|
void DialogSeamAllowance::CSAEndPointChanged(int index)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(index);
|
||||||
|
|
||||||
const int row = ui->listWidgetCustomSA->currentRow();
|
const int row = ui->listWidgetCustomSA->currentRow();
|
||||||
if (ui->listWidgetCustomSA->count() == 0 || row == -1 || row >= ui->listWidgetCustomSA->count())
|
if (ui->listWidgetCustomSA->count() == 0 || row == -1 || row >= ui->listWidgetCustomSA->count())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
|
||||||
const quint32 endPoint = ui->comboBoxEndPoint->itemData(index).toUInt();
|
|
||||||
#else
|
|
||||||
Q_UNUSED(index);
|
|
||||||
const quint32 endPoint = ui->comboBoxEndPoint->currentData().toUInt();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row);
|
QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row);
|
||||||
SCASSERT(rowItem != nullptr);
|
SCASSERT(rowItem != nullptr);
|
||||||
CustomSARecord record = qvariant_cast<CustomSARecord>(rowItem->data(Qt::UserRole));
|
CustomSARecord record = qvariant_cast<CustomSARecord>(rowItem->data(Qt::UserRole));
|
||||||
record.endPoint = endPoint;
|
record.endPoint = CURRENT_DATA(ui->comboBoxEndPoint).toUInt();
|
||||||
rowItem->setData(Qt::UserRole, QVariant::fromValue(record));
|
rowItem->setData(Qt::UserRole, QVariant::fromValue(record));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::CSAIncludeTypeChanged(int index)
|
void DialogSeamAllowance::CSAIncludeTypeChanged(int index)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(index);
|
||||||
|
|
||||||
const int row = ui->listWidgetCustomSA->currentRow();
|
const int row = ui->listWidgetCustomSA->currentRow();
|
||||||
if (ui->listWidgetCustomSA->count() == 0 || row == -1 || row >= ui->listWidgetCustomSA->count())
|
if (ui->listWidgetCustomSA->count() == 0 || row == -1 || row >= ui->listWidgetCustomSA->count())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
|
||||||
const PiecePathIncludeType type =
|
|
||||||
static_cast<PiecePathIncludeType>(ui->comboBoxIncludeType->itemData(index).toUInt());
|
|
||||||
#else
|
|
||||||
Q_UNUSED(index);
|
|
||||||
const PiecePathIncludeType type =
|
|
||||||
static_cast<PiecePathIncludeType>(ui->comboBoxIncludeType->currentData().toUInt());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row);
|
QListWidgetItem *rowItem = ui->listWidgetCustomSA->item(row);
|
||||||
SCASSERT(rowItem != nullptr);
|
SCASSERT(rowItem != nullptr);
|
||||||
CustomSARecord record = qvariant_cast<CustomSARecord>(rowItem->data(Qt::UserRole));
|
CustomSARecord record = qvariant_cast<CustomSARecord>(rowItem->data(Qt::UserRole));
|
||||||
record.includeType = type;
|
record.includeType = static_cast<PiecePathIncludeType>(CURRENT_DATA(ui->comboBoxIncludeType).toUInt());
|
||||||
rowItem->setData(Qt::UserRole, QVariant::fromValue(record));
|
rowItem->setData(Qt::UserRole, QVariant::fromValue(record));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -807,23 +784,11 @@ void DialogSeamAllowance::NodeAngleChanged(int index)
|
||||||
const int i = ui->comboBoxNodes->currentIndex();
|
const int i = ui->comboBoxNodes->currentIndex();
|
||||||
if (i != -1 && index != -1)
|
if (i != -1 && index != -1)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
QListWidgetItem *rowItem = GetItemById(CURRENT_DATA(ui->comboBoxNodes).toUInt());
|
||||||
const quint32 id = ui->comboBoxNodes->itemData(i).toUInt();
|
|
||||||
#else
|
|
||||||
const quint32 id = ui->comboBoxNodes->currentData().toUInt();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QListWidgetItem *rowItem = GetItemById(id);
|
|
||||||
if (rowItem)
|
if (rowItem)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
|
||||||
const PieceNodeAngle angle = static_cast<PieceNodeAngle>(ui->comboBoxAngle->itemData(index).toUInt());
|
|
||||||
#else
|
|
||||||
const PieceNodeAngle angle = static_cast<PieceNodeAngle>(ui->comboBoxAngle->currentData().toUInt());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VPieceNode rowNode = qvariant_cast<VPieceNode>(rowItem->data(Qt::UserRole));
|
VPieceNode rowNode = qvariant_cast<VPieceNode>(rowItem->data(Qt::UserRole));
|
||||||
rowNode.SetAngleType(angle);
|
rowNode.SetAngleType(static_cast<PieceNodeAngle>(CURRENT_DATA(ui->comboBoxAngle).toUInt()));
|
||||||
rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));
|
rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));
|
||||||
|
|
||||||
ListChanged();
|
ListChanged();
|
||||||
|
@ -1333,10 +1298,10 @@ VPiece DialogSeamAllowance::CreatePiece() const
|
||||||
piece.GetPatternPieceData().SetLabelHeight(m_oldData.GetLabelHeight());
|
piece.GetPatternPieceData().SetLabelHeight(m_oldData.GetLabelHeight());
|
||||||
piece.GetPatternPieceData().SetFontSize(m_oldData.GetFontSize());
|
piece.GetPatternPieceData().SetFontSize(m_oldData.GetFontSize());
|
||||||
piece.GetPatternPieceData().SetRotation(m_oldData.GetRotation());
|
piece.GetPatternPieceData().SetRotation(m_oldData.GetRotation());
|
||||||
piece.GetPatternPieceData().SetVisible(ui->checkBoxDetail->isChecked());
|
piece.GetPatternPieceData().SetVisible(ui->groupBoxDetailLabel->isChecked());
|
||||||
|
|
||||||
piece.GetPatternInfo() = m_oldGeom;
|
piece.GetPatternInfo() = m_oldGeom;
|
||||||
piece.GetPatternInfo().SetVisible(ui->checkBoxPattern->isChecked());
|
piece.GetPatternInfo().SetVisible(ui->groupBoxPatternLabel->isChecked());
|
||||||
|
|
||||||
piece.GetGrainlineGeometry() = m_oldGrainline;
|
piece.GetGrainlineGeometry() = m_oldGrainline;
|
||||||
piece.GetGrainlineGeometry().SetVisible(ui->checkBoxGrainline->isChecked());
|
piece.GetGrainlineGeometry().SetVisible(ui->checkBoxGrainline->isChecked());
|
||||||
|
@ -1480,20 +1445,16 @@ bool DialogSeamAllowance::MainPathIsClockwise() const
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::InitNodesList()
|
void DialogSeamAllowance::InitNodesList()
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
const quint32 id = CURRENT_DATA(ui->comboBoxNodes).toUInt();
|
||||||
const quint32 id = ui->comboBoxNodes->itemData(ui->comboBoxNodes->currentIndex()).toUInt();
|
|
||||||
#else
|
|
||||||
const quint32 id = ui->comboBoxNodes->currentData().toUInt();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ui->comboBoxNodes->blockSignals(true);
|
ui->comboBoxNodes->blockSignals(true);
|
||||||
ui->comboBoxNodes->clear();
|
ui->comboBoxNodes->clear();
|
||||||
|
|
||||||
const VPiece piece = CreatePiece();
|
const QVector<VPieceNode> nodes = GetPieceInternals<VPieceNode>(ui->listWidgetMainPath);
|
||||||
|
|
||||||
for (int i = 0; i < piece.GetPath().CountNodes(); ++i)
|
for (int i = 0; i < nodes.size(); ++i)
|
||||||
{
|
{
|
||||||
const VPieceNode node = piece.GetPath().at(i);
|
const VPieceNode node = nodes.at(i);
|
||||||
if (node.GetTypeTool() == Tool::NodePoint)
|
if (node.GetTypeTool() == Tool::NodePoint)
|
||||||
{
|
{
|
||||||
const QString name = GetNodeName(node);
|
const QString name = GetNodeName(node);
|
||||||
|
@ -1567,13 +1528,7 @@ void DialogSeamAllowance::UpdateNodeSABefore(const QString &formula)
|
||||||
const int index = ui->comboBoxNodes->currentIndex();
|
const int index = ui->comboBoxNodes->currentIndex();
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
QListWidgetItem *rowItem = GetItemById(CURRENT_DATA(ui->comboBoxNodes).toUInt());
|
||||||
const quint32 id = ui->comboBoxNodes->itemData(index).toUInt();
|
|
||||||
#else
|
|
||||||
const quint32 id = ui->comboBoxNodes->currentData().toUInt();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QListWidgetItem *rowItem = GetItemById(id);
|
|
||||||
if (rowItem)
|
if (rowItem)
|
||||||
{
|
{
|
||||||
VPieceNode rowNode = qvariant_cast<VPieceNode>(rowItem->data(Qt::UserRole));
|
VPieceNode rowNode = qvariant_cast<VPieceNode>(rowItem->data(Qt::UserRole));
|
||||||
|
@ -1589,13 +1544,7 @@ void DialogSeamAllowance::UpdateNodeSAAfter(const QString &formula)
|
||||||
const int index = ui->comboBoxNodes->currentIndex();
|
const int index = ui->comboBoxNodes->currentIndex();
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
|
QListWidgetItem *rowItem = GetItemById(CURRENT_DATA(ui->comboBoxNodes).toUInt());
|
||||||
const quint32 id = ui->comboBoxNodes->itemData(index).toUInt();
|
|
||||||
#else
|
|
||||||
const quint32 id = ui->comboBoxNodes->currentData().toUInt();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QListWidgetItem *rowItem = GetItemById(id);
|
|
||||||
if (rowItem)
|
if (rowItem)
|
||||||
{
|
{
|
||||||
VPieceNode rowNode = qvariant_cast<VPieceNode>(rowItem->data(Qt::UserRole));
|
VPieceNode rowNode = qvariant_cast<VPieceNode>(rowItem->data(Qt::UserRole));
|
||||||
|
@ -1689,11 +1638,11 @@ void DialogSeamAllowance::InitCSAPoint(QComboBox *box)
|
||||||
box->clear();
|
box->clear();
|
||||||
box->addItem(tr("Empty"), NULL_ID);
|
box->addItem(tr("Empty"), NULL_ID);
|
||||||
|
|
||||||
const VPiece piece = CreatePiece();
|
const QVector<VPieceNode> nodes = GetPieceInternals<VPieceNode>(ui->listWidgetMainPath);
|
||||||
|
|
||||||
for (int i = 0; i < piece.GetPath().CountNodes(); ++i)
|
for (int i = 0; i < nodes.size(); ++i)
|
||||||
{
|
{
|
||||||
const VPieceNode &node = piece.GetPath().at(i);
|
const VPieceNode &node = nodes.at(i);
|
||||||
if (node.GetTypeTool() == Tool::NodePoint)
|
if (node.GetTypeTool() == Tool::NodePoint)
|
||||||
{
|
{
|
||||||
const QString name = GetNodeName(node);
|
const QString name = GetNodeName(node);
|
||||||
|
@ -1702,6 +1651,35 @@ void DialogSeamAllowance::InitCSAPoint(QComboBox *box)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogSeamAllowance::InitPinPoint(QComboBox *box)
|
||||||
|
{
|
||||||
|
SCASSERT(box != nullptr);
|
||||||
|
|
||||||
|
quint32 currentId = NULL_ID;
|
||||||
|
if (box->count() > 0)
|
||||||
|
{
|
||||||
|
currentId = CURRENT_DATA(box).toUInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
box->clear();
|
||||||
|
box->addItem(QLatin1String("<") + tr("no pin") + QLatin1String(">"), NULL_ID);
|
||||||
|
|
||||||
|
const QVector<quint32> pins = GetPieceInternals<quint32>(ui->listWidgetPins);
|
||||||
|
|
||||||
|
for (int i = 0; i < pins.size(); ++i)
|
||||||
|
{
|
||||||
|
const QSharedPointer<VGObject> pin = data->GetGObject(pins.at(i));
|
||||||
|
box->addItem(pin->name(), pins.at(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
const int index = ui->comboBoxNodes->findData(currentId);
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
box->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::InitSAIncludeType()
|
void DialogSeamAllowance::InitSAIncludeType()
|
||||||
{
|
{
|
||||||
|
@ -1728,6 +1706,11 @@ void DialogSeamAllowance::InitPatternPieceDataTab()
|
||||||
ui->lineEditLetter->setClearButtonEnabled(true);
|
ui->lineEditLetter->setClearButtonEnabled(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
InitPinPoint(ui->comboBoxDetailLabelTopLeftPin);
|
||||||
|
InitPinPoint(ui->comboBoxDetailLabelBottomRightPin);
|
||||||
|
InitPinPoint(ui->comboBoxPatternLabelTopLeftPin);
|
||||||
|
InitPinPoint(ui->comboBoxPatternLabelBottomRightPin);
|
||||||
|
|
||||||
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogSeamAllowance::NameDetailChanged);
|
connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogSeamAllowance::NameDetailChanged);
|
||||||
|
|
||||||
m_qslMaterials << QApplication::translate("Detail", "Fabric", 0)
|
m_qslMaterials << QApplication::translate("Detail", "Fabric", 0)
|
||||||
|
@ -1779,6 +1762,9 @@ void DialogSeamAllowance::InitGrainlineTab()
|
||||||
|
|
||||||
m_iRotBaseHeight = ui->lineEditRotFormula->height();
|
m_iRotBaseHeight = ui->lineEditRotFormula->height();
|
||||||
m_iLenBaseHeight = ui->lineEditLenFormula->height();
|
m_iLenBaseHeight = ui->lineEditLenFormula->height();
|
||||||
|
|
||||||
|
InitPinPoint(ui->comboBoxGrainlineTopPin);
|
||||||
|
InitPinPoint(ui->comboBoxGrainlineBottomPin);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1789,6 +1775,18 @@ void DialogSeamAllowance::InitPinsTab()
|
||||||
&DialogSeamAllowance::ShowPinsContextMenu);
|
&DialogSeamAllowance::ShowPinsContextMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogSeamAllowance::InitAllPinComboboxes()
|
||||||
|
{
|
||||||
|
InitPinPoint(ui->comboBoxGrainlineTopPin);
|
||||||
|
InitPinPoint(ui->comboBoxGrainlineBottomPin);
|
||||||
|
|
||||||
|
InitPinPoint(ui->comboBoxDetailLabelTopLeftPin);
|
||||||
|
InitPinPoint(ui->comboBoxDetailLabelBottomRightPin);
|
||||||
|
InitPinPoint(ui->comboBoxPatternLabelTopLeftPin);
|
||||||
|
InitPinPoint(ui->comboBoxPatternLabelBottomRightPin);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString DialogSeamAllowance::GetFormulaSAWidth() const
|
QString DialogSeamAllowance::GetFormulaSAWidth() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -178,11 +178,13 @@ private:
|
||||||
void InitSeamAllowanceTab();
|
void InitSeamAllowanceTab();
|
||||||
void InitNodesList();
|
void InitNodesList();
|
||||||
void InitCSAPoint(QComboBox *box);
|
void InitCSAPoint(QComboBox *box);
|
||||||
|
void InitPinPoint(QComboBox *box);
|
||||||
void InitSAIncludeType();
|
void InitSAIncludeType();
|
||||||
void InitInternalPathsTab();
|
void InitInternalPathsTab();
|
||||||
void InitPatternPieceDataTab();
|
void InitPatternPieceDataTab();
|
||||||
void InitGrainlineTab();
|
void InitGrainlineTab();
|
||||||
void InitPinsTab();
|
void InitPinsTab();
|
||||||
|
void InitAllPinComboboxes();
|
||||||
|
|
||||||
void SetFormulaSAWidth(const QString &formula);
|
void SetFormulaSAWidth(const QString &formula);
|
||||||
|
|
||||||
|
|
|
@ -911,7 +911,7 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
|
@ -1029,17 +1029,82 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxDetail">
|
<widget class="QGroupBox" name="groupBoxDetailLabel">
|
||||||
<property name="text">
|
<property name="title">
|
||||||
<string>Detail label visible</string>
|
<string>Detail label visible</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="labelDetailLabelTopLeftPin">
|
||||||
|
<property name="text">
|
||||||
|
<string>Top left pin:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxDetailLabelTopLeftPin"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="labelDetailLabelBottomRightPin">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom right pin:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxDetailLabelBottomRightPin"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxPattern">
|
<widget class="QGroupBox" name="groupBoxPatternLabel">
|
||||||
<property name="text">
|
<property name="title">
|
||||||
<string>Pattern label visible</string>
|
<string>Pattern label visible</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout_5">
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="labelPatternLabelTopLeftPin">
|
||||||
|
<property name="text">
|
||||||
|
<string>Top left pin:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxPatternLabelTopLeftPin"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="labelPatternLabelBottomRightPin">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bottom right pin:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxPatternLabelBottomRightPin"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -1456,8 +1521,11 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="labelEditLen_2">
|
<widget class="QLabel" name="labelEditLen_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
@ -1507,24 +1575,44 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="comboBoxArrow"/>
|
<widget class="QComboBox" name="comboBoxArrow"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<spacer name="horizontalSpacer_2">
|
<widget class="QLabel" name="labelGrainlineTopPin">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>Top pin:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>40</width>
|
<item row="2" column="0">
|
||||||
<height>20</height>
|
<widget class="QLabel" name="labelGrainlineBottomPin">
|
||||||
</size>
|
<property name="text">
|
||||||
|
<string>Bottom pin:</string>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxGrainlineTopPin"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxGrainlineBottomPin"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabPins">
|
<widget class="QWidget" name="tabPins">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user