📄 qstylesheetitem.3qt
字号:
.TH QStyleSheetItem 3qt "3 September 2000" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2000 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQStyleSheetItem \- Encapsulates a text format.SH SYNOPSIS.br.PP\fC#include <qstylesheet.h>\fR.PPInherits Qt..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQStyleSheetItem\fR ( QStyleSheet * " "parent" ", const QString & name ) ".br.ti -1c.BI "\fBQStyleSheetItem\fR ( const QStyleSheetItem & ) ".br.ti -1c.BI "\fB~QStyleSheetItem\fR () ".br.ti -1c.BI "QString \fBname\fR () const".br.ti -1c.BI "QStyleSheet* \fBstyleSheet\fR () ".br.ti -1c.BI "const QStyleSheet* \fBstyleSheet\fR () const".br.ti -1c.BI "enum \fBAdditionalStyleValues\fR { Undefined = - 1}".br.ti -1c.BI "enum \fBDisplayMode\fR { DisplayBlock, DisplayInline, DisplayListItem, DisplayNone }".br.ti -1c.BI "DisplayMode \fBdisplayMode\fR () const".br.ti -1c.BI "void \fBsetDisplayMode\fR ( DisplayMode m ) ".br.ti -1c.BI "int \fBalignment\fR () const".br.ti -1c.BI "void \fBsetAlignment\fR ( int f ) ".br.ti -1c.BI "int \fBfontWeight\fR () const".br.ti -1c.BI "void \fBsetFontWeight\fR ( int w ) ".br.ti -1c.BI "int \fBlogicalFontSize\fR () const".br.ti -1c.BI "void \fBsetLogicalFontSize\fR ( int s ) ".br.ti -1c.BI "int \fBlogicalFontSizeStep\fR () const".br.ti -1c.BI "void \fBsetLogicalFontSizeStep\fR ( int s ) ".br.ti -1c.BI "int \fBfontSize\fR () const".br.ti -1c.BI "void \fBsetFontSize\fR ( int s ) ".br.ti -1c.BI "QString \fBfontFamily\fR () const".br.ti -1c.BI "void \fBsetFontFamily\fR ( const QString & ) ".br.ti -1c.BI "int numberOfColumns () const \fI(obsolete)\fR".br.ti -1c.BI "void setNumberOfColumns ( int ncols ) \fI(obsolete)\fR".br.ti -1c.BI "QColor \fBcolor\fR () const".br.ti -1c.BI "void \fBsetColor\fR ( const QColor & ) ".br.ti -1c.BI "bool \fBfontItalic\fR () const".br.ti -1c.BI "void \fBsetFontItalic\fR ( bool ) ".br.ti -1c.BI "bool \fBdefinesFontItalic\fR () const".br.ti -1c.BI "bool \fBfontUnderline\fR () const".br.ti -1c.BI "void \fBsetFontUnderline\fR ( bool ) ".br.ti -1c.BI "bool \fBdefinesFontUnderline\fR () const".br.ti -1c.BI "bool \fBisAnchor\fR () const".br.ti -1c.BI "void \fBsetAnchor\fR ( bool anc ) ".br.ti -1c.BI "enum \fBWhiteSpaceMode\fR { WhiteSpaceNormal, WhiteSpacePre, WhiteSpaceNoWrap }".br.ti -1c.BI "WhiteSpaceMode \fBwhiteSpaceMode\fR () const".br.ti -1c.BI "void \fBsetWhiteSpaceMode\fR ( WhiteSpaceMode m ) ".br.ti -1c.BI "enum \fBMargin\fR { MarginLeft, MarginRight, MarginTop, MarginBottom, MarginAll, MarginVertical, MarginHorizontal }".br.ti -1c.BI "int \fBmargin\fR ( Margin m ) const".br.ti -1c.BI "void \fBsetMargin\fR ( Margin, int ) ".br.ti -1c.BI "enum \fBListStyle\fR { ListDisc, ListCircle, ListSquare, ListDecimal, ListLowerAlpha, ListUpperAlpha }".br.ti -1c.BI "ListStyle \fBlistStyle\fR () const".br.ti -1c.BI "void \fBsetListStyle\fR ( ListStyle ) ".br.ti -1c.BI "QString \fBcontexts\fR () const".br.ti -1c.BI "void \fBsetContexts\fR ( const QString & ) ".br.ti -1c.BI "bool \fBallowedInContext\fR ( const QStyleSheetItem * ) const".br.ti -1c.BI "bool \fBselfNesting\fR () const".br.ti -1c.BI "void \fBsetSelfNesting\fR ( bool ) ".br.in -1c.SH DESCRIPTIONThe QStyleSheetItem class encapsulates a text format..PPA style consists of a name and a set of font, color, and other display properties. When used in a style sheet, items define the name of a rich text tag, and the display property changes associated with it..SS "Member Type Documentation".SH "QStyleSheetItem::DisplayMode"This enum type defines the way adjacent elements are displayed. The possible values are: .TP\fCDisplayBlock\fR - elements are displayed as a rectangular block. (eg. <P> ... </P>).TP\fCDisplayInline\fR - elements are displayed in a horizontally flowing sequence. (eg. <EM> ... </EM>).TP\fCDisplayListItem\fR - elements are displayed in a vertically sequence. (eg. <EM> ... </EM>).TP\fCDisplayNone\fR - elements are not displayed at all..SH "QStyleSheetItem::ListStyle"This enum type defines how the items in a list are prefixed when displayed. The currently defined values are: .TP\fCListDisc\fR - a filled circle.TP\fCListCircle\fR - an unfilled circle.TP\fCListSquare\fR - a filled circle.TP\fCListDecimal\fR - an integer in base 10: \fI1, 2, 3,\fR ....TP\fCListLowerAlpha\fR - a lowercase letter: \fIa, b, c,\fR ....TP\fCListUpperAlpha\fR - an uppercase letter: \fIA, B, C,\fR ....SH "QStyleSheetItem::Margin".TP\fCMarginLeft\fR - left margin.TP\fCMarginRight\fR - right margin.TP\fCMarginTop\fR - top margin.TP\fCMarginBottom\fR - bottom margin.TP\fCMarginAll\fR - all margins (left, right, top and bottom ).TP\fCMarginVertical\fR - top and bottom margin.TP\fCMarginHorizontal\fR - left and right margin.SH "QStyleSheetItem::WhiteSpaceMode"This enum defines the ways in which QStyleSheet can treat white space. There are three values at present: .TP\fCWhiteSpaceNormal\fR - any sequence of white space is equivalent to a single space, and is a line-break position..TP\fCWhiteSpacePre\fR - white space must be output exactly as given in the input..TP\fCWhiteSpaceNoWrap\fR - multiple spaces are collapsed as with WhiteSpaceNormal, but no automatic line breaks occur. To break lines manually, use the \\c<br> tag..IP.SH MEMBER FUNCTION DOCUMENTATION.SH "QStyleSheetItem::QStyleSheetItem ( QStyleSheet * parent, const QString & name )"Constructs a new style named \fIname\fR for the stylesheet \fIparent.\fR.PPAll properties in QStyleSheetItem are initially in the "do not change" state, except display mode, which defaults to \fCDisplayInline.\fR.SH "QStyleSheetItem::QStyleSheetItem ( const QStyleSheetItem & other )"Copy constructor. Constructs a copy of \fIother\fR that is not bound to any stylesheet..SH "QStyleSheetItem::~QStyleSheetItem ()"Destructs the style. Note that QStyleSheetItem objects become owned by QStyleSheet when they are created..SH "int QStyleSheetItem::alignment () const"Returns the alignment of this style. Possible values are AlignLeft, AlignRight and AlignCenter..PPSee also setAlignment() and Qt::AlignmentFlags..SH "bool QStyleSheetItem::allowedInContext ( const QStyleSheetItem * s ) const"Returns whether this style can be nested into an element of style \fIs\fR ..PPSee also contxts() and setContexts()..SH "QColor QStyleSheetItem::color () const"Returns the text color of this style, or an invalid color if no color has been set yet..PPSee also setColor()..SH "QString QStyleSheetItem::contexts () const"Returns a space separated list of names of styles that may contain elements of this style. As default, contexs() returns an empty string, which indicates that this style can be nested everywhere..PPSee also setContexts()..SH "bool QStyleSheetItem::definesFontItalic () const"Returns whether the style defines a font shape. A style does not define any shape until setFontItalic() is called..PPSee also setFontItalic() and fontItalic()..SH "bool QStyleSheetItem::definesFontUnderline () const"Returns whether the style defines a setting for the underline property of the font. A style does not define this until setFontUnderline() is called..PPSee also setFontUnderline() and fontUnderline()..SH "QStyleSheetItem::DisplayMode QStyleSheetItem::displayMode() const"Returns the display mode of the style..PPSee also setDisplayMode()..SH "QString QStyleSheetItem::fontFamily () const"Returns the font family setting of the style. This is either a valid font family or QString::null if no family has been set..PPSee also setFontFamily(), QFont::family() and QFont::setFamily()..SH "bool QStyleSheetItem::fontItalic () const"Returns whether the styles sets an italic or upright font..PPSee also setFontItalic() and definesFontItalic()..SH "int QStyleSheetItem::fontSize () const"Returns the font size setting of the style. This is either a valid pointsize or QStyleSheetItem::Undefined..PPSee also setFontSize(), QFont::pointSize() and QFont::setPointSize()..SH "bool QStyleSheetItem::fontUnderline () const"Returns whether the styles sets an underlined font..PPSee also setFontUnderline() and definesFontUnderline()..SH "int QStyleSheetItem::fontWeight () const"Returns the font weight setting of the style. This is either a valid QFont::Weight or the value QStyleSheetItem::Undefined..PPSee also setFontWeight() and QFont..SH "bool QStyleSheetItem::isAnchor () const"Returns whether this style is an anchor..PPSee also setAnchor()..SH "QStyleSheetItem::ListStyle QStyleSheetItem::listStyle() const"Returns the list style of the style..PPSee also setListStyle()..SH "int QStyleSheetItem::logicalFontSize () const"Returns the logical font size setting of the style. This is either a valid size between 1 and 7 or QStyleSheetItem::Undefined..PPSee also setLogicalFontSize(), setLogicalFontSizeStep(), QFont::pointSize() and QFont::setPointSize()..SH "int QStyleSheetItem::logicalFontSizeStep () const"Returns the logical font size step of this style..PPThe default is 0. Tags like \fCbig\fR define \fC+1, small\fR defines \fC-1\fR.PPSee also setLogicalFontSizeStep()..SH "int QStyleSheetItem::margin ( Margin m ) const"Returns the width of margin \fIm\fR in pixel..PPThe margin determinator \fIm\fR can be \fCMarginLeft, MarginRight, MarginTop, MarginBottom, MarginAll, MarginVertical\fR or \fCMarginHorizontal.\fR.PPSee also setMargin()..SH "QString QStyleSheetItem::name () const"Returns the name of style..SH "int QStyleSheetItem::numberOfColumns () const"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPReturns the number of columns for this style..PPSee also setNumberOfColumns(), displayMode() and setDisplayMode()..SH "bool QStyleSheetItem::selfNesting () const"Returns whether this style has self nesting enabled..PPSee also setSelfNesting()..SH "void QStyleSheetItem::setAlignment ( int f )"Sets the alignment. This only makes sense for styles with display mode DisplayBlock. Possible values are AlignLeft, AlignRight and AlignCenter..PPSee also alignment(), displayMode() and Qt::AlignmentFlags..SH "void QStyleSheetItem::setAnchor ( bool anc )"Sets whether the style is an anchor (link). Elements in this style have connections to other documents or anchors..PPSee also isAnchor()..SH "void QStyleSheetItem::setColor ( const QColor & c )"Sets the text color of this style..PPSee also color()..SH "void QStyleSheetItem::setContexts ( const QString & c )"Sets a space separated list of names of styles that may contain elements of this style. If \fIc\fR is empty, the style can be nested everywhere..PPSee also contexts()..SH "void QStyleSheetItem::setDisplayMode ( DisplayMode m )"Sets the display mode of the style to \fIm.\fR.PPSee also displayMode()..SH "void QStyleSheetItem::setFontFamily ( const QString & fam )"Sets the font family setting of the style..PPSee also fontFamily(), QFont::family() and QFont::setFamily()..SH "void QStyleSheetItem::setFontItalic ( bool italic )"Sets italic or upright shape for the style..PPSee also fontItalic() and definesFontItalic()..SH "void QStyleSheetItem::setFontSize ( int s )"Sets the font size setting of the style, in point measures..PPSee also fontSize(), QFont::pointSize() and QFont::setPointSize()..SH "void QStyleSheetItem::setFontUnderline ( bool underline )"Sets underline for the style..PPSee also fontUnderline() and definesFontUnderline()..SH "void QStyleSheetItem::setFontWeight ( int w )"Sets the font weight setting of the style. Valid values are those defined by QFont::Weight..PPSee also QFont and fontWeight()..SH "void QStyleSheetItem::setListStyle ( ListStyle s )"Sets the list style of the style..PPThis is used by nested elements which have a display mode of DisplayListItem..PPSee also listStyle() and DisplayMode..SH "void QStyleSheetItem::setLogicalFontSize ( int s )"Sets the logical font size setting of the style tp \fIs.\fR Valid logical sizes are 1 to 7..PPSee also logicalFontSize(), QFont::pointSize() and QFont::setPointSize()..SH "void QStyleSheetItem::setLogicalFontSizeStep ( int s )"Sets the logical font size step of this style to \fIs.\fR.PPSee also logicalFontSizeStep()..SH "void QStyleSheetItem::setMargin ( Margin m, int v )"Sets the width of margin \fIm\fR to \fIv\fR pixels..PPThe margin determinator \fIm\fR can be \fCMarginLeft, MarginRight, MarginTop, MarginBottom, MarginAll, MarginVertical\fR or \fCMarginHorizontal.\fR The value \fIv\fR must be >= 0..PPSee also margin()..SH "void QStyleSheetItem::setNumberOfColumns ( int ncols )"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPSets the number of columns for this style. Elements in the style are divided into columns..PPThis only makes sense if the style uses a block display mode..PPSee also numberOfColumns()..SH "void QStyleSheetItem::setSelfNesting ( bool nesting )"Sets the self nesting property for this style to \fInesting.\fR.PPIn order to support "dirty" HTML, paragraphs <p> and list items <li> are not self nesting. This means that starting a new paragraph or list item automatically closes the previous one..PPSee also selfNesting()..SH "void QStyleSheetItem::setWhiteSpaceMode ( WhiteSpaceMode m )"Sets the white space mode to \fIm.\fR Possible values are.TP\fCWhiteSpaceNormal\fR - white spaces in the document only serve as separators. Multiple spaces or indentation therefore is ignored..TP\fCWhiteSpacePre\fR - white spaces are preserved. This is particularly useful to display programming code..TP\fCWhiteSpaceNoWrap\fR - multiple spaces are collapsed as with WhiteSpaceNormal, but no automatic line breaks occur. To break lines manually, use the \\c<br> tag..SH "QStyleSheet* QStyleSheetItem::styleSheet ()"Returns the stylesheet this item is in..SH "const QStyleSheet* QStyleSheetItem::styleSheet () const"Returns the stylesheet this item is in..SH "QStyleSheetItem::WhiteSpaceMode QStyleSheetItem::whiteSpaceMode() const"Returns the white space mode..PPSee also setWhiteSpaceMode()..SH "SEE ALSO".BR http://doc.trolltech.com/qstylesheetitem.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -