diff options
Diffstat (limited to 'kword/KWViewMode.cpp')
-rw-r--r-- | kword/KWViewMode.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kword/KWViewMode.cpp b/kword/KWViewMode.cpp index c1c6f16e..b8249839 100644 --- a/kword/KWViewMode.cpp +++ b/kword/KWViewMode.cpp @@ -63,7 +63,7 @@ void KWViewMode::drawOnePageBorder( TQPainter * painter, const TQRect & crect, c TQRegion pageEmptyRegion = emptySpaceRegion.intersect( pagecrect ); //kdDebug() << "RESULT: pageEmptyRegion: " << pageEmptyRegion << endl; if ( !pageEmptyRegion.isEmpty() ) - m_doc->eraseEmptySpace( painter, pageEmptyRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Base ) ); + m_doc->eraseEmptySpace( painter, pageEmptyRegion, TQApplication::palette().active().brush( TQColorGroup::Base ) ); } } @@ -74,7 +74,7 @@ TQRect KWViewMode::drawRightShadow( TQPainter * painter, const TQRect & crect, c if ( !shadowRect.isEmpty() ) { painter->fillRect( shadowRect, - TQApplication::tqpalette().active().brush( TQColorGroup::Shadow ) ); + TQApplication::palette().active().brush( TQColorGroup::Shadow ) ); } return shadowRect; } @@ -85,7 +85,7 @@ TQRect KWViewMode::drawBottomShadow( TQPainter * painter, const TQRect & crect, shadowRect &= crect; // intersect if ( !shadowRect.isEmpty() ) painter->fillRect( shadowRect, - TQApplication::tqpalette().active().brush( TQColorGroup::Shadow ) ); + TQApplication::palette().active().brush( TQColorGroup::Shadow ) ); return shadowRect; } @@ -144,10 +144,10 @@ TQRect KWViewMode::rulerFrameRect() return TQRect(); } -void KWViewMode::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& tqlayout ) +void KWViewMode::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& layout ) { - hRuler->setPageLayout( tqlayout ); - vRuler->setPageLayout( tqlayout ); + hRuler->setPageLayout( layout ); + vRuler->setPageLayout( layout ); } // static @@ -230,7 +230,7 @@ int KWViewModeNormal::xOffset(KWPage *page, int canvasWidth /* = -1 */) { void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion ) { painter->save(); - painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) ); + painter->setPen( TQApplication::palette().active().color( TQColorGroup::Dark ) ); painter->setBrush( TQt::NoBrush ); TQRect pageRect; @@ -258,7 +258,7 @@ void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crec leftArea &= crect; if ( !leftArea.isEmpty() ) { painter->fillRect( leftArea, - TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + TQApplication::palette().active().brush( TQColorGroup::Mid ) ); } // The area on the right of the page @@ -267,7 +267,7 @@ void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crec if ( !rightArea.isEmpty() ) { painter->fillRect( rightArea, - TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + TQApplication::palette().active().brush( TQColorGroup::Mid ) ); // Draw a shadow int topOffset = ( page==0 ) ? s_shadowOffset : 0; // leave a few pixels on top, only for first page @@ -284,7 +284,7 @@ void KWViewModeNormal::drawPageBorders( TQPainter * painter, const TQRect & crec if ( !repaintRect.isEmpty() ) { painter->fillRect( repaintRect, - TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + TQApplication::palette().active().brush( TQColorGroup::Mid ) ); // Draw a shadow drawBottomShadow( painter, crect, pageRect, s_shadowOffset ); } @@ -406,7 +406,7 @@ TQPoint KWViewModePreview::viewToNormal( const TQPoint & vPoint ) void KWViewModePreview::drawPageBorders( TQPainter * painter, const TQRect & crect, const TQRegion & emptySpaceRegion ) { painter->save(); - painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) ); + painter->setPen( TQApplication::palette().active().color( TQColorGroup::Dark ) ); painter->setBrush( TQt::NoBrush ); //kdDebug() << "KWViewModePreview::drawPageBorders crect=" << DEBUGRECT( crect ) << endl; TQRegion grayRegion( crect ); @@ -439,7 +439,7 @@ void KWViewModePreview::drawPageBorders( TQPainter * painter, const TQRect & cre if ( !grayRegion.isEmpty() ) { //kdDebug() << "KWViewModePreview::drawPageBorders grayRegion's bounding Rect = " << DEBUGRECT( grayRegion.boundingRect() ) << endl; - m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::palette().active().brush( TQColorGroup::Mid ) ); } painter->restore(); } @@ -541,7 +541,7 @@ void KWViewModeText::drawPageBorders( TQPainter * painter, const TQRect & crect, painter->save(); TQRegion grayRegion( crect ); //kdDebug() << "KWViewModeText::drawPageBorders crect=" << grayRegion << endl; - painter->setPen( TQApplication::tqpalette().active().color( TQColorGroup::Dark ) ); + painter->setPen( TQApplication::palette().active().color( TQColorGroup::Dark ) ); TQSize cSize = contentsSize(); // Draw a line on the right -- ## or a shadow? // +1 to be out of the contents, and +1 for TQRect @@ -562,7 +562,7 @@ void KWViewModeText::drawPageBorders( TQPainter * painter, const TQRect & crect, } //kdDebug() << "KWViewModeText::drawPageBorders erasing grayRegion " << grayRegion << endl; if ( !grayRegion.isEmpty() ) - m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) ); + m_doc->eraseEmptySpace( painter, grayRegion, TQApplication::palette().active().brush( TQColorGroup::Mid ) ); painter->restore(); } @@ -571,24 +571,24 @@ TQRect KWViewModeText::rulerFrameRect() return TQRect( TQPoint(OFFSET, 0), contentsSize() ); } -void KWViewModeText::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& /*tqlayout*/ ) +void KWViewModeText::setPageLayout( KoRuler* hRuler, KoRuler* vRuler, const KoPageLayout& /*layout*/ ) { - // Create a dummy page-tqlayout, as if we had a single page englobing the whole text. - KoPageLayout tqlayout; - tqlayout.format = PG_CUSTOM; - tqlayout.orientation = PG_PORTRAIT; + // Create a dummy page-layout, as if we had a single page englobing the whole text. + KoPageLayout layout; + layout.format = PG_CUSTOM; + layout.orientation = PG_PORTRAIT; TQSize cSize = contentsSize(); - tqlayout.ptWidth = m_doc->unzoomItX( cSize.width() ); - tqlayout.ptHeight = m_doc->unzoomItY( cSize.height() ); - //kdDebug() << "KWViewModeText::setPageLayout tqlayout size " << tqlayout.ptWidth << "x" << tqlayout.ptHeight << endl; - tqlayout.ptLeft = OFFSET; - tqlayout.ptRight = 0; - tqlayout.ptTop = 0; - tqlayout.ptBottom = 0; - tqlayout.ptBindingSide = 0; - tqlayout.ptPageEdge = 0; - hRuler->setPageLayout( tqlayout ); - vRuler->setPageLayout( tqlayout ); + layout.ptWidth = m_doc->unzoomItX( cSize.width() ); + layout.ptHeight = m_doc->unzoomItY( cSize.height() ); + //kdDebug() << "KWViewModeText::setPageLayout layout size " << layout.ptWidth << "x" << layout.ptHeight << endl; + layout.ptLeft = OFFSET; + layout.ptRight = 0; + layout.ptTop = 0; + layout.ptBottom = 0; + layout.ptBindingSide = 0; + layout.ptPageEdge = 0; + hRuler->setPageLayout( layout ); + vRuler->setPageLayout( layout ); } bool KWViewModeText::isTextModeFrameset(KWFrameSet *fs) const { |