forked from qt-creator/qt-creator
basetexteditor: make block selection accessible
This commit is contained in:
@@ -5786,6 +5786,21 @@ bool BaseTextEditor::inFindScope(int selectionStart, int selectionEnd)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BaseTextEditor::setBlockSelection(bool on)
|
||||||
|
{
|
||||||
|
if (d->m_inBlockSelectionMode != on) {
|
||||||
|
d->m_inBlockSelectionMode = on;
|
||||||
|
if (on)
|
||||||
|
d->m_blockSelection.fromSelection(tabSettings(), textCursor());
|
||||||
|
viewport()->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BaseTextEditor::hasBlockSelection() const
|
||||||
|
{
|
||||||
|
return d->m_inBlockSelectionMode;
|
||||||
|
}
|
||||||
|
|
||||||
void BaseTextEditor::handleBlockSelection(int diff_row, int diff_col)
|
void BaseTextEditor::handleBlockSelection(int diff_row, int diff_col)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -237,6 +237,8 @@ public:
|
|||||||
|
|
||||||
void insertCodeSnippet(const QTextCursor &cursor, const QString &snippet);
|
void insertCodeSnippet(const QTextCursor &cursor, const QString &snippet);
|
||||||
|
|
||||||
|
void setBlockSelection(bool on);
|
||||||
|
bool hasBlockSelection() const;
|
||||||
|
|
||||||
int verticalBlockSelectionFirstColumn() const;
|
int verticalBlockSelectionFirstColumn() const;
|
||||||
int verticalBlockSelectionLastColumn() const;
|
int verticalBlockSelectionLastColumn() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user