Replaced various '#define' with actual strings - part 5

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/80/head
Michele Calgaro 12 months ago
parent 32a0eae8ca
commit 3849f5c32c
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -220,7 +220,7 @@ void PaletteViewScrolledArea::paintEvent(TQPaintEvent* /*event*/) {
setCellsSizes(); setCellsSizes();
TQPixmap pixmap(size()); TQPixmap pixmap(size());
TQPainter painter; TQPainter painter;
painter.begin(TQT_TQPAINTDEVICE(&pixmap), this); painter.begin(&pixmap, this);
TQFontMetrics fontMetrics = painter.fontMetrics(); TQFontMetrics fontMetrics = painter.fontMetrics();
int maxLineWidth; int maxLineWidth;
if(viewColorNames) { if(viewColorNames) {

@ -279,8 +279,8 @@ void KPSWidget::setupWidget()
Q_ASSERT( orientation() != CDSC_ORIENT_UNKNOWN ); Q_ASSERT( orientation() != CDSC_ORIENT_UNKNOWN );
const float dpiX = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiX(); const float dpiX = _magnification * this->x11AppDpiX();
const float dpiY = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiY(); const float dpiY = _magnification * this->x11AppDpiY();
int newWidth = 0, newHeight = 0; int newWidth = 0, newHeight = 0;
if( orientation() == CDSC_PORTRAIT || orientation() == CDSC_UPSIDEDOWN ) if( orientation() == CDSC_PORTRAIT || orientation() == CDSC_UPSIDEDOWN )

@ -686,7 +686,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
} }
// Write to local temporary file. // Write to local temporary file.
if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(atomicFileWriter.file ()), if (!savePixmapToDevice (pixmap, atomicFileWriter.file (),
saveOptions, metaInfo, saveOptions, metaInfo,
false/*no lossy prompt*/, false/*no lossy prompt*/,
parent)) parent))
@ -746,7 +746,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
return false; return false;
} }
if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(&file), if (!savePixmapToDevice (pixmap, &file,
saveOptions, metaInfo, saveOptions, metaInfo,
false/*no lossy prompt*/, false/*no lossy prompt*/,
parent)) parent))

@ -898,7 +898,7 @@ void kpDocumentSaveOptionsWidget::updatePreview ()
TQBuffer buffer (data); TQBuffer buffer (data);
buffer.open (IO_WriteOnly); buffer.open (IO_WriteOnly);
kpDocument::savePixmapToDevice (*m_documentPixmap, kpDocument::savePixmapToDevice (*m_documentPixmap,
TQT_TQIODEVICE(&buffer), &buffer,
documentSaveOptions (), documentSaveOptions (),
m_documentMetaInfo, m_documentMetaInfo,
false/*no lossy prompt*/, false/*no lossy prompt*/,

@ -1435,7 +1435,7 @@ void kpSelection::flip (bool horiz, bool vert)
#if DEBUG_KP_SELECTION && 1 #if DEBUG_KP_SELECTION && 1
kdDebug () << "\thave transparency mask - flipping that" << endl; kdDebug () << "\thave transparency mask - flipping that" << endl;
#endif #endif
kpPixmapFX::flip (TQT_TQPIXMAP(&m_transparencyMask), horiz, vert); kpPixmapFX::flip (&m_transparencyMask, horiz, vert);
} }

@ -694,9 +694,9 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
0, 0, 0, 0,
destRect.width (), destRect.height ()); destRect.width (), destRect.height ());
#else #else
bitBlt (TQT_TQPAINTDEVICE(destPixmapPtr), bitBlt (destPixmapPtr,
destRect.x (), destRect.y (), destRect.x (), destRect.y (),
TQT_TQPAINTDEVICE(const_cast<TQPixmap*>(&srcPixmap)), const_cast<TQPixmap*>(&srcPixmap),
0, 0, 0, 0,
destRect.width (), destRect.height (), destRect.width (), destRect.height (),
TQt::CopyROP, TQt::CopyROP,
@ -705,9 +705,9 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
if (srcPixmap.mask ()) if (srcPixmap.mask ())
{ {
TQBitmap mask = getNonNullMask (*destPixmapPtr); TQBitmap mask = getNonNullMask (*destPixmapPtr);
bitBlt (TQT_TQPAINTDEVICE(&mask), bitBlt (&mask,
destRect.x (), destRect.y (), destRect.x (), destRect.y (),
TQT_TQPAINTDEVICE(const_cast<TQBitmap*>(srcPixmap.mask ())), const_cast<TQBitmap*>(srcPixmap.mask ()),
0, 0, 0, 0,
destRect.width (), destRect.height (), destRect.width (), destRect.height (),
TQt::CopyROP, TQt::CopyROP,

@ -390,7 +390,7 @@ void PMDialogEditBase::slotTexturePreview( )
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
TQTextStream str( &buffer ); TQTextStream str( &buffer );
PMPovray31Format format; PMPovray31Format format;
PMSerializer* dev = format.newSerializer( TQT_TQIODEVICE(&buffer) ); PMSerializer* dev = format.newSerializer( &buffer );
PMRenderMode mode; PMRenderMode mode;
PMObjectList neededDeclares, objectsToCheck; PMObjectList neededDeclares, objectsToCheck;
TQPtrDict<PMObject> objectsToSerialize( 101 ); TQPtrDict<PMObject> objectsToSerialize( 101 );

@ -73,7 +73,7 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, TQWidget* dragSource
TQBuffer buffer( data ); TQBuffer buffer( data );
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
PMSerializer* ser = it.current( )->newSerializer( TQT_TQIODEVICE(&buffer) ); PMSerializer* ser = it.current( )->newSerializer( &buffer );
if( ser ) if( ser )
{ {
@ -143,7 +143,7 @@ PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, TQWidget*
TQBuffer buffer( data ); TQBuffer buffer( data );
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
PMSerializer* ser = fit.current( )->newSerializer( TQT_TQIODEVICE(&buffer) ); PMSerializer* ser = fit.current( )->newSerializer( &buffer );
if( ser ) if( ser )
{ {

@ -48,7 +48,7 @@ PMParser::PMParser( PMPart* part, const TQByteArray& array )
m_pPart = part; m_pPart = part;
TQBuffer* buffer = new TQBuffer( array ); TQBuffer* buffer = new TQBuffer( array );
buffer->open( IO_ReadOnly ); buffer->open( IO_ReadOnly );
m_pDevice = TQT_TQIODEVICE(buffer); m_pDevice = buffer;
m_bDeviceCreated = true; m_bDeviceCreated = true;
init( ); init( );

@ -951,7 +951,7 @@ bool PMPart::exportPovray( const KURL& url )
if( ok ) if( ok )
{ {
PMPovray35Format format; PMPovray35Format format;
PMSerializer* dev = format.newSerializer( TQT_TQIODEVICE(file) ); PMSerializer* dev = format.newSerializer( file );
dev->serialize( m_pScene ); dev->serialize( m_pScene );
delete dev; delete dev;
@ -1369,7 +1369,7 @@ void PMPart::slotFileImport( )
TQFile file( fileName ); TQFile file( fileName );
if( file.open( IO_ReadOnly ) ) if( file.open( IO_ReadOnly ) )
{ {
PMParser* newParser = selectedFormat->newParser( this, TQT_TQIODEVICE(&file) ); PMParser* newParser = selectedFormat->newParser( this, &file );
if( newParser ) if( newParser )
{ {
if( m_pActiveObject ) if( m_pActiveObject )
@ -1404,7 +1404,7 @@ void PMPart::slotFileExport( )
TQBuffer buffer( baData ); TQBuffer buffer( baData );
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
PMSerializer* newSer = selectedFormat->newSerializer( TQT_TQIODEVICE(&buffer) ); PMSerializer* newSer = selectedFormat->newSerializer( &buffer );
if( newSer ) if( newSer )
{ {
newSer->serialize( m_pScene ); newSer->serialize( m_pScene );
@ -2713,7 +2713,7 @@ void PMPart::slotRender( )
TQBuffer buffer( a ); TQBuffer buffer( a );
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
PMPovray35Format format; PMPovray35Format format;
PMSerializer* dev = format.newSerializer( TQT_TQIODEVICE(&buffer) ); PMSerializer* dev = format.newSerializer( &buffer );
dev->serialize( m_pScene ); dev->serialize( m_pScene );
delete dev; delete dev;

@ -128,14 +128,14 @@ void KSVGLoader::slotResult(TDEIO::Job *job)
if(check.contains(".svgz") || check.contains(".svg.gz")) if(check.contains(".svgz") || check.contains(".svg.gz"))
{ {
// decode the gzipped svg and emit it // decode the gzipped svg and emit it
TQIODevice *dev = KFilterDev::device(TQT_TQIODEVICE(new TQBuffer(m_data)), "application/x-gzip"); TQIODevice *dev = KFilterDev::device(new TQBuffer(m_data), "application/x-gzip");
dev->open(IO_ReadOnly); dev->open(IO_ReadOnly);
emit gotResult(dev); emit gotResult(dev);
} }
else else
{ {
m_job = 0; m_job = 0;
emit gotResult(TQT_TQIODEVICE(new TQBuffer(m_data))); emit gotResult(new TQBuffer(m_data));
m_data.resize(0); m_data.resize(0);
} }
} }
@ -162,7 +162,7 @@ void KSVGLoader::slotResult(TDEIO::Job *job)
if(buffer.open(IO_ReadOnly)) if(buffer.open(IO_ReadOnly))
{ {
const char *imageFormat = TQImageIO::imageFormat(TQT_TQIODEVICE(&buffer)); const char *imageFormat = TQImageIO::imageFormat(&buffer);
if(imageFormat != 0) if(imageFormat != 0)
{ {

@ -95,7 +95,7 @@ void SVGScriptElementImpl::slotResult(TDEIO::Job *)
m_data[m_data.size() - 1] = '\0'; m_data[m_data.size() - 1] = '\0';
TQBuffer buf(m_data); TQBuffer buf(m_data);
TQIODevice *dev = KFilterDev::device(TQT_TQIODEVICE(&buf), "application/x-gzip", false); TQIODevice *dev = KFilterDev::device(&buf, "application/x-gzip", false);
TQByteArray contents; TQByteArray contents;
if(dev->open(IO_ReadOnly)) if(dev->open(IO_ReadOnly))
contents = dev->readAll(); contents = dev->readAll();

@ -110,7 +110,7 @@ KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const
if(!ksvgd->canvas) if(!ksvgd->canvas)
return; return;
ksvgd->canvas->setup(TQT_TQPAINTDEVICE(ksvgd->backgroundPixmap), TQT_TQPAINTDEVICE(ksvgd->window)); ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window);
ksvgd->zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection()); ksvgd->zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection());
ksvgd->zoomOutAction = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection()); ksvgd->zoomOutAction = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection());
@ -299,7 +299,7 @@ void KSVGPlugin::slotRenderingBackend()
if(!ksvgd->canvas) if(!ksvgd->canvas)
return; return;
ksvgd->canvas->setup(TQT_TQPAINTDEVICE(ksvgd->backgroundPixmap), TQT_TQPAINTDEVICE(ksvgd->window)); ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window);
openURL(m_url); openURL(m_url);
} }

@ -59,7 +59,7 @@ bool SVGCreator::create(const TQString &path, int width, int height, TQImage &im
pix.fill(TQt::white); pix.fill(TQt::white);
KSVG::KSVGCanvas *c = KSVG::CanvasFactory::self()->loadCanvas(width, height); KSVG::KSVGCanvas *c = KSVG::CanvasFactory::self()->loadCanvas(width, height);
c->setup(TQT_TQPAINTDEVICE(&pix), TQT_TQPAINTDEVICE(&pix)); c->setup(&pix, &pix);
doc->attach(c); doc->attach(c);
connect(doc, TQT_SIGNAL(finishedRendering()), TQT_SLOT(slotFinished())); connect(doc, TQT_SIGNAL(finishedRendering()), TQT_SLOT(slotFinished()));

@ -29,7 +29,7 @@ SVGTestWidget::SVGTestWidget(const KURL &url)
if(!m_canvas) if(!m_canvas)
return; return;
m_canvas->setup(TQT_TQPAINTDEVICE(this), TQT_TQPAINTDEVICE(this)); m_canvas->setup(this, this);
if(!DocumentFactory::self()->attachCanvas(m_canvas, m_doc)) if(!DocumentFactory::self()->attachCanvas(m_canvas, m_doc))
return; return;

Loading…
Cancel
Save