Update label after changing date/time format.
--HG-- branch : feature
This commit is contained in:
parent
6d06370f4f
commit
464a54c7ee
|
@ -1349,6 +1349,7 @@ void VAbstractPattern::SetLabelDateFormat(const QString &format)
|
|||
{
|
||||
QDomElement tag = CheckTagExists(TagPatternLabel);
|
||||
SetAttribute(tag, AttrDateFormat, format);
|
||||
patternLabelWasChanged = true;
|
||||
modified = true;
|
||||
emit patternChanged(false);
|
||||
}
|
||||
|
@ -1373,6 +1374,7 @@ void VAbstractPattern::SetLabelTimeFormat(const QString &format)
|
|||
{
|
||||
QDomElement tag = CheckTagExists(TagPatternLabel);
|
||||
SetAttribute(tag, AttrTimeFormat, format);
|
||||
patternLabelWasChanged = true;
|
||||
modified = true;
|
||||
emit patternChanged(false);
|
||||
}
|
||||
|
|
|
@ -543,7 +543,7 @@ QStringList VLayoutPiece::GetPatternText() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VLayoutPiece::SetPatternInfo(const VAbstractPattern* pDoc, const VPatternLabelData& geom, const QFont &font,
|
||||
void VLayoutPiece::SetPatternInfo(VAbstractPattern* pDoc, const VPatternLabelData& geom, const QFont &font,
|
||||
const VContainer *pattern)
|
||||
{
|
||||
QPointF ptPos;
|
||||
|
|
|
@ -95,7 +95,7 @@ public:
|
|||
|
||||
QPointF GetPatternTextPosition() const;
|
||||
QStringList GetPatternText() const;
|
||||
void SetPatternInfo(const VAbstractPattern* pDoc, const VPatternLabelData& geom, const QFont& font,
|
||||
void SetPatternInfo(VAbstractPattern *pDoc, const VPatternLabelData& geom, const QFont& font,
|
||||
const VContainer *pattern);
|
||||
|
||||
void SetGrainline(const VGrainlineData& geom, const VContainer *pattern);
|
||||
|
|
|
@ -346,7 +346,7 @@ void VTextManager::Update(const QString& qsName, const VPieceLabelData& data)
|
|||
* @brief VTextManager::Update updates the text lines with pattern info
|
||||
* @param pDoc pointer to the abstract pattern object
|
||||
*/
|
||||
void VTextManager::Update(const VAbstractPattern *pDoc)
|
||||
void VTextManager::Update(VAbstractPattern *pDoc)
|
||||
{
|
||||
m_liLines.clear();
|
||||
|
||||
|
@ -365,6 +365,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc)
|
|||
lines[i].line = ReplacePlaceholders(placeholders, lines.at(i).line);
|
||||
}
|
||||
|
||||
pDoc->SetPatternWasChanged(false);
|
||||
m_patternLabelLines = PrepareLines(lines);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
const TextLine& GetSourceLine(int i) const;
|
||||
|
||||
void Update(const QString& qsName, const VPieceLabelData& data);
|
||||
void Update(const VAbstractPattern* pDoc);
|
||||
void Update(VAbstractPattern* pDoc);
|
||||
|
||||
private:
|
||||
QFont m_font;
|
||||
|
|
|
@ -343,7 +343,7 @@ void VTextGraphicsItem::UpdateData(const QString &qsName, const VPieceLabelData
|
|||
* @brief VTextGraphicsItem::UpdateData Updates the pattern label
|
||||
* @param pDoc pointer to the pattern object
|
||||
*/
|
||||
void VTextGraphicsItem::UpdateData(const VAbstractPattern* pDoc)
|
||||
void VTextGraphicsItem::UpdateData(VAbstractPattern* pDoc)
|
||||
{
|
||||
m_tm.Update(pDoc);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
void SetSize(qreal fW, qreal fH);
|
||||
bool IsContained(QRectF rectBB, qreal dRot, qreal& dX, qreal& dY) const;
|
||||
void UpdateData(const QString& qsName, const VPieceLabelData& data);
|
||||
void UpdateData(const VAbstractPattern* pDoc);
|
||||
void UpdateData(VAbstractPattern* pDoc);
|
||||
int GetTextLines() const;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue
Block a user