/usr/include/qt4/Qsci/qscistyle.h is in libqscintilla2-qt4-dev 2.10.2+dfsg-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | // This module defines interface to the QsciStyle class.
//
// Copyright (c) 2017 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of QScintilla.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#ifndef QSCISTYLE_H
#define QSCISTYLE_H
#include <qcolor.h>
#include <qfont.h>
#include <qstring.h>
#include <Qsci/qsciglobal.h>
class QsciScintillaBase;
//! \brief The QsciStyle class encapsulates all the attributes of a style.
//!
//! Each character of a document has an associated style which determines how
//! the character is displayed, e.g. its font and color. A style is identified
//! by a number. Lexers define styles for each of the language's features so
//! that they are displayed differently. Some style numbers have hard-coded
//! meanings, e.g. the style used for call tips.
class QSCINTILLA_EXPORT QsciStyle
{
public:
//! This enum defines the different ways the displayed case of the text can
//! be changed.
enum TextCase {
//! The text is displayed as its original case.
OriginalCase = 0,
//! The text is displayed as upper case.
UpperCase = 1,
//! The text is displayed as lower case.
LowerCase = 2
};
//! Constructs a QsciStyle instance for style number \a style. If \a style
//! is negative then a new style number is automatically allocated.
QsciStyle(int style = -1);
//! Constructs a QsciStyle instance for style number \a style. If \a style
//! is negative then a new style number is automatically allocated. The
//! styles description, color, paper color, font and end-of-line fill are
//! set to \a description, \a color, \a paper, \a font and \a eolFill
//! respectively.
QsciStyle(int style, const QString &description, const QColor &color,
const QColor &paper, const QFont &font, bool eolFill = false);
//! \internal Apply the style to a particular editor.
void apply(QsciScintillaBase *sci) const;
//! Returns the number of the style.
int style() const {return style_nr;}
//! The style's description is set to \a description.
//!
//! \sa description()
void setDescription(const QString &description) {style_description = description;}
//! Returns the style's description.
//!
//! \sa setDescription()
QString description() const {return style_description;}
//! The style's foreground color is set to \a color. The default is taken
//! from the application's default palette.
//!
//! \sa color()
void setColor(const QColor &color);
//! Returns the style's foreground color.
//!
//! \sa setColor()
QColor color() const {return style_color;}
//! The style's background color is set to \a paper. The default is taken
//! from the application's default palette.
//!
//! \sa paper()
void setPaper(const QColor &paper);
//! Returns the style's background color.
//!
//! \sa setPaper()
QColor paper() const {return style_paper;}
//! The style's font is set to \a font. The default is the application's
//! default font.
//!
//! \sa font()
void setFont(const QFont &font);
//! Returns the style's font.
//!
//! \sa setFont()
QFont font() const {return style_font;}
//! The style's end-of-line fill is set to \a fill. The default is false.
//!
//! \sa eolFill()
void setEolFill(bool fill);
//! Returns the style's end-of-line fill.
//!
//! \sa setEolFill()
bool eolFill() const {return style_eol_fill;}
//! The style's text case is set to \a text_case. The default is
//! OriginalCase.
//!
//! \sa textCase()
void setTextCase(TextCase text_case);
//! Returns the style's text case.
//!
//! \sa setTextCase()
TextCase textCase() const {return style_case;}
//! The style's visibility is set to \a visible. The default is true.
//!
//! \sa visible()
void setVisible(bool visible);
//! Returns the style's visibility.
//!
//! \sa setVisible()
bool visible() const {return style_visible;}
//! The style's changeability is set to \a changeable. The default is
//! true.
//!
//! \sa changeable()
void setChangeable(bool changeable);
//! Returns the style's changeability.
//!
//! \sa setChangeable()
bool changeable() const {return style_changeable;}
//! The style's sensitivity to mouse clicks is set to \a hotspot. The
//! default is false.
//!
//! \sa hotspot()
void setHotspot(bool hotspot);
//! Returns the style's sensitivity to mouse clicks.
//!
//! \sa setHotspot()
bool hotspot() const {return style_hotspot;}
//! Refresh the style settings.
void refresh();
private:
int style_nr;
QString style_description;
QColor style_color;
QColor style_paper;
QFont style_font;
bool style_eol_fill;
TextCase style_case;
bool style_visible;
bool style_changeable;
bool style_hotspot;
void init(int style);
};
#endif
|