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
8002b1a9
Commit
8002b1a9
authored
Feb 20, 2009
by
Roberto Raggi
Browse files
Customizable doxy formats.
parent
5bf1f27e
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
8002b1a9
...
...
@@ -740,7 +740,9 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_OPERATOR
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_PREPROCESSOR
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_LABEL
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_COMMENT
);
<<
QLatin1String
(
TextEditor
::
Constants
::
C_COMMENT
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_DOXYGEN_COMMENT
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_DOXYGEN_TAG
);
}
const
QVector
<
QTextCharFormat
>
formats
=
fs
.
toTextCharFormats
(
categories
);
...
...
src/plugins/cppeditor/cppeditorenums.h
View file @
8002b1a9
...
...
@@ -51,6 +51,8 @@ enum CppFormats {
CppPreprocessorFormat
,
CppLabelFormat
,
CppCommentFormat
,
CppDoxygenCommentFormat
,
CppDoxygenTagFormat
,
NumCppFormats
};
...
...
src/plugins/cppeditor/cpphighlighter.cpp
View file @
8002b1a9
...
...
@@ -329,10 +329,8 @@ void CppHighlighter::highlightDoxygenComment(const QString &text, int position,
const
QChar
*
uc
=
text
.
unicode
();
const
QChar
*
it
=
uc
+
position
;
QTextCharFormat
format
=
m_formats
[
CppCommentFormat
];
QTextCharFormat
kwFormat
=
format
;
kwFormat
.
setFontWeight
(
QFont
::
Bold
);
kwFormat
.
setUnderlineStyle
(
QTextCharFormat
::
SingleUnderline
);
const
QTextCharFormat
&
format
=
m_formats
[
CppDoxygenCommentFormat
];
const
QTextCharFormat
&
kwFormat
=
m_formats
[
CppDoxygenTagFormat
];
while
(
!
it
->
isNull
())
{
if
(
it
->
unicode
()
==
QLatin1Char
(
'\\'
)
||
...
...
src/plugins/texteditor/texteditorconstants.h
View file @
8002b1a9
...
...
@@ -84,6 +84,9 @@ const char * const C_OPERATOR = "Operator";
const
char
*
const
C_PREPROCESSOR
=
"Preprocessor"
;
const
char
*
const
C_LABEL
=
"Label"
;
const
char
*
const
C_COMMENT
=
"Comment"
;
const
char
*
const
C_DOXYGEN_COMMENT
=
"Doxygen.Comment"
;
const
char
*
const
C_DOXYGEN_TAG
=
"Doxygen.Tag"
;
const
char
*
const
C_DISABLED_CODE
=
"DisabledCode"
;
const
char
*
const
C_ADDED_LINE
=
"AddedLine"
;
...
...
src/plugins/texteditor/texteditorsettings.cpp
View file @
8002b1a9
...
...
@@ -84,6 +84,8 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_PREPROCESSOR
),
tr
(
"Preprocessor"
),
Qt
::
darkBlue
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_LABEL
),
tr
(
"Label"
),
Qt
::
darkRed
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_COMMENT
),
tr
(
"Comment"
),
Qt
::
darkGreen
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_DOXYGEN_COMMENT
),
tr
(
"Doxygen Comment"
),
Qt
::
darkBlue
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_DOXYGEN_TAG
),
tr
(
"Doxygen Tag"
),
Qt
::
blue
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_DISABLED_CODE
),
tr
(
"Disabled Code"
),
Qt
::
gray
));
// Diff categories
...
...
Write
Preview
Supports
Markdown
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