forked from qt-creator/qt-creator
TextEditor: Add line annotations
Displaying short descriptive text of a TextMark at line end. Currently implemented for ClangTextMark and BookMark. Change-Id: Idc6b579bda0382ad94b2e236b715696396b10460 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -44,7 +44,7 @@ void QmlProfilerTextMark::addTypeId(int typeId)
|
||||
m_typeIds.append(typeId);
|
||||
}
|
||||
|
||||
void QmlProfilerTextMark::paint(QPainter *painter, const QRect &paintRect) const
|
||||
void QmlProfilerTextMark::paintIcon(QPainter *painter, const QRect &paintRect) const
|
||||
{
|
||||
painter->save();
|
||||
painter->setPen(Qt::black);
|
||||
@@ -108,7 +108,7 @@ void QmlProfilerTextMarkModel::createMarks(QmlProfilerTool *tool, const QString
|
||||
}
|
||||
}
|
||||
|
||||
bool QmlProfilerTextMark::addToolTipContent(QLayout *target)
|
||||
bool QmlProfilerTextMark::addToolTipContent(QLayout *target) const
|
||||
{
|
||||
QGridLayout *layout = new QGridLayout;
|
||||
layout->setHorizontalSpacing(10);
|
||||
|
||||
@@ -37,10 +37,10 @@ public:
|
||||
QmlProfilerTextMark(QmlProfilerTool *tool, int typeId, const QString &fileName, int lineNumber);
|
||||
void addTypeId(int typeId);
|
||||
|
||||
void paint(QPainter *painter, const QRect &rect) const override;
|
||||
void paintIcon(QPainter *painter, const QRect &rect) const override;
|
||||
void clicked() override;
|
||||
bool isClickable() const override { return true; }
|
||||
bool addToolTipContent(QLayout *target) override;
|
||||
bool addToolTipContent(QLayout *target) const override;
|
||||
|
||||
private:
|
||||
QmlProfilerTool *m_tool;
|
||||
|
||||
Reference in New Issue
Block a user