22 #include <tqfontmetrics.h>
23 #include <tqvaluelist.h>
27 #include <tdelibs_export.h>
56 enum { FadeOut = 0x10000000, Truncate = 0x20000000 };
69 static KWordWrap* formatText( TQFontMetrics &fm,
const TQRect & r,
int flags,
const TQString & str,
int len = -1 );
83 TQString wrappedString()
const;
90 TQString truncatedString(
bool dots =
true )
const;
104 void drawText( TQPainter *painter,
int x,
int y,
int flags = TQt::AlignAuto )
const;
123 static void drawFadeoutText( TQPainter *p,
int x,
int y,
int maxW,
136 static void drawTruncateText( TQPainter *p,
int x,
int y,
int maxW,
141 TQValueList<int> m_breakPositions;
142 TQValueList<int> m_lineWidths;
143 TQRect m_boundingRect;
146 class KWordWrapPrivate* d;
Word-wrap algorithm that takes into account beautifulness ;)
TQRect boundingRect() const