summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrCanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrCanvas.cpp')
-rw-r--r--kpresenter/KPrCanvas.cpp1094
1 files changed, 547 insertions, 547 deletions
diff --git a/kpresenter/KPrCanvas.cpp b/kpresenter/KPrCanvas.cpp
index 965a3fd4..134e0851 100644
--- a/kpresenter/KPrCanvas.cpp
+++ b/kpresenter/KPrCanvas.cpp
@@ -22,21 +22,21 @@
#include <stdlib.h>
#include <math.h>
-#include <qprogressdialog.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qwmatrix.h>
-#include <qapplication.h>
+#include <tqprogressdialog.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqwmatrix.h>
+#include <tqapplication.h>
#include <kpopupmenu.h>
-#include <qimage.h>
-#include <qdatetime.h>
-#include <qdropsite.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qpoint.h>
-#include <qclipboard.h>
+#include <tqimage.h>
+#include <tqdatetime.h>
+#include <tqdropsite.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqpoint.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <kmimemagic.h>
@@ -92,8 +92,8 @@
const int KPrCanvas::MOUSE_SNAP_DISTANCE = 4;
const int KPrCanvas::KEY_SNAP_DISTANCE = 2;
-KPrCanvas::KPrCanvas( QWidget *parent, const char *name, KPrView *_view )
-: QWidget( parent, name, WStaticContents|WResizeNoErase|WRepaintNoErase )
+KPrCanvas::KPrCanvas( TQWidget *tqparent, const char *name, KPrView *_view )
+: TQWidget( tqparent, name, WStaticContents|WResizeNoErase|WRepaintNoErase )
, buffer( size() )
, m_gl( _view, _view->zoomHandler() )
, m_paintGuides( false )
@@ -108,7 +108,7 @@ KPrCanvas::KPrCanvas( QWidget *parent, const char *name, KPrView *_view )
m_keyPressEvent = false;
m_drawSymetricObject = false;
- if ( parent ) {
+ if ( tqparent ) {
showingLastSlide = false;
mousePressed = false;
drawContour = false;
@@ -116,7 +116,7 @@ KPrCanvas::KPrCanvas( QWidget *parent, const char *name, KPrView *_view )
m_resizeObject = 0;
m_editObject = 0;
m_rotateObject = 0;
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
m_view = _view;
setupMenus();
setMouseTracking( true );
@@ -152,7 +152,7 @@ KPrCanvas::KPrCanvas( QWidget *parent, const char *name, KPrView *_view )
hide();
}
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
setFocus();
setKeyCompression( true );
setInputMethodEnabled( true ); // ensure using the InputMethod
@@ -163,14 +163,14 @@ KPrCanvas::KPrCanvas( QWidget *parent, const char *name, KPrView *_view )
if( m_view)
{
m_activePage=m_view->kPresenterDoc()->pageList().getFirst();
- connect( m_view->kPresenterDoc(), SIGNAL( sig_terminateEditing( KPrTextObject * ) ),
- this, SLOT( terminateEditing( KPrTextObject * ) ) );
- connect( m_view, SIGNAL( autoScroll( const QPoint & )), this, SLOT( slotAutoScroll( const QPoint &)));
+ connect( m_view->kPresenterDoc(), TQT_SIGNAL( sig_terminateEditing( KPrTextObject * ) ),
+ this, TQT_SLOT( terminateEditing( KPrTextObject * ) ) );
+ connect( m_view, TQT_SIGNAL( autoScroll( const TQPoint & )), this, TQT_SLOT( slotAutoScroll( const TQPoint &)));
}
if ( kospeaker )
- connect( kospeaker, SIGNAL( customSpeakWidget(QWidget*, const QPoint&, uint) ),
- this, SLOT( speakTextUnderMouse(QWidget*, const QPoint&, uint) ) );
+ connect( kospeaker, TQT_SIGNAL( customSpeakWidget(TQWidget*, const TQPoint&, uint) ),
+ this, TQT_SLOT( speakTextUnderMouse(TQWidget*, const TQPoint&, uint) ) );
}
KPrCanvas::~KPrCanvas()
@@ -208,7 +208,7 @@ void KPrCanvas::scrollY( int y )
scroll( 0, dy );
}
-bool KPrCanvas::eventFilter( QObject *o, QEvent *e )
+bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e )
{
if ( !o || !e )
return TRUE;
@@ -216,49 +216,49 @@ bool KPrCanvas::eventFilter( QObject *o, QEvent *e )
KCursor::autoHideEventFilter( o, e );
switch ( e->type() )
{
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if ( m_currentTextObjectView )
m_currentTextObjectView->focusInEvent();
return TRUE;
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
if ( m_currentTextObjectView )
m_currentTextObjectView->focusOutEvent();
return TRUE;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
- QKeyEvent * keyev = static_cast<QKeyEvent *>(e);
+ TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
if ( keyev->key() == KGlobalSettings::contextMenuKey() ) {
popupContextMenu();
return true;
}
if ( m_currentTextObjectView &&
- (keyev->key()==Qt::Key_Home ||keyev->key()==Key_End
- || keyev->key()==Qt::Key_Tab || keyev->key()==Key_Prior
- || keyev->key()==Qt::Key_Next || keyev->key() == Key_Backtab) )
+ (keyev->key()==TQt::Key_Home ||keyev->key()==Key_End
+ || keyev->key()==TQt::Key_Tab || keyev->key()==Key_Prior
+ || keyev->key()==TQt::Key_Next || keyev->key() == Key_Backtab) )
{
m_currentTextObjectView->keyPressEvent( keyev );
return true;
}
- else if ( !m_currentTextObjectView && keyev->key()==Qt::Key_Tab )
+ else if ( !m_currentTextObjectView && keyev->key()==TQt::Key_Tab )
{
keyPressEvent(keyev);
return true;
}
break;
}
- case QEvent::AccelOverride:
+ case TQEvent::AccelOverride:
{
#ifndef NDEBUG
- QKeyEvent * keyev = static_cast<QKeyEvent *>(e);
+ TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
// Debug keys
if ( ( keyev->state() & ControlButton ) && ( keyev->state() & ShiftButton ) )
{
switch ( keyev->key() ) {
- case Qt::Key_P: // 'P' -> paragraph debug
+ case TQt::Key_P: // 'P' -> paragraph debug
printRTDebug( 0 );
keyev->accept();
break;
- case Qt::Key_V: // 'V' -> verbose parag debug
+ case TQt::Key_V: // 'V' -> verbose parag debug
printRTDebug( 1 );
keyev->accept();
break;
@@ -272,7 +272,7 @@ bool KPrCanvas::eventFilter( QObject *o, QEvent *e )
default:
break;
}
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
}
bool KPrCanvas::focusNextPrevChild( bool )
@@ -280,7 +280,7 @@ bool KPrCanvas::focusNextPrevChild( bool )
return TRUE; // Don't allow to go out of the canvas widget by pressing "Tab"
}
-void KPrCanvas::paintEvent( QPaintEvent* paintEvent )
+void KPrCanvas::paintEvent( TQPaintEvent* paintEvent )
{
if ( isUpdatesEnabled() )
{
@@ -290,12 +290,12 @@ void KPrCanvas::paintEvent( QPaintEvent* paintEvent )
if ( ! m_paintGuides )
{
//kdDebug(33001) << "KPrCanvas::paintEvent" << endl;
- QPainter bufPainter;
- bufPainter.begin( &buffer, this ); // double-buffering - (the buffer is as big as the widget)
+ TQPainter bufPainter;
+ bufPainter.tqbegin( TQT_TQPAINTDEVICE(&buffer), this ); // double-buffering - (the buffer is as big as the widget)
bufPainter.translate( -diffx(), -diffy() );
bufPainter.setBrushOrigin( -diffx(), -diffy() );
- QRect crect( paintEvent->rect() ); // the rectangle that needs to be repainted, in widget coordinates
+ TQRect crect( paintEvent->rect() ); // the rectangle that needs to be tqrepainted, in widget coordinates
bufPainter.setClipRect( crect );
//kdDebug(33001) << "KPrCanvas::paintEvent " << DEBUGRECT( crect ) << ", " << size() << endl;
@@ -333,8 +333,8 @@ void KPrCanvas::paintEvent( QPaintEvent* paintEvent )
#if 0 // this works but isn't enough - e.g. object effects need the same offsets
// so we should store them, but they don't work like diffx/diffy...
// (e.g. the painter mustn't be translated when painting the background)
- QRect desk = KGlobalSettings::desktopGeometry(this);
- QRect pgRect = m_view->kPresenterDoc()->pageList().at(0)->getZoomPageRect();
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
+ TQRect pgRect = m_view->kPresenterDoc()->pageList().at(0)->getZoomPageRect();
int offx = 0, offy = 0;
if ( desk.width() > pgRect.width() )
offx = ( desk.width() - pgRect.width() ) / 2;
@@ -361,8 +361,8 @@ void KPrCanvas::paintEvent( QPaintEvent* paintEvent )
}
- QPixmap topBuffer( buffer );
- QPainter topPainter( &topBuffer, &buffer );
+ TQPixmap topBuffer( buffer );
+ TQPainter topPainter( &topBuffer, &buffer );
topPainter.translate( -diffx(), -diffy() );
topPainter.setBrushOrigin( -diffx(), -diffy() );
@@ -371,14 +371,14 @@ void KPrCanvas::paintEvent( QPaintEvent* paintEvent )
m_gl.paintGuides( topPainter );
}
- topPainter.setPen( QPen( Qt::black, 1, Qt::SolidLine ) );
+ topPainter.setPen( TQPen( TQt::black, 1, TQt::SolidLine ) );
topPainter.setRasterOp( NotROP );
switch ( toolEditMode )
{
case MT_NONE:
if ( drawRubber )
{
- topPainter.setPen( QPen( black, 0, DotLine ) );
+ topPainter.setPen( TQPen( black, 0, DotLine ) );
topPainter.drawRect( m_view->zoomHandler()->zoomRect( m_rubber ) );
}
break;
@@ -423,14 +423,14 @@ void KPrCanvas::paintEvent( QPaintEvent* paintEvent )
case INS_POLYLINE:
case INS_CLOSED_POLYLINE:
{
- QPointArray pointArray = m_pointArray.zoomPointArray( m_view->zoomHandler() );
+ TQPointArray pointArray = m_pointArray.zoomPointArray( m_view->zoomHandler() );
topPainter.drawPolyline( pointArray );
topPainter.drawLine( m_view->zoomHandler()->zoomPoint( m_startPoint ),
m_view->zoomHandler()->zoomPoint( m_endPoint ) );
} break;
- case INS_QUADRICBEZIERCURVE:
+ case INS_TQUADRICBEZIERCURVE:
case INS_CUBICBEZIERCURVE:
- case INS_CLOSED_QUADRICBEZIERCURVE:
+ case INS_CLOSED_TQUADRICBEZIERCURVE:
case INS_CLOSED_CUBICBEZIERCURVE:
if ( m_drawCubicBezierCurve )
{
@@ -454,11 +454,11 @@ void KPrCanvas::paintEvent( QPaintEvent* paintEvent )
}
-void KPrCanvas::drawBackground( QPainter *painter, const QRect& rect, KPrPage * page, bool edit ) const
+void KPrCanvas::drawBackground( TQPainter *painter, const TQRect& rect, KPrPage * page, bool edit ) const
{
if ( edit )
{
- QRect pageRect = page->getZoomPageRect();
+ TQRect pageRect = page->getZoomPageRect();
if ( rect.intersects( pageRect ) )
{
@@ -476,20 +476,20 @@ void KPrCanvas::drawBackground( QPainter *painter, const QRect& rect, KPrPage *
pageRect.rRight() += 1;
pageRect.rBottom() += 1;
- QRegion grayRegion( rect );
+ TQRegion grayRegion( rect );
grayRegion -= pageRect;
// In edit mode we also want to draw the gray area out of the pages
if ( !grayRegion.isEmpty() )
- eraseEmptySpace( painter, grayRegion, QApplication::palette().active().brush( QColorGroup::Mid ) );
+ eraseEmptySpace( painter, grayRegion, TQApplication::tqpalette().active().brush( TQColorGroup::Mid ) );
}
else
{
// Old code, left a black area if zoomX != zoomY
//page->background()->draw( painter, m_view->zoomHandler(), rect, false );
- QRect desk = KGlobalSettings::desktopGeometry(getView());
- QRect crect = desk.intersect( rect );
+ TQRect desk = KGlobalSettings::desktopGeometry(getView());
+ TQRect crect = desk.intersect( rect );
if ( crect.isEmpty() || !page->displayBackground())
return;
@@ -502,11 +502,11 @@ void KPrCanvas::drawBackground( QPainter *painter, const QRect& rect, KPrPage *
// 100% stolen from KWord
-void KPrCanvas::eraseEmptySpace( QPainter * painter, const QRegion & emptySpaceRegion, const QBrush & brush ) const
+void KPrCanvas::eraseEmptySpace( TQPainter * painter, const TQRegion & emptySpaceRegion, const TQBrush & brush ) const
{
painter->save();
- painter->setClipRegion( emptySpaceRegion, QPainter::CoordPainter );
- painter->setPen( Qt::NoPen );
+ painter->setClipRegion( emptySpaceRegion, TQPainter::CoordPainter );
+ painter->setPen( TQt::NoPen );
//kdDebug(33001) << "KWDocument::eraseEmptySpace emptySpaceRegion: " << DEBUGRECT( emptySpaceRegion.boundingRect() ) << endl;
painter->fillRect( emptySpaceRegion.boundingRect(), brush );
@@ -514,10 +514,10 @@ void KPrCanvas::eraseEmptySpace( QPainter * painter, const QRegion & emptySpaceR
}
-void KPrCanvas::drawObjects( QPainter *painter, const QPtrList<KPrObject> &objects, SelectionMode selectionMode,
+void KPrCanvas::drawObjects( TQPainter *painter, const TQPtrList<KPrObject> &objects, SelectionMode selectionMode,
bool contour, KPrTextView * textView, int pageNum ) const
{
- QPtrListIterator<KPrObject> it( objects );
+ TQPtrListIterator<KPrObject> it( objects );
for ( ; it.current(); ++it )
{
SelectionMode selMode = selectionMode;
@@ -541,11 +541,11 @@ void KPrCanvas::drawObjects( QPainter *painter, const QPtrList<KPrObject> &objec
}
-void KPrCanvas::drawObjectsPres( QPainter *painter, const QPtrList<KPrObject> &_objects, PresStep step ) const
+void KPrCanvas::drawObjectsPres( TQPainter *painter, const TQPtrList<KPrObject> &_objects, PresStep step ) const
{
- QPtrList<KPrObject> objects;
+ TQPtrList<KPrObject> objects;
- QPtrListIterator<KPrObject> it( _objects );
+ TQPtrListIterator<KPrObject> it( _objects );
for ( ; it.current(); ++it )
{
if ( objectIsAHeaderFooterHidden(it.current()) )
@@ -571,13 +571,13 @@ void KPrCanvas::drawObjectsPres( QPainter *painter, const QPtrList<KPrObject> &_
}
-void KPrCanvas::drawObjectsEdit( QPainter *painter, const KoRect &rect, const QPtrList<KPrObject> &_objects,
+void KPrCanvas::drawObjectsEdit( TQPainter *painter, const KoRect &rect, const TQPtrList<KPrObject> &_objects,
SelectionMode selectionMode, int pageNum ) const
{
- QPtrList<KPrObject> objects;
+ TQPtrList<KPrObject> objects;
KPrTextView * textView = NULL;
- QPtrListIterator<KPrObject> it( _objects );
+ TQPtrListIterator<KPrObject> it( _objects );
for ( ; it.current(); ++it )
{
if ( objectIsAHeaderFooterHidden(it.current()) )
@@ -597,12 +597,12 @@ void KPrCanvas::drawObjectsEdit( QPainter *painter, const KoRect &rect, const QP
}
-void KPrCanvas::drawEditPage( QPainter *painter, const QRect &_rect,
+void KPrCanvas::drawEditPage( TQPainter *painter, const TQRect &_rect,
KPrPage *page, SelectionMode selectionMode ) const
{
KoRect rect = m_view->zoomHandler()->unzoomRect(_rect);
- int pageNum = m_view->kPresenterDoc()->pageList().findRef( page );
+ int pageNum = m_view->kPresenterDoc()->pageList().tqfindRef( page );
//objects on master page
if ( page->masterPage() && page->displayObjectFromMasterPage() )
drawObjectsEdit( painter, rect, page->masterPage()->objectList(), selectionMode, pageNum );
@@ -611,7 +611,7 @@ void KPrCanvas::drawEditPage( QPainter *painter, const QRect &_rect,
}
-void KPrCanvas::drawPresPage( QPainter *painter, const QRect &_rect, PresStep step ) const
+void KPrCanvas::drawPresPage( TQPainter *painter, const TQRect &_rect, PresStep step ) const
{
KoRect rect = m_view->zoomHandler()->unzoomRect(_rect);
@@ -624,16 +624,16 @@ void KPrCanvas::drawPresPage( QPainter *painter, const QRect &_rect, PresStep st
}
-void KPrCanvas::drawGrid(QPainter *painter, const QRect &rect2) const
+void KPrCanvas::drawGrid(TQPainter *painter, const TQRect &rect2) const
{
KPrDocument *doc=m_view->kPresenterDoc();
if(!doc->isReadWrite())
return;
- QPen _pen = QPen( doc->gridColor(), 6, Qt::DotLine );
+ TQPen _pen = TQPen( doc->gridColor(), 6, TQt::DotLine );
painter->save();
painter->setPen( _pen );
- QRect pageRect = m_activePage->getZoomPageRect();
+ TQRect pageRect = m_activePage->getZoomPageRect();
int zoomedX, zoomedY;
double offsetX = doc->getGridX();
@@ -641,7 +641,7 @@ void KPrCanvas::drawGrid(QPainter *painter, const QRect &rect2) const
for ( double i = offsetX; ( zoomedX = m_view->zoomHandler()->zoomItX( i )+pageRect.left() ) < pageRect.right(); i += offsetX )
for ( double j = offsetY; ( zoomedY = m_view->zoomHandler()->zoomItY( j )+pageRect.top() ) < pageRect.bottom(); j += offsetY )
- if( rect2.contains( zoomedX, zoomedY ) )
+ if( rect2.tqcontains( zoomedX, zoomedY ) )
painter->drawPoint( zoomedX, zoomedY );
painter->restore();
@@ -650,9 +650,9 @@ void KPrCanvas::drawGrid(QPainter *painter, const QRect &rect2) const
// This one is used to generate the pixmaps for the HTML presentation,
// for the pres-structure-dialog, for the sidebar previews, for template icons.
-void KPrCanvas::drawAllObjectsInPage( QPainter *painter, const QPtrList<KPrObject> & obj, int pageNum ) const
+void KPrCanvas::drawAllObjectsInPage( TQPainter *painter, const TQPtrList<KPrObject> & obj, int pageNum ) const
{
- QPtrListIterator<KPrObject> it( obj );
+ TQPtrListIterator<KPrObject> it( obj );
for ( ; it.current(); ++it ) {
if ( objectIsAHeaderFooterHidden( it.current() ) )
continue;
@@ -662,9 +662,9 @@ void KPrCanvas::drawAllObjectsInPage( QPainter *painter, const QPtrList<KPrObjec
void KPrCanvas::recalcAutoGuides( )
{
- QValueList<double> horizontalPos;
- QValueList<double> verticalPos;
- QPtrListIterator<KPrObject> it( m_activePage->objectList() );
+ TQValueList<double> horizontalPos;
+ TQValueList<double> verticalPos;
+ TQPtrListIterator<KPrObject> it( m_activePage->objectList() );
for ( ; it.current(); ++it )
{
if( ! it.current()->isSelected() )
@@ -674,9 +674,9 @@ void KPrCanvas::recalcAutoGuides( )
m_gl.setAutoGuideLines( horizontalPos, verticalPos );
}
-void KPrCanvas::mousePressEvent( QMouseEvent *e )
+void KPrCanvas::mousePressEvent( TQMouseEvent *e )
{
- QPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
+ TQPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
KoPoint docPoint = m_view->zoomHandler()->unzoomPoint( contentsPoint );
m_insertRect = KoRect();
@@ -691,24 +691,24 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
{
KPrTextObject *txtObj=m_currentTextObjectView->kpTextObject();
Q_ASSERT(txtObj);
- if(txtObj->contains( docPoint ))
+ if(txtObj->tqcontains( docPoint ))
{
KoPoint pos = docPoint - txtObj->innerRect().topLeft(); // in pt, but now translated into the object's coordinate system
// This is common to all mouse buttons, so that RMB and MMB place the cursor too
m_currentTextObjectView->mousePressEvent(e, m_view->zoomHandler()->ptToLayoutUnitPix( pos ) ); // in LU pixels
mousePressed = true;
m_view->enableAutoScroll();
- if(e->button() == RightButton)
+ if(e->button() == Qt::RightButton)
{
- m_currentTextObjectView->showPopup( m_view, QCursor::pos(), m_view->actionList() );
+ m_currentTextObjectView->showPopup( m_view, TQCursor::pos(), m_view->actionList() );
m_view->disableAutoScroll();
mousePressed=false;
}
- else if( e->button() == MidButton )
+ else if( e->button() == Qt::MidButton )
{
- QApplication::clipboard()->setSelectionMode( true );
+ TQApplication::tqclipboard()->setSelectionMode( true );
m_currentTextObjectView->paste();
- QApplication::clipboard()->setSelectionMode( false );
+ TQApplication::tqclipboard()->setSelectionMode( false );
}
return;
}
@@ -722,7 +722,7 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
exitEditMode();
if ( editMode ) {
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
mousePressed = true;
m_view->enableAutoScroll();
@@ -736,14 +736,14 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
}
if ( m_drawCubicBezierCurve && ( toolEditMode == INS_CUBICBEZIERCURVE
- || toolEditMode == INS_QUADRICBEZIERCURVE
+ || toolEditMode == INS_TQUADRICBEZIERCURVE
|| toolEditMode == INS_CLOSED_CUBICBEZIERCURVE
- || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) ) {
+ || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) ) {
if ( m_drawLineWithCubicBezierCurve ) {
- QPainter p( this );
- p.setPen( QPen( Qt::black, 1, Qt::SolidLine ) );
- p.setBrush( Qt::NoBrush );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( this );
+ p.setPen( TQPen( TQt::black, 1, TQt::SolidLine ) );
+ p.setBrush( TQt::NoBrush );
+ p.setRasterOp( TQt::NotROP );
p.translate( -diffx(), -diffy() );
KoPoint newStartPoint = snapPoint( docPoint );
@@ -760,11 +760,11 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
m_drawLineWithCubicBezierCurve = false;
}
else {
- QPainter p( this );
- QPen _pen = QPen( Qt::black, 1, Qt::DashLine );
+ TQPainter p( this );
+ TQPen _pen = TQPen( TQt::black, 1, TQt::DashLine );
p.setPen( _pen );
- p.setBrush( Qt::NoBrush );
- p.setRasterOp( Qt::NotROP );
+ p.setBrush( TQt::NoBrush );
+ p.setRasterOp( TQt::NotROP );
p.translate( -diffx(), -diffy() );
p.save();
@@ -846,7 +846,7 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
recalcAutoGuides();
if ( m_view->kPresenterDoc()->showGuideLines() && !m_disableSnapping )
{
- m_gl.repaintSnapping( objectRect( false ) );
+ m_gl.tqrepaintSnapping( objectRect( false ) );
}
}
else
@@ -865,7 +865,7 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
if ( kpobject )
{
mousePressed = false;
- QString msg( i18n( "The object you are trying to select belongs to the master slide. "
+ TQString msg( i18n( "The object you are trying to select belongs to the master slide. "
"Editing the object can only be done on the master slide.\n"
"Go there now?" ) );
m_view->disableAutoScroll(); // needed because the messagebox 'eats' the mouseRelease
@@ -950,8 +950,8 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
m_pointArray.putPoints( m_indexPointArray, 1, m_startPoint.x(), m_startPoint.y() );
++m_indexPointArray;
} break;
- case INS_CUBICBEZIERCURVE: case INS_QUADRICBEZIERCURVE:
- case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_QUADRICBEZIERCURVE: {
+ case INS_CUBICBEZIERCURVE: case INS_TQUADRICBEZIERCURVE:
+ case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_TQUADRICBEZIERCURVE: {
deSelectAllObj();
recalcAutoGuides();
mousePressed = true;
@@ -978,12 +978,12 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
}
}
- if ( e->button() == RightButton && ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE )
+ if ( e->button() == Qt::RightButton && ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE )
&& !m_pointArray.isNull() && m_drawPolyline ) {
if( m_indexPointArray > 1)
{
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.translate( -diffx(), -diffy() );
p.save();
@@ -997,7 +997,7 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
m_view->zoomHandler()->zoomPoint( m_pointArray.at( m_indexPointArray - 2 ) ) );
p.restore();
- m_indexPointArray = QMAX( 1, m_indexPointArray - 1 );
+ m_indexPointArray = TQMAX( 1, m_indexPointArray - 1 );
m_pointArray.resize( m_indexPointArray );
m_startPoint = m_pointArray.at( m_indexPointArray - 1 );
@@ -1008,8 +1008,8 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
}
else if( m_indexPointArray == 1)
{
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1026,8 +1026,8 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
return;
}
- if ( e->button() == RightButton && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_QUADRICBEZIERCURVE
- || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE )
+ if ( e->button() == Qt::RightButton && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_TQUADRICBEZIERCURVE
+ || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE )
&& !m_pointArray.isNull() && m_drawCubicBezierCurve ) {
if ( m_drawLineWithCubicBezierCurve ) {
KoPoint point = snapPoint( docPoint );
@@ -1042,17 +1042,17 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
endDrawCubicBezierCurve();
- m_gl.repaintAfterSnapping();
+ m_gl.tqrepaintAfterSnapping();
return;
}
- if ( e->button() == RightButton && toolEditMode == TEM_MOUSE ) {
+ if ( e->button() == Qt::RightButton && toolEditMode == TEM_MOUSE ) {
KPrObject * obj = getObjectAt( docPoint );
if ( obj )
{
kpobject = obj;
- QPoint pnt = QCursor::pos();
+ TQPoint pnt = TQCursor::pos();
mousePressed = false;
m_view->disableAutoScroll();
bool state=!( e->state() & ShiftButton ) && !( e->state() & ControlButton ) && !kpobject->isSelected();
@@ -1062,7 +1062,7 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
selectObj( kpobject );
objectPopup( kpobject, pnt );
} else {
- QPoint pnt = QCursor::pos();
+ TQPoint pnt = TQCursor::pos();
m_view->openPopupMenuMenuPage( pnt );
m_view->disableAutoScroll();
mousePressed = false;
@@ -1070,30 +1070,30 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
modType = MT_NONE;
}
- else if( e->button() == RightButton && toolEditMode == TEM_ZOOM ) {
- QPoint pnt = QCursor::pos();
+ else if( e->button() == Qt::RightButton && toolEditMode == TEM_ZOOM ) {
+ TQPoint pnt = TQCursor::pos();
mousePressed = false;
m_view->disableAutoScroll();
m_view->openPopupMenuZoom( pnt );
}
- else if( e->button() == RightButton && toolEditMode != TEM_MOUSE ) {
+ else if( e->button() == Qt::RightButton && toolEditMode != TEM_MOUSE ) {
//deactivate tools when you click on right button
setToolEditMode( TEM_MOUSE );
}
} else {
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
if ( m_drawMode ) {
setCursor( KPrUtils::penCursor() );
m_drawLineInDrawMode = true;
m_drawModeLineIndex = 0;
- m_drawModeLines.append( QPointArray() );
+ m_drawModeLines.append( TQPointArray() );
m_drawModeLines[m_drawModeLines.count() - 1].putPoints( m_drawModeLineIndex++, 1, e->x(), e->y() );
}
else
m_view->screenNext();
- } else if ( e->button() == MidButton )
+ } else if ( e->button() == Qt::MidButton )
m_view->screenPrev();
- else if ( e->button() == RightButton ) {
+ else if ( e->button() == Qt::RightButton ) {
if ( !m_drawMode && !spManualSwitch() )
{
finishObjectEffects();
@@ -1102,7 +1102,7 @@ void KPrCanvas::mousePressEvent( QMouseEvent *e )
}
setCursor( arrowCursor );
- QPoint pnt = QCursor::pos();
+ TQPoint pnt = TQCursor::pos();
int ret = m_presMenu->exec( pnt );
// we have to continue the timer if the menu was canceled and we draw mode is not active
if ( ret == -1 && !m_presMenu->isItemChecked( PM_DM ) && !spManualSwitch() )
@@ -1122,7 +1122,7 @@ KoRect KPrCanvas::getAlignBoundingRect() const
{
KoRect boundingRect;
- QPtrListIterator<KPrObject> it( m_activePage->objectList() );
+ TQPtrListIterator<KPrObject> it( m_activePage->objectList() );
for ( ; it.current() ; ++it )
{
if ( it.current() == m_view->kPresenterDoc()->header() ||
@@ -1136,12 +1136,12 @@ KoRect KPrCanvas::getAlignBoundingRect() const
return boundingRect;
}
-void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
+void KPrCanvas::mouseReleaseEvent( TQMouseEvent *e )
{
if ( editMode && m_view->kPresenterDoc()->showGuideLines() && toolEditMode == TEM_MOUSE && m_gl.mouseReleaseEvent( e ) )
return;
- QPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
+ TQPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
if(m_currentTextObjectView)
{
m_currentTextObjectView->mouseReleaseEvent( e, contentsPoint );
@@ -1151,7 +1151,7 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
return;
}
- if ( e->button() != LeftButton )
+ if ( e->button() != Qt::LeftButton )
return;
if ( m_drawMode ) {
@@ -1160,12 +1160,12 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
return;
}
- QPtrList<KPrObject> _objects;
+ TQPtrList<KPrObject> _objects;
_objects.setAutoDelete( false );
if ( ( m_drawPolyline && ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE ) )
- || ( m_drawCubicBezierCurve && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_QUADRICBEZIERCURVE
- || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) ) ) {
+ || ( m_drawCubicBezierCurve && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_TQUADRICBEZIERCURVE
+ || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) ) ) {
return;
}
@@ -1178,10 +1178,10 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
case MT_NONE: {
if ( drawRubber ) {
// used for selecting multiple object in with the mouse
- QPainter p;
+ TQPainter p;
p.begin( this );
p.setRasterOp( NotROP );
- p.setPen( QPen( black, 0, DotLine ) );
+ p.setPen( TQPen( black, 0, DotLine ) );
p.translate( -diffx(), -diffy() );
p.drawRect( m_view->zoomHandler()->zoomRect( m_rubber ) );
p.end();
@@ -1189,7 +1189,7 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
m_rubber = m_rubber.normalize();
- QPtrListIterator<KPrObject> it( getObjectList() );
+ TQPtrListIterator<KPrObject> it( getObjectList() );
for ( ; it.current() ; ++it )
{
if ( it.current()->intersects( m_rubber ) )
@@ -1202,7 +1202,7 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
}
if ( mouseSelectedObject )
- _repaint( false );
+ _tqrepaint( false );
emit objectSelectedChanged();
}
} break;
@@ -1215,7 +1215,7 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
m_view->kPresenterDoc()->addCommand( cmd );
} else
{
- m_activePage->repaintObj();
+ m_activePage->tqrepaintObj();
}
m_isMoving = false;
}
@@ -1262,10 +1262,10 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
drawContour = FALSE;
if( modType == MT_NONE && drawRubber )
{
- QPainter p;
+ TQPainter p;
p.begin( this );
p.setRasterOp( NotROP );
- p.setPen( QPen( black, 0, DotLine ) );
+ p.setPen( TQPen( black, 0, DotLine ) );
p.translate( -diffx(), -diffy() );
p.drawRect( m_view->zoomHandler()->zoomRect( m_rubber ) );
p.end();
@@ -1287,7 +1287,7 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
if ( !m_rotateObject )
break;
if ( m_angleBeforeRotate != m_rotateObject->getAngle() ) {
- QPtrList<KPrObject> objects;
+ TQPtrList<KPrObject> objects;
objects.append( m_rotateObject );
/* As the object is allready rotated set the angle to
@@ -1374,12 +1374,12 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
default: break;
}
- m_gl.repaintAfterSnapping();
+ m_gl.tqrepaintAfterSnapping();
emit objectSelectedChanged();
if ( toolEditMode != TEM_MOUSE && editMode )
- repaint( false );
+ tqrepaint( false );
m_view->disableAutoScroll();
mousePressed = false;
@@ -1388,25 +1388,25 @@ void KPrCanvas::mouseReleaseEvent( QMouseEvent *e )
mouseMoveEvent( e );
}
-void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
+void KPrCanvas::mouseMoveEvent( TQMouseEvent *e )
{
if ( editMode && m_view->kPresenterDoc()->showGuideLines() && toolEditMode == TEM_MOUSE && m_gl.mouseMoveEvent( e ) )
return;
- QPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
+ TQPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
KoPoint docPoint = m_view->zoomHandler()->unzoomPoint( contentsPoint );
if(m_currentTextObjectView)
{
if (m_currentTextObjectView->isLinkVariable(e->pos()) )
{
- setCursor(Qt::PointingHandCursor);
+ setCursor(TQt::PointingHandCursor);
return;
}
setCursor( arrowCursor );
KPrTextObject *txtObj=m_currentTextObjectView->kpTextObject();
Q_ASSERT(txtObj);
- if(txtObj->contains( docPoint )&&mousePressed)
+ if(txtObj->tqcontains( docPoint )&&mousePressed)
{
KoPoint pos = docPoint - txtObj->innerRect().topLeft();
m_currentTextObjectView->mouseMoveEvent( e, m_view->zoomHandler()->ptToLayoutUnitPix( pos ) ); // in LU pixels
@@ -1420,12 +1420,12 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
if(tmp_kpobject && tmp_kpobject->getType() == OT_TEXT)
{
KPrTextObject *kptextobject = static_cast<KPrTextObject*>( tmp_kpobject );
- QPoint iPoint = kptextobject->viewToInternal( e->pos(), this );
+ TQPoint iPoint = kptextobject->viewToInternal( e->pos(), this );
KoLinkVariable* linkVar = dynamic_cast<KoLinkVariable *>( kptextobject->textObject()->variableAtPoint( iPoint ) );
if ( linkVar )
{
- setCursor(Qt::PointingHandCursor);
+ setCursor(TQt::PointingHandCursor);
return;
}
}
@@ -1469,10 +1469,10 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
if ( modType == MT_NONE ) {
if ( drawRubber )
{
- QPainter p;
+ TQPainter p;
p.begin( this );
p.setRasterOp( NotROP );
- p.setPen( QPen( black, 0, DotLine ) );
+ p.setPen( TQPen( black, 0, DotLine ) );
p.translate( -diffx(), -diffy() );
p.drawRect( m_view->zoomHandler()->zoomRect( m_rubber ) );
m_rubber.setRight( docPoint.x() );
@@ -1512,10 +1512,10 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
} break;
case TEM_ZOOM : {
if ( drawRubber ) {
- QPainter p;
+ TQPainter p;
p.begin( this );
p.setRasterOp( NotROP );
- p.setPen( QPen( black, 0, DotLine ) );
+ p.setPen( TQPen( black, 0, DotLine ) );
p.translate( -diffx(), -diffy() );
p.drawRect( m_view->zoomHandler()->zoomRect( m_rubber ) );
m_rubber.setRight( docPoint.x() );
@@ -1542,7 +1542,7 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
angle -= 360;
m_rotateObject->rotate( angle );
- _repaint( m_rotateObject );
+ _tqrepaint( m_rotateObject );
}
}break;
case INS_AUTOFORM:
@@ -1554,8 +1554,8 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
case INS_TABLE:
case INS_TEXT:
{
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1570,8 +1570,8 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
mouseSelectedObject = true;
} break;
case INS_ELLIPSE: {
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1586,8 +1586,8 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
mouseSelectedObject = true;
} break;
case INS_RECT: {
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1602,8 +1602,8 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
mouseSelectedObject = true;
} break;
case INS_LINE: {
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1627,8 +1627,8 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
mouseSelectedObject = true;
} break;
case INS_PIE: {
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1648,15 +1648,15 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
m_endPoint = snapPoint( docPoint );
if ( m_endPoint != m_startPoint )
{
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
if ( e->state() & AltButton )
{
- QPointArray pointArray = m_pointArray.zoomPointArray( m_view->zoomHandler() );
+ TQPointArray pointArray = m_pointArray.zoomPointArray( m_view->zoomHandler() );
// erase
p.drawPolyline( pointArray );
m_pointArray.translate( m_endPoint.x() - m_startPoint.x(),
@@ -1680,8 +1680,8 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
mouseSelectedObject = true;
} break;
case INS_POLYLINE: case INS_CLOSED_POLYLINE: {
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1694,7 +1694,7 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
if ( e->state() & AltButton )
{
- QPointArray pointArray = m_pointArray.zoomPointArray( m_view->zoomHandler() );
+ TQPointArray pointArray = m_pointArray.zoomPointArray( m_view->zoomHandler() );
// erase
p.drawPolyline( pointArray );
m_pointArray.translate( m_endPoint.x() - oldEndPoint.x(),
@@ -1712,10 +1712,10 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
mouseSelectedObject = true;
} break;
- case INS_CUBICBEZIERCURVE: case INS_QUADRICBEZIERCURVE:
- case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_QUADRICBEZIERCURVE:{
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ case INS_CUBICBEZIERCURVE: case INS_TQUADRICBEZIERCURVE:
+ case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_TQUADRICBEZIERCURVE:{
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1766,7 +1766,7 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
double _thirdY = m_symmetricEndPoint.y() - _diffY;
m_CubicBezierThirdPoint = KoPoint( _thirdX, _thirdY );
- if ( toolEditMode == INS_QUADRICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) {
+ if ( toolEditMode == INS_TQUADRICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) {
_secondX = _thirdX;
_secondY = _thirdY;
m_CubicBezierSecondPoint = KoPoint( _secondX, _secondY );
@@ -1783,8 +1783,8 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
mouseSelectedObject = true;
} break;
case INS_POLYGON: {
- QPainter p( this );
- p.setPen( QPen( black, 1, SolidLine ) );
+ TQPainter p( this );
+ p.setPen( TQPen( black, 1, SolidLine ) );
p.setBrush( NoBrush );
p.setRasterOp( NotROP );
p.translate( -diffx(), -diffy() );
@@ -1802,7 +1802,7 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
}
}
} else if ( !editMode && m_drawMode && m_drawLineInDrawMode ) {
- QPainter p;
+ TQPainter p;
p.begin( this );
p.setPen( m_view->kPresenterDoc()->presPen() );
p.drawLine( m_drawModeLines[m_drawModeLines.count() - 1].point( m_drawModeLineIndex - 1 ), e->pos() );
@@ -1814,27 +1814,27 @@ void KPrCanvas::mouseMoveEvent( QMouseEvent *e )
setCursor( blankCursor );
}
-void KPrCanvas::mouseDoubleClickEvent( QMouseEvent *e )
+void KPrCanvas::mouseDoubleClickEvent( TQMouseEvent *e )
{
if(!m_view->koDocument()->isReadWrite())
return;
- QPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
+ TQPoint contentsPoint( e->pos().x()+diffx(), e->pos().y()+diffy() );
KoPoint docPoint = m_view->zoomHandler()->unzoomPoint( contentsPoint );
if(m_currentTextObjectView)
{
KPrTextObject *txtObj=m_currentTextObjectView->kpTextObject();
Q_ASSERT(txtObj);
- if(txtObj->contains( docPoint ))
+ if(txtObj->tqcontains( docPoint ))
{
KoPoint pos = docPoint - txtObj->getOrig();
- //pos=m_view->zoomHandler()->pixelToLayoutUnit(QPoint(pos.x(),pos.y()));
+ //pos=m_view->zoomHandler()->pixelToLayoutUnit(TQPoint(pos.x(),pos.y()));
m_currentTextObjectView->mouseDoubleClickEvent( e, m_view->zoomHandler()->ptToLayoutUnitPix( pos ) );
return;
}
}
//disallow activating objects outside the "page"
- if ( !m_activePage->getPageRect().contains(docPoint))
+ if ( !m_activePage->getPageRect().tqcontains(docPoint))
return;
@@ -1890,9 +1890,9 @@ void KPrCanvas::mouseDoubleClickEvent( QMouseEvent *e )
}
}
-void KPrCanvas::drawPieObject( QPainter *p, const KoRect & rect )
+void KPrCanvas::drawPieObject( TQPainter *p, const KoRect & rect )
{
- QRect pRect( m_view->zoomHandler()->zoomRect( rect ) );
+ TQRect pRect( m_view->zoomHandler()->zoomRect( rect ) );
switch ( m_view->getPieType() ) {
case PT_PIE:
p->drawPie( pRect.x(), pRect.y(), pRect.width() - 2,
@@ -1911,7 +1911,7 @@ void KPrCanvas::drawPieObject( QPainter *p, const KoRect & rect )
}
-void KPrCanvas::wheelEvent( QWheelEvent *e )
+void KPrCanvas::wheelEvent( TQWheelEvent *e )
{
if ( !editMode && !m_drawMode ) {
if ( e->delta() == -120 ) // wheel down
@@ -1924,45 +1924,45 @@ void KPrCanvas::wheelEvent( QWheelEvent *e )
emit sigMouseWheelEvent( e );
}
-void KPrCanvas::keyPressEvent( QKeyEvent *e )
+void KPrCanvas::keyPressEvent( TQKeyEvent *e )
{
if ( editMode && m_view->kPresenterDoc()->showGuideLines() && m_gl.keyPressEvent( e ) )
return;
if ( !editMode ) {
switch ( e->key() ) {
- case Qt::Key_Space: case Key_Right: case Key_Down:
+ case TQt::Key_Space: case Key_Right: case Key_Down:
setSwitchingMode( false );
m_view->screenNext();
break;
- case Qt::Key_Next:
+ case TQt::Key_Next:
setSwitchingMode( false );
m_view->screenNext( true );
break;
- case Qt::Key_Backspace: case Key_Left: case Key_Up:
+ case TQt::Key_Backspace: case Key_Left: case Key_Up:
setSwitchingMode( false );
finishObjectEffects();
finishPageEffect( true );
m_view->screenPrev();
break;
- case Qt::Key_Prior:
+ case TQt::Key_Prior:
setSwitchingMode( false );
finishObjectEffects();
finishPageEffect( true );
m_view->screenPrev( true );
break;
- case Qt::Key_Escape: case Key_Q: case Key_X:
+ case TQt::Key_Escape: case Key_Q: case Key_X:
setSwitchingMode( false );
finishObjectEffects();
finishPageEffect( true );
m_view->screenStop();
break;
- case Qt::Key_G:
+ case TQt::Key_G:
// setSwitchingMode( false ) not needed as it is allready done in slotGotoPage;
if ( !spManualSwitch() )
m_view->stopAutoPresTimer();
slotGotoPage();
break;
- case Qt::Key_Home: // go to first page
+ case TQt::Key_Home: // go to first page
setSwitchingMode( false );
presGotoFirstPage();
if ( !spManualSwitch() ) {
@@ -1970,7 +1970,7 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
m_setPageTimer = true;
}
break;
- case Qt::Key_End: // go to last page
+ case TQt::Key_End: // go to last page
setSwitchingMode( false );
if ( m_presentationSlidesIterator != m_presentationSlides.end() ) {
gotoPage( *(--m_presentationSlides.end()) );
@@ -1983,7 +1983,7 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
default: break;
}
} else if ( m_editObject ) {
- if ( e->key() == Qt::Key_Escape ) {
+ if ( e->key() == TQt::Key_Escape ) {
exitEditMode();
}
else if ( m_currentTextObjectView )
@@ -1998,16 +1998,16 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
{
switch ( e->key() )
{
- case Qt::Key_Next:
+ case TQt::Key_Next:
m_view->nextPage();
break;
- case Qt::Key_Prior:
+ case TQt::Key_Prior:
m_view->prevPage();
break;
- case Qt::Key_Home: // go to first page
+ case TQt::Key_Home: // go to first page
m_view->screenFirst();
break;
- case Qt::Key_End: // go to first page
+ case TQt::Key_End: // go to first page
m_view->screenLast();
break;
default:
@@ -2023,8 +2023,8 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
if ( e->state() & ControlButton )
{
- offsetx = QMAX(1,m_view->zoomHandler()->zoomItX(10));
- offsety = QMAX(1,m_view->zoomHandler()->zoomItY(10));
+ offsetx = TQMAX(1,m_view->zoomHandler()->zoomItX(10));
+ offsety = TQMAX(1,m_view->zoomHandler()->zoomItY(10));
}
if ( !m_keyPressEvent )
@@ -2033,27 +2033,27 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
}
switch ( e->key() )
{
- case Qt::Key_Up:
+ case TQt::Key_Up:
m_keyPressEvent = true;
moveObjectsByKey( 0, -offsety );
break;
- case Qt::Key_Down:
+ case TQt::Key_Down:
m_keyPressEvent = true;
moveObjectsByKey( 0, offsety );
break;
- case Qt::Key_Right:
+ case TQt::Key_Right:
m_keyPressEvent = true;
moveObjectsByKey( offsetx, 0 );
break;
- case Qt::Key_Left:
+ case TQt::Key_Left:
m_keyPressEvent = true;
moveObjectsByKey( -offsetx, 0 );
break;
- case Qt::Key_Delete:
+ case TQt::Key_Delete:
case Key_Backspace:
m_view->editDelete();
break;
- case Qt::Key_Escape:
+ case TQt::Key_Escape:
{
if ( mousePressed && toolEditMode == TEM_MOUSE )
{
@@ -2068,12 +2068,12 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
case MT_RESIZE_RU:
case MT_RESIZE_RD:
{
- QRect oldBoundingRect = m_view->zoomHandler()->zoomRect( m_resizeObject->getRepaintRect() );
+ TQRect oldBoundingRect = m_view->zoomHandler()->zoomRect( m_resizeObject->getRepaintRect() );
m_resizeObject->setOrig( m_rectBeforeResize.topLeft() );
m_resizeObject->setSize( m_rectBeforeResize.size() );
drawContour = false;
- m_view->kPresenterDoc()->repaint( oldBoundingRect );
- m_view->kPresenterDoc()->repaint( m_resizeObject );
+ m_view->kPresenterDoc()->tqrepaint( oldBoundingRect );
+ m_view->kPresenterDoc()->tqrepaint( m_resizeObject );
m_ratio = 0.0;
m_resizeObject = 0;
m_isResizing = false;
@@ -2104,13 +2104,13 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
setToolEditMode( TEM_MOUSE );
break;
}
- case Qt::Key_Shift:
+ case TQt::Key_Shift:
{
bool oldChangeSnap = m_disableSnapping;
- m_disableSnapping = e->key() == Qt::Key_Shift;
+ m_disableSnapping = e->key() == TQt::Key_Shift;
if ( !oldChangeSnap && m_disableSnapping )
{
- m_gl.repaintAfterSnapping();
+ m_gl.tqrepaintAfterSnapping();
}
// undo snapping for move by mouse
if ( e->state() & Qt::LeftButton && m_isMoving )
@@ -2125,25 +2125,25 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
else
{
switch ( e->key() ) {
- case Qt::Key_Down:
+ case TQt::Key_Down:
m_view->getVScrollBar()->addLine();
break;
- case Qt::Key_Up:
+ case TQt::Key_Up:
m_view->getVScrollBar()->subtractLine();
break;
- case Qt::Key_Right:
+ case TQt::Key_Right:
m_view->getHScrollBar()->addLine();
break;
- case Qt::Key_Left:
+ case TQt::Key_Left:
m_view->getHScrollBar()->subtractLine();
break;
- case Qt::Key_Tab:
+ case TQt::Key_Tab:
selectNext();
break;
- case Qt::Key_Backtab:
+ case TQt::Key_Backtab:
selectPrev();
break;
- case Qt::Key_Escape:
+ case TQt::Key_Escape:
if ( toolEditMode == TEM_ZOOM )
setToolEditMode( TEM_MOUSE );
break;
@@ -2153,7 +2153,7 @@ void KPrCanvas::keyPressEvent( QKeyEvent *e )
}
}
-void KPrCanvas::keyReleaseEvent( QKeyEvent *e )
+void KPrCanvas::keyReleaseEvent( TQKeyEvent *e )
{
if ( editMode && m_currentTextObjectView )
m_currentTextObjectView->keyReleaseEvent( e );
@@ -2161,7 +2161,7 @@ void KPrCanvas::keyReleaseEvent( QKeyEvent *e )
{
if ( mouseSelectedObject )
{
- if(e->key()==Qt::Key_Up || e->key()==Key_Down || e->key()==Key_Right || e->key()==Key_Left)
+ if(e->key()==TQt::Key_Up || e->key()==Key_Down || e->key()==Key_Right || e->key()==Key_Left)
{
if ( !e->isAutoRepeat() )
{
@@ -2177,7 +2177,7 @@ void KPrCanvas::keyReleaseEvent( QKeyEvent *e )
}
}
-void KPrCanvas::imStartEvent( QIMEvent * e )
+void KPrCanvas::imStartEvent( TQIMEvent * e )
{
if ( m_editObject && m_currentTextObjectView )
{
@@ -2188,7 +2188,7 @@ void KPrCanvas::imStartEvent( QIMEvent * e )
}
}
-void KPrCanvas::imComposeEvent( QIMEvent * e )
+void KPrCanvas::imComposeEvent( TQIMEvent * e )
{
if ( m_editObject && m_currentTextObjectView )
{
@@ -2197,7 +2197,7 @@ void KPrCanvas::imComposeEvent( QIMEvent * e )
}
}
-void KPrCanvas::imEndEvent( QIMEvent * e )
+void KPrCanvas::imEndEvent( TQIMEvent * e )
{
if ( m_editObject && m_currentTextObjectView )
{
@@ -2206,14 +2206,14 @@ void KPrCanvas::imEndEvent( QIMEvent * e )
}
}
-void KPrCanvas::resizeEvent( QResizeEvent *e )
+void KPrCanvas::resizeEvent( TQResizeEvent *e )
{
if ( editMode )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
}
else
- QWidget::resizeEvent( new QResizeEvent( KGlobalSettings::desktopGeometry(this).size(),
+ TQWidget::resizeEvent( new TQResizeEvent( KGlobalSettings::desktopGeometry(this).size(),
e->oldSize() ) );
buffer.resize( size() );
}
@@ -2222,7 +2222,7 @@ bool KPrCanvas::close( bool alsoDelete )
{
if ( editMode )
{
- return QWidget::close(alsoDelete);
+ return TQWidget::close(alsoDelete);
}
else
{
@@ -2243,7 +2243,7 @@ KPrObject * KPrCanvas::getObjectAt( const KoPoint &pos, bool withoutProtected )
void KPrCanvas::selectObj( KPrObject *kpobject )
{
kpobject->setSelected( true );
- _repaint( kpobject );
+ _tqrepaint( kpobject );
emit objectSelectedChanged();
mouseSelectedObject = true;
@@ -2252,7 +2252,7 @@ void KPrCanvas::selectObj( KPrObject *kpobject )
void KPrCanvas::deSelectObj( KPrObject *kpobject )
{
kpobject->setSelected( false );
- _repaint( kpobject );
+ _tqrepaint( kpobject );
if ( !m_activePage->isOneObjectSelected() )
{
@@ -2263,7 +2263,7 @@ void KPrCanvas::deSelectObj( KPrObject *kpobject )
void KPrCanvas::selectAllObj()
{
- QPtrListIterator<KPrObject> it( m_activePage->objectList() );
+ TQPtrListIterator<KPrObject> it( m_activePage->objectList() );
for ( ; it.current() ; ++it )
{
if ( !objectIsAHeaderFooterHidden(it.current()) )
@@ -2271,7 +2271,7 @@ void KPrCanvas::selectAllObj()
}
mouseSelectedObject = true;
- _repaint( false );
+ _tqrepaint( false );
emit objectSelectedChanged();
}
@@ -2310,12 +2310,12 @@ void KPrCanvas::setupMenus()
Q_CHECK_PTR( m_presMenu );
m_presMenu->setCheckable( true );
m_presMenu->insertTitle( i18n( "Slide Show" ) );
- m_presMenu->insertItem( i18n( "&Continue" ), this, SLOT( setSwitchingMode() ) );
- PM_DM = m_presMenu->insertItem( i18n( "&Drawing Mode" ), this, SLOT( setDrawingMode() ) );
+ m_presMenu->insertItem( i18n( "&Continue" ), this, TQT_SLOT( setSwitchingMode() ) );
+ PM_DM = m_presMenu->insertItem( i18n( "&Drawing Mode" ), this, TQT_SLOT( setDrawingMode() ) );
m_presMenu->insertSeparator();
- m_presMenu->insertItem( SmallIcon("goto"), i18n( "&Goto Slide..." ), this, SLOT( slotGotoPage() ) );
+ m_presMenu->insertItem( SmallIcon("goto"), i18n( "&Goto Slide..." ), this, TQT_SLOT( slotGotoPage() ) );
m_presMenu->insertSeparator();
- m_presMenu->insertItem( i18n( "&End" ), this, SLOT( slotExitPres() ) );
+ m_presMenu->insertItem( i18n( "&End" ), this, TQT_SLOT( slotExitPres() ) );
m_presMenu->setItemChecked( PM_DM, false );
m_presMenu->setMouseTracking( true );
}
@@ -2354,9 +2354,9 @@ bool KPrCanvas::exportPage( int nPage,
int quality )
{
bool res = false;
- const QCursor oldCursor( cursor() );
+ const TQCursor oldCursor( cursor() );
setCursor( waitCursor );
- QPixmap pix( nWidth, nHeight );
+ TQPixmap pix( nWidth, nHeight );
drawPageInPix( pix, nPage, 0, true, nWidth, nHeight );
if( !pix.isNull() ){
// Depending on the desired target size due to rounding
@@ -2365,7 +2365,7 @@ bool KPrCanvas::exportPage( int nPage,
// remove the additional columns/rows. This can be done
// since KPresenter is leaving a minimal border below/at
// the right of the image anyway.
- const QSize desiredSize(nWidth, nHeight);
+ const TQSize desiredSize(nWidth, nHeight);
if( desiredSize != pix.size() )
pix.resize( desiredSize );
// save the pixmap to the desired file
@@ -2377,7 +2377,7 @@ bool KPrCanvas::exportPage( int nPage,
if( !bLocalFile )
tmpFile->setAutoDelete( true );
if( bLocalFile || 0 == tmpFile->status() ){
- QFile file( bLocalFile ? fileURL.path(0) : tmpFile->name() );
+ TQFile file( bLocalFile ? fileURL.path(0) : tmpFile->name() );
if ( file.open( IO_ReadWrite ) ) {
res = pix.save( &file, format, quality );
file.close();
@@ -2403,10 +2403,10 @@ void KPrCanvas::savePicture()
void KPrCanvas::setTextFormat(const KoTextFormat &format, int flags)
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
KMacroCommand* macroCmd = new KMacroCommand( i18n("Change Text Font") );
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
for ( ; it.current() ; ++it ) {
KCommand *cmd = it.current()->setFormatCommand(&format, flags, true);
@@ -2416,11 +2416,11 @@ void KPrCanvas::setTextFormat(const KoTextFormat &format, int flags)
m_view->kPresenterDoc()->addCommand( macroCmd );
}
-void KPrCanvas::setTextColor( const QColor &color )
+void KPrCanvas::setTextColor( const TQColor &color )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = new KMacroCommand( i18n("Set Text Color") );
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setTextColorCommand( color );
@@ -2430,11 +2430,11 @@ void KPrCanvas::setTextColor( const QColor &color )
m_view->kPresenterDoc()->addCommand( macroCmd );
}
-void KPrCanvas::setTextBackgroundColor( const QColor &color )
+void KPrCanvas::setTextBackgroundColor( const TQColor &color )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setTextBackgroundColorCommand( color );
@@ -2451,9 +2451,9 @@ void KPrCanvas::setTextBackgroundColor( const QColor &color )
void KPrCanvas::setTextBold( bool b )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setBoldCommand( b );
@@ -2470,9 +2470,9 @@ void KPrCanvas::setTextBold( bool b )
void KPrCanvas::setTextItalic( bool b )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setItalicCommand( b );
@@ -2489,9 +2489,9 @@ void KPrCanvas::setTextItalic( bool b )
void KPrCanvas::setTextUnderline( bool b )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setUnderlineCommand( b );
@@ -2508,10 +2508,10 @@ void KPrCanvas::setTextUnderline( bool b )
void KPrCanvas::setTextStrikeOut( bool b )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
KMacroCommand* macroCmd = 0L;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
for ( ; it.current() ; ++it ) {
KCommand *cmd = it.current()->setStrikeOutCommand( b );
if ( cmd )
@@ -2525,12 +2525,12 @@ void KPrCanvas::setTextStrikeOut( bool b )
m_view->kPresenterDoc()->addCommand( macroCmd );
}
-void KPrCanvas::setTextFamily( const QString &f )
+void KPrCanvas::setTextFamily( const TQString &f )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
KMacroCommand* macroCmd = 0L;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setFamilyCommand( f );
if ( cmd )
@@ -2546,10 +2546,10 @@ void KPrCanvas::setTextFamily( const QString &f )
void KPrCanvas::setTextPointSize( int s )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
KMacroCommand* macroCmd = 0L;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setPointSizeCommand( s );
if ( cmd )
@@ -2566,9 +2566,9 @@ void KPrCanvas::setTextPointSize( int s )
void KPrCanvas::setTextSubScript( bool b )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setTextSubScriptCommand( b );
@@ -2585,9 +2585,9 @@ void KPrCanvas::setTextSubScript( bool b )
void KPrCanvas::setTextSuperScript( bool b )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setTextSuperScriptCommand( b );
@@ -2604,9 +2604,9 @@ void KPrCanvas::setTextSuperScript( bool b )
void KPrCanvas::setTextDefaultFormat( )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setDefaultFormatCommand( );
@@ -2623,9 +2623,9 @@ void KPrCanvas::setTextDefaultFormat( )
void KPrCanvas::setIncreaseFontSize()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
int size = it.current()->currentFormat()->pointSize();
KMacroCommand* macroCmd =0L;
for ( ; it.current() ; ++it ) {
@@ -2643,9 +2643,9 @@ void KPrCanvas::setIncreaseFontSize()
void KPrCanvas::setDecreaseFontSize()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
int size = it.current()->currentFormat()->pointSize();
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
@@ -2663,9 +2663,9 @@ void KPrCanvas::setDecreaseFontSize()
void KPrCanvas::setTextAlign( int align )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setAlignCommand(align);
@@ -2682,9 +2682,9 @@ void KPrCanvas::setTextAlign( int align )
void KPrCanvas::setTabList( const KoTabulatorList & tabList )
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setTabListCommand(tabList );
@@ -2701,17 +2701,17 @@ void KPrCanvas::setTabList( const KoTabulatorList & tabList )
void KPrCanvas::setTextDepthPlus()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
double leftMargin=0.0;
if(!lst.isEmpty())
- leftMargin=lst.first()->currentParagLayoutFormat()->margins[QStyleSheetItem::MarginLeft];
+ leftMargin=lst.first()->currentParagLayoutFormat()->margins[TQStyleSheetItem::MarginLeft];
double indent = m_view->kPresenterDoc()->getIndentValue();
double newVal = leftMargin + indent;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
- KCommand* cmd = it.current()->setMarginCommand(QStyleSheetItem::MarginLeft, newVal);
+ KCommand* cmd = it.current()->setMarginCommand(TQStyleSheetItem::MarginLeft, newVal);
if ( cmd )
{
if ( !macroCmd )
@@ -2723,25 +2723,25 @@ void KPrCanvas::setTextDepthPlus()
m_view->kPresenterDoc()->addCommand( macroCmd );
if(!lst.isEmpty())
{
- const KoParagLayout *layout=lst.first()->currentParagLayoutFormat();
- m_view->showRulerIndent( layout->margins[QStyleSheetItem::MarginLeft], layout->margins[QStyleSheetItem::MarginFirstLine],
- layout->margins[QStyleSheetItem::MarginRight], lst.first()->rtl());
+ const KoParagLayout *tqlayout=lst.first()->currentParagLayoutFormat();
+ m_view->showRulerIndent( tqlayout->margins[TQStyleSheetItem::MarginLeft], tqlayout->margins[TQStyleSheetItem::MarginFirstLine],
+ tqlayout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl());
}
}
void KPrCanvas::setTextDepthMinus()
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
double leftMargin=0.0;
if(!lst.isEmpty())
- leftMargin=lst.first()->currentParagLayoutFormat()->margins[QStyleSheetItem::MarginLeft];
+ leftMargin=lst.first()->currentParagLayoutFormat()->margins[TQStyleSheetItem::MarginLeft];
double indent = m_view->kPresenterDoc()->getIndentValue();
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
double newVal = leftMargin - indent;
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
- KCommand* cmd = it.current()->setMarginCommand(QStyleSheetItem::MarginLeft, QMAX( newVal, 0 ));
+ KCommand* cmd = it.current()->setMarginCommand(TQStyleSheetItem::MarginLeft, TQMAX( newVal, 0 ));
if ( cmd )
{
if ( !macroCmd )
@@ -2753,20 +2753,20 @@ void KPrCanvas::setTextDepthMinus()
m_view->kPresenterDoc()->addCommand( macroCmd );
if(!lst.isEmpty())
{
- const KoParagLayout *layout=lst.first()->currentParagLayoutFormat();
- m_view->showRulerIndent( layout->margins[QStyleSheetItem::MarginLeft], layout->margins[QStyleSheetItem::MarginFirstLine],
- layout->margins[QStyleSheetItem::MarginRight], lst.first()->rtl());
+ const KoParagLayout *tqlayout=lst.first()->currentParagLayoutFormat();
+ m_view->showRulerIndent( tqlayout->margins[TQStyleSheetItem::MarginLeft], tqlayout->margins[TQStyleSheetItem::MarginFirstLine],
+ tqlayout->margins[TQStyleSheetItem::MarginRight], lst.first()->rtl());
}
}
void KPrCanvas::setNewFirstIndent(double _firstIndent)
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
- KCommand* cmd = it.current()->setMarginCommand(QStyleSheetItem::MarginFirstLine, _firstIndent);
+ KCommand* cmd = it.current()->setMarginCommand(TQStyleSheetItem::MarginFirstLine, _firstIndent);
if ( cmd )
{
if ( !macroCmd )
@@ -2780,12 +2780,12 @@ void KPrCanvas::setNewFirstIndent(double _firstIndent)
void KPrCanvas::setNewLeftIndent(double _leftIndent)
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
- KCommand* cmd = it.current()->setMarginCommand(QStyleSheetItem::MarginLeft, _leftIndent);
+ KCommand* cmd = it.current()->setMarginCommand(TQStyleSheetItem::MarginLeft, _leftIndent);
if ( cmd )
{
if ( !macroCmd )
@@ -2799,12 +2799,12 @@ void KPrCanvas::setNewLeftIndent(double _leftIndent)
void KPrCanvas::setNewRightIndent(double _rightIndent)
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
- KCommand* cmd = it.current()->setMarginCommand(QStyleSheetItem::MarginRight, _rightIndent);
+ KCommand* cmd = it.current()->setMarginCommand(TQStyleSheetItem::MarginRight, _rightIndent);
if ( cmd )
{
if ( !macroCmd )
@@ -2818,9 +2818,9 @@ void KPrCanvas::setNewRightIndent(double _rightIndent)
/*void KPrCanvas::setTextCounter(KoParagCounter counter)
{
- QPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
+ TQPtrList<KoTextFormatInterface> lst = applicableTextInterfaces();
if ( lst.isEmpty() ) return;
- QPtrListIterator<KoTextFormatInterface> it( lst );
+ TQPtrListIterator<KoTextFormatInterface> it( lst );
KMacroCommand* macroCmd = 0L;
for ( ; it.current() ; ++it ) {
KCommand* cmd = it.current()->setCounterCommand(counter );
@@ -2863,9 +2863,9 @@ bool KPrCanvas::haveASelectedPixmapObj() const
return m_activePage->haveASelectedPixmapObj();
}
-QPtrList<KPrTextObject> KPrCanvas::applicableTextObjects() const
+TQPtrList<KPrTextObject> KPrCanvas::applicableTextObjects() const
{
- QPtrList<KPrTextObject> lst;
+ TQPtrList<KPrTextObject> lst;
// If we're editing a text object, then that's the one we return
if ( m_currentTextObjectView )
lst.append( m_currentTextObjectView->kpTextObject() );
@@ -2874,10 +2874,10 @@ QPtrList<KPrTextObject> KPrCanvas::applicableTextObjects() const
return lst;
}
-QPtrList<KoTextFormatInterface> KPrCanvas::applicableTextInterfaces() const
+TQPtrList<KoTextFormatInterface> KPrCanvas::applicableTextInterfaces() const
{
- QPtrList<KoTextFormatInterface> lst;
- QPtrList<KPrObject> lstObj;
+ TQPtrList<KoTextFormatInterface> lst;
+ TQPtrList<KPrObject> lstObj;
// If we're editing a text object, then that's the one we return
if ( m_currentTextObjectView )
{
@@ -2887,7 +2887,7 @@ QPtrList<KoTextFormatInterface> KPrCanvas::applicableTextInterfaces() const
else
{
m_activePage->getAllObjectSelectedList(lstObj);
- QPtrListIterator<KPrObject> it(lstObj);
+ TQPtrListIterator<KPrObject> it(lstObj);
for ( ; it.current(); ++it ) {
if ( it.current()->getType() == OT_TEXT )
{
@@ -2900,10 +2900,10 @@ QPtrList<KoTextFormatInterface> KPrCanvas::applicableTextInterfaces() const
return lst;
}
-QPtrList<KPrTextObject> KPrCanvas::selectedTextObjs() const
+TQPtrList<KPrTextObject> KPrCanvas::selectedTextObjs() const
{
- QPtrList<KPrTextObject> lst;
- QPtrListIterator<KPrObject> it(getObjectList());
+ TQPtrList<KPrTextObject> lst;
+ TQPtrListIterator<KPrObject> it(getObjectList());
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() && it.current()->getType() == OT_TEXT )
lst.append( static_cast<KPrTextObject*>( it.current() ) );
@@ -2932,19 +2932,19 @@ void KPrCanvas::startScreenPresentation( double zoomX, double zoomY, int curPgNu
m_zoomBeforePresentation = doc->zoomHandler()->zoom();
kdDebug() << "old zoomed resolutions =" << doc->zoomHandler()->zoomedResolutionX() << "," << doc->zoomHandler()->zoomedResolutionY() << endl;
- // Seems to fail (Qt uses the wrong font sizes...)
+ // Seems to fail (TQt uses the wrong font sizes...)
//doc->zoomHandler()->setZoomedResolution( zoomX * doc->zoomHandler()->zoomedResolutionX(),
// zoomY * doc->zoomHandler()->zoomedResolutionY() );
// Apply the new zooming to the existing one
- doc->zoomHandler()->setZoomAndResolution( qRound( zoom * m_zoomBeforePresentation ),
+ doc->zoomHandler()->setZoomAndResolution( tqRound( zoom * m_zoomBeforePresentation ),
KoGlobal::dpiX(), KoGlobal::dpiY() );
doc->newZoomAndResolution( false, false );
// add all selected slides
m_presentationSlides.clear();
- QValueList<int> selected = doc->displaySelectedSlides();
- for ( QValueList<int>::Iterator it = selected.begin() ; it != selected.end(); ++ it )
+ TQValueList<int> selected = doc->displaySelectedSlides();
+ for ( TQValueList<int>::Iterator it = selected.begin() ; it != selected.end(); ++ it )
{
// ARGLLLRGLRLGRLG selectedSlides gets us 0-based numbers,
// and here we want 1-based numbers !
@@ -2989,7 +2989,7 @@ void KPrCanvas::stopScreenPresentation()
m_step.m_pageNumber = 0;
editMode = true;
m_drawMode = false;
- repaint( false );
+ tqrepaint( false );
setToolEditMode( toolEditMode );
setWFlags( WResizeNoErase );
}
@@ -3014,7 +3014,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
// First try to go one sub-step further, if any object requires it
// ### should we also objects on the sticky page be checked for sub steps?
- QPtrListIterator<KPrObject> oit( doc->pageList().at( m_step.m_pageNumber )->objectList() );
+ TQPtrListIterator<KPrObject> oit( doc->pageList().at( m_step.m_pageNumber )->objectList() );
for ( int i = 0 ; oit.current(); ++oit, ++i )
{
KPrObject *kpobject = oit.current();
@@ -3034,7 +3034,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
// Then try to see if there is still one step to do in the current page
if ( m_step.m_step < *( --m_pageEffectSteps.end() ) )
{
- QValueList<int>::ConstIterator it = m_pageEffectSteps.find( m_step.m_step );
+ TQValueList<int>::ConstIterator it = m_pageEffectSteps.tqfind( m_step.m_step );
m_step.m_step = *( ++it );
m_step.m_subStep = 0;
//kdDebug(33001) << "Page::pNext setting currentEffectStep to " << m_step.m_step << endl;
@@ -3042,10 +3042,10 @@ bool KPrCanvas::pNext( bool gotoNextPage )
// if first step on page, draw background
if ( m_step.m_step == 0 )
{
- QPainter p;
+ TQPainter p;
p.begin( this );
drawBackground( &p,
- QRect( 0, 0, kapp->desktop()->width(), kapp->desktop()->height() ),
+ TQRect( 0, 0, kapp->desktop()->width(), kapp->desktop()->height() ),
doc->pageList().at( m_step.m_pageNumber ) );
p.end();
}
@@ -3063,7 +3063,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
}
// No more steps in this page, try to go to the next page
- QValueList<int>::ConstIterator test( m_presentationSlidesIterator );
+ TQValueList<int>::ConstIterator test( m_presentationSlidesIterator );
if ( ++test != m_presentationSlides.end() )
{
if ( !spManualSwitch() && m_setPageTimer )
@@ -3075,8 +3075,8 @@ bool KPrCanvas::pNext( bool gotoNextPage )
}
m_setPageTimer = true;
- QRect desk = KGlobalSettings::desktopGeometry(this);
- QPixmap _pix1( desk.width(), desk.height() );
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
+ TQPixmap _pix1( desk.width(), desk.height() );
drawCurrentPageInPix( _pix1 );
m_view->setPageDuration( m_step.m_pageNumber );
@@ -3087,17 +3087,17 @@ bool KPrCanvas::pNext( bool gotoNextPage )
m_pageEffectSteps = doc->getPageEffectSteps( m_step.m_pageNumber );
m_step.m_step = *m_pageEffectSteps.begin();
- QPixmap _pix2( desk.width(), desk.height() );
+ TQPixmap _pix2( desk.width(), desk.height() );
drawCurrentPageInPix( _pix2 );
- QValueList<int>::ConstIterator it( m_presentationSlidesIterator );
+ TQValueList<int>::ConstIterator it( m_presentationSlidesIterator );
--it;
KPrPage * page = doc->pageList().at( ( *it ) - 1 );
PageEffect _pageEffect = page->getPageEffect();
bool _soundEffect = page->getPageSoundEffect();
- QString _soundFileName = page->getPageSoundFileName();
+ TQString _soundFileName = page->getPageSoundFileName();
if ( _soundEffect && !_soundFileName.isEmpty() ) {
stopSound();
@@ -3107,7 +3107,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
if ( m_pageEffect )
finishPageEffect();
- m_pageEffect = new KPrPageEffects( this, _pix2, _pageEffect, page->getPageEffectSpeed() );
+ m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(this), _pix2, _pageEffect, page->getPageEffectSpeed() );
if ( m_pageEffect->doEffect() )
{
delete m_pageEffect;
@@ -3117,7 +3117,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
}
else
{
- connect( &m_pageEffectTimer, SIGNAL( timeout() ), SLOT( slotDoPageEffect() ) );
+ connect( &m_pageEffectTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoPageEffect() ) );
m_pageEffectTimer.start( 50, true );
}
@@ -3132,10 +3132,10 @@ bool KPrCanvas::pNext( bool gotoNextPage )
{
m_view->setPageDuration( m_step.m_pageNumber );
- QRect desk = KGlobalSettings::desktopGeometry(this);
- QPixmap lastSlide( desk.width(), desk.height() );
- QFont font( m_view->kPresenterDoc()->defaultFont().family() );
- QPainter p( &lastSlide );
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
+ TQPixmap lastSlide( desk.width(), desk.height() );
+ TQFont font( m_view->kPresenterDoc()->defaultFont().family() );
+ TQPainter p( &lastSlide );
p.setFont( font );
p.setPen( white );
@@ -3169,11 +3169,11 @@ bool KPrCanvas::pPrev( bool gotoPreviousPage )
m_drawModeLines.clear();
if ( !gotoPreviousPage && m_step.m_step > *m_pageEffectSteps.begin() ) {
- QValueList<int>::ConstIterator it = m_pageEffectSteps.find( m_step.m_step );
+ TQValueList<int>::ConstIterator it = m_pageEffectSteps.tqfind( m_step.m_step );
m_step.m_step = *( --it );
//hopefully there are never more than 1000 sub steps :-)
m_step.m_subStep = 1000;
- repaint( false );
+ tqrepaint( false );
return false;
} else {
// when we go back on the first slide, thats like starting the presentation again
@@ -3201,7 +3201,7 @@ bool KPrCanvas::pPrev( bool gotoPreviousPage )
else
{
m_step.m_step = *( --m_pageEffectSteps.end() );
- repaint( false );
+ tqrepaint( false );
}
return true;
@@ -3210,9 +3210,9 @@ bool KPrCanvas::pPrev( bool gotoPreviousPage )
return false;
}
-bool KPrCanvas::canAssignEffect( QPtrList<KPrObject> &objs ) const
+bool KPrCanvas::canAssignEffect( TQPtrList<KPrObject> &objs ) const
{
- QPtrListIterator<KPrObject> oIt( m_activePage->objectList() );
+ TQPtrListIterator<KPrObject> oIt( m_activePage->objectList() );
for (; oIt.current(); ++oIt )
{
//can't assign a effect to header/footer
@@ -3235,7 +3235,7 @@ bool KPrCanvas::isOneObjectSelected() const
// and obtain a pixmap of the specified width and/or height.
// By omitting one of them you make sure that the aspect ratio
// of your page is used for the resulting image.
-void KPrCanvas::drawPageInPix( QPixmap &_pix, int pgnum, int zoom,
+void KPrCanvas::drawPageInPix( TQPixmap &_pix, int pgnum, int zoom,
bool forceRealVariableValue,
int forceWidth,
int forceHeight )
@@ -3248,7 +3248,7 @@ void KPrCanvas::drawPageInPix( QPixmap &_pix, int pgnum, int zoom,
if( 0 < forceWidth || 0 < forceHeight )
{
- const QRect rect( doc->getPageRect( true ) );
+ const TQRect rect( doc->getPageRect( true ) );
const double dRectHeight = static_cast<double>(rect.height());
const double dRectWidth = static_cast<double>(rect.width());
double dForceHeight = static_cast<double>(forceHeight);
@@ -3282,11 +3282,11 @@ void KPrCanvas::drawPageInPix( QPixmap &_pix, int pgnum, int zoom,
}
KPrPage * page = m_view->kPresenterDoc()->pageList().at(pgnum);
- QRect rect = page->getZoomPageRect( );
+ TQRect rect = page->getZoomPageRect( );
_pix.resize( rect.size() );
- _pix.fill( Qt::white );
+ _pix.fill( TQt::white );
- QPainter p;
+ TQPainter p;
p.begin( &_pix );
bool _editMode = editMode;
@@ -3318,14 +3318,14 @@ void KPrCanvas::drawPageInPix( QPixmap &_pix, int pgnum, int zoom,
// This one is used in fullscreenmode, to generate the pixmaps used for the
// page effects.
-void KPrCanvas::drawCurrentPageInPix( QPixmap &_pix ) const
+void KPrCanvas::drawCurrentPageInPix( TQPixmap &_pix ) const
{
//kdDebug(33001) << "Page::drawCurrentPageInPix" << endl;
// avoid garbage on "weird" DPIs
- _pix.fill(Qt::black);
+ _pix.fill(TQt::black);
- QPainter p;
+ TQPainter p;
p.begin( &_pix );
drawBackground( &p, _pix.rect(), m_view->kPresenterDoc()->pageList().at( m_step.m_pageNumber ) );
@@ -3335,22 +3335,22 @@ void KPrCanvas::drawCurrentPageInPix( QPixmap &_pix ) const
p.end();
}
-void KPrCanvas::printPage( QPainter* painter, PresStep step, KPrinter *printer, int rows, int cols )
+void KPrCanvas::printPage( TQPainter* painter, PresStep step, KPrinter *printer, int rows, int cols )
{
//kdDebug(33001) << "KPrCanvas::printPage" << endl;
KPrDocument *doc = m_view->kPresenterDoc();
KPrPage* page = doc->pageList().at( step.m_pageNumber );
- QRect const rect = page->getZoomPageRect();
+ TQRect const rect = page->getZoomPageRect();
bool const drawBorder = printer->option("kde-kpresenter-printslideborders").toInt() && rows>1 && cols>1;
int height = rect.height();
int width = rect.width();
- QPaintDeviceMetrics metrics( printer );
+ TQPaintDeviceMetrics metrics( printer );
int begin_left = ( metrics.width() - rect.width() );
int begin_top = ( metrics.height() - rect.height() );
- rows = cols = QMAX( rows, cols ); // all slides have the same size
+ rows = cols = TQMAX( rows, cols ); // all slides have the same size
if ( rows > 1 )
{
@@ -3371,7 +3371,7 @@ void KPrCanvas::printPage( QPainter* painter, PresStep step, KPrinter *printer,
page = doc->pageList().at( step.m_pageNumber );
if ( !page )
return;
- painter->setViewport( QRect(left, top, width, height) );
+ painter->setViewport( TQRect(left, top, width, height) );
drawBackground( painter, rect, page, true );
drawPresPage( painter, rect, step );
if ( drawBorder )
@@ -3390,23 +3390,23 @@ void KPrCanvas::doObjEffects( bool isAllreadyPainted )
if ( m_effectHandler )
{
m_effectTimer.stop();
- QObject::disconnect( &m_effectTimer, SIGNAL( timeout() ), this, SLOT( slotDoEffect() ) );
+ TQObject::disconnect( &m_effectTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDoEffect() ) );
m_effectHandler->finish();
delete m_effectHandler;
m_effectHandler = 0;
}
- QPixmap screen_orig( kapp->desktop()->width(), kapp->desktop()->height() );
+ TQPixmap screen_orig( kapp->desktop()->width(), kapp->desktop()->height() );
KPrPage *page = m_view->kPresenterDoc()->pageList().at( m_step.m_pageNumber );
// YABADABADOOOOOOO.... That's a hack :-)
if ( m_step.m_subStep == 0 && !isAllreadyPainted && isUpdatesEnabled() )
{
//kdDebug(33001) << "Page::doObjEffects - in the strange hack" << endl;
- QPainter p;
+ TQPainter p;
p.begin( &screen_orig );
- QRect desktopRect = QRect( 0, 0, kapp->desktop()->width(), kapp->desktop()->height() );
+ TQRect desktopRect = TQRect( 0, 0, kapp->desktop()->width(), kapp->desktop()->height() );
drawBackground( &p, desktopRect, page );
PresStep step( m_step.m_pageNumber, m_step.m_step, m_step.m_subStep, true, true );
drawPresPage( &p, desktopRect ,step );
@@ -3418,11 +3418,11 @@ void KPrCanvas::doObjEffects( bool isAllreadyPainted )
bitBlt( &screen_orig, 0, 0, this );
}
- QPtrList<KPrObject> allObjects;
+ TQPtrList<KPrObject> allObjects;
// master slide objects are below the objects of the normal slide
if ( page->displayObjectFromMasterPage() )
{
- QPtrListIterator<KPrObject> it( page->masterPage()->objectList() );
+ TQPtrListIterator<KPrObject> it( page->masterPage()->objectList() );
for ( ; it.current(); ++it ) {
if ( objectIsAHeaderFooterHidden( it.current() ) )
continue;
@@ -3431,14 +3431,14 @@ void KPrCanvas::doObjEffects( bool isAllreadyPainted )
}
}
- QPtrListIterator<KPrObject> it( page->objectList() );
+ TQPtrListIterator<KPrObject> it( page->objectList() );
for ( ; it.current(); ++it )
{
allObjects.append( it.current() );
}
//TODO add global presentation speed
- m_effectHandler = new KPrEffectHandler( m_step, goingBack, this, &screen_orig, allObjects, m_view, 1 );
+ m_effectHandler = new KPrEffectHandler( m_step, goingBack, TQT_TQPAINTDEVICE(this), &screen_orig, allObjects, m_view, 1 );
if ( m_effectHandler->doEffect() )
{
delete m_effectHandler;
@@ -3446,7 +3446,7 @@ void KPrCanvas::doObjEffects( bool isAllreadyPainted )
}
else
{
- connect( &m_effectTimer, SIGNAL( timeout() ), SLOT( slotDoEffect() ) );
+ connect( &m_effectTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoEffect() ) );
m_effectTimer.start( 50, true );
}
@@ -3457,7 +3457,7 @@ void KPrCanvas::slotDoEffect()
if ( m_effectHandler->doEffect() )
{
m_effectTimer.stop();
- QObject::disconnect( &m_effectTimer, SIGNAL( timeout() ), this, SLOT( slotDoEffect() ) );
+ TQObject::disconnect( &m_effectTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDoEffect() ) );
delete m_effectHandler;
m_effectHandler = 0;
}
@@ -3473,7 +3473,7 @@ void KPrCanvas::slotDoPageEffect()
if ( m_pageEffect->doEffect() )
{
m_pageEffectTimer.stop();
- QObject::disconnect( &m_pageEffectTimer, SIGNAL( timeout() ), this, SLOT( slotDoPageEffect() ) );
+ TQObject::disconnect( &m_pageEffectTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDoPageEffect() ) );
delete m_pageEffect;
m_pageEffect = 0;
@@ -3485,10 +3485,10 @@ void KPrCanvas::slotDoPageEffect()
}
}
-void KPrCanvas::slotAutoScroll(const QPoint &scrollDistance)
+void KPrCanvas::slotAutoScroll(const TQPoint &scrollDistance)
{
- //QPoint d = m_view->zoomHandler()->zoomPoint( scrollDistance );
- QPoint d = scrollDistance;
+ //TQPoint d = m_view->zoomHandler()->zoomPoint( scrollDistance );
+ TQPoint d = scrollDistance;
m_view->getHScrollBar()->setValue( m_view->getHScrollBar()->value() + d.x() );
m_view->getVScrollBar()->setValue( m_view->getVScrollBar()->value() + d.y() );
}
@@ -3500,7 +3500,7 @@ bool KPrCanvas::finishObjectEffects()
if ( m_effectHandler )
{
m_effectTimer.stop();
- QObject::disconnect( &m_effectTimer, SIGNAL( timeout() ), this, SLOT( slotDoEffect() ) );
+ TQObject::disconnect( &m_effectTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDoEffect() ) );
m_effectHandler->finish();
delete m_effectHandler;
m_effectHandler = 0;
@@ -3516,7 +3516,7 @@ bool KPrCanvas::finishPageEffect( bool cancel )
if ( m_pageEffect )
{
m_pageEffectTimer.stop();
- QObject::disconnect( &m_pageEffectTimer, SIGNAL( timeout() ), this, SLOT( slotDoPageEffect() ) );
+ TQObject::disconnect( &m_pageEffectTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDoPageEffect() ) );
if ( !cancel )
m_pageEffect->finish();
delete m_pageEffect;
@@ -3538,13 +3538,13 @@ bool KPrCanvas::finishPageEffect( bool cancel )
}
-void KPrCanvas::print( QPainter *painter, KPrinter *printer, float /*left_margin*/, float /*top_margin*/ )
+void KPrCanvas::print( TQPainter *painter, KPrinter *printer, float /*left_margin*/, float /*top_margin*/ )
{
PresStep step( 0, 1000, 1000 );
//deSelectAllObj(); // already done in KPrView::setupPrinter
int i = 0;
- repaint( false );
+ tqrepaint( false );
kapp->processEvents();
editMode = false;
@@ -3556,7 +3556,7 @@ void KPrCanvas::print( QPainter *painter, KPrinter *printer, float /*left_margin
//m_view->setDiffX( -static_cast<int>( MM_TO_POINT( left_margin ) ) );
//m_view->setDiffY( -static_cast<int>( MM_TO_POINT( top_margin ) ) );
- QProgressDialog progress( i18n( "Printing..." ), i18n( "Cancel" ),
+ TQProgressDialog progress( i18n( "Printing..." ), i18n( "Cancel" ),
printer->pageList().count() + 2, this );
int j = 0;
@@ -3576,8 +3576,8 @@ void KPrCanvas::print( QPainter *painter, KPrinter *printer, float /*left_margin
m_view->setDiffY( ( printer->fromPage() - 1 ) * ( getPageRect( 1, 1.0, false ).height() ) -
(int)MM_TO_POINT( top_margin ) );*/
int current_slide = 0;
- QValueList<int> list=printer->pageList(); // 1-based
- QValueList<int>::iterator it;
+ TQValueList<int> list=printer->pageList(); // 1-based
+ TQValueList<int>::iterator it;
for( it=list.begin();it!=list.end();++it)
{
i=(*it);
@@ -3633,11 +3633,11 @@ void KPrCanvas::print( QPainter *painter, KPrinter *printer, float /*left_margin
fillBlack = true;
editMode = true;
- repaint( false );
+ tqrepaint( false );
}
-void KPrCanvas::updateInsertRect( const KoPoint &point, Qt::ButtonState state )
+void KPrCanvas::updateInsertRect( const KoPoint &point, TQt::ButtonState state )
{
if ( state & AltButton )
{
@@ -3762,13 +3762,13 @@ void KPrCanvas::insertCubicBezierCurve( const KoPointArray &_pointArray )
m_activePage->insertCubicBezierCurve( points, bezierPoints, rect, m_view->getPen(),
m_view->getLineBegin(), m_view->getLineEnd() );
}
- else if ( toolEditMode == INS_QUADRICBEZIERCURVE )
+ else if ( toolEditMode == INS_TQUADRICBEZIERCURVE )
{
m_activePage->insertQuadricBezierCurve( points, bezierPoints, rect, m_view->getPen(),
m_view->getLineBegin(), m_view->getLineEnd() );
}
else if ( toolEditMode == INS_CLOSED_CUBICBEZIERCURVE ||
- toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE )
+ toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE )
{
m_activePage->insertClosedLine( bezierPoints, rect, m_view->getPen(), m_view->getBrush(),
m_view->getFillType(), m_view->getGColor1(), m_view->getGColor2(),
@@ -3795,9 +3795,9 @@ void KPrCanvas::insertPolygon( const KoPointArray &_pointArray )
void KPrCanvas::insertPicture( const KoRect &rect )
{
- QString file = m_activePage->insPictureFile();
+ TQString file = m_activePage->insPictureFile();
- QCursor c = cursor();
+ TQCursor c = cursor();
setCursor( waitCursor );
if ( !file.isEmpty() ) {
if ( rect.width() > 10 && rect.height() > 10 )
@@ -3809,7 +3809,7 @@ void KPrCanvas::insertPicture( const KoRect &rect )
KoPoint tl( rect.topLeft() );
m_activePage->insertPicture( file, tl );
}
- m_activePage->setInsPictureFile( QString::null );
+ m_activePage->setInsPictureFile( TQString() );
}
setCursor( c );
}
@@ -3832,8 +3832,8 @@ void KPrCanvas::setToolEditMode( ToolEditMode _m, bool updateView )
if ( ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE ) && !m_pointArray.isNull())
endDrawPolyline();
- if ( ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_QUADRICBEZIERCURVE
- || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) && !m_pointArray.isNull() )
+ if ( ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_TQUADRICBEZIERCURVE
+ || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) && !m_pointArray.isNull() )
endDrawCubicBezierCurve();
exitEditMode();
@@ -3842,7 +3842,7 @@ void KPrCanvas::setToolEditMode( ToolEditMode _m, bool updateView )
if ( toolEditMode == TEM_MOUSE )
{
setCursor( arrowCursor );
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
// ### missing some coord transformation here?
KoPoint docPoint( m_view->zoomHandler()->unzoomPoint( pos ) );
KPrObject *obj=m_activePage->getCursor( pos);
@@ -3872,7 +3872,7 @@ void KPrCanvas::endDrawPolyline()
emit objectSelectedChanged();
if ( toolEditMode != TEM_MOUSE && editMode )
- repaint( false );
+ tqrepaint( false );
m_view->disableAutoScroll();
mousePressed = false;
modType = MT_NONE;
@@ -3885,7 +3885,7 @@ void KPrCanvas::endDrawCubicBezierCurve()
insertCubicBezierCurve( m_pointArray );
emit objectSelectedChanged();
if ( toolEditMode != TEM_MOUSE && editMode )
- repaint( false );
+ tqrepaint( false );
m_view->disableAutoScroll();
mousePressed = false;
modType = MT_NONE;
@@ -3898,7 +3898,7 @@ void KPrCanvas::selectNext()
if ( m_activePage->numSelected() == 0 )
objectList().at( 0 )->setSelected( true );
else {
- int i = objectList().findRef( m_activePage->getSelectedObj() );
+ int i = objectList().tqfindRef( m_activePage->getSelectedObj() );
if ( i < static_cast<int>( objectList().count() ) - 1 ) {
m_view->kPresenterDoc()->deSelectAllObj();
objectList().at( ++i )->setSelected( true );
@@ -3908,7 +3908,7 @@ void KPrCanvas::selectNext()
}
}
m_view->showObjectRect( m_activePage->getSelectedObj() );
- _repaint( false );
+ _tqrepaint( false );
}
void KPrCanvas::selectPrev()
@@ -3917,7 +3917,7 @@ void KPrCanvas::selectPrev()
if ( m_activePage->numSelected() == 0 )
objectList().at( objectList().count() - 1 )->setSelected( true );
else {
- int i = objectList().findRef( m_activePage->getSelectedObj() );
+ int i = objectList().tqfindRef( m_activePage->getSelectedObj() );
if ( i > 0 ) {
m_view->kPresenterDoc()->deSelectAllObj();
objectList().at( --i )->setSelected( true );
@@ -3927,15 +3927,15 @@ void KPrCanvas::selectPrev()
}
}
m_view->showObjectRect( m_activePage->getSelectedObj() );
- _repaint( false );
+ _tqrepaint( false );
}
-void KPrCanvas::dragEnterEvent( QDragEnterEvent *e )
+void KPrCanvas::dragEnterEvent( TQDragEnterEvent *e )
{
if ( m_currentTextObjectView )
m_currentTextObjectView->dragEnterEvent( e );
- else if ( QTextDrag::canDecode( e )
- || QImageDrag::canDecode( e )
+ else if ( TQTextDrag::canDecode( e )
+ || TQImageDrag::canDecode( e )
|| KURLDrag::canDecode(e)) {
e->accept();
}
@@ -3943,7 +3943,7 @@ void KPrCanvas::dragEnterEvent( QDragEnterEvent *e )
e->ignore();
}
-void KPrCanvas::dragMoveEvent( QDragMoveEvent *e )
+void KPrCanvas::dragMoveEvent( TQDragMoveEvent *e )
{
if( m_currentTextObjectView)
{
@@ -3953,13 +3953,13 @@ void KPrCanvas::dragMoveEvent( QDragMoveEvent *e )
emitChanged = checkCurrentTextEdit( obj );
if ( m_currentTextObjectView )
{
- m_currentTextObjectView->dragMoveEvent( e, QPoint() );
+ m_currentTextObjectView->dragMoveEvent( e, TQPoint() );
if ( emitChanged )
emit currentObjectEditChanged();
}
}
- else if ( QTextDrag::canDecode( e )
- || QImageDrag::canDecode( e )
+ else if ( TQTextDrag::canDecode( e )
+ || TQImageDrag::canDecode( e )
|| KURLDrag::canDecode(e)) {
e->accept();
}
@@ -3967,13 +3967,13 @@ void KPrCanvas::dragMoveEvent( QDragMoveEvent *e )
e->ignore();
}
-void KPrCanvas::dropImage( QMimeSource * data, bool resizeImageToOriginalSize, int posX, int posY )
+void KPrCanvas::dropImage( TQMimeSource * data, bool resizeImageToOriginalSize, int posX, int posY )
{
setToolEditMode( TEM_MOUSE );
deSelectAllObj();
- QImage pix;
- QImageDrag::decode( data, pix );
+ TQImage pix;
+ TQImageDrag::decode( data, pix );
KTempFile tmpFile;
tmpFile.setAutoDelete(true);
@@ -3982,10 +3982,10 @@ void KPrCanvas::dropImage( QMimeSource * data, bool resizeImageToOriginalSize, i
return;
pix.save( tmpFile.name(), "PNG" );
- QCursor c = cursor();
+ TQCursor c = cursor();
setCursor( waitCursor );
- QPoint pos( posX + diffx(), posY + diffy() );
+ TQPoint pos( posX + diffx(), posY + diffy() );
KoPoint docPoint( m_view->zoomHandler()->unzoomPoint( pos ) );
m_activePage->insertPicture( tmpFile.name(), docPoint );
@@ -3997,14 +3997,14 @@ void KPrCanvas::dropImage( QMimeSource * data, bool resizeImageToOriginalSize, i
setCursor( c );
}
-void KPrCanvas::dropEvent( QDropEvent *e )
+void KPrCanvas::dropEvent( TQDropEvent *e )
{
//disallow dropping objects outside the "page"
- KoPoint docPoint = m_view->zoomHandler()->unzoomPoint( e->pos()+QPoint(diffx(),diffy()) );
- if ( !m_activePage->getZoomPageRect().contains(e->pos()))
+ KoPoint docPoint = m_view->zoomHandler()->unzoomPoint( e->pos()+TQPoint(diffx(),diffy()) );
+ if ( !m_activePage->getZoomPageRect().tqcontains(e->pos()))
return;
- if ( QImageDrag::canDecode( e ) ) {
+ if ( TQImageDrag::canDecode( e ) ) {
dropImage( e, true, e->pos().x(), e->pos().y() );
e->accept();
} else if ( KURLDrag::canDecode( e ) ) {
@@ -4018,7 +4018,7 @@ void KPrCanvas::dropEvent( QDropEvent *e )
for ( ; it != lst.end(); ++it ) {
const KURL &url( *it );
- QString filename;
+ TQString filename;
if ( !url.isLocalFile() ) {
if ( !KIO::NetAccess::download( url, filename, this ) )
continue;
@@ -4029,18 +4029,18 @@ void KPrCanvas::dropEvent( QDropEvent *e )
KMimeMagicResult *res = KMimeMagic::self()->findFileType( filename );
if ( res && res->isValid() ) {
- QString mimetype = res->mimeType();
- if ( mimetype.contains( "image" ) ) {
- QCursor c = cursor();
+ TQString mimetype = res->mimeType();
+ if ( mimetype.tqcontains( "image" ) ) {
+ TQCursor c = cursor();
setCursor( waitCursor );
m_activePage->insertPicture( filename, docPoint );
setCursor( c );
- } else if ( mimetype.contains( "text" ) ) {
- QCursor c = cursor();
+ } else if ( mimetype.tqcontains( "text" ) ) {
+ TQCursor c = cursor();
setCursor( waitCursor );
- QFile f( filename );
- QTextStream t( &f );
- QString text = QString::null, tmp;
+ TQFile f( filename );
+ TQTextStream t( &f );
+ TQString text = TQString(), tmp;
kdDebug()<<" filename :"<<filename<<endl;
if ( f.open( IO_ReadOnly ) ) {
while ( !t.eof() ) {
@@ -4051,7 +4051,7 @@ void KPrCanvas::dropEvent( QDropEvent *e )
f.close();
}
kdDebug()<<" text :"<<endl;
- m_activePage->insertTextObject( m_view->zoomHandler()->unzoomRect(QRect( e->pos().x(), e->pos().y(), 250, 250 )),
+ m_activePage->insertTextObject( m_view->zoomHandler()->unzoomRect(TQRect( e->pos().x(), e->pos().y(), 250, 250 )),
text, m_view );
setCursor( c );
@@ -4064,14 +4064,14 @@ void KPrCanvas::dropEvent( QDropEvent *e )
{
m_currentTextObjectView->dropEvent( e );
}
- else if ( QTextDrag::canDecode( e ) ) {
+ else if ( TQTextDrag::canDecode( e ) ) {
setToolEditMode( TEM_MOUSE );
deSelectAllObj();
- QString text;
- QTextDrag::decode( e, text );
- //kdDebug()<<" QTextDrag::decode( e, text ); :"<<text<<endl;
- m_activePage->insertTextObject( m_view->zoomHandler()->unzoomRect( QRect( e->pos().x(), e->pos().y(), 250, 250 )),
+ TQString text;
+ TQTextDrag::decode( e, text );
+ //kdDebug()<<" TQTextDrag::decode( e, text ); :"<<text<<endl;
+ m_activePage->insertTextObject( m_view->zoomHandler()->unzoomRect( TQRect( e->pos().x(), e->pos().y(), 250, 250 )),
text, m_view );
e->accept();
} else
@@ -4106,14 +4106,14 @@ void KPrCanvas::gotoPage( int pg )
m_step.m_pageNumber = page;
kdDebug(33001) << "Page::gotoPage m_step.m_pageNumber =" << m_step.m_pageNumber << endl;
- m_presentationSlidesIterator = m_presentationSlides.find( m_step.m_pageNumber + 1 );
+ m_presentationSlidesIterator = m_presentationSlides.tqfind( m_step.m_pageNumber + 1 );
editMode = false;
m_drawMode = false;
m_pageEffectSteps = m_view->kPresenterDoc()->getPageEffectSteps( m_step.m_pageNumber );
m_step.m_step = *m_pageEffectSteps.begin();
m_step.m_subStep = 0;
#if 0
- QRect desk = KGlobalSettings::desktopGeometry(this);
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
resize( desk.width(), desk.height() );
#endif
doObjEffects();
@@ -4138,43 +4138,43 @@ void KPrCanvas::copyOasisObjs()
{
//todo copy object from selected object
KoStoreDrag *kd = new KoStoreDrag( "application/vnd.oasis.opendocument.presentation", 0L );
- QDragObject* dragObject = kd;
- QByteArray arr;
- QBuffer buffer(arr);
- KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/vnd.oasis.opendocument.presentation" );
+ TQDragObject* dragObject = kd;
+ TQByteArray arr;
+ TQBuffer buffer(arr);
+ KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/vnd.oasis.opendocument.presentation" );
delete store;
kd->setEncodedData( arr );
- QApplication::clipboard()->setData( dragObject, QClipboard::Clipboard );
+ TQApplication::tqclipboard()->setData( dragObject, TQClipboard::Clipboard );
}
void KPrCanvas::copyObjs()
{
- QDomDocument doc("DOC");
- QDomElement presenter=doc.createElement("DOC");
+ TQDomDocument doc("DOC");
+ TQDomElement presenter=doc.createElement("DOC");
presenter.setAttribute("editor", "KPresenter");
presenter.setAttribute("mime", "application/x-kpresenter");
doc.appendChild(presenter);
- QPtrList<KoDocumentChild> embeddedObjectsActivePage;
+ TQPtrList<KoDocumentChild> embeddedObjectsActivePage;
KoStoreDrag *kd = new KoStoreDrag( "application/x-kpresenter", 0L );
- QDragObject* dragObject = kd;
- QByteArray arr;
- QBuffer buffer(arr);
- KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/x-kpresenter" );
+ TQDragObject* dragObject = kd;
+ TQByteArray arr;
+ TQBuffer buffer(arr);
+ KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/x-kpresenter" );
m_activePage->getAllEmbeddedObjectSelected(embeddedObjectsActivePage );
// Save internal embedded objects first, since it might change their URL
int i = 0;
- QValueList<KoPictureKey> savePictures;
- QPtrListIterator<KoDocumentChild> chl( embeddedObjectsActivePage );
+ TQValueList<KoPictureKey> savePictures;
+ TQPtrListIterator<KoDocumentChild> chl( embeddedObjectsActivePage );
for( ; chl.current(); ++chl ) {
KoDocument* childDoc = chl.current()->document();
if ( childDoc && !childDoc->isStoredExtern() )
- (void) childDoc->saveToStore( store, QString::number( i++ ) );
+ (void) childDoc->saveToStore( store, TQString::number( i++ ) );
}
m_activePage->copyObjs(doc, presenter, savePictures);
@@ -4194,7 +4194,7 @@ void KPrCanvas::copyObjs()
if ( savePictures.count() == 1 )
{
KoPicture pic = kprdoc->pictureCollection()->findPicture( savePictures.first() );
- QDragObject* picDrag = pic.dragObject( 0L );
+ TQDragObject* picDrag = pic.dragObject( 0L );
if ( picDrag ) {
KMultipleDrag* multipleDrag = new KMultipleDrag( 0L );
multipleDrag->addDragObject( kd );
@@ -4206,7 +4206,7 @@ void KPrCanvas::copyObjs()
if ( store->open( "root" ) )
{
- QCString s = doc.toCString(); // this is already Utf8!
+ TQCString s = doc.toCString(); // this is already Utf8!
//kdDebug(33001) << "KPrCanvas::copyObject: " << s << endl;
(void)store->write( s.data(), s.size()-1 );
store->close();
@@ -4214,7 +4214,7 @@ void KPrCanvas::copyObjs()
delete store;
kd->setEncodedData( arr );
- QApplication::clipboard()->setData( dragObject, QClipboard::Clipboard );
+ TQApplication::tqclipboard()->setData( dragObject, TQClipboard::Clipboard );
}
void KPrCanvas::deleteObjs()
@@ -4229,23 +4229,23 @@ void KPrCanvas::deleteObjs()
}
-void KPrCanvas::enterEvent( QEvent *e )
+void KPrCanvas::enterEvent( TQEvent *e )
{
- m_view->setRulerMousePos( ( ( QMouseEvent* )e )->x(), ( ( QMouseEvent* )e )->y() );
+ m_view->setRulerMousePos( ( ( TQMouseEvent* )e )->x(), ( ( TQMouseEvent* )e )->y() );
m_view->setRulerMouseShow( true );
}
-void KPrCanvas::leaveEvent( QEvent * /*e*/ )
+void KPrCanvas::leaveEvent( TQEvent * /*e*/ )
{
m_view->setRulerMouseShow( false );
}
-QPtrList<KPrObject> KPrCanvas::objectList() const
+TQPtrList<KPrObject> KPrCanvas::objectList() const
{
return m_activePage->objectList();
}
-const QPtrList<KPrObject> &KPrCanvas::getObjectList() const
+const TQPtrList<KPrObject> &KPrCanvas::getObjectList() const
{
return m_activePage->objectList();
}
@@ -4255,7 +4255,7 @@ unsigned int KPrCanvas::currPgNum() const
return m_view->getCurrPgNum();
}
-QColor KPrCanvas::txtBackCol() const
+TQColor KPrCanvas::txtBackCol() const
{
return m_view->kPresenterDoc()->txtBackCol();
}
@@ -4275,7 +4275,7 @@ bool KPrCanvas::spManualSwitch() const
return m_view->kPresenterDoc()->spManualSwitch();
}
-QRect KPrCanvas::getPageRect( bool decBorders ) const
+TQRect KPrCanvas::getPageRect( bool decBorders ) const
{
return m_view->kPresenterDoc()->getPageRect( decBorders );
}
@@ -4285,19 +4285,19 @@ unsigned int KPrCanvas::pageNums() const
return m_view->kPresenterDoc()->getPageNums();
}
-void KPrCanvas::_repaint( bool /*erase*/ )
+void KPrCanvas::_tqrepaint( bool /*erase*/ )
{
- m_view->kPresenterDoc()->repaint( false );
+ m_view->kPresenterDoc()->tqrepaint( false );
}
-void KPrCanvas::_repaint( const QRect &r )
+void KPrCanvas::_tqrepaint( const TQRect &r )
{
- m_view->kPresenterDoc()->repaint( r );
+ m_view->kPresenterDoc()->tqrepaint( r );
}
-void KPrCanvas::_repaint( KPrObject *o )
+void KPrCanvas::_tqrepaint( KPrObject *o )
{
- m_view->kPresenterDoc()->repaint( o );
+ m_view->kPresenterDoc()->tqrepaint( o );
}
void KPrCanvas::slotExitPres()
@@ -4327,7 +4327,7 @@ void KPrCanvas::setSwitchingMode( bool continueTimer )
m_view->continueAutoPresTimer();
}
-void KPrCanvas::exitEditMode( bool repaint )
+void KPrCanvas::exitEditMode( bool tqrepaint )
{
if ( m_editObject )
{
@@ -4337,7 +4337,7 @@ void KPrCanvas::exitEditMode( bool repaint )
{
m_currentTextObjectView->clearSelection();
//hide cursor when we desactivate textObjectView
- if ( repaint )
+ if ( tqrepaint )
{
m_currentTextObjectView->drawCursor( false );
m_currentTextObjectView->terminate();
@@ -4347,8 +4347,8 @@ void KPrCanvas::exitEditMode( bool repaint )
delete m_currentTextObjectView;
m_currentTextObjectView = 0;
- if ( repaint )
- _repaint( static_cast<KPrObject*>( kpTextObj ) );
+ if ( tqrepaint )
+ _tqrepaint( static_cast<KPrObject*>( kpTextObj ) );
}
// Title of slide may have changed
m_view->kPresenterDoc()->updateSideBarItem( m_activePage );
@@ -4358,7 +4358,7 @@ void KPrCanvas::exitEditMode( bool repaint )
else if (m_editObject->getType() == OT_PART )
{
static_cast<KPrPartObject *>(m_editObject)->deactivate();
- _repaint( m_editObject );
+ _tqrepaint( m_editObject );
m_editObject = 0;
return;
}
@@ -4387,7 +4387,7 @@ void KPrCanvas::picViewOriginalSize()
if ( newSize.width() > pageRect.width() )
fakt = pageRect.width() / newSize.width();
if ( newSize.height() > pageRect.height() )
- fakt = QMIN( fakt, pageRect.height() / newSize.height() );
+ fakt = TQMIN( fakt, pageRect.height() / newSize.height() );
KoSize diff( newSize.width() * fakt - object->getSize().width(),
newSize.height() * fakt - object->getSize().height() );
@@ -4440,7 +4440,7 @@ void KPrCanvas::picViewOrigHelper(int x, int y)
y = (int)origSize.height();
}
- QSize presSize( x, y );
+ TQSize presSize( x, y );
scalePixmapToBeOrigIn( currentSize, pgSize, presSize, obj );
}
@@ -4450,9 +4450,9 @@ void KPrCanvas::picViewOrigFactor()
}
void KPrCanvas::scalePixmapToBeOrigIn( const KoSize &currentSize, const KoSize &pgSize,
- const QSize &presSize, KPrPixmapObject *obj )
+ const TQSize &presSize, KPrPixmapObject *obj )
{
- QRect desk = KGlobalSettings::desktopGeometry(this);
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
double faktX = (double)presSize.width() / (double)desk.width();
double faktY = (double)presSize.height() / (double)desk.height();
double w = pgSize.width() * faktX;
@@ -4470,15 +4470,15 @@ void KPrCanvas::setTextBackground( KPrTextObject */*obj*/ )
// This is called when double-clicking on a text object.
// What should happen exactly ? (DF)
#if 0
- QPixmap pix( m_activePage->getZoomPageRect().size() );
- QPainter painter( &pix );
+ TQPixmap pix( m_activePage->getZoomPageRect().size() );
+ TQPainter painter( &pix );
m_activePage->background()->drawBackground( &painter, FALSE );
- QPixmap bpix( obj->getSize().toQSize() ); // ## zoom it !
+ TQPixmap bpix( obj->getSize().toTQSize() ); // ## zoom it !
bitBlt( &bpix, 0, 0, &pix, obj->getOrig().x(), obj->getOrig().y() -
m_activePage->getZoomPageRect().height() * ( m_view->getCurrPgNum() - 1 ), bpix.width(), bpix.height() );
- QBrush b( white, bpix );
- QPalette pal( obj->textObjectView()->palette() );
- pal.setBrush( QColorGroup::Base, b );
+ TQBrush b( white, bpix );
+ TQPalette pal( obj->textObjectView()->palette() );
+ pal.setBrush( TQColorGroup::Base, b );
obj->textObjectView()->setPalette( pal );
#endif
}
@@ -4602,8 +4602,8 @@ void KPrCanvas::moveObjectsByKey( int x, int y )
m_moveSnapDiff = KoPoint( 0, 0 );
- KoGuides::SnapStatus snapStatus = KoGuides::SNAP_NONE;
- m_gl.snapToGuideLines( movedRect, KEY_SNAP_DISTANCE, snapStatus, m_moveSnapDiff );
+ KoGuides::SnaptqStatus snaptqStatus = KoGuides::SNAP_NONE;
+ m_gl.snapToGuideLines( movedRect, KEY_SNAP_DISTANCE, snaptqStatus, m_moveSnapDiff );
move += m_moveSnapDiff;
}
@@ -4632,13 +4632,13 @@ void KPrCanvas::moveObjectsByKey( int x, int y )
move.setY( pageRect.bottom() - rect.bottom() );
}
- // we only want a repaint if we have guide lines
+ // we only want a tqrepaint if we have guide lines
if ( snapToGuideLines )
{
// redraw guidelines (intentionally always)
KoRect movedRect( rect );
movedRect.moveBy( move.x(), move.y() );
- m_gl.repaintSnapping( movedRect );
+ m_gl.tqrepaintSnapping( movedRect );
}
if ( move != KoPoint( 0, 0 ) )
@@ -4672,20 +4672,20 @@ void KPrCanvas::moveObjectsByMouse( KoPoint &pos, bool keepXorYunchanged )
move -= m_moveSnapDiff;
m_moveSnapDiff = KoPoint( 0, 0 ); // needed if all snapping is off
- KoGuides::SnapStatus snapStatus = KoGuides::SNAP_NONE;
+ KoGuides::SnaptqStatus snaptqStatus = KoGuides::SNAP_NONE;
if ( snapToGrid )
{
- m_moveSnapDiff.setX( qRound( movedRect.topLeft().x() / doc->getGridX()) * doc->getGridX()
+ m_moveSnapDiff.setX( tqRound( movedRect.topLeft().x() / doc->getGridX()) * doc->getGridX()
- movedRect.topLeft().x() );
- m_moveSnapDiff.setY( qRound( movedRect.topLeft().y() / doc->getGridY()) * doc->getGridY()
+ m_moveSnapDiff.setY( tqRound( movedRect.topLeft().y() / doc->getGridY()) * doc->getGridY()
- movedRect.topLeft().y() );
- snapStatus = KoGuides::SNAP_BOTH;
+ snaptqStatus = KoGuides::SNAP_BOTH;
}
if ( snapToGuideLines )
{
- m_gl.snapToGuideLines( movedRect, MOUSE_SNAP_DISTANCE, snapStatus, m_moveSnapDiff );
+ m_gl.snapToGuideLines( movedRect, MOUSE_SNAP_DISTANCE, snaptqStatus, m_moveSnapDiff );
}
move += m_moveSnapDiff;
@@ -4727,7 +4727,7 @@ void KPrCanvas::moveObjectsByMouse( KoPoint &pos, bool keepXorYunchanged )
if ( snapToGuideLines )
{
// redraw guidelines (intentionally always)
- m_gl.repaintSnapping( movedRect );
+ m_gl.tqrepaintSnapping( movedRect );
}
if ( move != KoPoint( 0, 0 ) )
@@ -4742,10 +4742,10 @@ void KPrCanvas::resizeObject( ModifyType _modType, const KoPoint & point, bool k
{
KPrObject *kpobject = m_resizeObject;
- QRect oldBoundingRect( m_view->zoomHandler()->zoomRect( kpobject->getRepaintRect() ) );
+ TQRect oldBoundingRect( m_view->zoomHandler()->zoomRect( kpobject->getRepaintRect() ) );
KoRect objRect = kpobject->getRealRect();
- KoGuides::SnapStatus snapStatus( KoGuides::SNAP_NONE );
+ KoGuides::SnaptqStatus snaptqStatus( KoGuides::SNAP_NONE );
bool left = false;
bool right = false;
@@ -4754,22 +4754,22 @@ void KPrCanvas::resizeObject( ModifyType _modType, const KoPoint & point, bool k
if ( _modType == MT_RESIZE_UP || _modType == MT_RESIZE_LU || _modType == MT_RESIZE_RU )
{
top = true;
- snapStatus |= KoGuides::SNAP_HORIZ;
+ snaptqStatus |= KoGuides::SNAP_HORIZ;
}
if ( _modType == MT_RESIZE_DN || _modType == MT_RESIZE_LD || _modType == MT_RESIZE_RD )
{
bottom = true;
- snapStatus |= KoGuides::SNAP_HORIZ;
+ snaptqStatus |= KoGuides::SNAP_HORIZ;
}
if ( _modType == MT_RESIZE_LF || _modType == MT_RESIZE_LU || _modType == MT_RESIZE_LD )
{
left = true;
- snapStatus |= KoGuides::SNAP_VERT;
+ snaptqStatus |= KoGuides::SNAP_VERT;
}
if ( _modType == MT_RESIZE_RT || _modType == MT_RESIZE_RU || _modType == MT_RESIZE_RD )
{
right = true;
- snapStatus |= KoGuides::SNAP_VERT;
+ snaptqStatus |= KoGuides::SNAP_VERT;
}
double newLeft = objRect.left();
@@ -4931,17 +4931,17 @@ void KPrCanvas::resizeObject( ModifyType _modType, const KoPoint & point, bool k
{
sp.setY( rect.bottom() );
}
- m_gl.repaintSnapping( sp, snapStatus );
+ m_gl.tqrepaintSnapping( sp, snaptqStatus );
}
- _repaint( oldBoundingRect );
- _repaint( kpobject );
+ _tqrepaint( oldBoundingRect );
+ _tqrepaint( kpobject );
emit objectSizeChanged();
}
}
-void KPrCanvas::finishResizeObject( const QString &name, bool layout )
+void KPrCanvas::finishResizeObject( const TQString &name, bool tqlayout )
{
if ( m_resizeObject )
{
@@ -4958,12 +4958,12 @@ void KPrCanvas::finishResizeObject( const QString &name, bool layout )
m_view->kPresenterDoc()->addCommand( resizeCmd );
}
- if ( layout )
- m_view->kPresenterDoc()->layout( m_resizeObject );
+ if ( tqlayout )
+ m_view->kPresenterDoc()->tqlayout( m_resizeObject );
m_ratio = 0.0;
m_isResizing = false;
- _repaint( m_resizeObject );
+ _tqrepaint( m_resizeObject );
m_resizeObject = NULL;
}
}
@@ -4987,16 +4987,16 @@ void KPrCanvas::lowerObject()
m_objectDisplayAbove = 0;
}
-const QPtrList<KPrObject> KPrCanvas::displayObjectList() const
+const TQPtrList<KPrObject> KPrCanvas::displayObjectList() const
{
- QPtrList<KPrObject> list = objectList();
+ TQPtrList<KPrObject> list = objectList();
list.setAutoDelete( false );
if ( m_objectDisplayAbove )
{
// it can happen that the object is no longer there e.g. when
// the insert of the object is undone
- int pos = objectList().findRef( m_objectDisplayAbove );
+ int pos = objectList().tqfindRef( m_objectDisplayAbove );
if ( pos != -1 && m_objectDisplayAbove->isSelected() )
{
list.take( pos );
@@ -5011,7 +5011,7 @@ const QPtrList<KPrObject> KPrCanvas::displayObjectList() const
return list;
}
-void KPrCanvas::playSound( const QString &soundFileName )
+void KPrCanvas::playSound( const TQString &soundFileName )
{
if(soundPlayer)
delete soundPlayer;
@@ -5028,9 +5028,9 @@ void KPrCanvas::stopSound()
}
}
-void KPrCanvas::setXimPosition( int x, int y, int w, int h, QFont *f )
+void KPrCanvas::setXimPosition( int x, int y, int w, int h, TQFont *f )
{
- QWidget::setMicroFocusHint( x - diffx(), y - diffy(), w, h, true, f );
+ TQWidget::setMicroFocusHint( x - diffx(), y - diffy(), w, h, true, f );
}
void KPrCanvas::createEditing( KPrTextObject *textObj )
@@ -5057,12 +5057,12 @@ void KPrCanvas::terminateEditing( KPrTextObject *textObj )
}
}
-void KPrCanvas::drawCubicBezierCurve( QPainter &p, KoPointArray &points )
+void KPrCanvas::drawCubicBezierCurve( TQPainter &p, KoPointArray &points )
{
p.save();
if ( !m_drawLineWithCubicBezierCurve )
{
- QPen pen = QPen( Qt::black, 1, Qt::DashLine );
+ TQPen pen = TQPen( TQt::black, 1, TQt::DashLine );
p.setPen( pen );
double angle = KoPoint::getAngle( m_endPoint, m_startPoint );
drawFigure( L_SQUARE, &p, m_endPoint, pen.color(), pen.width(), angle,m_view->zoomHandler() );
@@ -5080,7 +5080,7 @@ void KPrCanvas::drawCubicBezierCurve( QPainter &p, KoPointArray &points )
m_view->zoomHandler()->zoomPoint( symmetricEndPoint ) );
p.save();
- p.setPen( QPen( Qt::black, 1, Qt::SolidLine ) );
+ p.setPen( TQPen( TQt::black, 1, TQt::SolidLine ) );
p.drawCubicBezier( points.zoomPointArray( m_view->zoomHandler() ) );
p.restore();
}
@@ -5095,7 +5095,7 @@ void KPrCanvas::drawCubicBezierCurve( QPainter &p, KoPointArray &points )
}
-void KPrCanvas::redrawCubicBezierCurve( QPainter &p )
+void KPrCanvas::redrawCubicBezierCurve( TQPainter &p )
{
if ( m_indexPointArray > 0 )
{
@@ -5122,7 +5122,7 @@ void KPrCanvas::redrawCubicBezierCurve( QPainter &p )
}
-void KPrCanvas::drawPolygon( QPainter &p, const KoRect &rect )
+void KPrCanvas::drawPolygon( TQPainter &p, const KoRect &rect )
{
KoRect nRect = rect.normalize();
bool checkConcavePolygon = m_view->getCheckConcavePolygon();
@@ -5131,14 +5131,14 @@ void KPrCanvas::drawPolygon( QPainter &p, const KoRect &rect )
KoRect _rect( 0, 0, nRect.width(), nRect.height() );
double angle = 2 * M_PI / cornersValue;
- double diameter = static_cast<double>( QMAX( _rect.width(), _rect.height() ) );
+ double diameter = static_cast<double>( TQMAX( _rect.width(), _rect.height() ) );
double radius = diameter * 0.5;
KoPointArray _points( checkConcavePolygon ? cornersValue * 2 : cornersValue );
- _points.setPoint( 0, 0, qRound( -radius ) );
+ _points.setPoint( 0, 0, tqRound( -radius ) );
double xmin = 0;
- double ymin = qRound( -radius );
+ double ymin = tqRound( -radius );
if ( checkConcavePolygon ) {
angle = angle / 2.0;
@@ -5264,13 +5264,13 @@ KoRect KPrCanvas::objectRect( bool all ) const
return m_activePage->getRealRect( all );
}
-void KPrCanvas::scrollTopLeftPoint( const QPoint & pos )
+void KPrCanvas::scrollTopLeftPoint( const TQPoint & pos )
{
m_view->getHScrollBar()->setValue( pos.x() );
m_view->getVScrollBar()->setValue( pos.y() );
}
-void KPrCanvas::changePicture( const KURL & url, QWidget *window )
+void KPrCanvas::changePicture( const KURL & url, TQWidget *window )
{
m_activePage->changePicture( url, window );
}
@@ -5309,10 +5309,10 @@ void KPrCanvas::ensureVisible( int x, int y, int xmargin, int ymargin )
// "Extend Contents to Object Height"
void KPrCanvas::textContentsToHeight()
{
- QPtrList<KPrTextObject> lst = applicableTextObjects();
+ TQPtrList<KPrTextObject> lst = applicableTextObjects();
if ( lst.isEmpty() )
return;
- QPtrListIterator<KPrTextObject> it( lst );
+ TQPtrListIterator<KPrTextObject> it( lst );
KMacroCommand * macro = 0L;
for ( ; it.current() ; ++it ) {
KCommand *cmd= it.current()->textContentsToHeight();
@@ -5321,24 +5321,24 @@ void KPrCanvas::textContentsToHeight()
if ( !macro )
macro = new KMacroCommand(i18n("Extend Text Contents to Height"));
macro->addCommand( cmd);
- _repaint( it.current() );
+ _tqrepaint( it.current() );
}
}
if( macro )
{
macro->execute();
m_view->kPresenterDoc()->addCommand( macro );
- m_view->kPresenterDoc()->repaint(this);
+ m_view->kPresenterDoc()->tqrepaint(this);
}
}
// "Resize Object to fit Contents"
void KPrCanvas::textObjectToContents()
{
- QPtrList<KPrTextObject> lst = applicableTextObjects();
+ TQPtrList<KPrTextObject> lst = applicableTextObjects();
if ( lst.isEmpty() )
return;
- QPtrListIterator<KPrTextObject> it( lst );
+ TQPtrListIterator<KPrTextObject> it( lst );
KMacroCommand * macro = 0L;
for ( ; it.current() ; ++it ) {
KCommand *cmd= it.current()->textObjectToContents();
@@ -5354,15 +5354,15 @@ void KPrCanvas::textObjectToContents()
{
macro->execute();
m_view->kPresenterDoc()->addCommand( macro );
- m_view->kPresenterDoc()->repaint(this);
+ m_view->kPresenterDoc()->tqrepaint(this);
}
}
void KPrCanvas::flipObject( bool _horizontal )
{
- QPtrList<KPrObject> lst;
- QPtrListIterator<KPrObject> it(getObjectList());
+ TQPtrList<KPrObject> lst;
+ TQPtrListIterator<KPrObject> it(getObjectList());
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() &&
it.current()->getType() != OT_AUTOFORM &&
@@ -5394,10 +5394,10 @@ void KPrCanvas::raiseObjs( bool forward )
m_activePage->raiseObjs( forward );
}
-QPtrList<KPrTextObject> KPrCanvas::listOfTextObjs() const
+TQPtrList<KPrTextObject> KPrCanvas::listOfTextObjs() const
{
- QPtrList<KPrTextObject> lst;
- QPtrListIterator<KPrObject> it(getObjectList());
+ TQPtrList<KPrTextObject> lst;
+ TQPtrListIterator<KPrObject> it(getObjectList());
for ( ; it.current(); ++it ) {
if ( it.current()->getType() == OT_TEXT )
{
@@ -5410,30 +5410,30 @@ QPtrList<KPrTextObject> KPrCanvas::listOfTextObjs() const
return lst;
}
-KPrTextObject* KPrCanvas::textUnderMouse( const QPoint & point )
+KPrTextObject* KPrCanvas::textUnderMouse( const TQPoint & point )
{
- QPtrList<KPrTextObject> obj = listOfTextObjs();
- QPtrListIterator<KPrTextObject> it2(obj );
+ TQPtrList<KPrTextObject> obj = listOfTextObjs();
+ TQPtrListIterator<KPrTextObject> it2(obj );
for ( ; it2.current() ; ++it2 ) {
- QRect outerRect( m_view->kPresenterDoc()->zoomHandler()->zoomRect( it2.current()->getRect()) );
- if ( !it2.current()->isProtectContent() && outerRect.contains( point) )
+ TQRect outerRect( m_view->kPresenterDoc()->zoomHandler()->zoomRect( it2.current()->getRect()) );
+ if ( !it2.current()->isProtectContent() && outerRect.tqcontains( point) )
return it2.current();
}
return 0L;
}
-void KPrCanvas::speakTextUnderMouse(QWidget* w, const QPoint& p, uint flags)
+void KPrCanvas::speakTextUnderMouse(TQWidget* w, const TQPoint& p, uint flags)
{
Q_UNUSED( flags );
if ( w != this ) return;
// Since text objects can't get focus without clicking with the mouse,
// no point in supporting focus speaking.
- if ( p == QPoint() ) return;
+ if ( p == TQPoint() ) return;
KPrTextObject *to = textUnderMouse( w->mapFromGlobal( p ) );
if ( to == m_prevSpokenTO ) return;
m_prevSpokenTO = to;
if ( to ) {
- QString text = to->textObject()->textDocument()->plainText();
+ TQString text = to->textObject()->textDocument()->plainText();
if ( !text.isEmpty() ) kospeaker->sayWidget( text );
}
}
@@ -5444,7 +5444,7 @@ bool KPrCanvas::checkCurrentTextEdit( KPrTextObject * textObj )
if ( textObj && m_currentTextObjectView && m_currentTextObjectView->kpTextObject() != textObj )
{
m_currentTextObjectView->kpTextObject()->setEditingTextObj( false );
- _repaint( m_currentTextObjectView->kpTextObject() );
+ _tqrepaint( m_currentTextObjectView->kpTextObject() );
//don't remove selection otherwise break dnd.
m_currentTextObjectView->terminate(false);
delete m_currentTextObjectView;
@@ -5465,7 +5465,7 @@ void KPrCanvas::alignObjects( AlignType at )
{
KPrDocument * doc = m_view->kPresenterDoc();
- QString name;
+ TQString name;
switch ( at )
{
@@ -5489,9 +5489,9 @@ void KPrCanvas::alignObjects( AlignType at )
break;
}
- QPtrList<KPrObject> objects;
+ TQPtrList<KPrObject> objects;
- QPtrListIterator<KPrObject> it( m_activePage->objectList() );
+ TQPtrListIterator<KPrObject> it( m_activePage->objectList() );
for ( ; it.current() ; ++it )
{
if ( it.current() == m_view->kPresenterDoc()->header() ||
@@ -5518,12 +5518,12 @@ bool KPrCanvas::canMoveOneObject() const
void KPrCanvas::closeObject(bool /*close*/)
{
- QPtrList<KPrObject> lst;
- QPtrListIterator<KPrObject> it(getObjectList());
+ TQPtrList<KPrObject> lst;
+ TQPtrListIterator<KPrObject> it(getObjectList());
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected()
&& (it.current()->getType() == OT_POLYLINE || it.current()->getType() == OT_FREEHAND
- || it.current()->getType() == OT_QUADRICBEZIERCURVE
+ || it.current()->getType() == OT_TQUADRICBEZIERCURVE
|| it.current()->getType() == OT_CUBICBEZIERCURVE ))
lst.append( it.current() );
}
@@ -5535,16 +5535,16 @@ void KPrCanvas::closeObject(bool /*close*/)
m_view->kPresenterDoc()->addCommand( cmd );
}
-void KPrCanvas::layout()
+void KPrCanvas::tqlayout()
{
- QPtrListIterator<KPrObject> it(getObjectList());
+ TQPtrListIterator<KPrObject> it(getObjectList());
for ( ; it.current(); ++it ) {
if ( it.current()->getType() == OT_TEXT )
- static_cast<KPrTextObject *>( it.current() )->layout();
+ static_cast<KPrTextObject *>( it.current() )->tqlayout();
}
}
-KoPoint KPrCanvas::snapPoint( KoPoint &pos, bool repaintSnapping )
+KoPoint KPrCanvas::snapPoint( KoPoint &pos, bool tqrepaintSnapping )
{
KoPoint sp( pos );
KPrDocument * doc( m_view->kPresenterDoc() );
@@ -5553,18 +5553,18 @@ KoPoint KPrCanvas::snapPoint( KoPoint &pos, bool repaintSnapping )
bool snapToGuideLines = doc->showGuideLines() && !m_disableSnapping;
KoPoint snapDiff = KoPoint( 0, 0 ); // needed if all snapping is off
- KoGuides::SnapStatus snapStatus = KoGuides::SNAP_NONE;
+ KoGuides::SnaptqStatus snaptqStatus = KoGuides::SNAP_NONE;
if ( snapToGrid )
{
- snapDiff.setX( qRound( sp.x() / doc->getGridX()) * doc->getGridX() - sp.x() );
- snapDiff.setY( qRound( sp.y() / doc->getGridY()) * doc->getGridY() - sp.y() );
- snapStatus = KoGuides::SNAP_BOTH;
+ snapDiff.setX( tqRound( sp.x() / doc->getGridX()) * doc->getGridX() - sp.x() );
+ snapDiff.setY( tqRound( sp.y() / doc->getGridY()) * doc->getGridY() - sp.y() );
+ snaptqStatus = KoGuides::SNAP_BOTH;
}
if ( snapToGuideLines )
{
- m_gl.snapToGuideLines( sp, MOUSE_SNAP_DISTANCE, snapStatus, snapDiff );
+ m_gl.snapToGuideLines( sp, MOUSE_SNAP_DISTANCE, snaptqStatus, snapDiff );
}
sp += snapDiff;
@@ -5582,16 +5582,16 @@ KoPoint KPrCanvas::snapPoint( KoPoint &pos, bool repaintSnapping )
sp.setY( pageRect.bottom() );
// redraw guidelines (intentionally always)
- if ( repaintSnapping && snapToGuideLines )
+ if ( tqrepaintSnapping && snapToGuideLines )
{
- m_gl.repaintSnapping( sp, KoGuides::SNAP_BOTH );
+ m_gl.tqrepaintSnapping( sp, KoGuides::SNAP_BOTH );
}
return sp;
}
-void KPrCanvas::alignVertical( VerticalAlignmentType _type )
+void KPrCanvas::alignVertical(VerticalAlignmentType _type )
{
KCommand *cmd = m_activePage->alignVertical( _type );
if ( cmd )
@@ -5614,7 +5614,7 @@ KoPointArray KPrCanvas::getObjectPoints( const KoPointArray &pointArray )
return points;
}
-void KPrCanvas::objectPopup( KPrObject *object, const QPoint &point )
+void KPrCanvas::objectPopup( KPrObject *object, const TQPoint &point )
{
switch ( object->getType() )
{
@@ -5644,7 +5644,7 @@ void KPrCanvas::objectPopup( KPrObject *object, const QPoint &point )
break;
case OT_POLYLINE:
case OT_CUBICBEZIERCURVE:
- case OT_QUADRICBEZIERCURVE:
+ case OT_TQUADRICBEZIERCURVE:
case OT_FREEHAND:
m_view->openPopupMenuObject( "closed_popup", point );
break;
@@ -5674,7 +5674,7 @@ void KPrCanvas::popupContextMenu()
m_view->stopAutoPresTimer();
}
setCursor( arrowCursor );
- QPoint p( width()/2, height()/2 );
+ TQPoint p( width()/2, height()/2 );
int ret = m_presMenu->exec( p );
// we have to continue the timer if the menu was canceled and draw mode is not active
if ( ret == -1 && !m_presMenu->isItemChecked( PM_DM ) && !spManualSwitch() )
@@ -5685,7 +5685,7 @@ void KPrCanvas::popupContextMenu()
// TODO: Better to popup at caret position.
// KoTextCursor* cursor = m_currentTextObjectView->cursor();
KoPoint kop = m_currentTextObjectView->kpTextObject()->getOrig();
- QPoint p = m_view->zoomHandler()->zoomPoint( kop );
+ TQPoint p = m_view->zoomHandler()->zoomPoint( kop );
p = mapToGlobal( p );
m_currentTextObjectView->showPopup( m_view, p, m_view->actionList() );
return;
@@ -5694,11 +5694,11 @@ void KPrCanvas::popupContextMenu()
KPrObject* obj = m_activePage->getSelectedObj();
if (obj) {
KoPoint kop = obj->getOrig();
- QPoint p = m_view->zoomHandler()->zoomPoint( kop );
+ TQPoint p = m_view->zoomHandler()->zoomPoint( kop );
p = mapToGlobal( p );
objectPopup( obj, p );
} else {
- QPoint p = mapToGlobal( QPoint() );
+ TQPoint p = mapToGlobal( TQPoint() );
m_view->openPopupMenuMenuPage( p );
}
}