Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QTextFormat class provides formatting information for a QTextDocument. More...
Public Member Functions | |
override bool | Equals (object o) |
override int | GetHashCode () |
QTextFormat () | |
| |
QTextFormat (QTextFormat rhs) | |
| |
QTextFormat (int type) | |
| |
virtual void | CreateProxy () |
new bool | BoolProperty (int propertyId) |
| |
new QBrush | BrushProperty (int propertyId) |
| |
new void | ClearBackground () |
| |
new void | ClearForeground () |
| |
new void | ClearProperty (int propertyId) |
| |
new QColor | ColorProperty (int propertyId) |
| |
new double | DoubleProperty (int propertyId) |
| |
new bool | HasProperty (int propertyId) |
| |
new int | IntProperty (int propertyId) |
| |
new bool | IsBlockFormat () |
| |
new bool | IsCharFormat () |
| |
new bool | IsFrameFormat () |
| |
new bool | IsImageFormat () |
| |
new bool | IsListFormat () |
| |
new bool | IsTableCellFormat () |
| |
new bool | IsTableFormat () |
| |
new bool | IsValid () |
| |
new QTextLength | LengthProperty (int propertyId) |
| |
new System.Collections.Generic.List < QTextLength > | LengthVectorProperty (int propertyId) |
| |
new void | Merge (QTextFormat other) |
| |
new QPen | PenProperty (int propertyId) |
| |
new System.Collections.Generic.Dictionary < System.Int32, System.Object > | Properties () |
| |
new object | property (int propertyId) |
| |
new int | PropertyCount () |
| |
new void | SetProperty (int propertyId, object value) |
| |
new void | SetProperty (int propertyId, System.Collections.Generic.List< QTextLength > lengths) |
| |
new string | StringProperty (int propertyId) |
| |
new QTextBlockFormat | ToBlockFormat () |
| |
new QTextCharFormat | ToCharFormat () |
| |
new QTextFrameFormat | ToFrameFormat () |
| |
new QTextImageFormat | ToImageFormat () |
| |
new QTextListFormat | ToListFormat () |
| |
new QTextTableCellFormat | ToTableCellFormat () |
| |
new QTextTableFormat | ToTableFormat () |
| |
new int | Type () |
| |
new void | Dispose () |
Static Public Member Functions | |
static bool | operator!= (QTextFormat arg1, QTextFormat arg2) |
| |
static bool | operator== (QTextFormat arg1, QTextFormat arg2) |
| |
Protected Member Functions | |
QTextFormat (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
new QBrush | Background [get, set] |
| |
new QBrush | Foreground [get, set] |
| |
new Qt.LayoutDirection | LayoutDirection [get, set] |
| |
new int | ObjectIndex [get, set] |
| |
new int | ObjectType [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
static new QMetaObject | StaticMetaObject [get] |
The QTextFormat class provides formatting information for a QTextDocument.
A QTextFormat is a generic class used for describing the format of parts of a QTextDocument. The derived classes QTextCharFormat, QTextBlockFormat, QTextListFormat, and QTextTableFormat are usually more useful, and describe the formatting that is applied to specific parts of the document.
A format has a FormatType which specifies the kinds of text item it can format; e.g. a block of text, a list, a table, etc. A format also has various properties (some specific to particular format types), as described by the Property enum. Every property has a corresponding Property.
The format type is given by type(), and the format can be tested with isCharFormat(), isBlockFormat(), isListFormat(), isTableFormat(), isFrameFormat(), and isImageFormat(). If the type is determined, it can be retrieved with toCharFormat(), toBlockFormat(), toListFormat(), toTableFormat(), toFrameFormat(), and toImageFormat().
A format's properties can be set with the setProperty() functions, and retrieved with boolProperty(), intProperty(), doubleProperty(), and stringProperty() as appropriate. All the property IDs used in the format can be retrieved with allPropertyIds(). One format can be merged into another using merge().
A format's object index can be set with setObjectIndex(), and retrieved with objectIndex(). These methods can be used to associate the format with a QTextObject. It is used to represent lists, frames, and tables inside the document.
See also Rich Text Processing.
This enum describes the text item a QTextFormat object is formatting.
See also QTextCharFormat, QTextBlockFormat, QTextListFormat, QTextTableFormat, and type().
This enum describes what kind of QTextObject this format is associated with.
See also QTextObject, QTextTable, and QTextObject::format().
This enum describes how page breaking is performed when printing. It maps to the corresponding css properties.
This enum was introduced or modified in Qt 4.2.
See also QTextBlockFormat::pageBreakPolicy(), QTextFrameFormat::pageBreakPolicy(), and PageBreakPolicy.
This enum describes the different properties a format can have.
Paragraph and character properties
Paragraph properties
Character properties
List properties
Table and frame properties
Table cell properties
Image properties
Selection properties
Page break properties
See also property() and setProperty().
AnchorHref | |
AnchorName | |
BackgroundBrush | |
BackgroundImageUrl | |
BlockAlignment | |
BlockBottomMargin | |
BlockIndent | |
BlockLeftMargin | |
BlockNonBreakableLines | |
BlockRightMargin | |
BlockTopMargin | |
BlockTrailingHorizontalRulerWidth |
The width of a horizontal ruler element. |
CssFloat |
How a frame is located relative to the surrounding text |
FirstFontProperty | |
FontCapitalization |
Specifies the capitalization type that is to be applied to the text. |
FontFamily | |
FontFixedPitch | |
FontHintingPreference |
Controls the use of hinting according to values of the QFont::HintingPreference enum. |
FontItalic | |
FontKerning |
Specifies whether the font has kerning turned on. |
FontLetterSpacing |
Changes the default spacing between individual letters in the font. The value is specified in percentage, with 100 as the default value. |
FontOverline | |
FontPixelSize | |
FontPointSize | |
FontSizeAdjustment |
Specifies the change in size given to the fontsize already set using FontPointSize or FontPixelSize. |
FontSizeIncrement | |
FontStrikeOut | |
FontStyleHint |
Corresponds to the QFont::StyleHint property |
FontStyleStrategy |
Corresponds to the QFont::StyleStrategy property |
FontUnderline |
This property has been deprecated. Use QTextFormat::TextUnderlineStyle instead. |
FontWeight | |
FontWordSpacing |
Changes the default spacing between individual words. A positive value increases the word spacing by the corresponding pixels; a negative value decreases the spacing. |
ForegroundBrush | |
FrameBorder | |
FrameBorderBrush | |
FrameBorderStyle |
See the BorderStyle enum. |
FrameBottomMargin | |
FrameHeight | |
FrameLeftMargin | |
FrameMargin | |
FramePadding | |
FrameRightMargin | |
FrameTopMargin | |
FrameWidth | |
FullWidthSelection |
When set on the characterFormat of a selection, the whole width of the text will be shown selected. |
ImageHeight | |
ImageName | |
ImageWidth | |
IsAnchor | |
LastFontProperty | |
LayoutDirection |
The layout direction of the text in the document (Qt::LayoutDirection). |
LineHeight | |
LineHeightType | |
ListIndent |
Specifies the amount of indentation used for a list. |
ListNumberPrefix |
Defines the text which is prepended to item numbers in numeric lists. |
ListNumberSuffix |
Defines the text which is appended to item numbers in numeric lists. |
ListStyle |
Specifies the style used for the items in a list, described by values of the QTextListFormat::Style enum. |
ObjectIndex |
The index of the formatted object. See objectIndex(). |
ObjectType | |
OutlinePen | |
PageBreakPolicy |
Specifies how pages are broken. See the PageBreakFlag enum. |
TabPositions |
Specifies the tab positions. The tab positions are structs of QTextOption::Tab which are stored in a QList (internally, in a QList<QVariant>). |
TableCellBottomPadding | |
TableCellColumnSpan | |
TableCellLeftPadding | |
TableCellPadding | |
TableCellRightPadding | |
TableCellRowSpan | |
TableCellSpacing | |
TableCellTopPadding | |
TableColumnWidthConstraints | |
TableColumns | |
TableHeaderRowCount | |
TextIndent | |
TextOutline | |
TextToolTip |
Specifies the (optional) tool tip to be displayed for a fragment of text. |
TextUnderlineColor | |
TextUnderlineStyle | |
TextVerticalAlignment | |
UserProperty |
|
protected |
QtGui.QTextFormat.QTextFormat | ( | ) |
Creates a new text format with an InvalidFormat.
See also FormatType.
QtGui.QTextFormat.QTextFormat | ( | QTextFormat | rhs | ) |
Creates a new text format with the same attributes as the other text format.
QtGui.QTextFormat.QTextFormat | ( | int | type | ) |
Creates a new text format of the given type.
See also FormatType.
new bool QtGui.QTextFormat.BoolProperty | ( | int | propertyId | ) |
Returns the value of the property specified by propertyId. If the property isn't of QTextFormat::Bool type, false is returned instead.
See also setProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
new QBrush QtGui.QTextFormat.BrushProperty | ( | int | propertyId | ) |
Returns the value of the property given by propertyId; if the property isn't of QVariant::Brush type, Qt::NoBrush is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
new void QtGui.QTextFormat.ClearBackground | ( | ) |
Clears the brush used to paint the document's background. The default brush will be used.
See also background(), setBackground(), and clearForeground().
new void QtGui.QTextFormat.ClearForeground | ( | ) |
Clears the brush used to paint the document's foreground. The default brush will be used.
See also foreground(), setForeground(), and clearBackground().
new void QtGui.QTextFormat.ClearProperty | ( | int | propertyId | ) |
Clears the value of the property given by propertyId
See also Property.
new QColor QtGui.QTextFormat.ColorProperty | ( | int | propertyId | ) |
Returns the value of the property given by propertyId; if the property isn't of QVariant::Color type, an invalid color is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
|
virtual |
new void QtGui.QTextFormat.Dispose | ( | ) |
new double QtGui.QTextFormat.DoubleProperty | ( | int | propertyId | ) |
Returns the value of the property specified by propertyId. If the property isn't of QVariant::Double or QMetaType::Float type, 0 is returned instead.
See also setProperty(), boolProperty(), intProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
override bool QtGui.QTextFormat.Equals | ( | object | o | ) |
override int QtGui.QTextFormat.GetHashCode | ( | ) |
new bool QtGui.QTextFormat.HasProperty | ( | int | propertyId | ) |
Returns true if the text format has a property with the given propertyId; otherwise returns false.
See also properties() and Property.
new int QtGui.QTextFormat.IntProperty | ( | int | propertyId | ) |
Returns the value of the property specified by propertyId. If the property is not of QTextFormat::Integer type, 0 is returned instead.
See also setProperty(), boolProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
new bool QtGui.QTextFormat.IsBlockFormat | ( | ) |
Returns true if this text format is a BlockFormat; otherwise returns false.
new bool QtGui.QTextFormat.IsCharFormat | ( | ) |
Returns true if this text format is a CharFormat; otherwise returns false.
new bool QtGui.QTextFormat.IsFrameFormat | ( | ) |
Returns true if this text format is a FrameFormat; otherwise returns false.
new bool QtGui.QTextFormat.IsImageFormat | ( | ) |
Returns true if this text format is an image format; otherwise returns false.
new bool QtGui.QTextFormat.IsListFormat | ( | ) |
Returns true if this text format is a ListFormat; otherwise returns false.
new bool QtGui.QTextFormat.IsTableCellFormat | ( | ) |
Returns true if this text format is a TableCellFormat; otherwise returns false.
This function was introduced in Qt 4.4.
new bool QtGui.QTextFormat.IsTableFormat | ( | ) |
Returns true if this text format is a TableFormat; otherwise returns false.
new bool QtGui.QTextFormat.IsValid | ( | ) |
Returns true if the format is valid (i.e. is not InvalidFormat); otherwise returns false.
new QTextLength QtGui.QTextFormat.LengthProperty | ( | int | propertyId | ) |
Returns the value of the property given by propertyId.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthVectorProperty(), and Property.
new System.Collections.Generic.List<QTextLength> QtGui.QTextFormat.LengthVectorProperty | ( | int | propertyId | ) |
Returns the value of the property given by propertyId. If the property isn't of QTextFormat::LengthVector type, an empty length vector is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), and Property.
new void QtGui.QTextFormat.Merge | ( | QTextFormat | other | ) |
Merges the other format with this format; where there are conflicts the other format takes precedence.
|
static |
Returns true if this text format is different from the other text format.
|
static |
Returns true if this text format is the same as the other text format.
new QPen QtGui.QTextFormat.PenProperty | ( | int | propertyId | ) |
Returns the value of the property given by propertyId; if the property isn't of QVariant::Pen type, Qt::NoPen is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
new System.Collections.Generic.Dictionary<System.Int32,System.Object> QtGui.QTextFormat.Properties | ( | ) |
Returns a map with all properties of this text format.
new object QtGui.QTextFormat.property | ( | int | propertyId | ) |
Returns the property specified by the given propertyId.
See also setProperty() and Property.
new int QtGui.QTextFormat.PropertyCount | ( | ) |
Returns the number of properties stored in the format.
This function was introduced in Qt 4.3.
new void QtGui.QTextFormat.SetProperty | ( | int | propertyId, |
object | value | ||
) |
Sets the property specified by the propertyId to the given value.
See also property() and Property.
new void QtGui.QTextFormat.SetProperty | ( | int | propertyId, |
System.Collections.Generic.List< QTextLength > | lengths | ||
) |
Sets the value of the property given by propertyId to value.
See also lengthVectorProperty() and Property.
new string QtGui.QTextFormat.StringProperty | ( | int | propertyId | ) |
Returns the value of the property given by propertyId; if the property isn't of QVariant::String type, an empty string is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
new QTextBlockFormat QtGui.QTextFormat.ToBlockFormat | ( | ) |
Returns this format as a block format.
new QTextCharFormat QtGui.QTextFormat.ToCharFormat | ( | ) |
Returns this format as a character format.
new QTextFrameFormat QtGui.QTextFormat.ToFrameFormat | ( | ) |
Returns this format as a frame format.
new QTextImageFormat QtGui.QTextFormat.ToImageFormat | ( | ) |
Returns this format as an image format.
new QTextListFormat QtGui.QTextFormat.ToListFormat | ( | ) |
Returns this format as a list format.
new QTextTableCellFormat QtGui.QTextFormat.ToTableCellFormat | ( | ) |
Returns this format as a table cell format.
This function was introduced in Qt 4.4.
new QTextTableFormat QtGui.QTextFormat.ToTableFormat | ( | ) |
Returns this format as a table format.
new int QtGui.QTextFormat.Type | ( | ) |
Returns the type of this format.
See also FormatType.
|
protected |
|
getset |
Returns the brush used to paint the document's background.
Sets the brush use to paint the document's background to the brush specified.
|
getset |
Returns the brush used to render foreground details, such as text, frame outlines, and table borders.
Sets the foreground brush to the specified brush. The foreground brush is mostly used to render text.
|
getset |
Returns the document's layout direction.
Sets the document's layout direction to the specified direction.
|
getset |
Returns the index of the format object, or -1 if the format object is invalid.
Sets the format object's object index.
|
getset |
Returns the text format's object type.
Sets the text format's object type to type.
|
getset |
|
staticget |