Kate
KateAttribute Class Reference
The Attribute class incorporates all text decorations supported by Kate. More...
#include <kateattribute.h>
Public Types | |
enum | items { Weight = 0x1, Bold = 0x2, Italic = 0x4, Underline = 0x8, StrikeOut = 0x10, Outline = 0x20, TextColor = 0x40, SelectedTextColor = 0x80, BGColor = 0x100, SelectedBGColor = 0x200, Overline = 0x400 } |
Public Member Functions | |
const QColor & | bgColor () const |
bool | bold () const |
virtual void | changed () |
void | clear () |
void | clearAttribute (int item) |
QFont | font (const QFont &ref) |
bool | isChanged () |
bool | isSomethingSet () const |
bool | italic () const |
bool | itemSet (int item) const |
int | itemsSet () const |
KateAttribute () | |
KateAttribute & | operator+= (const KateAttribute &a) |
const QColor & | outline () const |
bool | overline () const |
const QColor & | selectedBGColor () const |
const QColor & | selectedTextColor () const |
void | setBGColor (const QColor &color) |
void | setBold (bool enable=true) |
void | setItalic (bool enable=true) |
void | setOutline (const QColor &color) |
void | setOverline (bool enable=true) |
void | setSelectedBGColor (const QColor &color) |
void | setSelectedTextColor (const QColor &color) |
void | setStrikeOut (bool enable=true) |
void | setTextColor (const QColor &color) |
void | setUnderline (bool enable=true) |
void | setWeight (int weight) |
bool | strikeOut () const |
const QColor & | textColor () const |
bool | underline () const |
int | weight () const |
int | width (KateFontStruct &fs, const QChar &c, int tabWidth) const |
int | width (KateFontStruct &fs, const QString &text, int col, int tabWidth) const |
virtual | ~KateAttribute () |
Friends | |
bool | operator!= (const KateAttribute &h1, const KateAttribute &h2) |
bool | operator== (const KateAttribute &h1, const KateAttribute &h2) |
Detailed Description
The Attribute class incorporates all text decorations supported by Kate.TODO: store the actual font as well. TODO: update changed mechanism - use separate bitfield
Definition at line 32 of file kateattribute.h.
Member Enumeration Documentation
enum KateAttribute::items |
- Enumerator:
-
Weight Bold Italic Underline StrikeOut Outline TextColor SelectedTextColor BGColor SelectedBGColor Overline
Definition at line 35 of file kateattribute.h.
Constructor & Destructor Documentation
KateAttribute::KateAttribute | ( | ) |
Definition at line 21 of file kateattribute.cpp.
KateAttribute::~KateAttribute | ( | ) | [virtual] |
Definition at line 32 of file kateattribute.cpp.
Member Function Documentation
const QColor& KateAttribute::bgColor | ( | ) | const [inline] |
Definition at line 118 of file kateattribute.h.
bool KateAttribute::bold | ( | ) | const [inline] |
Definition at line 78 of file kateattribute.h.
virtual void KateAttribute::changed | ( | ) | [inline, virtual] |
void KateAttribute::clear | ( | ) |
Definition at line 36 of file kateattribute.cpp.
void KateAttribute::clearAttribute | ( | int | item | ) | [inline] |
Definition at line 70 of file kateattribute.h.
Definition at line 76 of file kateattribute.cpp.
bool KateAttribute::isChanged | ( | ) | [inline] |
Definition at line 134 of file kateattribute.h.
bool KateAttribute::isSomethingSet | ( | ) | const [inline] |
Definition at line 64 of file kateattribute.h.
bool KateAttribute::italic | ( | ) | const [inline] |
Definition at line 83 of file kateattribute.h.
Definition at line 61 of file kateattribute.h.
int KateAttribute::itemsSet | ( | ) | const [inline] |
Definition at line 67 of file kateattribute.h.
KateAttribute & KateAttribute::operator+= | ( | const KateAttribute & | a | ) |
Definition at line 41 of file kateattribute.cpp.
const QColor& KateAttribute::outline | ( | ) | const [inline] |
Definition at line 103 of file kateattribute.h.
bool KateAttribute::overline | ( | ) | const [inline] |
Definition at line 88 of file kateattribute.h.
const QColor& KateAttribute::selectedBGColor | ( | ) | const [inline] |
Definition at line 123 of file kateattribute.h.
const QColor& KateAttribute::selectedTextColor | ( | ) | const [inline] |
Definition at line 113 of file kateattribute.h.
void KateAttribute::setBGColor | ( | const QColor & | color | ) |
Definition at line 195 of file kateattribute.cpp.
void KateAttribute::setBold | ( | bool | enable = true |
) |
Definition at line 106 of file kateattribute.cpp.
void KateAttribute::setItalic | ( | bool | enable = true |
) |
Definition at line 111 of file kateattribute.cpp.
void KateAttribute::setOutline | ( | const QColor & | color | ) |
Definition at line 159 of file kateattribute.cpp.
void KateAttribute::setOverline | ( | bool | enable = true |
) |
Definition at line 135 of file kateattribute.cpp.
void KateAttribute::setSelectedBGColor | ( | const QColor & | color | ) |
Definition at line 207 of file kateattribute.cpp.
void KateAttribute::setSelectedTextColor | ( | const QColor & | color | ) |
Definition at line 183 of file kateattribute.cpp.
void KateAttribute::setStrikeOut | ( | bool | enable = true |
) |
Definition at line 147 of file kateattribute.cpp.
void KateAttribute::setTextColor | ( | const QColor & | color | ) |
Definition at line 171 of file kateattribute.cpp.
void KateAttribute::setUnderline | ( | bool | enable = true |
) |
Definition at line 123 of file kateattribute.cpp.
void KateAttribute::setWeight | ( | int | weight | ) |
Definition at line 94 of file kateattribute.cpp.
bool KateAttribute::strikeOut | ( | ) | const [inline] |
Definition at line 98 of file kateattribute.h.
const QColor& KateAttribute::textColor | ( | ) | const [inline] |
Definition at line 108 of file kateattribute.h.
bool KateAttribute::underline | ( | ) | const [inline] |
Definition at line 93 of file kateattribute.h.
int KateAttribute::weight | ( | ) | const [inline] |
Definition at line 73 of file kateattribute.h.
int KateAttribute::width | ( | KateFontStruct & | fs, | |
const QChar & | c, | |||
int | tabWidth | |||
) | const [inline] |
Definition at line 58 of file kateattribute.h.
int KateAttribute::width | ( | KateFontStruct & | fs, | |
const QString & | text, | |||
int | col, | |||
int | tabWidth | |||
) | const [inline] |
Definition at line 54 of file kateattribute.h.
Friends And Related Function Documentation
bool operator!= | ( | const KateAttribute & | h1, | |
const KateAttribute & | h2 | |||
) | [friend] |
Definition at line 263 of file kateattribute.cpp.
bool operator== | ( | const KateAttribute & | h1, | |
const KateAttribute & | h2 | |||
) | [friend] |
Definition at line 219 of file kateattribute.cpp.
The documentation for this class was generated from the following files: