Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
fb05c7a9
Commit
fb05c7a9
authored
Sep 13, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
basetexteditor: make block selection accessible
parent
26417ff4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
src/plugins/texteditor/basetexteditor.cpp
src/plugins/texteditor/basetexteditor.cpp
+15
-0
src/plugins/texteditor/basetexteditor.h
src/plugins/texteditor/basetexteditor.h
+2
-0
No files found.
src/plugins/texteditor/basetexteditor.cpp
View file @
fb05c7a9
...
...
@@ -5786,6 +5786,21 @@ bool BaseTextEditor::inFindScope(int selectionStart, int selectionEnd)
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
)
{
...
...
src/plugins/texteditor/basetexteditor.h
View file @
fb05c7a9
...
...
@@ -237,6 +237,8 @@ public:
void
insertCodeSnippet
(
const
QTextCursor
&
cursor
,
const
QString
&
snippet
);
void
setBlockSelection
(
bool
on
);
bool
hasBlockSelection
()
const
;
int
verticalBlockSelectionFirstColumn
()
const
;
int
verticalBlockSelectionLastColumn
()
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment