Move all grainline objects inside a group box.
--HG-- branch : feature
This commit is contained in:
parent
d9bf2d5d6c
commit
3a2752ef37
|
@ -212,7 +212,7 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece)
|
||||||
|
|
||||||
UpdateList();
|
UpdateList();
|
||||||
|
|
||||||
ui->checkBoxGrainline->setChecked(piece.GetGrainlineGeometry().IsVisible());
|
ui->groupBoxGrainline->setChecked(piece.GetGrainlineGeometry().IsVisible());
|
||||||
ui->lineEditRotFormula->setPlainText(piece.GetGrainlineGeometry().GetRotation());
|
ui->lineEditRotFormula->setPlainText(piece.GetGrainlineGeometry().GetRotation());
|
||||||
ui->lineEditLenFormula->setPlainText(piece.GetGrainlineGeometry().GetLength());
|
ui->lineEditLenFormula->setPlainText(piece.GetGrainlineGeometry().GetLength());
|
||||||
ui->comboBoxArrow->setCurrentIndex(int(piece.GetGrainlineGeometry().GetArrowType()));
|
ui->comboBoxArrow->setCurrentIndex(int(piece.GetGrainlineGeometry().GetArrowType()));
|
||||||
|
@ -1072,14 +1072,7 @@ void DialogSeamAllowance::SetEditMode()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::EnableGrainlineRotation()
|
void DialogSeamAllowance::EnableGrainlineRotation()
|
||||||
{
|
{
|
||||||
ui->lineEditRotFormula->setEnabled(ui->checkBoxGrainline->isChecked());
|
if (ui->groupBoxGrainline->isChecked() == true)
|
||||||
ui->lineEditLenFormula->setEnabled(ui->checkBoxGrainline->isChecked());
|
|
||||||
ui->pushButtonRot->setEnabled(ui->checkBoxGrainline->isChecked());
|
|
||||||
ui->pushButtonLen->setEnabled(ui->checkBoxGrainline->isChecked());
|
|
||||||
ui->pushButtonShowLen->setEnabled(ui->checkBoxGrainline->isChecked());
|
|
||||||
ui->pushButtonShowRot->setEnabled(ui->checkBoxGrainline->isChecked());
|
|
||||||
|
|
||||||
if (ui->checkBoxGrainline->isChecked() == true)
|
|
||||||
{
|
{
|
||||||
UpdateValues();
|
UpdateValues();
|
||||||
}
|
}
|
||||||
|
@ -1410,7 +1403,7 @@ VPiece DialogSeamAllowance::CreatePiece() const
|
||||||
piece.GetPatternInfo().SetBottomRightPin(getCurrentObjectId(ui->comboBoxPatternLabelBottomRightPin));
|
piece.GetPatternInfo().SetBottomRightPin(getCurrentObjectId(ui->comboBoxPatternLabelBottomRightPin));
|
||||||
|
|
||||||
piece.GetGrainlineGeometry() = m_oldGrainline;
|
piece.GetGrainlineGeometry() = m_oldGrainline;
|
||||||
piece.GetGrainlineGeometry().SetVisible(ui->checkBoxGrainline->isChecked());
|
piece.GetGrainlineGeometry().SetVisible(ui->groupBoxGrainline->isChecked());
|
||||||
piece.GetGrainlineGeometry().SetRotation(GetFormulaFromUser(ui->lineEditRotFormula));
|
piece.GetGrainlineGeometry().SetRotation(GetFormulaFromUser(ui->lineEditRotFormula));
|
||||||
piece.GetGrainlineGeometry().SetLength(GetFormulaFromUser(ui->lineEditLenFormula));
|
piece.GetGrainlineGeometry().SetLength(GetFormulaFromUser(ui->lineEditLenFormula));
|
||||||
piece.GetGrainlineGeometry().SetArrowType(static_cast<ArrowType>(ui->comboBoxArrow->currentIndex()));
|
piece.GetGrainlineGeometry().SetArrowType(static_cast<ArrowType>(ui->comboBoxArrow->currentIndex()));
|
||||||
|
@ -1867,7 +1860,7 @@ void DialogSeamAllowance::InitPatternPieceDataTab()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSeamAllowance::InitGrainlineTab()
|
void DialogSeamAllowance::InitGrainlineTab()
|
||||||
{
|
{
|
||||||
connect(ui->checkBoxGrainline, &QCheckBox::toggled, this, &DialogSeamAllowance::EnableGrainlineRotation);
|
connect(ui->groupBoxGrainline, &QGroupBox::toggled, this, &DialogSeamAllowance::EnableGrainlineRotation);
|
||||||
connect(ui->pushButtonRot, &QPushButton::clicked, this, &DialogSeamAllowance::EditFormula);
|
connect(ui->pushButtonRot, &QPushButton::clicked, this, &DialogSeamAllowance::EditFormula);
|
||||||
connect(ui->pushButtonLen, &QPushButton::clicked, this, &DialogSeamAllowance::EditFormula);
|
connect(ui->pushButtonLen, &QPushButton::clicked, this, &DialogSeamAllowance::EditFormula);
|
||||||
connect(ui->lineEditLenFormula, &QPlainTextEdit::textChanged, this, &DialogSeamAllowance::UpdateValues);
|
connect(ui->lineEditLenFormula, &QPlainTextEdit::textChanged, this, &DialogSeamAllowance::UpdateValues);
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabMainPath">
|
<widget class="QWidget" name="tabMainPath">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -1130,18 +1130,19 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Grainline</string>
|
<string>Grainline</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<widget class="QGroupBox" name="groupBoxGrainline">
|
||||||
<item>
|
<property name="title">
|
||||||
<widget class="QCheckBox" name="checkBoxGrainline">
|
|
||||||
<property name="text">
|
|
||||||
<string>Grainline visible</string>
|
<string>Grainline visible</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="checkable">
|
||||||
</item>
|
<bool>true</bool>
|
||||||
</layout>
|
</property>
|
||||||
</item>
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||||
<item alignment="Qt::AlignLeft">
|
<item alignment="Qt::AlignLeft">
|
||||||
|
@ -1533,43 +1534,6 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</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">
|
<property name="text">
|
||||||
<string>Arrows:</string>
|
<string>Arrows:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1615,6 +1579,9 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<widget class="QWidget" name="tabPins">
|
<widget class="QWidget" name="tabPins">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Pins</string>
|
<string>Pins</string>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user