Removed printf commands, added Q_REQUIRED_RESULT macros, replaced v[i] with v.at(i) where needed, replaced 1,0 with true,false when creating boolean XML attributes
--HG-- branch : feature
This commit is contained in:
parent
0e7b369c2e
commit
455befa493
|
@ -1002,7 +1002,7 @@ QString VAbstractPattern::GetPatternName() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractPattern::SetPatternName(QString qsName)
|
||||
void VAbstractPattern::SetPatternName(const QString &qsName)
|
||||
{
|
||||
CheckTagExists(TagPatternName);
|
||||
setTagText(TagPatternName, qsName);
|
||||
|
@ -1017,7 +1017,7 @@ QString VAbstractPattern::GetCompanyName() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractPattern::SetCompanyName(QString qsName)
|
||||
void VAbstractPattern::SetCompanyName(const QString& qsName)
|
||||
{
|
||||
CheckTagExists(TagCompanyName);
|
||||
setTagText(TagCompanyName, qsName);
|
||||
|
@ -1032,7 +1032,7 @@ QString VAbstractPattern::GetPatternNumber() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractPattern::SetPatternNumber(QString qsNum)
|
||||
void VAbstractPattern::SetPatternNumber(const QString& qsNum)
|
||||
{
|
||||
CheckTagExists(TagPatternNum);
|
||||
setTagText(TagPatternNum, qsNum);
|
||||
|
@ -1047,7 +1047,7 @@ QString VAbstractPattern::GetCustomerName() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractPattern::SetCustomerName(QString qsName)
|
||||
void VAbstractPattern::SetCustomerName(const QString& qsName)
|
||||
{
|
||||
CheckTagExists(TagCustomerName);
|
||||
setTagText(TagCustomerName, qsName);
|
||||
|
@ -1062,7 +1062,7 @@ QString VAbstractPattern::GetPatternSize() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractPattern::SetPatternSize(QString qsSize)
|
||||
void VAbstractPattern::SetPatternSize(const QString& qsSize)
|
||||
{
|
||||
CheckTagExists(TagSize);
|
||||
setTagText(TagSize, qsSize);
|
||||
|
|
|
@ -109,15 +109,15 @@ public:
|
|||
void SetNotes(const QString &text);
|
||||
|
||||
QString GetPatternName() const;
|
||||
void SetPatternName(QString qsName);
|
||||
void SetPatternName(const QString& qsName);
|
||||
QString GetCompanyName() const;
|
||||
void SetCompanyName(QString qsName);
|
||||
void SetCompanyName(const QString& qsName);
|
||||
QString GetPatternNumber() const;
|
||||
void SetPatternNumber(QString qsNum);
|
||||
void SetPatternNumber(const QString &qsNum);
|
||||
QString GetCustomerName() const;
|
||||
void SetCustomerName(QString qsName);
|
||||
void SetCustomerName(const QString& qsName);
|
||||
QString GetPatternSize() const;
|
||||
void SetPatternSize(QString qsSize);
|
||||
void SetPatternSize(const QString &qsSize);
|
||||
bool IsDateVisible() const;
|
||||
void SetDateVisible(bool bVisible);
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QBrush>
|
||||
#include <stdio.h>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
|
||||
# include "../vmisc/vmath.h"
|
||||
|
@ -159,7 +158,7 @@ void VLayoutDetail::SetPatternInfo(const VAbstractPattern* pDoc, const VPatternI
|
|||
<< QPointF(ptPos.x(), ptPos.y() + geom.GetLabelHeight());
|
||||
for (int i = 0; i < v.count(); ++i)
|
||||
{
|
||||
v[i] = RotatePoint(ptCenter, v[i], dAng);
|
||||
v[i] = RotatePoint(ptCenter, v.at(i), dAng);
|
||||
}
|
||||
d->patternInfo = RoundPoints(v);
|
||||
|
||||
|
@ -543,7 +542,6 @@ void VLayoutDetail::CreateTextItems()
|
|||
qreal dW = GetDistance(points.at(0), points.at(1));
|
||||
qreal dY = 0;
|
||||
qreal dX;
|
||||
printf("Pattern lines %d %d\n", m_tmPattern.GetCount(), m_tmPattern.GetSourceLineCount());
|
||||
for (int i = 0; i < m_tmPattern.GetCount(); ++i)
|
||||
{
|
||||
const TextLine& tl = m_tmPattern.GetLine(i);
|
||||
|
|
|
@ -88,8 +88,8 @@ public:
|
|||
QPainterPath ContourPath() const;
|
||||
void ClearTextItems();
|
||||
void CreateTextItems();
|
||||
int GetTextItemsCount() const;
|
||||
QGraphicsItem* GetTextItem(int i) const;
|
||||
int GetTextItemsCount() const Q_REQUIRED_RESULT;
|
||||
QGraphicsItem* GetTextItem(int i) const Q_REQUIRED_RESULT;
|
||||
QPainterPath LayoutAllowencePath() const;
|
||||
QGraphicsItem *GetItem() const Q_REQUIRED_RESULT;
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ void SaveDetailOptions::SavePatternPieceData(QDomElement &domElement, const VDet
|
|||
QDomElement domData = doc->createElement(VAbstractPattern::TagData);
|
||||
const VPatternPieceData& data = det.GetPatternPieceData();
|
||||
doc->SetAttribute(domData, VAbstractPattern::AttrLetter, data.GetLetter());
|
||||
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, data.IsVisible() == true? 1:0);
|
||||
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, data.IsVisible() == true? trueStr : falseStr);
|
||||
doc->SetAttribute(domData, AttrMx, data.GetPos().x());
|
||||
doc->SetAttribute(domData, AttrMy, data.GetPos().y());
|
||||
doc->SetAttribute(domData, VToolDetail::AttrWidth, data.GetLabelWidth());
|
||||
|
@ -165,7 +165,7 @@ void SaveDetailOptions::SavePatternInfo(QDomElement &domElement, const VDetail &
|
|||
{
|
||||
QDomElement domData = doc->createElement(VAbstractPattern::TagPatternInfo);
|
||||
const VPatternInfoGeometry& data = det.GetPatternInfo();
|
||||
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, data.IsVisible() == true? 1:0);
|
||||
doc->SetAttribute(domData, VAbstractPattern::AttrVisible, data.IsVisible() == true? trueStr : falseStr);
|
||||
doc->SetAttribute(domData, AttrMx, data.GetPos().x());
|
||||
doc->SetAttribute(domData, AttrMy, data.GetPos().y());
|
||||
doc->SetAttribute(domData, VToolDetail::AttrWidth, data.GetLabelWidth());
|
||||
|
|
Loading…
Reference in New Issue
Block a user