Seamly2D
Code documentation
VMeasurement Class Reference

The VMeasurement class keep data row of multisize table. More...

#include <vmeasurement.h>

Inheritance diagram for VMeasurement:
Collaboration diagram for VMeasurement:

Public Member Functions

 VMeasurement (quint32 index, const QString &name, qreal baseSize, qreal baseHeight, const qreal &base, const qreal &ksize, const qreal &kheight, const QString &gui_text=QString(), const QString &description=QString(), const QString &tagName=QString())
 VMeasurement create measurement for multisize table. More...
 
 VMeasurement (VContainer *data, quint32 index, const QString &name, const qreal &base, const QString &formula, bool ok, const QString &gui_text=QString(), const QString &description=QString(), const QString &tagName=QString())
 VMeasurement create measurement for individual table. More...
 
 VMeasurement (const VMeasurement &m)
 
virtual ~VMeasurement () Q_DECL_OVERRIDE
 
VMeasurementoperator= (const VMeasurement &m)
 
void Swap (VMeasurement &m) Q_DECL_NOTHROW
 
QString getGuiText () const
 getGuiText measurement name for tooltip More...
 
QString TagName () const
 
void setTagName (const QString &tagName)
 
QString GetFormula () const
 
bool isCustom () const
 
int Index () const
 
bool IsFormulaOk () const
 
virtual bool isNotUsed () const Q_DECL_OVERRIDE
 
virtual qreal GetValue () const Q_DECL_OVERRIDE
 
virtual qreal * GetValue () Q_DECL_OVERRIDE
 
VContainerGetData ()
 
void SetSize (qreal *size)
 
void SetHeight (qreal *height)
 
void SetUnit (const Unit *unit)
 
qreal GetBase () const
 GetBase return value in base size and height. More...
 
void SetBase (const qreal &value)
 
qreal GetKsize () const
 GetKsize return increment in sizes. More...
 
void SetKsize (const qreal &value)
 
qreal GetKheight () const
 GetKheight return increment in heights. More...
 
void SetKheight (const qreal &value)
 
- Public Member Functions inherited from VVariable
 VVariable ()
 
 VVariable (const QString &name, const QString &description=QString())
 
 VVariable (const VVariable &var)
 
virtual ~VVariable () Q_DECL_OVERRIDE
 
VVariableoperator= (const VVariable &var)
 
void Swap (VVariable &var) Q_DECL_NOTHROW
 
QString GetDescription () const
 
void SetDescription (const QString &desc)
 
- Public Member Functions inherited from VInternalVariable
 VInternalVariable ()
 
 VInternalVariable (const VInternalVariable &var)
 
virtual ~VInternalVariable ()
 
VInternalVariableoperator= (const VInternalVariable &var)
 
void Swap (VInternalVariable &var) Q_DECL_NOTHROW
 
QString GetName () const
 
void SetName (const QString &name)
 
VarType GetType () const
 
void SetType (const VarType &type)
 
virtual bool Filter (quint32 id)
 

Static Public Member Functions

static QStringList ListHeights (QMap< GHeights, bool > heights, Unit patternUnit)
 
static QStringList ListSizes (QMap< GSizes, bool > sizes, Unit patternUnit)
 
static QStringList WholeListHeights (Unit patternUnit)
 
static QStringList WholeListSizes (Unit patternUnit)
 
static bool IsGradationSizeValid (const QString &size)
 
static bool IsGradationHeightValid (const QString &height)
 

Private Member Functions

qreal CalcValue () const
 

Static Private Member Functions

static void ListValue (QStringList &list, qreal value, Unit patternUnit)
 

Private Attributes

QSharedDataPointer< VMeasurementDatad
 

Additional Inherited Members

- Protected Member Functions inherited from VInternalVariable
void SetValue (const qreal &value)
 

Detailed Description

The VMeasurement class keep data row of multisize table.

Definition at line 73 of file vmeasurement.h.

Constructor & Destructor Documentation

◆ VMeasurement() [1/3]

VMeasurement::VMeasurement ( quint32  index,
const QString &  name,
qreal  baseSize,
qreal  baseHeight,
const qreal &  base,
const qreal &  ksize,
const qreal &  kheight,
const QString &  gui_text = QString(),
const QString &  description = QString(),
const QString &  tagName = QString() 
)

VMeasurement create measurement for multisize table.

Parameters
namemeasurement's name
basevalue in base size and height
ksizeincrement in sizes
kheightincrement in heights
gui_textshor tooltip for user
descriptionmeasurement full description
tagNamemeasurement's tag name in file

Definition at line 81 of file vmeasurement.cpp.

References d, Measurement, VInternalVariable::SetType(), and VInternalVariable::SetValue().

◆ VMeasurement() [2/3]

VMeasurement::VMeasurement ( VContainer data,
quint32  index,
const QString &  name,
const qreal &  base,
const QString &  formula,
bool  ok,
const QString &  gui_text = QString(),
const QString &  description = QString(),
const QString &  tagName = QString() 
)

VMeasurement create measurement for individual table.

Parameters
namemeasurement's name
basevalue in base size and height
gui_textshor tooltip for user
descriptionmeasurement full description
tagNamemeasurement's tag name in file

Definition at line 100 of file vmeasurement.cpp.

References Measurement, VInternalVariable::SetType(), and VInternalVariable::SetValue().

◆ VMeasurement() [3/3]

VMeasurement::VMeasurement ( const VMeasurement m)

Definition at line 110 of file vmeasurement.cpp.

◆ ~VMeasurement()

VMeasurement::~VMeasurement ( )
virtual

Definition at line 127 of file vmeasurement.cpp.

Member Function Documentation

◆ CalcValue()

qreal VMeasurement::CalcValue ( ) const
private

Definition at line 249 of file vmeasurement.cpp.

References Cm, d, VInternalVariable::GetValue(), Inch, and UnitConvertor().

Referenced by GetValue().

◆ GetBase()

qreal VMeasurement::GetBase ( ) const

GetBase return value in base size and height.

Returns
value

Definition at line 373 of file vmeasurement.cpp.

References d.

◆ GetData()

VContainer * VMeasurement::GetData ( )

Definition at line 345 of file vmeasurement.cpp.

References d.

◆ GetFormula()

QString VMeasurement::GetFormula ( ) const

Definition at line 302 of file vmeasurement.cpp.

References d.

◆ getGuiText()

QString VMeasurement::getGuiText ( ) const

getGuiText measurement name for tooltip

Returns
measurement name

Definition at line 284 of file vmeasurement.cpp.

References d.

◆ GetKheight()

qreal VMeasurement::GetKheight ( ) const

GetKheight return increment in heights.

Returns
increment

Definition at line 406 of file vmeasurement.cpp.

References d.

◆ GetKsize()

qreal VMeasurement::GetKsize ( ) const

GetKsize return increment in sizes.

Returns
increment

Definition at line 389 of file vmeasurement.cpp.

References d.

◆ GetValue() [1/2]

qreal VMeasurement::GetValue ( ) const
virtual

Reimplemented from VInternalVariable.

Definition at line 332 of file vmeasurement.cpp.

References CalcValue().

◆ GetValue() [2/2]

qreal * VMeasurement::GetValue ( )
virtual

Reimplemented from VInternalVariable.

Definition at line 338 of file vmeasurement.cpp.

References CalcValue(), VInternalVariable::GetValue(), and VInternalVariable::SetValue().

◆ Index()

int VMeasurement::Index ( ) const

Definition at line 314 of file vmeasurement.cpp.

References d.

◆ isCustom()

bool VMeasurement::isCustom ( ) const

Definition at line 308 of file vmeasurement.cpp.

References CustomMSign, and VInternalVariable::GetName().

◆ IsFormulaOk()

bool VMeasurement::IsFormulaOk ( ) const

Definition at line 320 of file vmeasurement.cpp.

References d.

◆ IsGradationHeightValid()

bool VMeasurement::IsGradationHeightValid ( const QString &  height)
static

Definition at line 235 of file vmeasurement.cpp.

References Cm, and WholeListHeights().

Referenced by VCommandLine::OptGradationHeight(), and MApplication::ParseCommandLine().

◆ IsGradationSizeValid()

bool VMeasurement::IsGradationSizeValid ( const QString &  size)
static

Definition at line 221 of file vmeasurement.cpp.

References Cm, and WholeListSizes().

Referenced by VCommandLine::OptGradationSize(), and MApplication::ParseCommandLine().

◆ isNotUsed()

bool VMeasurement::isNotUsed ( ) const
virtual

Reimplemented from VInternalVariable.

Definition at line 326 of file vmeasurement.cpp.

References d.

◆ ListHeights()

QStringList VMeasurement::ListHeights ( QMap< GHeights, bool >  heights,
Unit  patternUnit 
)
static

Definition at line 131 of file vmeasurement.cpp.

References ALL, Inch, ListValue(), and WholeListHeights().

Referenced by MainWindow::initStatusBar().

◆ ListSizes()

QStringList VMeasurement::ListSizes ( QMap< GSizes, bool >  sizes,
Unit  patternUnit 
)
static

Definition at line 158 of file vmeasurement.cpp.

References ALL, Inch, ListValue(), and WholeListSizes().

Referenced by MainWindow::initStatusBar().

◆ ListValue()

void VMeasurement::ListValue ( QStringList &  list,
qreal  value,
Unit  patternUnit 
)
staticprivate

Definition at line 272 of file vmeasurement.cpp.

References Cm, and UnitConvertor().

Referenced by ListHeights(), ListSizes(), WholeListHeights(), and WholeListSizes().

◆ operator=()

VMeasurement & VMeasurement::operator= ( const VMeasurement m)

Definition at line 115 of file vmeasurement.cpp.

References d, and VVariable::operator=().

◆ SetBase()

void VMeasurement::SetBase ( const qreal &  value)

Definition at line 379 of file vmeasurement.cpp.

References d.

◆ SetHeight()

void VMeasurement::SetHeight ( qreal *  height)

Definition at line 357 of file vmeasurement.cpp.

References d.

◆ SetKheight()

void VMeasurement::SetKheight ( const qreal &  value)

Definition at line 413 of file vmeasurement.cpp.

References d.

◆ SetKsize()

void VMeasurement::SetKsize ( const qreal &  value)

Definition at line 396 of file vmeasurement.cpp.

References d.

◆ SetSize()

void VMeasurement::SetSize ( qreal *  size)

Definition at line 351 of file vmeasurement.cpp.

References d.

◆ setTagName()

void VMeasurement::setTagName ( const QString &  tagName)

Definition at line 296 of file vmeasurement.cpp.

References d.

◆ SetUnit()

void VMeasurement::SetUnit ( const Unit unit)

Definition at line 363 of file vmeasurement.cpp.

References d.

◆ Swap()

void VMeasurement::Swap ( VMeasurement m)

Definition at line 67 of file vmeasurement.cpp.

References VVariable::Swap().

◆ TagName()

QString VMeasurement::TagName ( ) const

Definition at line 290 of file vmeasurement.cpp.

References d.

◆ WholeListHeights()

◆ WholeListSizes()

Member Data Documentation

◆ d


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