Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Qt3::QTextFormat Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-write/qrichtext_p.h>

Collaboration diagram for Qt3::QTextFormat:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Flags {
  NoFlags, Bold = 1, Italic = 2, Underline = 4,
  Family = 8, Size = 16, Color = 32, Misspelled = 64,
  VAlign = 128, StrikeOut = 256, Font = Bold | Italic | Underline | Family | Size | StrikeOut, Format = Font | Color | Misspelled | VAlign
}
enum  VerticalAlignment { AlignNormal, AlignSuperScript, AlignSubScript }

Public Member Functions

 QTextFormat ()
virtual ~QTextFormat ()
 QTextFormat (const QStyleSheetItem *s)
 QTextFormat (const QFont &f, const QColor &c, QTextFormatCollection *parent=0)
 QTextFormat (const QTextFormat &fm)
QTextFormat makeTextFormat (const QStyleSheetItem *style, const QMap< QString, QString > &attr, double scaleFontsFactor) const
QTextFormatoperator= (const QTextFormat &fm)
QColor color () const
QFont font () const
bool isMisspelled () const
VerticalAlignment vAlign () const
int minLeftBearing () const
int minRightBearing () const
int width (const QChar &c) const
int width (const QString &str, int pos) const
int height () const
int ascent () const
int descent () const
int leading () const
bool useLinkColor () const
void setBold (bool b)
void setItalic (bool b)
void setUnderline (bool b)
void setStrikeOut (bool b)
void setFamily (const QString &f)
void setPointSize (int s)
void setFont (const QFont &f)
void setColor (const QColor &c)
void setMisspelled (bool b)
void setVAlign (VerticalAlignment a)
bool operator== (const QTextFormat &f) const
QTextFormatCollectionparent () const
QString key () const
void addRef ()
void removeRef ()
QString makeFormatChangeTags (QTextFormat *defaultFormat, QTextFormat *f, const QString &oldAnchorHref, const QString &anchorHref) const
QString makeFormatEndTags (QTextFormat *defaultFormat, const QString &anchorHref) const
bool fontSizesInPixels ()

Static Public Member Functions

static QString getKey (const QFont &f, const QColor &c, bool misspelled, VerticalAlignment vAlign)
static void setPainter (QPainter *p)
static QPainter * painter ()

Protected Member Functions

virtual void generateKey ()

Private Member Functions

void update ()

Private Attributes

QFont fn
QColor col
QFontMetrics fm
uint missp: 1
uint linkColor: 1
uint usePixelSizes: 1
int leftBearing
int rightBearing
VerticalAlignment ha
uchar widths [256]
int hei
int asc
int dsc
QTextFormatCollectioncollection
int ref
QString k
int logicalFontSize
int stdSize

Static Private Attributes

static QPainter * pntr = 0

Friends

class QTextFormatCollection
class QTextDocument

Member Enumeration Documentation

enum Qt3::QTextFormat::Flags
 

Enumeration values:
NoFlags 
Bold 
Italic 
Underline 
Family 
Size 
Color 
Misspelled 
VAlign 
StrikeOut 
Font 
Format 

Definition at line 1404 of file qrichtext_p.h.

enum Qt3::QTextFormat::VerticalAlignment
 

Enumeration values:
AlignNormal 
AlignSuperScript 
AlignSubScript 

Definition at line 1419 of file qrichtext_p.h.


Constructor & Destructor Documentation

QTextFormat::QTextFormat  ) 
 

Definition at line 185 of file qrichtext_p.cpp.

References AlignNormal, collection, FALSE, ha, missp, qApp, ref, stdSize, TRUE, and usePixelSizes.

QTextFormat::~QTextFormat  )  [virtual]
 

Definition at line 181 of file qrichtext_p.cpp.

QTextFormat::QTextFormat const QStyleSheetItem s  ) 
 

Definition at line 201 of file qrichtext_p.cpp.

References addRef(), AlignNormal, asc, col, collection, Qt3::QStyleSheetItem::color(), dsc, FALSE, fm, fn, Qt3::QStyleSheetItem::fontFamily(), Qt3::QStyleSheetItem::fontItalic(), Qt3::QStyleSheetItem::fontSize(), Qt3::QStyleSheetItem::fontStrikeOut(), Qt3::QStyleSheetItem::fontUnderline(), Qt3::QStyleSheetItem::fontWeight(), generateKey(), ha, hei, leftBearing, missp, qApp, ref, rightBearing, stdSize, TRUE, usePixelSizes, and widths.

QTextFormat::QTextFormat const QFont &  f,
const QColor &  c,
QTextFormatCollection parent = 0
 

Definition at line 235 of file qrichtext_p.cpp.

References addRef(), AlignNormal, asc, collection, dsc, FALSE, fm, generateKey(), ha, hei, leftBearing, missp, ref, rightBearing, stdSize, TRUE, usePixelSizes, and widths.

QTextFormat::QTextFormat const QTextFormat fm  ) 
 

Definition at line 258 of file qrichtext_p.cpp.

References addRef(), asc, col, collection, dsc, fn, ha, hei, k, leftBearing, linkColor, logicalFontSize, missp, ref, rightBearing, stdSize, usePixelSizes, and widths.


Member Function Documentation

void Qt3::QTextFormat::addRef  )  [inline]
 

Definition at line 1783 of file qrichtext_p.h.

References QTextFormat::ref.

Referenced by Qt3::QTextFormatCollection::format(), operator=(), QTextFormat(), and Qt3::QTextEdit::setFormat().

int QTextFormat::ascent  )  const
 

Definition at line 355 of file qrichtext_p.cpp.

References asc, fn, and pntr.

QColor Qt3::QTextFormat::color  )  const [inline]
 

Definition at line 1753 of file qrichtext_p.h.

References QTextFormat::col.

Referenced by Qt3::QTextEdit::color(), Qt3::QTextParagraph::drawLabel(), Qt3::QTextParagraph::drawString(), Qt3::QTextEdit::handleMouseMove(), makeFormatChangeTags(), makeFormatEndTags(), Qt3::QTextEdit::setFormat(), and Qt3::QTextCursor::splitAndInsertEmptyParagraph().

int QTextFormat::descent  )  const
 

Definition at line 363 of file qrichtext_p.cpp.

References dsc, fn, and pntr.

QFont Qt3::QTextFormat::font  )  const [inline]
 

Definition at line 1758 of file qrichtext_p.h.

References QTextFormat::fn.

Referenced by Qt3::QTextEdit::bold(), Qt3::QTextParagraph::drawLabel(), Qt3::QTextParagraph::drawString(), Qt3::QTextEdit::family(), Qt3::QTextEdit::font(), Qt3::QTextEdit::handleMouseMove(), Qt3::QTextEdit::italic(), makeFormatChangeTags(), makeFormatEndTags(), Qt3::QTextEdit::pointSize(), Qt3::QTextEdit::setFormat(), Qt3::QTextParagraph::setFormat(), Qt3::QTextCursor::splitAndInsertEmptyParagraph(), and Qt3::QTextEdit::underline().

bool Qt3::QTextFormat::fontSizesInPixels  )  [inline]
 

Definition at line 1469 of file qrichtext_p.h.

Referenced by Qt3::QTextParagraph::drawString().

void QTextFormat::generateKey  )  [protected, virtual]
 

Definition at line 379 of file qrichtext_p.cpp.

References col, fn, getKey(), isMisspelled(), k, and vAlign().

Referenced by QTextFormat(), and update().

QString QTextFormat::getKey const QFont &  f,
const QColor &  c,
bool  misspelled,
VerticalAlignment  vAlign
[static]
 

Definition at line 384 of file qrichtext_p.cpp.

References k, and QString::number().

Referenced by generateKey().

int QTextFormat::height  )  const
 

Definition at line 347 of file qrichtext_p.cpp.

References fn, hei, and pntr.

bool Qt3::QTextFormat::isMisspelled  )  const [inline]
 

Definition at line 1763 of file qrichtext_p.h.

References QTextFormat::missp.

Referenced by Qt3::QTextParagraph::drawString(), generateKey(), Qt3::QTextEdit::handleMouseMove(), Qt3::QTextEdit::setFormat(), and Qt3::QTextCursor::splitAndInsertEmptyParagraph().

QString Qt3::QTextFormat::key  )  const [inline]
 

Definition at line 1799 of file qrichtext_p.h.

References QTextFormat::k.

Referenced by Qt3::QTextFormatCollection::format(), Qt3::QTextEdit::handleMouseMove(), Qt3::QTextFormatCollection::remove(), Qt3::QTextEdit::setFormat(), Qt3::QTextParagraph::setFormat(), and Qt3::QTextEdit::updateCurrentFormat().

int QTextFormat::leading  )  const
 

Definition at line 371 of file qrichtext_p.cpp.

References fm, fn, and pntr.

QString QTextFormat::makeFormatChangeTags QTextFormat defaultFormat,
QTextFormat f,
const QString oldAnchorHref,
const QString anchorHref
const
 

Definition at line 5868 of file qrichtext.cpp.

References AlignSubScript, AlignSuperScript, col, color(), fn, font(), QString::isEmpty(), makeFormatEndTags(), QString::number(), s, and vAlign().

QString QTextFormat::makeFormatEndTags QTextFormat defaultFormat,
const QString anchorHref
const
 

Definition at line 5910 of file qrichtext.cpp.

References color(), font(), QString::isEmpty(), and vAlign().

Referenced by makeFormatChangeTags().

QTextFormat QTextFormat::makeTextFormat const QStyleSheetItem style,
const QMap< QString, QString > &  attr,
double  scaleFontsFactor
const
 

Definition at line 5927 of file qrichtext.cpp.

References AlignNormal, AlignSubScript, AlignSuperScript, col, Qt3::QStyleSheetItem::color(), QString::contains(), QMap< Key, T >::contains(), Qt3::QStyleSheetItem::definesFontItalic(), Qt3::QStyleSheetItem::definesFontStrikeOut(), Qt3::QStyleSheetItem::definesFontUnderline(), Qt3::QTextDocument::endsWith(), FALSE, fn, Qt3::QStyleSheetItem::fontFamily(), Qt3::QStyleSheetItem::fontItalic(), Qt3::QStyleSheetItem::fontSize(), Qt3::QStyleSheetItem::fontStrikeOut(), Qt3::QStyleSheetItem::fontUnderline(), Qt3::QStyleSheetItem::fontWeight(), format(), Qt3::QStyleSheetItem::isAnchor(), QString::isEmpty(), QString::length(), linkColor, logicalFontSize, Qt3::QStyleSheetItem::logicalFontSize(), Qt3::QStyleSheetItem::logicalFontSizeStep(), QString::mid(), Qt3::QStyleSheetItem::name(), s, Qt3::QTextDocument::section(), setPointSize(), setVAlign(), QString::startsWith(), stdSize, QString::stripWhiteSpace(), Qt3::QStyleSheetItem::styleSheet(), QString::toInt(), TRUE, Qt3::QStyleSheetItem::Undefined, update(), usePixelSizes, Qt3::QStyleSheetItem::VAlignBaseline, Qt3::QStyleSheetItem::VAlignSub, Qt3::QStyleSheetItem::VAlignSuper, and Qt3::QStyleSheetItem::verticalAlignment().

Referenced by Qt3::QTextDocument::parseTable(), and Qt3::QTextDocument::setRichTextInternal().

int QTextFormat::minLeftBearing  )  const
 

Definition at line 331 of file qrichtext_p.cpp.

References fn, leftBearing, and pntr.

int QTextFormat::minRightBearing  )  const
 

Definition at line 339 of file qrichtext_p.cpp.

References fn, pntr, and rightBearing.

QTextFormat & QTextFormat::operator= const QTextFormat fm  ) 
 

Definition at line 281 of file qrichtext_p.cpp.

References addRef(), asc, col, collection, dsc, fm, fn, ha, hei, k, leftBearing, linkColor, logicalFontSize, missp, ref, rightBearing, stdSize, usePixelSizes, and widths.

bool Qt3::QTextFormat::operator== const QTextFormat f  )  const [inline]
 

Definition at line 1773 of file qrichtext_p.h.

References k, and QTextFormat::k.

QPainter * QTextFormat::painter  )  [static]
 

Definition at line 325 of file qrichtext_p.cpp.

References pntr.

Referenced by Qt3::QTextParagraph::bottomMargin(), Qt3::QTextParagraph::firstLineMargin(), Qt3::QTextTableCell::heightForWidth(), Qt3::QTextParagraph::leftMargin(), Qt3::QTextParagraph::lineSpacing(), Qt3::QTextParagraph::rightMargin(), Qt3::QTextTableCell::setGeometry(), and Qt3::QTextParagraph::topMargin().

QTextFormatCollection * Qt3::QTextFormat::parent  )  const [inline]
 

Definition at line 1778 of file qrichtext_p.h.

References QTextFormat::collection.

Referenced by Qt3::QTextFormatCollection::format().

void Qt3::QTextFormat::removeRef  )  [inline]
 

Definition at line 1788 of file qrichtext_p.h.

References QTextFormat::collection, Qt3::QTextFormatCollection::defFormat, QTextFormat::ref, and Qt3::QTextFormatCollection::remove().

Referenced by Qt3::QTextEdit::handleMouseMove(), Qt3::QTextEdit::setFormat(), Qt3::QTextCursor::splitAndInsertEmptyParagraph(), and Qt3::QTextFormatCommand::~QTextFormatCommand().

void QTextFormat::setBold bool  b  ) 
 

Definition at line 5787 of file qrichtext.cpp.

References fn, and update().

Referenced by Qt3::QTextEdit::setBold().

void QTextFormat::setColor const QColor &  c  ) 
 

Definition at line 5860 of file qrichtext.cpp.

References col, and update().

Referenced by Qt3::QTextEdit::setColor(), Qt3::QTextEdit::setEnabled(), Qt3::QTextEdit::setPalette(), and Qt3::QTextDocument::setRichTextInternal().

void QTextFormat::setFamily const QString f  ) 
 

Definition at line 5835 of file qrichtext.cpp.

References fn, and update().

Referenced by Qt3::QTextEdit::setFamily().

void QTextFormat::setFont const QFont &  f  ) 
 

Definition at line 5852 of file qrichtext.cpp.

References fn, QString::isEmpty(), k, and update().

Referenced by Qt3::QTextEdit::setFontInternal().

void QTextFormat::setItalic bool  b  ) 
 

Definition at line 5811 of file qrichtext.cpp.

References fn, and update().

Referenced by Qt3::QTextEdit::setItalic().

void QTextFormat::setMisspelled bool  b  ) 
 

Definition at line 5795 of file qrichtext.cpp.

References missp, and update().

void QTextFormat::setPainter QPainter *  p  )  [static]
 

Definition at line 320 of file qrichtext_p.cpp.

References pntr.

void QTextFormat::setPointSize int  s  ) 
 

Definition at line 5843 of file qrichtext.cpp.

References FALSE, fn, update(), and usePixelSizes.

Referenced by makeTextFormat(), and Qt3::QTextEdit::setPointSize().

void QTextFormat::setStrikeOut bool  b  ) 
 

Definition at line 5827 of file qrichtext.cpp.

References fn, and update().

void QTextFormat::setUnderline bool  b  ) 
 

Definition at line 5819 of file qrichtext.cpp.

References fn, and update().

Referenced by Qt3::QTextEdit::setUnderline().

void QTextFormat::setVAlign VerticalAlignment  a  ) 
 

Definition at line 5803 of file qrichtext.cpp.

References ha, and update().

Referenced by makeTextFormat(), and Qt3::QTextEdit::setVerticalAlignment().

void QTextFormat::update  )  [private]
 

Definition at line 305 of file qrichtext_p.cpp.

References asc, dsc, fm, fn, generateKey(), hei, leftBearing, rightBearing, and widths.

Referenced by Qt3::QTextFormatCollection::format(), makeTextFormat(), setBold(), setColor(), setFamily(), setFont(), setItalic(), setMisspelled(), setPointSize(), setStrikeOut(), setUnderline(), setVAlign(), and Qt3::QTextFormatCollection::updateDefaultFormat().

bool Qt3::QTextFormat::useLinkColor  )  const [inline]
 

Definition at line 1804 of file qrichtext_p.h.

References QTextFormat::linkColor.

Referenced by Qt3::QTextParagraph::drawString().

QTextFormat::VerticalAlignment Qt3::QTextFormat::vAlign  )  const [inline]
 

Definition at line 1768 of file qrichtext_p.h.

References QTextFormat::ha.

Referenced by Qt3::QTextParagraph::drawString(), generateKey(), Qt3::QTextEdit::handleMouseMove(), makeFormatChangeTags(), makeFormatEndTags(), Qt3::QTextEdit::setFormat(), and Qt3::QTextParagraph::setFormat().

int QTextFormat::width const QString str,
int  pos
const
 

Definition at line 3353 of file qrichtext.cpp.

References AlignNormal, f, fm, fn, ha, pntr, and usePixelSizes.

int QTextFormat::width const QChar c  )  const
 

Definition at line 3312 of file qrichtext.cpp.

References AlignNormal, f, fm, fn, ha, pntr, usePixelSizes, and widths.

Referenced by Qt3::QTextParagraph::QTextParagraph().


Friends And Related Function Documentation

friend class QTextDocument [friend]
 

Definition at line 1401 of file qrichtext_p.h.

friend class QTextFormatCollection [friend]
 

Definition at line 1400 of file qrichtext_p.h.


Member Data Documentation

int Qt3::QTextFormat::asc [private]
 

Definition at line 1487 of file qrichtext_p.h.

Referenced by ascent(), operator=(), QTextFormat(), and update().

QColor Qt3::QTextFormat::col [private]
 

Definition at line 1479 of file qrichtext_p.h.

Referenced by Qt3::QTextFormatCollection::format(), generateKey(), makeFormatChangeTags(), makeTextFormat(), operator=(), QTextFormat(), setColor(), and Qt3::QTextFormatCollection::updateDefaultFormat().

QTextFormatCollection* Qt3::QTextFormat::collection [private]
 

Definition at line 1488 of file qrichtext_p.h.

Referenced by Qt3::QTextFormatCollection::format(), operator=(), and QTextFormat().

int Qt3::QTextFormat::dsc [private]
 

Definition at line 1487 of file qrichtext_p.h.

Referenced by descent(), operator=(), QTextFormat(), and update().

QFontMetrics Qt3::QTextFormat::fm [private]
 

Definition at line 1480 of file qrichtext_p.h.

Referenced by leading(), operator=(), QTextFormat(), update(), and width().

QFont Qt3::QTextFormat::fn [private]
 

Definition at line 1478 of file qrichtext_p.h.

Referenced by ascent(), descent(), Qt3::QTextFormatCollection::format(), generateKey(), height(), leading(), makeFormatChangeTags(), makeTextFormat(), minLeftBearing(), minRightBearing(), operator=(), QTextFormat(), setBold(), setFamily(), setFont(), setItalic(), setPointSize(), setStrikeOut(), setUnderline(), update(), Qt3::QTextFormatCollection::updateDefaultFormat(), and width().

VerticalAlignment Qt3::QTextFormat::ha [private]
 

Definition at line 1485 of file qrichtext_p.h.

Referenced by Qt3::QTextFormatCollection::format(), operator=(), QTextFormat(), setVAlign(), and width().

int Qt3::QTextFormat::hei [private]
 

Definition at line 1487 of file qrichtext_p.h.

Referenced by height(), operator=(), QTextFormat(), and update().

QString Qt3::QTextFormat::k [private]
 

Definition at line 1490 of file qrichtext_p.h.

Referenced by generateKey(), getKey(), operator=(), operator==(), QTextFormat(), and setFont().

int Qt3::QTextFormat::leftBearing [private]
 

Definition at line 1484 of file qrichtext_p.h.

Referenced by minLeftBearing(), operator=(), QTextFormat(), and update().

uint Qt3::QTextFormat::linkColor [private]
 

Definition at line 1482 of file qrichtext_p.h.

Referenced by makeTextFormat(), operator=(), and QTextFormat().

int Qt3::QTextFormat::logicalFontSize [private]
 

Definition at line 1491 of file qrichtext_p.h.

Referenced by makeTextFormat(), operator=(), QTextFormat(), and Qt3::QTextFormatCollection::updateDefaultFormat().

uint Qt3::QTextFormat::missp [private]
 

Definition at line 1481 of file qrichtext_p.h.

Referenced by Qt3::QTextFormatCollection::format(), operator=(), QTextFormat(), and setMisspelled().

QPainter * QTextFormat::pntr = 0 [static, private]
 

Definition at line 318 of file qrichtext_p.cpp.

Referenced by ascent(), descent(), height(), leading(), minLeftBearing(), minRightBearing(), painter(), setPainter(), and width().

int Qt3::QTextFormat::ref [private]
 

Definition at line 1489 of file qrichtext_p.h.

Referenced by operator=(), QTextFormat(), and Qt3::QTextDocument::setRichTextInternal().

int Qt3::QTextFormat::rightBearing [private]
 

Definition at line 1484 of file qrichtext_p.h.

Referenced by minRightBearing(), operator=(), QTextFormat(), and update().

int Qt3::QTextFormat::stdSize [private]
 

Definition at line 1492 of file qrichtext_p.h.

Referenced by makeTextFormat(), operator=(), QTextFormat(), and Qt3::QTextFormatCollection::updateDefaultFormat().

uint Qt3::QTextFormat::usePixelSizes [private]
 

Definition at line 1483 of file qrichtext_p.h.

Referenced by Qt3::QTextFormatCollection::format(), makeTextFormat(), operator=(), QTextFormat(), setPointSize(), Qt3::QTextFormatCollection::updateDefaultFormat(), and width().

uchar Qt3::QTextFormat::widths[256] [private]
 

Definition at line 1486 of file qrichtext_p.h.

Referenced by operator=(), QTextFormat(), update(), and width().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:03:41 2005 for OPIE by  doxygen 1.4.2