QTextLine Class Reference |
Constant | Value |
---|---|
QTextLine::CursorBetweenCharacters | 0 |
QTextLine::CursorOnCharacter | 1 |
Constant | Value |
---|---|
QTextLine::Leading | 0 |
QTextLine::Trailing | 1 |
Creates an invalid line.
Returns the line's ascent.
See also descent() and height().
Converts the cursor position cursorPos to the corresponding x position inside the line, taking account of the edge.
If cursorPos is not a valid cursor position, the nearest valid cursor position will be used instead, and cpos will be modified to point to this valid cursor position.
See also xToCursor().
This is an overloaded member function, provided for convenience.
Returns the line's descent.
See also ascent() and height().
Draws a line on the given painter at the specified position. The selection is reserved for internal use.
Returns the line's height. This is equal to ascent() + descent() + 1.
See also ascent() and descent().
Returns true if this text line is valid; otherwise returns false.
Returns the position of the line in the text engine.
Returns the rectangle covered by the line.
Returns the width of the line that is occupied by text. This is always <= to width(), and is the minimum width that could be used by layout() without changing the line break position.
Returns the line's bounding rectangle.
See also x(), y(), textLength(), and width().
Lays out the line with the given width. The line is filled from its starting position with as many characters as will fit into the line.
Lays out the line. The line is filled from its starting position with as many characters as are specified by numColumns.
Moves the line to position pos.
Returns the length of the text in the line.
See also naturalTextWidth().
Returns the start of the line from the beginning of the string passed to the QTextLayout.
Returns the line's width as specified by the layout() function.
See also naturalTextWidth(), x(), y(), textLength(), and rect().
Returns the line's x position.
See also rect(), y(), textLength(), and width().
Converts the x-coordinate x, to the nearest matching cursor position, depending on the cursor position type, cpos.
See also cursorToX().
Returns the line's y position.
See also x(), rect(), textLength(), and width().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com