class KWordWrap


Module kdeui
Namespace
Class KWordWrap
Inherits
Word-wrap algorithm that takes into account beautifulness ;)

That means:

  • not letting a letter alone on the last line,
  • breaking at punctuation signs (not only at spaces)
  • improved handling of (), [] and {}
  • improved handling of '/' (e.g. for paths)
  • Usage: call the static method, formatText, with the text to wrap and the constraining rectangle etc., it will return an instance of KWordWrap containing internal data, result of the word-wrapping. From that instance you can retrieve the boundingRect, and invoke drawing.

    This design allows to call the word-wrap algorithm only when the text changes and not every time we want to know the bounding rect or draw the text.

    Author David Faure



    enums

    enum details

    methods