Initialize ITextMark with a lineNumber

Ensure that it is updated as the lines are moved. That can be later used
to quickly find and remove the marks again.

Change-Id: I2285111996d5c8ef12f792fd73ff00ce186addc1
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Daniel Teske
2012-02-21 16:27:04 +01:00
committed by hjk
parent b112c277da
commit 2df2c0655c
7 changed files with 44 additions and 33 deletions

View File

@@ -43,6 +43,11 @@ ITextMark::~ITextMark()
}
int ITextMark::lineNumber() const
{
return m_lineNumber;
}
void ITextMark::paint(QPainter *painter, const QRect &rect) const
{
m_icon.paint(painter, rect, Qt::AlignCenter);
@@ -50,7 +55,7 @@ void ITextMark::paint(QPainter *painter, const QRect &rect) const
void ITextMark::updateLineNumber(int lineNumber)
{
Q_UNUSED(lineNumber)
m_lineNumber = lineNumber;
}
void ITextMark::updateBlock(const QTextBlock &)