Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
5f899211
Commit
5f899211
authored
Apr 24, 2009
by
mae
Browse files
polishing of block highlighting, and a new folder bar.
parent
dfd2c5db
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
src/plugins/texteditor/basetexteditor.cpp
View file @
5f899211
This diff is collapsed.
Click to expand it.
src/plugins/texteditor/basetexteditor.h
View file @
5f899211
...
...
@@ -370,7 +370,6 @@ private slots:
void
restoreCursorPosition
();
void
highlightSearchResults
(
const
QString
&
txt
,
QTextDocument
::
FindFlags
findFlags
);
void
setFindScope
(
const
QTextCursor
&
);
void
setCollapseIndicatorAlpha
(
int
);
void
currentEditorChanged
(
Core
::
IEditor
*
editor
);
private:
...
...
@@ -460,7 +459,7 @@ private:
void
saveCurrentCursorPositionForNavigation
();
void
toggleBlockVisible
(
const
QTextBlock
&
block
);
QRect
collapseBox
(
const
QTextBlock
&
block
);
QRect
collapseBox
();
QTextBlock
collapsedBlockAt
(
const
QPoint
&
pos
,
QRect
*
box
=
0
)
const
;
...
...
src/plugins/texteditor/basetexteditor_p.h
View file @
5f899211
...
...
@@ -33,7 +33,6 @@
#include "basetexteditor.h"
#include <QtCore/QBasicTimer>
#include <QtCore/QTimeLine>
#include <QtCore/QSharedData>
#include <QtGui/QTextEdit>
...
...
@@ -119,6 +118,7 @@ struct BaseTextEditorPrivateHighlightBlocks
QList
<
int
>
open
;
QList
<
int
>
close
;
QList
<
int
>
visualIndent
;
inline
bool
isEmpty
()
const
{
return
open
.
isEmpty
()
||
close
.
isEmpty
()
||
visualIndent
.
isEmpty
();
}
inline
bool
operator
==
(
const
BaseTextEditorPrivateHighlightBlocks
&
o
)
const
{
return
(
open
==
o
.
open
&&
close
==
o
.
close
&&
visualIndent
==
o
.
visualIndent
);
}
...
...
@@ -178,9 +178,7 @@ public:
int
extraAreaSelectionAnchorBlockNumber
;
int
extraAreaToggleMarkBlockNumber
;
int
extraAreaHighlightCollapseBlockNumber
;
int
extraAreaCollapseAlpha
;
int
extraAreaHighlightFadingBlockNumber
;
QTimeLine
*
extraAreaTimeLine
;
int
extraAreaHighlightCollapseColumn
;
QBasicTimer
collapsedBlockTimer
;
int
visibleCollapsedBlockNumber
;
...
...
src/plugins/texteditor/displaysettings.cpp
View file @
5f899211
...
...
@@ -40,7 +40,7 @@ static const char * const showWrapColumnKey = "ShowWrapColumn";
static
const
char
*
const
wrapColumnKey
=
"WrapColumn"
;
static
const
char
*
const
visualizeWhitespaceKey
=
"VisualizeWhitespace"
;
static
const
char
*
const
displayFoldingMarkersKey
=
"DisplayFoldingMarkersV2"
;
static
const
char
*
const
highlightCurrentLineKey
=
"HighlightCurrentLineKey"
;
static
const
char
*
const
highlightCurrentLineKey
=
"HighlightCurrentLineKey
V2
"
;
static
const
char
*
const
highlightBlocksKey
=
"HighlightBlocksKeyV2"
;
static
const
char
*
const
groupPostfix
=
"DisplaySettings"
;
...
...
@@ -53,7 +53,7 @@ DisplaySettings::DisplaySettings() :
m_wrapColumn
(
80
),
m_visualizeWhitespace
(
false
),
m_displayFoldingMarkers
(
false
),
m_highlightCurrentLine
(
tru
e
),
m_highlightCurrentLine
(
fals
e
),
m_highlightBlocks
(
true
)
{
}
...
...
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