QTextBoundaryFinder Class Reference
|
Constant | Value | Description |
---|---|---|
QTextBoundaryFinder::NotAtBoundary | 0 | The boundary finder is not at a boundary position. |
QTextBoundaryFinder::StartWord | 1 | The boundary finder is at the start of a word. |
QTextBoundaryFinder::EndWord | 2 | The boundary finder is at the end of a word. |
The BoundaryReasons type is a typedef for QFlags<BoundaryReason>. It stores an OR combination of BoundaryReason values.
Constant | Value | Description |
---|---|---|
QTextBoundaryFinder::Grapheme | 0 | Finds a grapheme which is the smallest boundary. It including letters, punctation marks, numerals and more. |
QTextBoundaryFinder::Word | 1 | Finds a word. |
QTextBoundaryFinder::Line | 2 | Finds possible positions for breaking the text into multiple lines. |
QTextBoundaryFinder::Sentence | 3 | Finds sentence boundaries. These include periods, question marks etc. |
Constructs an invalid QTextBoundaryFinder object.
Copies the QTextBoundaryFinder object, other.
Creates a QTextBoundaryFinder object of type operating on string.
Creates a QTextBoundaryFinder object of type operating on chars with length.
buffer is an optional working buffer of size bufferSize you can pass to the QTextBoundaryFinder. If the buffer is large enough to hold the working data required, it will use this insetad of allocating its own buffer.
Warning: QTextBoundaryFinder does not create a copy of chars. It is the application programmer's responsability to ensure the array is allocated for as long as the QTextBoundaryFinder object stays alive. The same applies to buffer.
Destructs the QTextBoundaryFinder object.
Returns the reasons for the boundary finder to have chosen the current position as a boundary.
Returns true if the object's position() is currently at a valid text boundary.
Returns true if the text boundary finder is valid; otherwise returns false. A default QTextBoundaryFinder is invalid.
Returns the current position of the QTextBoundaryFinder.
See also setPosition().
Sets the current position of the QTextBoundaryFinder to position. If position is out of bounds it will get bound to the valid positions.
See also position().
Returns the string the QTextBoundaryFinder object operates on.
Moves the finder to the end of the string. This is equivalent to setPosition(string.length()).
See also setPosition() and position().
Moves the QTextBoundaryFinder to the next boundary position and returns that position.
Returns -1 is there is no next boundary.
Moves the QTextBoundaryFinder to the previous boundary position and returns that position.
Returns -1 is there is no previous boundary.
Moves the finder to the start of the string. This is equivalent to setPosition(0).
See also setPosition() and position().
Returns the type of the QTextBoundaryFinder.
Assigns the object, other, to another QTextBoundaryFinder object.
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 qtextended4.4 | |
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