#include </home/clem/local/src/opie/noncore/apps/opie-write/qstylesheet.h>
Collaboration diagram for Qt3::QStyleSheet:

Public Member Functions | |
| QStyleSheet (QObject *parent=0, const char *name=0) | |
| virtual | ~QStyleSheet () |
| QStyleSheetItem * | item (const QString &name) |
| const QStyleSheetItem * | item (const QString &name) const |
| void | insert (QStyleSheetItem *item) |
| virtual QTextCustomItem * | tag (const QString &name, const QMap< QString, QString > &attr, const QString &context, const QMimeSourceFactory &factory, bool emptyTag, QTextDocument *doc) const |
| virtual void | scaleFont (QFont &font, int logicalSize) const |
| virtual void | error (const QString &) const |
Static Public Member Functions | |
| static QStyleSheet * | defaultSheet () |
| static void | setDefaultSheet (QStyleSheet *) |
| static QString | escape (const QString &) |
| static QString | convertFromPlainText (const QString &, QStyleSheetItem::WhiteSpaceMode mode=QStyleSheetItem::WhiteSpacePre) |
| static bool | mightBeRichText (const QString &) |
Private Member Functions | |
| void | init () |
Private Attributes | |
| QDict< QStyleSheetItem > | styles |
| QStyleSheetItem * | nullstyle |
|
||||||||||||
|
Creates a style sheet called name, with parent parent. Like any QObject it will be deleted when its parent is destroyed (if the child still exists). By default the style sheet has the tag definitions defined above. Definition at line 1054 of file qstylesheet.cpp. References init(). Referenced by defaultSheet(). |
|
|
Destroys the style sheet. All styles inserted into the style sheet will be deleted. Definition at line 1064 of file qstylesheet.cpp. |
|
||||||||||||
|
Auxiliary function. Converts the plain text string plain to a rich text formatted paragraph while preserving most of its look.
mode defines the whitespace mode. Possible values are
Definition at line 1369 of file qstylesheet.cpp. References col, i, isSpace(), QString::length(), and Qt3::QStyleSheetItem::WhiteSpacePre. |
|
|
Returns the application-wide default style sheet. This style sheet is used by rich text rendering classes such as QSimpleRichText, QWhatsThis and QMessageBox to define the rendering style and available tags within rich text documents. It also serves as the initial style sheet for the more complex render widgets, QTextEdit and QTextBrowser.
Definition at line 1259 of file qstylesheet.cpp. References QStyleSheet(), and QSingleCleanupHandler< Type >::set(). Referenced by Qt3::QTextDocument::init(), and mightBeRichText(). |
|
|
This virtual function is called when an error occurs when processing rich text. Reimplement it if you need to catch error messages. Errors might occur if some rich text strings contain tags that are not understood by the stylesheet, if some tags are nested incorrectly, or if tags are not closed properly. msg is the error message. Definition at line 1515 of file qstylesheet.cpp. Referenced by Qt3::QTextDocument::setRichTextInternal(). |
|
|
Auxiliary function. Converts the plain text string plain to a rich text formatted string with any HTML meta-characters escaped.
Definition at line 1423 of file qstylesheet.cpp. References i, and QString::length(). |
|
|
|
For internal use only. Inserts style. Any tags generated after this time will be bound to this style. Note that style becomes owned by the style sheet and will be deleted when the style sheet is destroyed. Definition at line 1292 of file qstylesheet.cpp. References QDict< type >::insert(), and styles. Referenced by Qt3::QStyleSheetItem::QStyleSheetItem(). |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the style called name or 0 if there is no such style (const version) Definition at line 1314 of file qstylesheet.cpp. References QString::isNull(), and styles. |
|
|
Returns the style called name or 0 if there is no such style. Definition at line 1301 of file qstylesheet.cpp. References QString::isNull(), and styles. Referenced by Qt3::QTextDocument::parseTable(), Qt3::QTextDocument::setRichTextInternal(), and tag(). |
|
|
Returns TRUE if the string text is likely to be rich text; otherwise returns FALSE. This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee. Definition at line 1470 of file qstylesheet.cpp. References defaultSheet(), FALSE, QString::find(), i, QString::isEmpty(), isSpace(), QString::left(), QString::length(), QString::lower(), QString::mid(), tag(), and TRUE. Referenced by Qt3::QTextEdit::append(), and Qt3::QTextDocument::setText(). |
|
||||||||||||
|
Scales the font font to the appropriate physical point size corresponding to the logical font size logicalSize. When calling this function, font has a point size corresponding to the logical font size 3. Logical font sizes range from 1 to 7, with 1 being the smallest.
Definition at line 1531 of file qstylesheet.cpp. References FALSE, s, and TRUE. Referenced by Qt3::QTextFormatCollection::updateDefaultFormat(). |
|
|
Sets the application-wide default style sheet to sheet, deleting any style sheet previously set. The ownership is transferred to QStyleSheet.
Definition at line 1275 of file qstylesheet.cpp. References QSingleCleanupHandler< Type >::reset(), and QSingleCleanupHandler< Type >::set(). |
|
||||||||||||||||||||||||||||
|
Generates an internal object for the tag called name, given the attributes attr, and using additional information provided by the mime source factory factory. context is the optional context of the document, i.e. the path to look for relative links. This becomes important if the text contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see {QMimeSourceFactory::defaultFactory()}) to resolve these references. The context will then be used to calculate the absolute path. See QMimeSourceFactory::makeAbsolute() for details. emptyTag and doc are for internal use only. This function should not be used in application code. Definition at line 1341 of file qstylesheet.cpp. References item(), and Qt3::QStyleSheetItem::name(). Referenced by mightBeRichText(), and Qt3::QTextDocument::setRichTextInternal(). |
|
|
Definition at line 220 of file qstylesheet.h. Referenced by init(). |
|
|
Definition at line 219 of file qstylesheet.h. |
1.4.2