Creation of folio sequential type for Element Autonumbering. Correction of autonumbering type handling in numparteditorw.cpp

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4592 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
dfochi
2016-07-26 18:52:49 +00:00
parent 52e33787a8
commit d6f1381631
18 changed files with 568 additions and 153 deletions

View File

@@ -233,8 +233,11 @@ void SelectAutonumW::applyEnable(bool b) {
void SelectAutonumW::contextToFormula() {
m_eaw->clearContext();
int count_unit = 0;
int count_unitf = 0;
int count_ten = 0;
int count_tenf = 0;
int count_hundred = 0;
int count_hundredf = 0;
foreach (NumPartEditorW *npe, num_part_list_) {
if (npe->isValid()) {
if (npe->type_ == NumPartEditorW::idfolio) {
@@ -259,14 +262,26 @@ void SelectAutonumW::contextToFormula() {
count_unit++;
m_eaw->setContext("%sequ_"+QString::number(count_unit));
}
else if (npe->type_ == NumPartEditorW::unitfolio) {
count_unitf++;
m_eaw->setContext("%sequf_"+QString::number(count_unitf));
}
else if (npe->type_ == NumPartEditorW::ten) {
count_ten++;
m_eaw->setContext("%seqt_"+QString::number(count_ten));
}
else if (npe->type_ == NumPartEditorW::tenfolio) {
count_tenf++;
m_eaw->setContext("%seqtf_"+QString::number(count_tenf));
}
else if (npe->type_ == NumPartEditorW::hundred) {
count_hundred++;
m_eaw->setContext("%seqh_"+QString::number(count_hundred));
}
else if (npe->type_ == NumPartEditorW::hundredfolio) {
count_hundredf++;
m_eaw->setContext("%seqhf_"+QString::number(count_hundredf));
}
}
}
}