Revamp struct sequenceStruct to class sequentialNumbers.

Element now use methods (toXml and fromXml) of sequentialNumbers to store and load sequential.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4803 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-12-08 15:06:46 +00:00
parent 18df62cea1
commit 9f014d55af
11 changed files with 196 additions and 113 deletions

View File

@@ -1268,22 +1268,6 @@ QString Conductor::text() const {
return(label);
}
/**
* @brief Conductor::setOthersSequential
* Copy sequentials from conductor in argument to this conductor
* @param conductor to copy sequentials from
*/
void Conductor::setOthersSequential(Conductor *other) {
QString conductor_currentAutoNum = other->diagram()->project()->conductorCurrentAutoNum();
NumerotationContext nc = other->diagram()->project()->conductorAutoNum(conductor_currentAutoNum);
m_autoNum_seq.unit = other->m_autoNum_seq.unit;
m_autoNum_seq.unit_folio = other->m_autoNum_seq.unit_folio;
m_autoNum_seq.ten = other->m_autoNum_seq.ten;
m_autoNum_seq.ten_folio = other->m_autoNum_seq.ten_folio;
m_autoNum_seq.hundred = other->m_autoNum_seq.hundred;
m_autoNum_seq.hundred_folio = other->m_autoNum_seq.hundred_folio;
}
/**
* @brief Conductor::setText
* The text of this conductor
@@ -1292,24 +1276,6 @@ void Conductor::setOthersSequential(Conductor *other) {
void Conductor::setText(const QString &t)
{
text_item->setPlainText(t);
// text_item->setPlainText(t);
// if (setSeq && diagram())
// {
// QString conductor_currentAutoNum = diagram()->project()->conductorCurrentAutoNum();
// NumerotationContext nc = diagram()->project()->conductorAutoNum(conductor_currentAutoNum);
// autonum::setSequential(text(), m_autoNum_seq, nc, diagram(), conductor_currentAutoNum);
// NumerotationContextCommands ncc (nc);
// diagram()->project()->addConductorAutoNum(conductor_currentAutoNum, ncc.next());
// setSeq = false;
// }
// if (diagram())
// {
// QString label = autonum::AssignVariables::formulaToLabel(t, m_autoNum_seq, diagram());
// text_item -> setPlainText(label);
// }
}
/**