summaryrefslogtreecommitdiffstats
path: root/kig/kig/kig_view.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kig/kig/kig_view.cpp')
-rw-r--r--kig/kig/kig_view.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kig/kig/kig_view.cpp b/kig/kig/kig_view.cpp
index fbf16517..9eda893b 100644
--- a/kig/kig/kig_view.cpp
+++ b/kig/kig/kig_view.cpp
@@ -55,10 +55,10 @@ kdbgstream& operator<< ( kdbgstream& s, const TQPoint& t )
KigWidget::KigWidget( KigPart* part,
KigView* view,
- TQWidget* parent,
+ TQWidget* tqparent,
const char* name,
bool fullscreen )
- : TQWidget( parent, name,
+ : TQWidget( tqparent, name,
fullscreen ? WStyle_Customize | WStyle_NoBorder : 0 ),
mpart( part ),
mview( view ),
@@ -69,8 +69,8 @@ KigWidget::KigWidget( KigPart* part,
{
part->addWidget(this);
- setFocusPolicy(ClickFocus);
- setBackgroundMode( Qt::NoBackground );
+ setFocusPolicy(TQ_ClickFocus);
+ setBackgroundMode( TQt::NoBackground );
setMouseTracking(true);
curPix.resize( size() );
@@ -123,7 +123,7 @@ void KigWidget::updateWidget( const std::vector<TQRect>& overlay )
#undef SHOW_OVERLAY_RECTS
#ifdef SHOW_OVERLAY_RECTS
TQPainter debug (this, this);
- debug.setPen(Qt::yellow);
+ debug.setPen(TQt::yellow);
#endif // SHOW_OVERLAY_RECTS
// we undo our old changes...
for ( std::vector<TQRect>::const_iterator i = oldOverlay.begin(); i != oldOverlay.end(); ++i )
@@ -193,7 +193,7 @@ void KigWidget::recenterScreen()
Rect KigWidget::matchScreenShape( const Rect& r ) const
{
- return r.matchShape( Rect::fromQRect( rect() ) );
+ return r.matchShape( Rect::fromTQRect( rect() ) );
}
void KigWidget::slotZoomIn()
@@ -231,7 +231,7 @@ void KigWidget::slotZoomOut()
void KigWidget::clearStillPix()
{
- stillPix.fill(Qt::white);
+ stillPix.fill(TQt::white);
oldOverlay.clear();
oldOverlay.push_back ( TQRect( TQPoint(0,0), size() ) );
}
@@ -245,7 +245,7 @@ void KigWidget::redrawScreen( const std::vector<ObjectHolder*>& selection, bool
// update the screen...
clearStillPix();
- KigPainter p( msi, &stillPix, mpart->document() );
+ KigPainter p( msi, TQT_TQPAINTDEVICE(&stillPix), mpart->document() );
p.drawGrid( mpart->document().coordinateSystem(), mpart->document().grid(),
mpart->document().axes() );
p.drawObjects( selection, true );
@@ -287,34 +287,34 @@ void KigWidget::updateScrollBars()
KigView::KigView( KigPart* part,
bool fullscreen,
- TQWidget* parent,
+ TQWidget* tqparent,
const char* name )
- : TQWidget( parent, name ),
- mlayout( 0 ), mrightscroll( 0 ), mbottomscroll( 0 ),
+ : TQWidget( tqparent, name ),
+ mtqlayout( 0 ), mrightscroll( 0 ), mbottomscroll( 0 ),
mupdatingscrollbars( false ),
mrealwidget( 0 ), mpart( part )
{
connect( part, TQT_SIGNAL( recenterScreen() ), this, TQT_SLOT( slotInternalRecenterScreen() ) );
- mlayout = new TQGridLayout( this, 2, 2 );
- mrightscroll = new TQScrollBar( Vertical, this, "Right Scrollbar" );
+ mtqlayout = new TQGridLayout( this, 2, 2 );
+ mrightscroll = new TQScrollBar(Qt::Vertical, this, "Right Scrollbar" );
// TODO: make this configurable...
mrightscroll->setTracking( true );
connect( mrightscroll, TQT_SIGNAL( valueChanged( int ) ),
this, TQT_SLOT( slotRightScrollValueChanged( int ) ) );
connect( mrightscroll, TQT_SIGNAL( sliderReleased() ),
this, TQT_SLOT( updateScrollBars() ) );
- mbottomscroll = new TQScrollBar( Horizontal, this, "Bottom Scrollbar" );
+ mbottomscroll = new TQScrollBar(Qt::Horizontal, this, "Bottom Scrollbar" );
connect( mbottomscroll, TQT_SIGNAL( valueChanged( int ) ),
this, TQT_SLOT( slotBottomScrollValueChanged( int ) ) );
connect( mbottomscroll, TQT_SIGNAL( sliderReleased() ),
this, TQT_SLOT( updateScrollBars() ) );
mrealwidget = new KigWidget( part, this, this, "Kig Widget", fullscreen );
- mlayout->addWidget( mbottomscroll, 1, 0 );
- mlayout->addWidget( mrealwidget, 0, 0 );
- mlayout->addWidget( mrightscroll, 0, 1 );
+ mtqlayout->addWidget( mbottomscroll, 1, 0 );
+ mtqlayout->addWidget( mrealwidget, 0, 0 );
+ mtqlayout->addWidget( mrightscroll, 0, 1 );
- resize( sizeHint() );
+ resize( tqsizeHint() );
mrealwidget->recenterScreen();
part->redrawScreen( mrealwidget );
updateScrollBars();
@@ -336,7 +336,7 @@ void KigView::updateScrollBars()
Rect er = mrealwidget->entireDocumentRect();
Rect sr = mrealwidget->screenInfo().shownRect();
- // we define the total rect to be the smallest rect that contains
+ // we define the total rect to be the smallest rect that tqcontains
// both er and sr...
er |= sr;
@@ -360,7 +360,7 @@ void KigView::updateScrollBars()
mrightscroll->setLineStep( (int)( sr.height() / pw / 10 ) );
mrightscroll->setPageStep( (int)( sr.height() / pw / 1.2 ) );
- // note that since Qt has a coordinate system with the lowest y
+ // note that since TQt has a coordinate system with the lowest y
// values at the top, and we have it the other way around ( i know i
// shouldn't have done this.. :( ), we invert the value that the
// scrollbar shows. This is inverted again in
@@ -443,7 +443,7 @@ const KigDocument& KigWidget::document() const
return mpart->document();
}
-TQSize KigWidget::sizeHint() const
+TQSize KigWidget::tqsizeHint() const
{
return TQSize( 630, 450 );
}
@@ -508,9 +508,9 @@ void KigView::toggleFullScreen()
{
mrealwidget->setFullScreen( ! mrealwidget->isFullScreen() );
if ( mrealwidget->isFullScreen() )
- topLevelWidget()->showFullScreen();
+ tqtopLevelWidget()->showFullScreen();
else
- topLevelWidget()->showNormal();
+ tqtopLevelWidget()->showNormal();
}
void KigWidget::setFullScreen( bool f )
@@ -545,7 +545,7 @@ void KigView::zoomRect()
void KigWidget::setShowingRect( const Rect& r )
{
- msi.setShownRect( r.matchShape( Rect::fromQRect( rect() ) ) );
+ msi.setShownRect( r.matchShape( Rect::fromTQRect( rect() ) ) );
}
void KigView::slotRecenterScreen()
@@ -568,7 +568,7 @@ void KigWidget::zoomArea()
KigInputDialog::getTwoCoordinates( i18n( "Select Zoom Area" ),
i18n( "Select the zoom area by entering the coordinates of "
"the upper left corner and the lower right corner." ) +
- TQString::fromLatin1("<br>") +
+ TQString::tqfromLatin1("<br>") +
mpart->document().coordinateSystem().coordinateFormatNoticeMarkup(),
this, &ok, mpart->document(), &tl, &br );
if ( ok )