From f6b6a0bc36d3f5383badc408390ce33f7b141451 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 29 Sep 2015 21:56:46 +0300 Subject: [PATCH] Second try to close issue #373. --HG-- branch : develop --- src/app/tape/dialogs/dialogmdatabase.cpp | 54 +++++++----------------- src/app/tape/dialogs/dialogmdatabase.h | 3 +- 2 files changed, 17 insertions(+), 40 deletions(-) diff --git a/src/app/tape/dialogs/dialogmdatabase.cpp b/src/app/tape/dialogs/dialogmdatabase.cpp index cea3b95b3..049772c3d 100644 --- a/src/app/tape/dialogs/dialogmdatabase.cpp +++ b/src/app/tape/dialogs/dialogmdatabase.cpp @@ -263,47 +263,25 @@ void DialogMDataBase::ShowDescription(QTreeWidgetItem *item, int column) //--------------------------------------------------------------------------------------------------------------------- void DialogMDataBase::InitDataBase(const QStringList &list) { - InitGroup(groupA, "A. " + tr("Direct Height", "Measurement section"), ListGroupA(), list); - InitGroup(groupB, "B. " + tr("Direct Width", "Measurement section"), ListGroupB(), list); - InitGroup(groupC, "C. " + tr("Indentation", "Measurement section"), ListGroupC(), list); - InitGroup(groupD, "D. " + tr("Circumference and Arc", "Measurement section"), ListGroupD(), list); - InitGroup(groupE, "E. " + tr("Vertical", "Measurement section"), ListGroupE(), list); - InitGroup(groupF, "F. " + tr("Horizontal", "Measurement section"), ListGroupF(), list); - InitGroup(groupG, "G. " + tr("Bust", "Measurement section"), ListGroupG(), list); - InitGroup(groupH, "H. " + tr("Balance", "Measurement section"), ListGroupH(), list); - InitGroup(groupI, "I. " + tr("Arm", "Measurement section"), ListGroupI(), list); - InitGroup(groupJ, "J. " + tr("Leg", "Measurement section"), ListGroupJ(), list); - InitGroup(groupK, "K. " + tr("Crotch and Rise", "Measurement section"), ListGroupK(), list); - InitGroup(groupL, "L. " + tr("Hand", "Measurement section"), ListGroupL(), list); - InitGroup(groupM, "M. " + tr("Foot", "Measurement section"), ListGroupM(), list); - InitGroup(groupN, "N. " + tr("Head", "Measurement section"), ListGroupN(), list); - InitGroup(groupO, "O. " + tr("Men & Tailoring", "Measurement section"), ListGroupO(), list); - InitGroup(groupP, "P. " + tr("Historical & Specialty", "Measurement section"), ListGroupP(), list); + InitGroup(groupA, "A. " + tr("Direct Height", "Measurement section"), ListGroupA(), list); + InitGroup(groupB, "B. " + tr("Direct Width", "Measurement section"), ListGroupB(), list); + InitGroup(groupC, "C. " + tr("Indentation", "Measurement section"), ListGroupC(), list); + InitGroup(groupD, "D. " + tr("Hand", "Measurement section"), ListGroupD(), list); + InitGroup(groupE, "E. " + tr("Foot", "Measurement section"), ListGroupE(), list); + InitGroup(groupF, "F. " + tr("Head", "Measurement section"), ListGroupF(), list); + InitGroup(groupG, "G. " + tr("Circumference and Arc", "Measurement section"), ListGroupG(), list); + InitGroup(groupH, "H. " + tr("Vertical", "Measurement section"), ListGroupH(), list); + InitGroup(groupI, "I. " + tr("Horizontal", "Measurement section"), ListGroupI(), list); + InitGroup(groupJ, "J. " + tr("Bust", "Measurement section"), ListGroupJ(), list); + InitGroup(groupK, "K. " + tr("Balance", "Measurement section"), ListGroupK(), list); + InitGroup(groupL, "L. " + tr("Arm", "Measurement section"), ListGroupL(), list); + InitGroup(groupM, "M. " + tr("Leg", "Measurement section"), ListGroupM(), list); + InitGroup(groupN, "N. " + tr("Crotch and Rise", "Measurement section"), ListGroupN(), list); + InitGroup(groupO, "O. " + tr("Men & Tailoring", "Measurement section"), ListGroupO(), list); + InitGroup(groupP, "P. " + tr("Historical & Specialty", "Measurement section"), ListGroupP(), list); InitGroup(groupQ, "Q. " + tr("Patternmaking measurements", "Measurement section"), ListGroupQ(), list); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogMDataBase::InitDataBase() -{ - InitGroup(groupA, "A. " + tr("Direct Height", "Measurement section"), ListGroupA()); - InitGroup(groupB, "B. " + tr("Direct Width", "Measurement section"), ListGroupB()); - InitGroup(groupC, "C. " + tr("Indentation", "Measurement section"), ListGroupC()); - InitGroup(groupD, "D. " + tr("Circumference and Arc", "Measurement section"), ListGroupD()); - InitGroup(groupE, "E. " + tr("Vertical", "Measurement section"), ListGroupE()); - InitGroup(groupF, "F. " + tr("Horizontal", "Measurement section"), ListGroupF()); - InitGroup(groupG, "G. " + tr("Bust", "Measurement section"), ListGroupG()); - InitGroup(groupH, "H. " + tr("Balance", "Measurement section"), ListGroupH()); - InitGroup(groupI, "I. " + tr("Arm", "Measurement section"), ListGroupI()); - InitGroup(groupJ, "J. " + tr("Leg", "Measurement section"), ListGroupJ()); - InitGroup(groupK, "K. " + tr("Crotch and Rise", "Measurement section"), ListGroupK()); - InitGroup(groupL, "L. " + tr("Hand", "Measurement section"), ListGroupL()); - InitGroup(groupM, "M. " + tr("Foot", "Measurement section"), ListGroupM()); - InitGroup(groupN, "N. " + tr("Head", "Measurement section"), ListGroupN()); - InitGroup(groupO, "O. " + tr("Men & Tailoring", "Measurement section"), ListGroupO()); - InitGroup(groupP, "P. " + tr("Historical & Specialty", "Measurement section"), ListGroupP()); - InitGroup(groupQ, "Q. " + tr("Patternmaking measurements", "Measurement section"), ListGroupQ()); -} - //--------------------------------------------------------------------------------------------------------------------- void DialogMDataBase::InitGroup(QTreeWidgetItem *group, const QString &groupName, const QStringList &mList, const QStringList &list) diff --git a/src/app/tape/dialogs/dialogmdatabase.h b/src/app/tape/dialogs/dialogmdatabase.h index db0dd5cc6..c76a66f58 100644 --- a/src/app/tape/dialogs/dialogmdatabase.h +++ b/src/app/tape/dialogs/dialogmdatabase.h @@ -82,8 +82,7 @@ private: QTreeWidgetItem *groupP; QTreeWidgetItem *groupQ; - void InitDataBase(const QStringList &list); - void InitDataBase(); + void InitDataBase(const QStringList &list = QStringList()); void InitGroup(QTreeWidgetItem *group, const QString &groupName, const QStringList &mList, const QStringList &list = QStringList());