diff options
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqrichtext.cpp')
-rw-r--r-- | tqtinterface/qt4/src/kernel/tqrichtext.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqrichtext.cpp b/tqtinterface/qt4/src/kernel/tqrichtext.cpp index e8e91b3..644255b 100644 --- a/tqtinterface/qt4/src/kernel/tqrichtext.cpp +++ b/tqtinterface/qt4/src/kernel/tqrichtext.cpp @@ -6724,7 +6724,7 @@ TQTextImage::TQTextImage(TQTextDocument *p, const QMap<TQString, TQString> &attr } } if (pm.hasAlphaChannel()) { - QRegion mask(pm.mask()); + QRegion mask(pm.QPixmap::mask()); QRegion all(0, 0, pm.width(), pm.height()); reg = new QRegion(all.subtracted(mask)); } @@ -8954,7 +8954,7 @@ void TQTextCursor::insert( const QString &str, bool checkNewLine, TQMemArray<TQT para->format( -1, TRUE ); if ( h != para->rect().height() ) invalidateNested(); - else if ( para->document() && para->document()->tqparent() ) + else if ( para->document() && para->document()->parent() ) para->document()->nextDoubleBuffered = TRUE; fixCursorPosition(); @@ -9597,7 +9597,7 @@ bool TQTextCursor::remove() para->format( -1, TRUE ); if ( h != para->rect().height() ) invalidateNested(); - else if ( para->document() && para->document()->tqparent() ) + else if ( para->document() && para->document()->parent() ) para->document()->nextDoubleBuffered = TRUE; return FALSE; } else if ( para->next() ) { @@ -9621,7 +9621,7 @@ bool TQTextCursor::removePreviousChar() para->format( -1, TRUE ); if ( h != para->rect().height() ) invalidateNested(); - else if ( para->document() && para->document()->tqparent() ) + else if ( para->document() && para->document()->parent() ) para->document()->nextDoubleBuffered = TRUE; return FALSE; } else if ( para->prev() ) { @@ -11025,7 +11025,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor ) if ( p == lastParagraph() && c.atParagEnd() ) break; } else { - if ( p->document()->tqparent() ) + if ( p->document()->parent() ) do { c.gotoNextLetter(); } while ( c.paragraph() == p ); @@ -11090,7 +11090,7 @@ bool TQTextDocument::removeSelection( int id ) p = start.paragraph(); p->removeSelection( id ); //### avoid endless loop by all means necessary, did somebody mention refactoring? - if ( !tqparent() && p == lParag ) + if ( !parent() && p == lParag ) break; } start.gotoNextLetter(); @@ -11147,7 +11147,7 @@ TQString TQTextDocument::selectedText( int id, bool asRichText ) const // end selection 3.0.3 improvement - if ( asRichText && !tqparent() ) { + if ( asRichText && !parent() ) { richTextExportStart = &c1; richTextExportEnd = &c2; @@ -11670,7 +11670,7 @@ TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int floating: if ( parag->rect().y() + parag->rect().height() < parag->document()->height() ) { - if ( !parag->document()->tqparent() ) { + if ( !parag->document()->parent() ) { TQRect fillRect = TQRect( 0, parag->rect().y() + parag->rect().height(), parag->document()->width(), parag->document()->height() - ( parag->rect().y() + parag->rect().height() ) ); if ( TQRect( cx, cy, cw, ch ).intersects( fillRect ) ) @@ -14444,7 +14444,7 @@ void TQTextFormatCollection::setPaintDevice( TQPaintDevice *pd ) TQTextFormat *TQTextFormatCollection::format( TQTextFormat *f ) { - if ( f->tqparent() == this || f == defFormat ) { + if ( f->parent() == this || f == defFormat ) { lastFormat = f; lastFormat->addRef(); return lastFormat; @@ -14998,10 +14998,10 @@ TQTextImage::TQTextImage( TQTextDocument *p, const QMap<TQString, TQString> &att pmi.ref++; } } - if ( pm.tqmask() ) { - TQRegion tqmask( *pm.tqmask() ); + if ( pm.mask() ) { + TQRegion mask( *pm.mask() ); TQRegion all( 0, 0, pm.width(), pm.height() ); - reg = new TQRegion( all.subtract( tqmask ) ); + reg = new TQRegion( all.subtract( mask ) ); } } @@ -16261,7 +16261,7 @@ bool TQTextTable::enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagrap doc = cell->richText(); parag = doc->firstParagraph(); idx = 0; - ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + tqparent->x(); + ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x(); oy += cell->tqgeometry().y() + cell->verticalAlignmentOffset() + outerborder; return TRUE; } @@ -16294,7 +16294,7 @@ bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * doc = cell->richText(); parag = doc->firstParagraph(); idx = 0; - ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + tqparent->x(); + ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x(); oy += cell->tqgeometry().y() + cell->verticalAlignmentOffset() + outerborder; return TRUE; } @@ -16327,7 +16327,7 @@ bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * doc = cell->richText(); parag = doc->lastParagraph(); idx = parag->length() - 1; - ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + tqparent->x(); + ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x(); oy += cell->tqgeometry().y() + cell->verticalAlignmentOffset() + outerborder; return TRUE; } @@ -16365,7 +16365,7 @@ bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph * return FALSE; parag = doc->firstParagraph(); idx = 0; - ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + tqparent->x(); + ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x(); oy += cell->tqgeometry().y() + cell->verticalAlignmentOffset() + outerborder; return TRUE; } @@ -16403,7 +16403,7 @@ bool TQTextTable::up( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&p return FALSE; parag = doc->lastParagraph(); idx = parag->length() - 1; - ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + tqparent->x(); + ox += cell->tqgeometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x(); oy += cell->tqgeometry().y() + cell->verticalAlignmentOffset() + outerborder; return TRUE; } @@ -16422,12 +16422,12 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table, maxw = TQWIDGETSIZE_MAX; minw = 0; - tqparent = table; + parent = table; row_ = row; col_ = column; stretch_ = 0; - richtext = new TQTextDocument( table->tqparent ); - richtext->formatCollection()->setPaintDevice( table->tqparent->formatCollection()->paintDevice() ); + richtext = new TQTextDocument( table->parent ); + richtext->formatCollection()->setPaintDevice( table->parent->formatCollection()->paintDevice() ); richtext->bodyText = fmt.color(); richtext->setTableCell( this ); TQString a = *attr.find( "align" ); @@ -16451,8 +16451,8 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table, else if ( va == "bottom" ) align |= TQt::AlignBottom; } - richtext->setFormatter( table->tqparent->formatter() ); - richtext->setUseFormatCollection( table->tqparent->useFormatCollection() ); + richtext->setFormatter( table->parent->formatter() ); + richtext->setUseFormatCollection( table->parent->useFormatCollection() ); richtext->setMimeSourceFactory( &factory ); richtext->setStyleSheet( sheet ); richtext->setRichText( doc, context, &fmt ); @@ -16487,7 +16487,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table, attributes = attr; - tqparent->addCell( this ); + parent->addCell( this ); } TQTextTableCell::~TQTextTableCell() @@ -16500,11 +16500,11 @@ TQTextTableCell::~TQTextTableCell() TQSize TQTextTableCell::tqsizeHint() const { - int extra = 2 * ( tqparent->innerborder + tqparent->cellpadding + border_tolerance); + int extra = 2 * ( parent->innerborder + parent->cellpadding + border_tolerance); int used = richtext->widthUsed() + extra; if (stretch_ ) { - int w = tqparent->width * stretch_ / 100 - 2*tqparent->cellspacing - 2*tqparent->cellpadding; + int w = parent->width * stretch_ / 100 - 2*parent->cellspacing - 2*parent->cellpadding; return TQSize( TQMIN( w, maxw ), 0 ).expandedTo( tqminimumSize() ); } @@ -16513,7 +16513,7 @@ TQSize TQTextTableCell::tqsizeHint() const TQSize TQTextTableCell::tqminimumSize() const { - int extra = 2 * ( tqparent->innerborder + tqparent->cellpadding + border_tolerance); + int extra = 2 * ( parent->innerborder + parent->cellpadding + border_tolerance); return TQSize( TQMAX( richtext->minimumWidth() + extra, minw), 0 ); } @@ -16533,7 +16533,7 @@ bool TQTextTableCell::isEmpty() const } void TQTextTableCell::setGeometry( const TQRect& r ) { - int extra = 2 * ( tqparent->innerborder + tqparent->cellpadding ); + int extra = 2 * ( parent->innerborder + parent->cellpadding ); if ( r.width() != cached_width ) richtext->doLayout( TQTextFormat::painter(), r.width() - extra ); cached_width = r.width(); @@ -16552,7 +16552,7 @@ bool TQTextTableCell::hasHeightForWidth() const int TQTextTableCell::heightForWidth( int w ) const { - int extra = 2 * ( tqparent->innerborder + tqparent->cellpadding ); + int extra = 2 * ( parent->innerborder + parent->cellpadding ); w = TQMAX( minw, w ); if ( cached_width != w ) { @@ -16574,7 +16574,7 @@ void TQTextTableCell::adjustToPainter( TQPainter* p ) int TQTextTableCell::horizontalAlignmentOffset() const { - return tqparent->cellpadding; + return parent->cellpadding; } int TQTextTableCell::verticalAlignmentOffset() const @@ -16582,14 +16582,14 @@ int TQTextTableCell::verticalAlignmentOffset() const if ( (align & TQt::AlignVCenter ) == TQt::AlignVCenter ) return ( geom.height() - richtext->height() ) / 2; else if ( ( align & TQt::AlignBottom ) == TQt::AlignBottom ) - return geom.height() - tqparent->cellpadding - richtext->height() ; - return tqparent->cellpadding; + return geom.height() - parent->cellpadding - richtext->height() ; + return parent->cellpadding; } void TQTextTableCell::draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool ) { if ( cached_width != geom.width() ) { - int extra = 2 * ( tqparent->innerborder + tqparent->cellpadding ); + int extra = 2 * ( parent->innerborder + parent->cellpadding ); richtext->doLayout( p, geom.width() - extra ); cached_width = geom.width(); } @@ -16622,4 +16622,4 @@ void TQTextTableCell::draw( TQPainter* p, int x, int y, int cx, int cy, int cw, #endif //TQT_NO_RICHTEXT -#endif // USE_QT4
\ No newline at end of file +#endif // USE_QT4 |