Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
csshighlighter_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
// Qt-Security score:significant reason:default
4
5
//
6
// W A R N I N G
7
// -------------
8
//
9
// This file is not part of the Qt API. It exists for the convenience
10
// of Qt Designer. This header
11
// file may change from version to version without notice, or even be removed.
12
//
13
// We mean it.
14
//
15
16
#
ifndef
CSSHIGHLIGHTER_H
17
#
define
CSSHIGHLIGHTER_H
18
19
#
include
<
QtGui
/
qsyntaxhighlighter
.
h
>
20
#
include
<
QtGui
/
qcolor
.
h
>
21
#
include
"shared_global_p.h"
22
23
QT_BEGIN_NAMESPACE
24
25
namespace
qdesigner_internal
{
26
27
struct
CssHighlightColors
28
{
29
QColor
selector
;
30
QColor
property
;
31
QColor
value
;
32
QColor
pseudo1
;
33
QColor
pseudo2
;
34
QColor
quote
;
35
QColor
comment
;
36
};
37
38
class
QDESIGNER_SHARED_EXPORT
CssHighlighter
:
public
QSyntaxHighlighter
39
{
40
Q_OBJECT
41
public
:
42
explicit
CssHighlighter
(
const
CssHighlightColors
&
colors
,
43
QTextDocument
*
document
);
44
45
protected
:
46
void
highlightBlock
(
const
QString
&)
override
;
47
void
highlight
(
const
QString
&,
int
,
int
,
int
/*State*/
);
48
49
private
:
50
enum
State
{
Selector
,
Property
,
Value
,
Pseudo
,
Pseudo1
,
Pseudo2
,
Quote
,
51
MaybeComment
,
Comment
,
MaybeCommentEnd
};
52
53
const
CssHighlightColors
m_colors
;
54
};
55
56
}
// namespace qdesigner_internal
57
58
QT_END_NAMESPACE
59
60
#
endif
// CSSHIGHLIGHTER_H
qdesigner_internal::CssHighlighter
Definition
csshighlighter_p.h:39
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:67
QDESIGNER_SHARED_EXPORT
#define QDESIGNER_SHARED_EXPORT
Definition
shared_global_p.h:33
qdesigner_internal::CssHighlightColors
Definition
csshighlighter_p.h:28
qdesigner_internal::CssHighlightColors::pseudo1
QColor pseudo1
Definition
csshighlighter_p.h:32
qdesigner_internal::CssHighlightColors::selector
QColor selector
Definition
csshighlighter_p.h:29
qdesigner_internal::CssHighlightColors::pseudo2
QColor pseudo2
Definition
csshighlighter_p.h:33
qdesigner_internal::CssHighlightColors::comment
QColor comment
Definition
csshighlighter_p.h:35
qdesigner_internal::CssHighlightColors::quote
QColor quote
Definition
csshighlighter_p.h:34
qdesigner_internal::CssHighlightColors::property
QColor property
Definition
csshighlighter_p.h:30
qdesigner_internal::CssHighlightColors::value
QColor value
Definition
csshighlighter_p.h:31
qttools
src
designer
src
lib
shared
csshighlighter_p.h
Generated on
for Qt by
1.16.1