summaryrefslogtreecommitdiffstats
path: root/src/komposetaskvisualizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/komposetaskvisualizer.cpp')
-rw-r--r--src/komposetaskvisualizer.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/komposetaskvisualizer.cpp b/src/komposetaskvisualizer.cpp
index a3930aa..5348768 100644
--- a/src/komposetaskvisualizer.cpp
+++ b/src/komposetaskvisualizer.cpp
@@ -15,11 +15,11 @@
#include "komposeviewmanager.h"
#include "komposetaskmanager.h"
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#include <kwin.h>
#include <netwm.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <time.h>
@@ -28,7 +28,7 @@
KomposeTaskVisualizer::KomposeTaskVisualizer(KomposeTask *parent, const char *name)
- : QObject(parent, name),
+ : TQObject(parent, name),
task(parent),
scaledScreenshotDirty(false),
screenshotSuspended(false),
@@ -40,8 +40,8 @@ KomposeTaskVisualizer::KomposeTaskVisualizer(KomposeTask *parent, const char *na
compositeInit = false;
#endif
- screenshot.setOptimization( QPixmap::BestOptim );
- scaledScreenshot.setOptimization( QPixmap::BestOptim );
+ screenshot.setOptimization( TQPixmap::BestOptim );
+ scaledScreenshot.setOptimization( TQPixmap::BestOptim );
// Create highlight color modifier
cmHighlight = imlib_create_color_modifier();
@@ -78,7 +78,7 @@ KomposeTaskVisualizer::~KomposeTaskVisualizer()
* Called from outside to retrieve a screenshot
* @param pix The pixmap the screenshot will be rendered onto
*/
-void KomposeTaskVisualizer::renderOnPixmap(QPixmap* pix, int effect)
+void KomposeTaskVisualizer::renderOnPixmap(TQPixmap* pix, int effect)
{
if ( scaledScreenshotDirty || scaledScreenshot.isNull() || scaledScreenshot.size() != pix->size() ||
KomposeSettings::instance()->getImageEffects() && (lasteffect != effect ) )
@@ -89,7 +89,7 @@ void KomposeTaskVisualizer::renderOnPixmap(QPixmap* pix, int effect)
copyBlt ( pix, 0, 0, &scaledScreenshot, 0, 0, pix->width(), pix->height() );
- // QPainter p( pix );
+ // TQPainter p( pix );
// p.drawPixmap(0 ,0 , *scaledScreenshot, 0, 0, pix->width(), pix->height() );
// p.end();
}
@@ -99,7 +99,7 @@ void KomposeTaskVisualizer::renderOnPixmap(QPixmap* pix, int effect)
* Renders a scaled version of screenshot and stores it as scaledScreenshot
* @param newSize
*/
-void KomposeTaskVisualizer::renderScaledScreenshot( QSize newSize )
+void KomposeTaskVisualizer::renderScaledScreenshot( TQSize newSize )
{
kdDebug() << "KomposeTaskVisualizer::renderScaledScreenshot() (" << task->window() << ") " << newSize.width() << "x" << newSize.height() << endl;
@@ -140,7 +140,7 @@ void KomposeTaskVisualizer::renderScaledScreenshot( QSize newSize )
// The XComposite way
#ifdef COMPOSITE
Picture picture = XRenderCreatePicture( dpy, windowBackingPix, format, CPSubwindowMode, &pa );
- QRect geom = task->getGeometry();
+ TQRect geom = task->getGeometry();
double scale = (double)pix->width() / (double)geom.width();
XRenderSetPictureFilter( dpy, picture, FilterBilinear, 0, 0 );
@@ -153,7 +153,7 @@ void KomposeTaskVisualizer::renderScaledScreenshot( QSize newSize )
XRenderSetPictureTransform( dpy, picture, &xform );
- XRenderComposite( QPaintDevice::x11AppDisplay(),
+ XRenderComposite( TQPaintDevice::x11AppDisplay(),
hasAlpha ? PictOpOver : PictOpSrc,
picture,
None,
@@ -197,7 +197,7 @@ void KomposeTaskVisualizer::slotTaskActivated()
{
// Retry 1 sec later
screenshotSuspended = true;
- QTimer::singleShot( 500, this, SLOT( slotTaskActivated() ) );
+ TQTimer::singleShot( 500, this, SLOT( slotTaskActivated() ) );
}
screenshotSuspended = false;
@@ -208,7 +208,7 @@ void KomposeTaskVisualizer::slotTaskActivated()
{
kdDebug() << "KomposeTaskVisualizer::slotTaskActivated() (WId " << task->window() << ") - Screenshot already exists, but passive mode on - Grabbing new one." << endl;
// Use a timer to make task switching feel more responsive
- QTimer::singleShot( 300, this, SLOT( captureScreenshot_GrabWindow() ) );
+ TQTimer::singleShot( 300, this, SLOT( captureScreenshot_GrabWindow() ) );
//captureScreenshot_GrabWindow();
}
}
@@ -247,8 +247,8 @@ void KomposeTaskVisualizer::slotUpdateScreenshot()
kdDebug() << "KomposeTaskVisualizer::slotUpdateScreenshot() (WId " << task->window() << ") - Forcing activation (no screenshot exists)" << endl;
task->activate();
- QApplication::flushX();
- QApplication::syncX();
+ TQApplication::flushX();
+ TQApplication::syncX();
// Wait until window is fully redrawn
struct timespec req, rem;
@@ -257,16 +257,16 @@ void KomposeTaskVisualizer::slotUpdateScreenshot()
while(nanosleep(&req, &rem))
req = rem;
- QApplication::flushX();
+ TQApplication::flushX();
//task->refresh();
// Finally capture!
- screenshot = QPixmap::grabWindow( task->window() );
+ screenshot = TQPixmap::grabWindow( task->window() );
//captureScreenshot_GrabWindow();
// Restore if formerly iconified
if ( iconifyLater )
- QTimer::singleShot( 1000, task, SLOT( iconify() ) );
+ TQTimer::singleShot( 1000, task, SLOT( iconify() ) );
scaledScreenshotDirty = true;
}
@@ -310,7 +310,7 @@ void KomposeTaskVisualizer::initXComposite()
#ifdef COMPOSITE
if ( !compositeInit && KomposeGlobal::instance()->hasXcomposite() && KomposeSettings::instance()->getUseComposite())
{
- dpy = QPaintDevice::x11AppDisplay();
+ dpy = TQPaintDevice::x11AppDisplay();
connect( task, SIGNAL(x11ConfigureNotify()), this, SLOT(updateXCompositeNamedPixmap()));
XSelectInput( dpy, task->wmFrame(), StructureNotifyMask );
@@ -360,21 +360,21 @@ void KomposeTaskVisualizer::captureScreenshot_GrabWindow()
//task->activate();
- // QWidget *rootWin = qApp->desktop();
- // screenshot = QPixmap::grabWindow( rootWin->winId(), geom.x(), geom.y(), geom.width(), geom.height() );
+ // TQWidget *rootWin = tqApp->desktop();
+ // screenshot = TQPixmap::grabWindow( rootWin->winId(), geom.x(), geom.y(), geom.width(), geom.height() );
- screenshot = QPixmap::grabWindow( task->window() );
+ screenshot = TQPixmap::grabWindow( task->window() );
scaledScreenshotDirty = true;
// We've just grabbed a screenshot and don't want this to happen again in the next 3?! seconds
screenshotBlocked = true;
- QTimer::singleShot( 3000, this, SLOT( enablePasvScreenshots() ) );
+ TQTimer::singleShot( 3000, this, SLOT( enablePasvScreenshots() ) );
kdDebug() << "KomposeTaskVisualizer::captureScreenshot_GrabWindow() (WId " << task->window() << ") - Grabbed screenshot." << endl;
// Code to create a screenshot directly as an Imlib image
- // QRect geom = windowInfo.geometry();
+ // TQRect geom = windowInfo.geometry();
// Display *disp;
// Visual *vis;
// Colormap cm;