forked from qt-creator/qt-creator
add basic support to show refactor markers
See BaseTextEditor::setRefactorMarkers(...). The markers support a clicked signal via BaseTextEditor and tooltips. They feature a cursor, but are always positioned at the end of the line (not block!). As special gimmick they do extend the document width when they are positioned outside the document area.
This commit is contained in:
@@ -51,6 +51,10 @@ namespace TextEditor {
|
||||
namespace Internal {
|
||||
class BaseTextEditorPrivate;
|
||||
class TextEditorOverlay;
|
||||
class RefactorOverlay;
|
||||
class RefactorMarker;
|
||||
typedef QList<RefactorMarker> RefactorMarkers;
|
||||
|
||||
}
|
||||
|
||||
class ITextMarkable;
|
||||
@@ -315,6 +319,7 @@ private:
|
||||
Internal::BaseTextEditorPrivate *d;
|
||||
friend class Internal::BaseTextEditorPrivate;
|
||||
friend class Internal::TextEditorOverlay;
|
||||
friend class Internal::RefactorOverlay;
|
||||
|
||||
public:
|
||||
QWidget *extraArea() const;
|
||||
@@ -348,6 +353,13 @@ public:
|
||||
QList<QTextEdit::ExtraSelection> extraSelections(ExtraSelectionKind kind) const;
|
||||
QString extraSelectionTooltip(int pos) const;
|
||||
|
||||
|
||||
void setRefactorMarkers(const Internal::RefactorMarkers &markers);
|
||||
signals:
|
||||
void refactorMarkerClicked(const Internal::RefactorMarker &marker);
|
||||
|
||||
public:
|
||||
|
||||
struct BlockRange
|
||||
{
|
||||
BlockRange() : first(0), last(-1) {}
|
||||
@@ -516,6 +528,7 @@ private slots:
|
||||
void _q_highlightBlocks();
|
||||
void slotSelectionChanged();
|
||||
void _q_animateUpdate(int position, QPointF lastPos, QRectF rect);
|
||||
void doFoo();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user