diff options
Diffstat (limited to 'kbarcode/dsrichtext.cpp')
-rw-r--r-- | kbarcode/dsrichtext.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kbarcode/dsrichtext.cpp b/kbarcode/dsrichtext.cpp index 2898f1d..b2444dc 100644 --- a/kbarcode/dsrichtext.cpp +++ b/kbarcode/dsrichtext.cpp @@ -74,11 +74,11 @@ DSRichText::~DSRichText() { } -void DSRichText::initFormat( formated_word* f, int tqalignment ) +void DSRichText::initFormat( formated_word* f, int alignment ) { f->text = TQString(); f->line = false; - f->tqalignment = tqalignment; + f->alignment = alignment; f->font = m_base; f->color = m_color; } @@ -147,7 +147,7 @@ void DSRichText::draw( TQPainter* p ) for( unsigned int i = 0; i < lines.count(); i++ ) { formated_line l = lines[i]; - if( l.formats.count() && l.formats[0].tqalignment == TQt::AlignJustify && i != lines.count() - 1 ) { + if( l.formats.count() && l.formats[0].alignment == TQt::AlignJustify && i != lines.count() - 1 ) { // last line in a paragraph is not justified (in blocksatz mode)! drawJustified( &l ); } else { @@ -157,7 +157,7 @@ void DSRichText::draw( TQPainter* p ) painter->setFont( f.font ); painter->setPen( TQPen( f.color ) ); - int a = f.tqalignment; + int a = f.alignment; if( a == TQt::AlignRight ) { a = TQt::AlignLeft; if( !x ) @@ -208,7 +208,7 @@ void DSRichText::drawJustified( formated_line* line ) bool DSRichText::parseParagraph() { - int tqalignment = 0; + int alignment = 0; formated_word f; TQString d = parse( text, "<p", "</p>", pos ); //qDebug("D=" + d ); @@ -218,11 +218,11 @@ bool DSRichText::parseParagraph() if( d.isNull() ) return false; - d = parseParagraphTag( d, &tqalignment ); + d = parseParagraphTag( d, &alignment ); WordList words; TQString data; - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); if( d.isEmpty() ) { // found empty paragraph @@ -237,7 +237,7 @@ bool DSRichText::parseParagraph() data.append( d[i] ); parseWords( data, &f, &words ); - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); data = TQString(); // bail out now, otherwise there is @@ -250,7 +250,7 @@ bool DSRichText::parseParagraph() i += span.length(); if( span.startsWith( "<span " ) ) { - initFormat( &f, tqalignment ); + initFormat( &f, alignment ); f.font = parseStyle( parse( span, "style=\"", "\"", 0 ), &f.color ); } } @@ -403,13 +403,13 @@ TQString DSRichText::replaceEscapeSequences( const TQString & t ) return tmp; } -TQString DSRichText::parseParagraphTag( const TQString &t, int* tqalignment ) +TQString DSRichText::parseParagraphTag( const TQString &t, int* alignment ) { TQString d = TQString( t ); if( d.startsWith("<p>") ) { d = d.mid( 3, d.length() - 3 ); } else if( d.startsWith("<p ") ) { - *tqalignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) ); + *alignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) ); if( d.contains( ">" ) ) { int x = d.find(">" ) + 1; d = d.mid( x, d.length() - x ); |