Move cursot to end of text.
--HG-- branch : develop
This commit is contained in:
parent
15691024ae
commit
8158261dcc
|
@ -218,6 +218,7 @@ void DialogAlongLine::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -143,6 +143,7 @@ void DialogArc::SetF2(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditF2->setPlainText(f2);
|
ui->plainTextEditF2->setPlainText(f2);
|
||||||
path->setF2(f2);
|
path->setF2(f2);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditF2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -160,6 +161,7 @@ void DialogArc::SetF1(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditF1->setPlainText(f1);
|
ui->plainTextEditF1->setPlainText(f1);
|
||||||
path->setF1(f1);
|
path->setF1(f1);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditF1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -177,6 +179,7 @@ void DialogArc::SetRadius(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(radius);
|
ui->plainTextEditFormula->setPlainText(radius);
|
||||||
path->setRadius(radius);
|
path->setRadius(radius);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -219,6 +219,7 @@ void DialogBisector::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -120,6 +120,7 @@ void DialogCurveIntersectAxis::setAngle(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formulaAngle);
|
ui->plainTextEditFormula->setPlainText(formulaAngle);
|
||||||
line->setAngle(formulaAngle);
|
line->setAngle(formulaAngle);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -162,6 +162,7 @@ void DialogCutArc::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
path->setLength(formula);
|
path->setLength(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -101,6 +101,7 @@ void DialogCutSpline::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
path->setLength(formula);
|
path->setLength(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -101,6 +101,7 @@ void DialogCutSplinePath::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
path->setLength(formula);
|
path->setLength(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -123,6 +123,7 @@ void DialogEditWrongFormula::setFormula(const QString &value)
|
||||||
this->DeployFormulaTextEdit();
|
this->DeployFormulaTextEdit();
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -189,6 +189,7 @@ void DialogEndLine::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formulaLength);
|
ui->plainTextEditFormula->setPlainText(formulaLength);
|
||||||
line->setLength(formulaLength);
|
line->setLength(formulaLength);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -207,6 +208,7 @@ void DialogEndLine::setAngle(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditAngle->setPlainText(formulaAngle);
|
ui->plainTextEditAngle->setPlainText(formulaAngle);
|
||||||
line->setAngle(formulaAngle);
|
line->setAngle(formulaAngle);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -632,14 +632,26 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
|
<tabstop>toolButtonPutHereLength</tabstop>
|
||||||
|
<tabstop>toolButtonEqualLength</tabstop>
|
||||||
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
|
<tabstop>plainTextEditAngle</tabstop>
|
||||||
|
<tabstop>toolButtonPutHereAngle</tabstop>
|
||||||
|
<tabstop>toolButtonEqualAngle</tabstop>
|
||||||
|
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
||||||
|
<tabstop>comboBoxBasePoint</tabstop>
|
||||||
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
<tabstop>radioButtonSizeGrowth</tabstop>
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
<tabstop>radioButtonStandardTable</tabstop>
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
<tabstop>radioButtonIncrements</tabstop>
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
<tabstop>radioButtonLengthLine</tabstop>
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
<tabstop>radioButtonLengthArc</tabstop>
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
<tabstop>radioButtonLengthSpline</tabstop>
|
||||||
|
<tabstop>radioButtonAngleLine</tabstop>
|
||||||
|
<tabstop>checkBoxHideEmpty</tabstop>
|
||||||
<tabstop>listWidget</tabstop>
|
<tabstop>listWidget</tabstop>
|
||||||
<tabstop>toolButtonEqualLength</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -121,6 +121,7 @@ void DialogLineIntersectAxis::setAngle(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formulaAngle);
|
ui->plainTextEditFormula->setPlainText(formulaAngle);
|
||||||
line->setAngle(formulaAngle);
|
line->setAngle(formulaAngle);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -229,6 +229,7 @@ void DialogNormal::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -259,6 +259,7 @@ void DialogPointOfContact::setRadius(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(radius);
|
ui->plainTextEditFormula->setPlainText(radius);
|
||||||
line->setRadius(radius);
|
line->setRadius(radius);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -247,6 +247,7 @@ void DialogShoulderPoint::setFormula(const QString &value)
|
||||||
}
|
}
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
line->setLength(formula);
|
line->setLength(formula);
|
||||||
|
MoveCursorToEnd(ui->plainTextEditFormula);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -392,6 +392,15 @@ void DialogTool::PutValHere(QPlainTextEdit *plainTextEdit, QListWidget *listWidg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogTool::MoveCursorToEnd(QPlainTextEdit *plainTextEdit)
|
||||||
|
{
|
||||||
|
SCASSERT(plainTextEdit != nullptr);
|
||||||
|
QTextCursor cursor = plainTextEdit->textCursor();
|
||||||
|
cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
|
||||||
|
plainTextEdit->setTextCursor(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief ValFormulaChanged handle change formula
|
* @brief ValFormulaChanged handle change formula
|
||||||
|
|
|
@ -333,6 +333,7 @@ protected:
|
||||||
* @brief SaveData Put dialog data in local variables
|
* @brief SaveData Put dialog data in local variables
|
||||||
*/
|
*/
|
||||||
virtual void SaveData(){}
|
virtual void SaveData(){}
|
||||||
|
void MoveCursorToEnd(QPlainTextEdit *plainTextEdit);
|
||||||
private:
|
private:
|
||||||
void FillList(QComboBox *box, const QMap<QString, quint32> &list)const;
|
void FillList(QComboBox *box, const QMap<QString, quint32> &list)const;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user