Wrap code for better readability

This commit is contained in:
Simon De Backer
2020-08-18 20:08:32 +02:00
parent 790cdc5229
commit 99abc165d6
17 changed files with 274 additions and 119 deletions

View File

@@ -360,7 +360,9 @@ namespace autonum
@param type : type of sequential
(unit, unitfolio, ten, tenfolio, hundred, hundredfolio)
*/
void setSequentialToList(QStringList &list, NumerotationContext &context, const QString& type)
void setSequentialToList(QStringList &list,
NumerotationContext &context,
const QString& type)
{
for (int i = 0; i < context.size(); i++)
{
@@ -384,7 +386,10 @@ namespace autonum
@param hash : hash to have values inserted
@param autoNumName : name to use as key of hash
*/
void setFolioSequentialToHash(QStringList &list, QHash<QString, QStringList> &hash, const QString& autoNumName)
void setFolioSequentialToHash(QStringList &list,
QHash<QString,
QStringList> &hash,
const QString& autoNumName)
{
if (hash.isEmpty() || !hash.contains(autoNumName))
{

View File

@@ -161,7 +161,8 @@ NumStrategy::~NumStrategy() {}
@brief NumStrategy::nextString
@return the next value of nc at position i
*/
NumerotationContext NumStrategy::nextString (const NumerotationContext &nc, const int i) const {
NumerotationContext NumStrategy::nextString (const NumerotationContext &nc,
const int i) const {
QStringList strl = nc.itemAt(i);
NumerotationContext newnc;
newnc.addValue(strl.at(0), strl.at(1), strl.at(2).toInt());
@@ -170,9 +171,10 @@ NumerotationContext NumStrategy::nextString (const NumerotationContext &nc, cons
/**
@brief NumStrategy::nextNumber
@return the next value of @nc at position @i
@return the next value of nc at position i
*/
NumerotationContext NumStrategy::nextNumber (const NumerotationContext &nc, const int i) const {
NumerotationContext NumStrategy::nextNumber (const NumerotationContext &nc,
const int i) const {
QStringList strl = nc.itemAt(i);
NumerotationContext newnc;
QString value = QString::number( (strl.at(1).toInt()) + (strl.at(2).toInt()) );
@@ -184,7 +186,8 @@ NumerotationContext NumStrategy::nextNumber (const NumerotationContext &nc, cons
@brief NumStrategy::previousNumber
@return the previous value of nc at position i
*/
NumerotationContext NumStrategy::previousNumber(const NumerotationContext &nc, const int i) const {
NumerotationContext NumStrategy::previousNumber(const NumerotationContext &nc,
const int i) const {
QStringList strl = nc.itemAt(i);
NumerotationContext newnc;
QString value = QString::number( (strl.at(1).toInt()) - (strl.at(2).toInt()) );

View File

@@ -195,16 +195,18 @@ void AutoNumberingManagementW::on_buttonBox_clicked(QAbstractButton *button) {
emit applyPressed();
break;
case QDialogButtonBox::HelpRole:
QMessageBox::information(this, tr("Auto Numbering Management", "title window"),
tr("In this Menu you can set whether you want the Auto Numberings to be updated or not."
" For Element Auto Numbering you have 4 options of Update Policy:\n"
"-Both: both New and Existent Element labels will be updated. This is the default option.\n"
"-Update Only New: only new created Elements will be updated. Existent Element labels will be frozen.\n"
"-Update Only Existent: only existent Elements will be updated. New Elements will be assigned "
"their formula but will not update once created.\n"
"-Disable: both New and Existent Element labels will not be updated. This is valid for new folios as well.\n"
"Note: These options DO NOT allow or block Auto Numberings, only their Update Policy."
));
QMessageBox::information(
this,
tr("Auto Numbering Management", "title window"),
tr("In this Menu you can set whether you want the Auto Numberings to be updated or not."
" For Element Auto Numbering you have 4 options of Update Policy:\n"
"-Both: both New and Existent Element labels will be updated. This is the default option.\n"
"-Update Only New: only new created Elements will be updated. Existent Element labels will be frozen.\n"
"-Update Only Existent: only existent Elements will be updated. New Elements will be assigned "
"their formula but will not update once created.\n"
"-Disable: both New and Existent Element labels will not be updated. This is valid for new folios as well.\n"
"Note: These options DO NOT allow or block Auto Numberings, only their Update Policy."
));
break;
}
}