Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument. More...
Public Member Functions | |
QTextBlockFormat () | |
| |
QTextBlockFormat (QTextBlockFormat copy) | |
| |
override void | CreateProxy () |
new bool | IsValid () |
| |
new double | LineHeight () |
| |
new double | LineHeight (double scriptLineHeight, double scaling) |
| |
new int | LineHeightType () |
| |
new void | SetLineHeight (double height, int heightType) |
| |
new void | Dispose () |
Public Member Functions inherited from QtGui.QTextFormat | |
override bool | Equals (object o) |
override int | GetHashCode () |
QTextFormat () | |
| |
QTextFormat (QTextFormat rhs) | |
| |
QTextFormat (int type) | |
| |
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 () |
Protected Member Functions | |
QTextBlockFormat (System.Type dummy) | |
QTextBlockFormat (QTextFormat fmt) | |
| |
Protected Member Functions inherited from QtGui.QTextFormat | |
QTextFormat (System.Type dummy) | |
Properties | |
new Qt.AlignmentFlag | Alignment [get, set] |
| |
new double | BottomMargin [get, set] |
| |
new int | Indent [get, set] |
| |
new double | LeftMargin [get, set] |
| |
new bool | NonBreakableLines [get, set] |
| |
new QTextFormat.PageBreakFlag | PageBreakPolicy [get, set] |
| |
new double | RightMargin [get, set] |
| |
new System.Collections.Generic.List < QTextOption.Tab > | TabPositions [get, set] |
| |
new double | TextIndent [get, set] |
| |
new double | TopMargin [get, set] |
| |
Properties inherited from QtGui.QTextFormat | |
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] |
Additional Inherited Members | |
Static Public Member Functions inherited from QtGui.QTextFormat | |
static bool | operator!= (QTextFormat arg1, QTextFormat arg2) |
| |
static bool | operator== (QTextFormat arg1, QTextFormat arg2) |
| |
Protected Attributes inherited from QtGui.QTextFormat | |
SmokeInvocation | interceptor |
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument.
A document is composed of a list of blocks, represented by QTextBlock objects. Each block can contain an item of some kind, such as a paragraph of text, a table, a list, or an image. Every block has an associated QTextBlockFormat that specifies its characteristics.
To cater for left-to-right and right-to-left languages you can set a block's direction with setDirection(). Paragraph alignment is set with setAlignment(). Margins are controlled by setTopMargin(), setBottomMargin(), setLeftMargin(), setRightMargin(). Overall indentation is set with setIndent(), the indentation of the first line with setTextIndent().
Line spacing is set with setLineHeight() and retrieved via lineHeight() and lineHeightType(). The types of line spacing available are in the LineHeightTypes enum.
Line breaking can be enabled and disabled with setNonBreakableLines().
The brush used to paint the paragraph's background is set with setBackground(), and other aspects of the text's appearance can be customized by using the setProperty() function with the OutlinePen, ForegroundBrush, and BackgroundBrush QTextFormat::Property values.
If a text block is part of a list, it can also have a list format that is accessible with the listFormat() function.
See also QTextBlock and QTextCharFormat.
This enum describes the various types of line spacing support paragraphs can have.
This enum was introduced or modified in Qt 4.8.
See also lineHeight(), lineHeightType(), and setLineHeight().
|
protected |
QtGui.QTextBlockFormat.QTextBlockFormat | ( | ) |
Constructs a new QTextBlockFormat.
|
protected |
Constructs a new QTextBlockFormat.
QtGui.QTextBlockFormat.QTextBlockFormat | ( | QTextBlockFormat | copy | ) |
Constructs a new QTextBlockFormat.
|
virtual |
Reimplemented from QtGui.QTextFormat.
new void QtGui.QTextBlockFormat.Dispose | ( | ) |
new bool QtGui.QTextBlockFormat.IsValid | ( | ) |
Returns true if this block format is valid; otherwise returns false.
new double QtGui.QTextBlockFormat.LineHeight | ( | ) |
This returns the LineHeight property for the paragraph.
This function was introduced in Qt 4.8.
See also LineHeightTypes, setLineHeight(), and lineHeightType().
new double QtGui.QTextBlockFormat.LineHeight | ( | double | scriptLineHeight, |
double | scaling | ||
) |
Returns the height of the lines in the paragraph based on the height of the script line given by scriptLineHeight and the specified scaling factor.
The value that is returned is also dependent on the given LineHeightType of the paragraph as well as the LineHeight setting that has been set for the paragraph.
The scaling is needed for heights that include a fixed number of pixels, to scale them appropriately for printing.
This function was introduced in Qt 4.8.
See also LineHeightTypes, setLineHeight(), and lineHeightType().
new int QtGui.QTextBlockFormat.LineHeightType | ( | ) |
This returns the LineHeightType property of the paragraph.
This function was introduced in Qt 4.8.
See also LineHeightTypes, setLineHeight(), and lineHeight().
new void QtGui.QTextBlockFormat.SetLineHeight | ( | double | height, |
int | heightType | ||
) |
Sets the line height for the paragraph to the value given by height which is dependent on heightType in the way described by the LineHeightTypes enum.
This function was introduced in Qt 4.8.
See also LineHeightTypes, lineHeight(), and lineHeightType().
|
getset |
Returns the paragraph's alignment.
Sets the paragraph's alignment.
|
getset |
Returns the paragraph's bottom margin.
Sets the paragraph's bottom margin.
|
getset |
Returns the paragraph's indent.
Sets the paragraph's indentation. Margins are set independently of indentation with setLeftMargin() and setTextIndent(). The indentation is an integer that is multiplied with the document-wide standard indent, resulting in the actual indent of the paragraph.
|
getset |
Returns the paragraph's left margin.
Sets the paragraph's left margin. Indentation can be applied separately with setIndent().
|
getset |
Returns true if the lines in the paragraph are non-breakable; otherwise returns false.
If b is true, the lines in the paragraph are treated as non-breakable; otherwise they are breakable.
|
getset |
Returns the currently set page break policy for the paragraph. The default is QTextFormat::PageBreak_Auto.
This function was introduced in Qt 4.2.
Sets the page break policy for the paragraph to policy.
This function was introduced in Qt 4.2.
|
getset |
Returns the paragraph's right margin.
Sets the paragraph's right margin.
|
getset |
Returns a list of tab positions defined for the text block.
This function was introduced in Qt 4.4.
Sets the tab positions for the text block to those specified by tabs.
This function was introduced in Qt 4.4.
|
getset |
Returns the paragraph's text indent.
Sets the indent for the first line in the block. This allows the first line of a paragraph to be indented differently to the other lines, enhancing the readability of the text.
|
getset |
Returns the paragraph's top margin.
Sets the paragraph's top margin.