Seamly2D
Code documentation
MeasurementDatabaseDialog Class Reference

#include <dialogmdatabase.h>

Inheritance diagram for MeasurementDatabaseDialog:
Collaboration diagram for MeasurementDatabaseDialog:

Public Member Functions

 MeasurementDatabaseDialog (const QStringList &measurements, QWidget *parent=nullptr)
 
 MeasurementDatabaseDialog (QWidget *parent=nullptr)
 
virtual ~MeasurementDatabaseDialog () Q_DECL_OVERRIDE
 
void retranslateGroups ()
 
QStringList getNewMeasurementNames () const
 

Static Public Member Functions

static QString imageUrl (const QString &number)
 

Protected Member Functions

virtual void changeEvent (QEvent *event) Q_DECL_OVERRIDE
 
virtual bool eventFilter (QObject *target, QEvent *event) Q_DECL_OVERRIDE
 

Private Slots

void updateChecks (QTreeWidgetItem *item, int column)
 
void showDescription (QTreeWidgetItem *item, int column)
 
void treeContextMenu (const QPoint &pos)
 
void recheckState ()
 

Private Member Functions

void initDataBase (const QStringList &measurements=QStringList())
 
void initGroup (QTreeWidgetItem **group, const QString &groupName, const QStringList &groupList, const QStringList &measurementList=QStringList())
 
Q_REQUIRED_RESULT QTreeWidgetItem * addMeasurementGroup (const QString &text)
 
void addMeasurement (QTreeWidgetItem *group, const QString &groupName, const QStringList &newMeasurements)
 
void readSettings ()
 
void writeSettings ()
 
void filterGroups (const QString searchString)
 
void filterGroup (QTreeWidgetItem *group, const QString &searchString)
 
void retranslateGroup (QTreeWidgetItem *group, const QString &groupName, const QStringList &measurements)
 
void retranslateMeasurement (QTreeWidgetItem *group, int index, const QString &name)
 
void changeCheckState (QTreeWidgetItem *group, Qt::CheckState state)
 
Qt::CheckState globalCheckState () const
 

Private Attributes

Ui::DialogMDataBase * ui
 
bool selectMode
 
QStringList measurements
 
QStringList newMeasurements
 
const QString groupAText = "A. " + MeasurementDatabaseDialog::tr("Direct Height", "Measurement section")
 
const QString groupBText = "B. " + MeasurementDatabaseDialog::tr("Direct Width", "Measurement section")
 
const QString groupCText = "C. " + MeasurementDatabaseDialog::tr("Indentation", "Measurement section")
 
const QString groupDText = "D. " + MeasurementDatabaseDialog::tr("Hand", "Measurement section")
 
const QString groupEText = "E. " + MeasurementDatabaseDialog::tr("Foot", "Measurement section")
 
const QString groupFText = "F. " + MeasurementDatabaseDialog::tr("Head", "Measurement section")
 
const QString groupGText = "G. " + MeasurementDatabaseDialog::tr("Circumference and Arc", "Measurement section")
 
const QString groupHText = "H. " + MeasurementDatabaseDialog::tr("Vertical", "Measurement section")
 
const QString groupIText = "I. " + MeasurementDatabaseDialog::tr("Horizontal", "Measurement section")
 
const QString groupJText = "J. " + MeasurementDatabaseDialog::tr("Bust", "Measurement section")
 
const QString groupKText = "K. " + MeasurementDatabaseDialog::tr("Balance", "Measurement section")
 
const QString groupLText = "L. " + MeasurementDatabaseDialog::tr("Arm", "Measurement section")
 
const QString groupMText = "M. " + MeasurementDatabaseDialog::tr("Leg", "Measurement section")
 
const QString groupNText = "N. " + MeasurementDatabaseDialog::tr("Crotch and Rise", "Measurement section")
 
const QString groupOText = "O. " + MeasurementDatabaseDialog::tr("Men & Tailoring", "Measurement section")
 
const QString groupPText = "P. " + MeasurementDatabaseDialog::tr("Historical & Specialty", "Measurement section")
 
const QString groupQText = "Q. " + MeasurementDatabaseDialog::tr("Patternmaking measurements", "Measurement section")
 
QTreeWidgetItem * groupA
 
QTreeWidgetItem * groupB
 
QTreeWidgetItem * groupC
 
QTreeWidgetItem * groupD
 
QTreeWidgetItem * groupE
 
QTreeWidgetItem * groupF
 
QTreeWidgetItem * groupG
 
QTreeWidgetItem * groupH
 
QTreeWidgetItem * groupI
 
QTreeWidgetItem * groupJ
 
QTreeWidgetItem * groupK
 
QTreeWidgetItem * groupL
 
QTreeWidgetItem * groupM
 
QTreeWidgetItem * groupN
 
QTreeWidgetItem * groupO
 
QTreeWidgetItem * groupP
 
QTreeWidgetItem * groupQ
 

Detailed Description

Definition at line 64 of file dialogmdatabase.h.

Constructor & Destructor Documentation

◆ MeasurementDatabaseDialog() [1/2]

MeasurementDatabaseDialog::MeasurementDatabaseDialog ( const QStringList &  measurements,
QWidget *  parent = nullptr 
)
explicit

◆ MeasurementDatabaseDialog() [2/2]

MeasurementDatabaseDialog::MeasurementDatabaseDialog ( QWidget *  parent = nullptr)
explicit

◆ ~MeasurementDatabaseDialog()

MeasurementDatabaseDialog::~MeasurementDatabaseDialog ( )
virtual

Definition at line 151 of file dialogmdatabase.cpp.

References ui, and writeSettings().

Member Function Documentation

◆ addMeasurement()

void MeasurementDatabaseDialog::addMeasurement ( QTreeWidgetItem *  group,
const QString &  groupName,
const QStringList &  newMeasurements 
)
private

Definition at line 475 of file dialogmdatabase.cpp.

References measurements, qApp, SCASSERT, selectMode, and updateChecks().

Referenced by initGroup().

◆ addMeasurementGroup()

QTreeWidgetItem * MeasurementDatabaseDialog::addMeasurementGroup ( const QString &  text)
private

Definition at line 459 of file dialogmdatabase.cpp.

References selectMode, and ui.

Referenced by initGroup().

◆ changeCheckState()

void MeasurementDatabaseDialog::changeCheckState ( QTreeWidgetItem *  group,
Qt::CheckState  state 
)
private

Definition at line 594 of file dialogmdatabase.cpp.

References SCASSERT.

Referenced by recheckState().

◆ changeEvent()

void MeasurementDatabaseDialog::changeEvent ( QEvent *  event)
protectedvirtual

Definition at line 230 of file dialogmdatabase.cpp.

References ui.

◆ eventFilter()

bool MeasurementDatabaseDialog::eventFilter ( QObject *  target,
QEvent *  event 
)
protectedvirtual

Definition at line 243 of file dialogmdatabase.cpp.

References showDescription(), and ui.

◆ filterGroup()

void MeasurementDatabaseDialog::filterGroup ( QTreeWidgetItem *  group,
const QString &  searchString 
)
private

Definition at line 544 of file dialogmdatabase.cpp.

References SCASSERT.

Referenced by filterGroups().

◆ filterGroups()

void MeasurementDatabaseDialog::filterGroups ( const QString  searchString)
private

◆ getNewMeasurementNames()

QStringList MeasurementDatabaseDialog::getNewMeasurementNames ( ) const

Definition at line 158 of file dialogmdatabase.cpp.

References newMeasurements.

◆ globalCheckState()

Qt::CheckState MeasurementDatabaseDialog::globalCheckState ( ) const
private

◆ imageUrl()

QString MeasurementDatabaseDialog::imageUrl ( const QString &  number)
static

Definition at line 188 of file dialogmdatabase.cpp.

References MapDiagrams(), and qApp.

Referenced by showDescription(), and TMainWindow::ShowMDiagram().

◆ initDataBase()

◆ initGroup()

void MeasurementDatabaseDialog::initGroup ( QTreeWidgetItem **  group,
const QString &  groupName,
const QStringList &  groupList,
const QStringList &  measurementList = QStringList() 
)
private

Definition at line 448 of file dialogmdatabase.cpp.

References addMeasurement(), and addMeasurementGroup().

Referenced by initDataBase().

◆ readSettings()

void MeasurementDatabaseDialog::readSettings ( )
private

Definition at line 508 of file dialogmdatabase.cpp.

References qApp.

Referenced by MeasurementDatabaseDialog().

◆ recheckState

void MeasurementDatabaseDialog::recheckState ( )
privateslot

◆ retranslateGroup()

void MeasurementDatabaseDialog::retranslateGroup ( QTreeWidgetItem *  group,
const QString &  groupName,
const QStringList &  measurements 
)
private

Definition at line 571 of file dialogmdatabase.cpp.

References retranslateMeasurement().

Referenced by retranslateGroups().

◆ retranslateGroups()

◆ retranslateMeasurement()

void MeasurementDatabaseDialog::retranslateMeasurement ( QTreeWidgetItem *  group,
int  index,
const QString &  name 
)
private

Definition at line 584 of file dialogmdatabase.cpp.

References qApp.

Referenced by retranslateGroup().

◆ showDescription

void MeasurementDatabaseDialog::showDescription ( QTreeWidgetItem *  item,
int  column 
)
privateslot

◆ treeContextMenu

void MeasurementDatabaseDialog::treeContextMenu ( const QPoint &  pos)
privateslot

◆ updateChecks

void MeasurementDatabaseDialog::updateChecks ( QTreeWidgetItem *  item,
int  column 
)
privateslot

Definition at line 272 of file dialogmdatabase.cpp.

References measurements, and newMeasurements.

Referenced by addMeasurement(), and MeasurementDatabaseDialog().

◆ writeSettings()

void MeasurementDatabaseDialog::writeSettings ( )
private

Definition at line 514 of file dialogmdatabase.cpp.

References qApp.

Referenced by ~MeasurementDatabaseDialog().

Member Data Documentation

◆ groupA

QTreeWidgetItem* MeasurementDatabaseDialog::groupA
private

◆ groupAText

const QString MeasurementDatabaseDialog::groupAText = "A. " + MeasurementDatabaseDialog::tr("Direct Height", "Measurement section")
private

Definition at line 95 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupB

QTreeWidgetItem* MeasurementDatabaseDialog::groupB
private

◆ groupBText

const QString MeasurementDatabaseDialog::groupBText = "B. " + MeasurementDatabaseDialog::tr("Direct Width", "Measurement section")
private

Definition at line 96 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupC

QTreeWidgetItem* MeasurementDatabaseDialog::groupC
private

◆ groupCText

const QString MeasurementDatabaseDialog::groupCText = "C. " + MeasurementDatabaseDialog::tr("Indentation", "Measurement section")
private

Definition at line 97 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupD

QTreeWidgetItem* MeasurementDatabaseDialog::groupD
private

◆ groupDText

const QString MeasurementDatabaseDialog::groupDText = "D. " + MeasurementDatabaseDialog::tr("Hand", "Measurement section")
private

Definition at line 98 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupE

QTreeWidgetItem* MeasurementDatabaseDialog::groupE
private

◆ groupEText

const QString MeasurementDatabaseDialog::groupEText = "E. " + MeasurementDatabaseDialog::tr("Foot", "Measurement section")
private

Definition at line 99 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupF

QTreeWidgetItem* MeasurementDatabaseDialog::groupF
private

◆ groupFText

const QString MeasurementDatabaseDialog::groupFText = "F. " + MeasurementDatabaseDialog::tr("Head", "Measurement section")
private

Definition at line 100 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupG

QTreeWidgetItem* MeasurementDatabaseDialog::groupG
private

◆ groupGText

const QString MeasurementDatabaseDialog::groupGText = "G. " + MeasurementDatabaseDialog::tr("Circumference and Arc", "Measurement section")
private

Definition at line 101 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupH

QTreeWidgetItem* MeasurementDatabaseDialog::groupH
private

◆ groupHText

const QString MeasurementDatabaseDialog::groupHText = "H. " + MeasurementDatabaseDialog::tr("Vertical", "Measurement section")
private

Definition at line 102 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupI

QTreeWidgetItem* MeasurementDatabaseDialog::groupI
private

◆ groupIText

const QString MeasurementDatabaseDialog::groupIText = "I. " + MeasurementDatabaseDialog::tr("Horizontal", "Measurement section")
private

Definition at line 103 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupJ

QTreeWidgetItem* MeasurementDatabaseDialog::groupJ
private

◆ groupJText

const QString MeasurementDatabaseDialog::groupJText = "J. " + MeasurementDatabaseDialog::tr("Bust", "Measurement section")
private

Definition at line 104 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupK

QTreeWidgetItem* MeasurementDatabaseDialog::groupK
private

◆ groupKText

const QString MeasurementDatabaseDialog::groupKText = "K. " + MeasurementDatabaseDialog::tr("Balance", "Measurement section")
private

Definition at line 105 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupL

QTreeWidgetItem* MeasurementDatabaseDialog::groupL
private

◆ groupLText

const QString MeasurementDatabaseDialog::groupLText = "L. " + MeasurementDatabaseDialog::tr("Arm", "Measurement section")
private

Definition at line 106 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupM

QTreeWidgetItem* MeasurementDatabaseDialog::groupM
private

◆ groupMText

const QString MeasurementDatabaseDialog::groupMText = "M. " + MeasurementDatabaseDialog::tr("Leg", "Measurement section")
private

Definition at line 107 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupN

QTreeWidgetItem* MeasurementDatabaseDialog::groupN
private

◆ groupNText

const QString MeasurementDatabaseDialog::groupNText = "N. " + MeasurementDatabaseDialog::tr("Crotch and Rise", "Measurement section")
private

Definition at line 108 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupO

QTreeWidgetItem* MeasurementDatabaseDialog::groupO
private

◆ groupOText

const QString MeasurementDatabaseDialog::groupOText = "O. " + MeasurementDatabaseDialog::tr("Men & Tailoring", "Measurement section")
private

Definition at line 109 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupP

QTreeWidgetItem* MeasurementDatabaseDialog::groupP
private

◆ groupPText

const QString MeasurementDatabaseDialog::groupPText = "P. " + MeasurementDatabaseDialog::tr("Historical & Specialty", "Measurement section")
private

Definition at line 110 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ groupQ

QTreeWidgetItem* MeasurementDatabaseDialog::groupQ
private

◆ groupQText

const QString MeasurementDatabaseDialog::groupQText = "Q. " + MeasurementDatabaseDialog::tr("Patternmaking measurements", "Measurement section")
private

Definition at line 111 of file dialogmdatabase.h.

Referenced by initDataBase(), and retranslateGroups().

◆ measurements

QStringList MeasurementDatabaseDialog::measurements
private

Definition at line 92 of file dialogmdatabase.h.

Referenced by addMeasurement(), and updateChecks().

◆ newMeasurements

QStringList MeasurementDatabaseDialog::newMeasurements
private

Definition at line 93 of file dialogmdatabase.h.

Referenced by getNewMeasurementNames(), and updateChecks().

◆ selectMode

bool MeasurementDatabaseDialog::selectMode
private

◆ ui

Ui::DialogMDataBase* MeasurementDatabaseDialog::ui
private

The documentation for this class was generated from the following files: