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

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/57/head
Michele Calgaro 12 months ago
parent d7ae9fb514
commit fb6b4d204d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -287,7 +287,7 @@ bool KisBrush::save()
{
TQFile file(filename());
file.open(IO_WriteOnly | IO_Truncate);
bool ok = saveToDevice(TQT_TQIODEVICE(&file));
bool ok = saveToDevice(&file);
file.close();
return ok;
}

@ -265,7 +265,7 @@ bool KisImagePipeBrush::save()
{
TQFile file(filename());
file.open(IO_WriteOnly | IO_Truncate);
bool ok = saveToDevice(TQT_TQIODEVICE(&file));
bool ok = saveToDevice(&file);
file.close();
return ok;
}

@ -66,7 +66,7 @@ void KGradientSlider::paintEvent(TQPaintEvent *)
/*if (!m_dragging) {*/
TQPixmap pm(size());
TQPainter p1;
p1.begin(TQT_TQPAINTDEVICE(&pm), this);
p1.begin(&pm, this);
pm.fill();

@ -133,7 +133,7 @@ void KCurve::paintEvent(TQPaintEvent *)
TQPixmap pm(size());
TQPainter p1;
p1.begin(TQT_TQPAINTDEVICE(&pm), this);
p1.begin(&pm, this);
// draw background
if(m_pix)

@ -26,7 +26,7 @@
TQPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h)
{
TQPixmap target(w, h);
KisCanvasPainter painter(TQT_TQPAINTDEVICE(&target));
KisCanvasPainter painter(&target);
painter.eraseRect(0, 0, w, h);

@ -735,7 +735,7 @@ void KisCanvasWidget::X11TabletDevice::writeSettingsToConfig()
void KisCanvasWidget::X11TabletDevice::enableEvents(TQWidget *widget) const
{
if (!m_eventClassList.isEmpty()) {
int result = XSelectExtensionEvent(TQT_TQPAINTDEVICE(widget)->x11AppDisplay(), widget->handle(),
int result = XSelectExtensionEvent(widget->x11AppDisplay(), widget->handle(),
const_cast<XEventClass*>(&m_eventClassList[0]),
m_eventClassList.count());

@ -82,7 +82,7 @@ void KisClipboard::setClip(KisPaintDeviceSP selection)
// We'll create a store (ZIP format) in memory
TQBuffer buffer;
TQCString mimeType("application/x-chalk-selection");
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType );
KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store );
Q_ASSERT( !store->bad() );
@ -146,7 +146,7 @@ KisPaintDeviceSP KisClipboard::clip()
if(cbData && cbData->provides(mimeType))
{
TQBuffer buffer(cbData->encodedData(mimeType));
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read, mimeType );
KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType );
KisProfile *profile=0;
if (store->hasFile("profile.icc")) {
@ -244,7 +244,7 @@ TQSize KisClipboard::clipSize()
if(cbData && cbData->provides(mimeType)) {
TQBuffer buffer(cbData->encodedData(mimeType));
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read, mimeType );
KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType );
KisProfile *profile=0;
if (store->hasFile("profile.icc")) {

@ -108,7 +108,7 @@ bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event)
KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter()
{
return new KisTQPaintDeviceCanvasPainter(TQT_TQPAINTDEVICE(this));
return new KisTQPaintDeviceCanvasPainter(this);
}
#if defined(EXTENDED_X11_TABLET_SUPPORT)

@ -38,7 +38,7 @@ bool KisTQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool un
TQWidget *widget = dynamic_cast<TQWidget *>(canvasWidget);
if (widget != 0) {
return m_painter.begin(TQT_TQPAINTDEVICE(widget), unclipped);
return m_painter.begin(widget, unclipped);
} else {
return false;
}

@ -87,7 +87,7 @@ KoFilter::ConversionStatus GenericFilter::doImport()
TQFile tempFile(temp.name());
m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write);
m_out = KoStore::createStore(&tempFile, KoStore::Write);
if (!m_out || !m_out->open("root"))
{

@ -73,7 +73,7 @@ AiImport::convert( const TQCString& from, const TQCString& to )
TQDomDocument doc ("DOC");
KarbonAIParserBase parser;
if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc))
if (!parser.parse(fileIn, doc))
{
fileIn.close();
return KoFilter::CreationError;

@ -81,7 +81,7 @@ EpsImport::convert( const TQCString& from, const TQCString& to )
if ( file.open(IO_ReadOnly) )
{
extractor.parse (*TQT_TQIODEVICE(&file));
extractor.parse(file);
llx = extractor.llx();
lly = extractor.lly();
urx = extractor.urx();

@ -152,7 +152,7 @@ KoFilter::ConversionStatus ImageExport::convert(const TQCString& from, const TQC
TQPixmap pixmap = TQPixmap(size);
pixmap.fill(TQt::white);
KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(&pixmap));
kpainter.start(&pixmap);
float translationX = border;
float translationY = border;

@ -56,7 +56,7 @@ void Document::generate()
if(_file.open(IO_WriteOnly))
{
kdDebug(30522) << "GENERATION" << endl;
_out.setDevice(TQT_TQIODEVICE(&_file));
_out.setDevice(&_file);
_document.generate(_out, !isEmbeded());
//_out << getDocument();
_file.close();

@ -43,7 +43,7 @@ KoFilter::ConversionStatus KugarNOPImport::convert( const TQCString& /*from*/, c
}
KoDocument *doc=m_chain->outputDocument();
doc->loadXML(TQT_TQIODEVICE(&in),TQDomDocument());
doc->loadXML(&in,TQDomDocument());
in.close();
doc->resetURL();

@ -72,7 +72,7 @@ bool AmiProWorker::doCloseFile(void)
if( !out.open( IO_WriteOnly ) )
return FALSE;
TQTextStream stream;
stream.setDevice( TQT_TQIODEVICE(&out) );
stream.setDevice( &out );
stream << result;
return TRUE;
}

@ -134,7 +134,7 @@ bool AmiProParser::process( const TQString& filename )
return setResult( FileError );
TQTextStream stream;
stream.setDevice( TQT_TQIODEVICE(&in) );
stream.setDevice( &in );
// the first should be "[ver]"
line = stream.readLine();

@ -120,7 +120,7 @@ private:
bool ASCIIWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{
m_ioDevice = TQT_TQIODEVICE(new TQFile(filenameOut));
m_ioDevice = new TQFile(filenameOut);
if (!m_ioDevice)
{

@ -172,7 +172,7 @@ TQByteArray HancomWordImport::Private::createContent()
TQBuffer contentBuffer( contentData );
contentBuffer.open( IO_WriteOnly );
contentWriter = new KoXmlWriter( TQT_TQIODEVICE(&contentBuffer) );
contentWriter = new KoXmlWriter( &contentBuffer );
contentWriter->startDocument( "office:document-content" );
contentWriter->startElement( "office:document-content" );
@ -224,7 +224,7 @@ TQByteArray HancomWordImport::Private::createStyles()
TQBuffer stylesBuffer( stylesData );
stylesBuffer.open( IO_WriteOnly );
stylesWriter = new KoXmlWriter( TQT_TQIODEVICE(&stylesBuffer) );
stylesWriter = new KoXmlWriter( &stylesBuffer );
stylesWriter->startDocument( "office:document-styles" );
stylesWriter->startElement( "office:document-styles" );
@ -280,7 +280,7 @@ TQByteArray HancomWordImport::Private::createManifest()
TQBuffer manifestBuffer( manifestData );
manifestBuffer.open( IO_WriteOnly );
manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) );
manifestWriter = new KoXmlWriter( &manifestBuffer );
manifestWriter->startDocument( "manifest:manifest" );
manifestWriter->startElement( "manifest:manifest" );

@ -472,7 +472,7 @@ bool HtmlWorker::doFullParagraph(const TQString& paraText,
bool HtmlWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{
m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut));
m_ioDevice=new TQFile(filenameOut);
if (!m_ioDevice)
{

@ -199,7 +199,7 @@ KoFilter::ConversionStatus KWord13Import::convert( const TQCString& from, const
TQFile file( fileName );
file.open( IO_ReadOnly );
if ( ! parseRoot( TQT_TQIODEVICE(&file), kwordDocument ) )
if ( ! parseRoot( &file, kwordDocument ) )
{
kdError(30520) << "Could not process document! Aborting!" << endl;
file.close();

@ -107,7 +107,7 @@ void KWord13OasisGenerator::preparePageLayout( void )
// ### TODO: test
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter element ( TQT_TQIODEVICE(&buffer) );
KoXmlWriter element ( &buffer );
element.startElement("style:columns");
element.addAttribute( "fo:column-count", columns );
element.addAttributePt( "fo:column-gap", positiveNumberOrNull( m_kwordDocument->getProperty( "PAPER:columnspacing", "PAPER:ptColumnspc" ) ) );
@ -932,7 +932,7 @@ bool KWord13OasisGenerator::generate ( const TQString& fileName, KWord13Document
TQByteArray manifestData;
TQBuffer manifestBuffer( manifestData );
manifestBuffer.open( IO_WriteOnly );
m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) );
m_manifestWriter = new KoXmlWriter( &manifestBuffer );
m_manifestWriter->startDocument( "manifest:manifest" );
m_manifestWriter->startElement( "manifest:manifest" );
m_manifestWriter->addAttribute( "xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0" );

@ -60,7 +60,7 @@ void Xml2LatexParser::generate()
if(_file.open(IO_WriteOnly))
{
kdDebug(30522) << "GENERATION" << endl;
_out.setDevice(TQT_TQIODEVICE(&_file));
_out.setDevice(&_file);
if(!Config::instance()->isEmbeded())
FileHeader::instance()->generate(_out);
_document.generate(_out, !Config::instance()->isEmbeded());

@ -136,7 +136,7 @@ bool KWEFBaseWorker::loadAndConvertToImage(const TQString& strName, const TQStri
return false;
}
imageIO.setIODevice(TQT_TQIODEVICE(&buffer));
imageIO.setIODevice(&buffer);
imageIO.setFormat(outExtension.utf8());
if (!imageIO.write())

@ -1413,7 +1413,7 @@ KoFilter::ConversionStatus KWEFKWordLeader::convert( KoFilterChain* chain,
else
{
TQFile file( filename );
if ( ! ProcessStoreFile( TQT_TQIODEVICE(&file), ProcessDocTag, this ) )
if ( ! ProcessStoreFile( &file, ProcessDocTag, this ) )
{
kdError(30508) << "Could not process document! Aborting!" << endl;
doAbortFile();

@ -1188,7 +1188,7 @@ public:
outBuffer.open (IO_WriteOnly);
// write BMP
imageIO.setIODevice (TQT_TQIODEVICE(&outBuffer));
imageIO.setIODevice (&outBuffer);
imageIO.setFormat ("BMP");
if (!imageIO.write ())
{

@ -1400,7 +1400,7 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an
TQBuffer buffer( image.copy() ); // Be more safe than sorry and do not allow shallow copy
KoPicture pic;
buffer.open( IO_ReadOnly );
if ( pic.load( TQT_TQIODEVICE(&buffer), strExtension ) )
if ( pic.load( &buffer, strExtension ) )
{
const TQSize size ( pic.getOriginalSize() );
height = size.height();

@ -888,7 +888,7 @@ bool RTFWorker::doFooter(const FooterData& footer)
bool RTFWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{
m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut));
m_ioDevice=new TQFile(filenameOut);
if (!m_ioDevice)
{

@ -71,7 +71,7 @@ bool WMLWorker::doCloseFile(void)
if( !out.open( IO_WriteOnly ) )
return FALSE;
TQTextStream stream;
stream.setDevice( TQT_TQIODEVICE(&out) );
stream.setDevice( &out );
stream << result;
return TRUE;
}

@ -429,7 +429,7 @@ WMLLayout& WMLLayout::operator=( const WMLLayout& l )
void WMLParser::parse( const char* filename )
{
TQFile f( filename );
TQXmlInputSource source( TQT_TQIODEVICE(&f) );
TQXmlInputSource source( &f );
TQXmlSimpleReader reader;
WMLHandler handler( this );
reader.setContentHandler( &handler );

@ -200,7 +200,7 @@ VGradient::saveOasis( KoGenStyles &mainStyles ) const
gradientStyle.addAttribute( "svg:spreadMethod", "pad" );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
// save stops
VColorStop* colorstop;

@ -175,7 +175,7 @@ VDocumentPreview::paintEvent( TQPaintEvent* )
{
delete m_docpixmap;
m_docpixmap = new TQPixmap( width(), height() );
VKoPainter p( TQT_TQPAINTDEVICE(m_docpixmap), width(), height() );
VKoPainter p( m_docpixmap, width(), height() );
p.clear( TQColor( 195, 194, 193 ) );
p.setWorldMatrix( TQWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
p.setZoomFactor( scaleFactor );
@ -334,7 +334,7 @@ VObjectListViewItem::update()
// draw thumb preview (16x16)
TQPixmap preview;
preview.resize( 16, 16 );
VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false );
VKoPainter p( &preview, 16, 16, false );
// Y mirroring
TQWMatrix mat;
mat.scale( 1, -1 );
@ -390,7 +390,7 @@ VLayerListViewItem::update()
// draw thumb preview (16x16)
TQPixmap preview;
preview.resize( 16, 16 );
VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false );
VKoPainter p( &preview, 16, 16, false );
// Y mirroring
TQWMatrix mat;
mat.scale( 1, -1 );

@ -377,7 +377,7 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
KTempFile contentTmpFile;
contentTmpFile.setAutoDelete( true );
TQFile* tmpFile = contentTmpFile.file();
KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 );
KoXmlWriter contentTmpWriter( tmpFile, 1 );
contentTmpWriter.startElement( "office:body" );
contentTmpWriter.startElement( "office:drawing" );
@ -398,7 +398,7 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
// And now we can copy over the contents from the tempfile to the real one
tmpFile->close();
docWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
docWriter->addCompleteElement( tmpFile );
contentTmpFile.close();
docWriter->endElement(); // Root element

@ -510,7 +510,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double
m_clipart->setState( VObject::normal );
m_pixmap.resize( 64, 64 );
VKoPainter p( TQT_TQPAINTDEVICE(&m_pixmap), 64, 64 );
VKoPainter p( &m_pixmap, 64, 64 );
TQWMatrix mat( 64., 0, 0, 64., 0, 0 );
VTransformCmd trafo( 0L, mat );
@ -524,7 +524,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double
p.end();
m_thumbPixmap.resize( 32, 32 );
VKoPainter p2( TQT_TQPAINTDEVICE(&m_thumbPixmap), 32, 32 );
VKoPainter p2( &m_thumbPixmap, 32, 32 );
mat.setMatrix( 32., 0, 0, 32., 0, 0 );
trafo.setMatrix( mat );

@ -177,8 +177,8 @@ KarbonView::KarbonView( KarbonPart* p, TQWidget* parent, const char* name )
// set up factory
m_painterFactory = new VPainterFactory;
m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() );
m_painterFactory->setEditPainter( TQT_TQPAINTDEVICE(canvasWidget()->viewport()), width(), height() );
m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() );
m_painterFactory->setEditPainter( canvasWidget()->viewport(), width(), height() );
if( shell() )
{
@ -759,9 +759,9 @@ KarbonView::viewModeChanged()
canvasWidget()->pixmap()->fill();
if( m_viewAction->currentItem() == 1 )
m_painterFactory->setWireframePainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() );
m_painterFactory->setWireframePainter( canvasWidget()->pixmap(), width(), height() );
else
m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() );
m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() );
m_canvas->repaintAll();
}

@ -112,7 +112,7 @@ ShadowPreview::paintEvent( TQPaintEvent* )
int a = 360 - m_parent->shadowAngle();
TQPixmap pm( w, h );
VKoPainter p( TQT_TQPAINTDEVICE(&pm), w, h );
VKoPainter p( &pm, w, h );
VColor color( VColor::rgb );
VFill fill;

@ -43,7 +43,7 @@ VGradientListItem::VGradientListItem( const VGradient& gradient, TQString filena
m_gradient = new VGradient( gradient );
m_pixmap.resize( 200, 16 );
VKoPainter gp( TQT_TQPAINTDEVICE(&m_pixmap), m_pixmap.width(), m_pixmap.height() );
VKoPainter gp( &m_pixmap, m_pixmap.width(), m_pixmap.height() );
gp.setRasterOp( TQt::XorROP );
gp.newPath();
VGradient grad( *m_gradient );
@ -114,7 +114,7 @@ VGradientPreview::~VGradientPreview()
void VGradientPreview::paintEvent( TQPaintEvent* )
{
TQPixmap pixmap( width(), height() );
VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() );
VKoPainter gp( &pixmap, width(), height() );
gp.setRasterOp( TQt::XorROP );
gp.newPath();
VGradient gradient( *m_gradient );

@ -96,7 +96,7 @@ void VGradientWidget::paintEvent( TQPaintEvent* )
int gh = h - ph; // gradient area height
TQPixmap pixmap( width(), height() );
VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() );
VKoPainter gp( &pixmap, width(), height() );
gp.setRasterOp( TQt::XorROP );
VGradient gradient( *m_gradient );
gradient.setType( VGradient::linear );

@ -97,7 +97,7 @@ VSmallPreview::drawFill( const VFill &f )
TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() );
VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin();
m_painter->setPen( TQt::NoPen );
@ -192,7 +192,7 @@ VSmallPreview::drawStroke( const VStroke &s )
TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() );
VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin();
m_painter->setPen( TQt::NoPen );

@ -62,7 +62,7 @@ VStrokeFillPreview::VStrokeFillPreview(
installEventFilter( this );
m_pixmap.resize( int( PANEL_SIZEX ), int( PANEL_SIZEY ) );
m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) );
m_painter = new VKoPainter( &m_pixmap, uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) );
}
VStrokeFillPreview::~VStrokeFillPreview()

@ -300,7 +300,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
}
pixmapBuffer.convertFromImage(img);
if (!fast) {
p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device());
p2.begin(&pixmapBuffer, p.device());
}
else
target->drawPixmap(pos, pixmapBuffer);
@ -308,7 +308,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
else {
if (!fast) {
pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth));
p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device());
p2.begin(&pixmapBuffer, p.device());
p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap);
}
else

@ -52,7 +52,7 @@ void KexiSimplePrintPreviewView::paintEvent( TQPaintEvent *pe )
return;
TQPixmap pm(size()); //dbl buffered
TQPainter p;
p.begin(TQT_TQPAINTDEVICE(&pm), this);
p.begin(&pm, this);
//! @todo only for screen!
p.fillRect(TQRect(TQPoint(0,0),pm.size()), TQBrush(white));//pe->rect(), TQBrush(white));
if (m_window->currentPage()>=0)

@ -148,7 +148,7 @@ void
KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type)
{
TQPainter p;
p.begin(TQT_TQPAINTDEVICE(this), true);
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
@ -192,7 +192,7 @@ void
KexiDBForm::clearForm()
{
TQPainter p;
p.begin(TQT_TQPAINTDEVICE(this), true);
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
@ -216,7 +216,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi
toPoint = to->parentWidget()->mapTo(this, to->pos());
TQPainter p;
p.begin(TQT_TQPAINTDEVICE(this), true);
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );

@ -640,7 +640,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
if (m_designMode && pixmap().isNull()) {
TQPixmap pm(size()-TQSize(m, m));
TQPainter p2;
p2.begin(TQT_TQPAINTDEVICE(&pm), this);
p2.begin(&pm, this);
p2.fillRect(0,0,width(),height(), bg);
updatePixmap();

@ -98,16 +98,16 @@ KexiFlowLayout::~KexiFlowLayout()
void
KexiFlowLayout::addItem(TQLayoutItem *item)
{
m_list.append(TQT_TQLAYOUTITEM(item));
m_list.append(item);
}
void
KexiFlowLayout::addSpacing(int size)
{
if (m_orientation ==TQt::Horizontal)
addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum )) );
addItem( new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
else
addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed )) );
addItem( new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
}
TQLayoutIterator

@ -104,7 +104,7 @@ bool KFormulaDoc::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
formula->saveMathML( stream, true );
tmpFile->close();
contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
contentWriter->addCompleteElement( tmpFile );
contentTmpFile.close();

@ -331,7 +331,7 @@ void KivioCanvas::paintEvent( TQPaintEvent* ev )
// Draw content
KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(m_buffer));
kpainter.start(m_buffer);
kpainter.translateBy(-m_iXOffset + m_pageOffsetX, -m_iYOffset + m_pageOffsetY);
m_pDoc->paintContent(kpainter, paintRect, false, page, TQPoint(0, 0), m_pView->zoomHandler(), showConnectorTargets(), true);
kpainter.stop();
@ -706,7 +706,7 @@ void KivioCanvas::beginUnclippedSpawnerPainter()
unclippedSpawnerPainter = new KivioScreenPainter();
// Tell it to start (allocates a Qpainter object)
unclippedSpawnerPainter->start(TQT_TQPAINTDEVICE(this));
unclippedSpawnerPainter->start(this);
// Uhhhhh??
if( !unclipped )

@ -204,7 +204,7 @@ void KivioPage::saveOasis(KoStore* /*store*/, KoXmlWriter* docWriter, KoGenStyle
TQBuffer layerBuffer;
layerBuffer.open(IO_WriteOnly);
KoXmlWriter layerWriter(TQT_TQIODEVICE(&layerBuffer));
KoXmlWriter layerWriter(&layerBuffer);
layerWriter.startElement("draw:layer-set");
// Iterate through all layers

@ -160,7 +160,7 @@ TQByteArray KivioDragObject::imageEncoded(const char* mimetype) const
TQPixmap buffer(zoomHandler.zoomItX(m_stencilRect.width()), zoomHandler.zoomItY(m_stencilRect.height()));
buffer.fill(TQt::white);
KivioScreenPainter p;
p.start( TQT_TQPAINTDEVICE(&buffer) );
p.start( &buffer );
p.setTranslation(-zoomHandler.zoomItX(m_stencilRect.x()), -zoomHandler.zoomItY(m_stencilRect.y()));
KivioIntraStencilData data;
data.painter = &p;

@ -1305,7 +1305,7 @@ TQPixmap Kivio::generatePixmapFromStencil(int width, int height, KivioStencil* s
TQPixmap pix(width, height);
pix.fill(TQt::white);
KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(&pix));
kpainter.start(&pix);
kpainter.translateBy(-rect.x() + ((width - rect.width()) / 2), -rect.y() + ((height - rect.height()) / 2));
KivioIntraStencilData data;
data.painter = &kpainter;

@ -150,7 +150,7 @@ void KivioBirdEyePanel::updateView()
TQRect rect(TQPoint(0,0),s1);
KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(m_buffer));
kpainter.start(m_buffer);
kpainter.painter()->fillRect(rect, TDEApplication::palette().active().brush(TQColorGroup::Mid));
kpainter.painter()->fillRect(px0, py0, pw, ph, white);

@ -985,7 +985,7 @@ void View::slotExportGantt() {
TQString fn = KFileDialog::getSaveFileName( TQString(), TQString(), this );
if (!fn.isEmpty()) {
TQFile f(fn);
m_ganttview->exportGantt(TQT_TQIODEVICE(&f));
m_ganttview->exportGantt(&f);
}
}

@ -452,7 +452,7 @@ void KPrBackGround::load( const TQDomElement &element )
TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8
rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED
TQBuffer buffer(rawData);
backPicture.loadXpm(TQT_TQIODEVICE(&buffer));
backPicture.loadXpm(&buffer);
}
#if 0

@ -291,7 +291,7 @@ void KPrCanvas::paintEvent( TQPaintEvent* paintEvent )
{
//kdDebug(33001) << "KPrCanvas::paintEvent" << endl;
TQPainter bufPainter;
bufPainter.begin( TQT_TQPAINTDEVICE(&buffer), this ); // double-buffering - (the buffer is as big as the widget)
bufPainter.begin( &buffer, this ); // double-buffering - (the buffer is as big as the widget)
bufPainter.translate( -diffx(), -diffy() );
bufPainter.setBrushOrigin( -diffx(), -diffy() );
@ -3107,7 +3107,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
if ( m_pageEffect )
finishPageEffect();
m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(this), _pix2, _pageEffect, page->getPageEffectSpeed() );
m_pageEffect = new KPrPageEffects( this, _pix2, _pageEffect, page->getPageEffectSpeed() );
if ( m_pageEffect->doEffect() )
{
delete m_pageEffect;
@ -3438,7 +3438,7 @@ void KPrCanvas::doObjEffects( bool isAllreadyPainted )
}
//TODO add global presentation speed
m_effectHandler = new KPrEffectHandler( m_step, goingBack, TQT_TQPAINTDEVICE(this), &screen_orig, allObjects, m_view, 1 );
m_effectHandler = new KPrEffectHandler( m_step, goingBack, this, &screen_orig, allObjects, m_view, 1 );
if ( m_effectHandler->doEffect() )
{
delete m_effectHandler;
@ -4141,7 +4141,7 @@ void KPrCanvas::copyOasisObjs()
TQDragObject* dragObject = kd;
TQByteArray arr;
TQBuffer buffer(arr);
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/vnd.oasis.opendocument.presentation" );
KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/vnd.oasis.opendocument.presentation" );
delete store;
kd->setEncodedData( arr );
@ -4163,7 +4163,7 @@ void KPrCanvas::copyObjs()
TQDragObject* dragObject = kd;
TQByteArray arr;
TQBuffer buffer(arr);
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/x-kpresenter" );
KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/x-kpresenter" );
m_activePage->getAllEmbeddedObjectSelected(embeddedObjectsActivePage );

@ -1895,7 +1895,7 @@ KoTextCursor * KPrOasisPasteTextCommand::execute( KoTextCursor *c )
c->setIndex( m_idx );
TQBuffer buffer( m_data );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
if ( store->bad() || !store->hasFile( "content.xml" ) )
{

@ -1019,14 +1019,14 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
KTempFile contentTmpFile;
contentTmpFile.setAutoDelete( true );
TQFile* tmpFile = contentTmpFile.file();
KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 );
KoXmlWriter contentTmpWriter( tmpFile, 1 );
//For sticky objects
KTempFile stickyTmpFile;
stickyTmpFile.setAutoDelete( true );
TQFile* masterStyles = stickyTmpFile.file();
KoXmlWriter stickyTmpWriter( TQT_TQIODEVICE(masterStyles), 1 );
KoXmlWriter stickyTmpWriter( masterStyles, 1 );
contentTmpWriter.startElement( "office:body" );
@ -1083,7 +1083,7 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
// And now we can copy over the contents from the tempfile to the real one
tmpFile->close();
contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
contentWriter->addCompleteElement( tmpFile );
contentTmpFile.close();
contentWriter->endElement(); // root element
@ -1552,7 +1552,7 @@ void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyl
if ( masterStyles )
{
stylesWriter->startElement( "office:master-styles" );
stylesWriter->addCompleteElement( TQT_TQIODEVICE(masterStyles) );
stylesWriter->addCompleteElement( masterStyles );
stylesWriter->endElement();
}
}

@ -130,7 +130,7 @@ void KPrPage::saveOasisObject( KoStore *store, KoXmlWriter &xmlWriter, KoSavingC
KTempFile animationTmpFile;
animationTmpFile.setAutoDelete( true );
TQFile* tmpFile = animationTmpFile.file();
KoXmlWriter animationTmpWriter( TQT_TQIODEVICE(tmpFile) );
KoXmlWriter animationTmpWriter( tmpFile );
lstMap listObjectAnimation;
TQPtrListIterator<KPrObject> it( m_objectList );
for ( ; it.current() ; ++it )
@ -228,7 +228,7 @@ void KPrPage::saveOasisObject( KoStore *store, KoXmlWriter &xmlWriter, KoSavingC
}
animationTmpWriter.endElement();//close "presentation:animations"
tmpFile->close();
xmlWriter.addCompleteElement( TQT_TQIODEVICE(tmpFile) );
xmlWriter.addCompleteElement( tmpFile );
}
else
@ -626,7 +626,7 @@ TQString KPrPage::saveOasisPageStyle( KoStore *, KoGenStyles& mainStyles ) const
{
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
elementWriter.startElement( "presentation:sound" );
elementWriter.addAttribute( "xlink:href", m_soundFileName );
elementWriter.addAttribute( "xlink:type", "simple" );
@ -1006,7 +1006,7 @@ void KPrPage::pasteObjs( const TQByteArray & data,int nbCopy, double angle,
if ( !data.size() )
return;
TQBuffer buffer( data );
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KoStore* store = KoStore::createStore( &buffer, KoStore::Read );
int nbNewObject = -1 ;
KMacroCommand *macro = 0L;
if ( !store->bad() )

@ -435,7 +435,7 @@ double KPrPixmapObject::load(const TQDomElement &element)
TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8
rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED
TQBuffer buffer(rawData); // ### TODO: open?
image.loadXpm(TQT_TQIODEVICE(&buffer));
image.loadXpm(&buffer);
}
}
}

@ -200,7 +200,7 @@ void KPrSlideTransitionDia::preview()
m_dialog->previewPixmap->repaint();
}
m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(m_dialog->previewPixmap), m_target, effect, effectSpeed );
m_pageEffect = new KPrPageEffects( m_dialog->previewPixmap, m_target, effect, effectSpeed );
if ( m_pageEffect->doEffect() )
{
delete m_pageEffect;

@ -2368,7 +2368,7 @@ TQDragObject * KPrTextView::newDrag( TQWidget * parent )
{
TQBuffer buffer;
const TQCString mimeType = "application/vnd.oasis.opendocument.text";
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType );
KoStore * store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store );
Q_ASSERT( !store->bad() );

@ -108,7 +108,7 @@ void KPrEffectPreview::run( PageEffect effect, EffectSpeed speed )
TQLabel::repaint();
}
m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(this), m_target, effect, speed );
m_pageEffect = new KPrPageEffects( this, m_target, effect, speed );
if ( m_pageEffect->doEffect() )
{
delete m_pageEffect;

@ -822,7 +822,7 @@ void KPrView::savePicture( const TQString& oldName, KoPicture& picture)
TQFile file( url.path() );
if ( file.open( IO_ReadWrite ) )
{
picture.save( TQT_TQIODEVICE(&file) );
picture.save( &file );
file.close();
}
else
@ -841,7 +841,7 @@ void KPrView::savePicture( const TQString& oldName, KoPicture& picture)
TQFile file( tempFile.name() );
if ( file.open( IO_ReadWrite ) )
{
picture.save( TQT_TQIODEVICE(&file) );
picture.save( &file );
file.close();
if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) )
{

@ -3848,7 +3848,7 @@ void Canvas::copyOasisObjects()
// We'll create a store (ZIP format) in memory
TQBuffer buffer;
TQCString mimeType = "application/vnd.oasis.opendocument.spreadsheet";
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType );
KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store );
Q_ASSERT( !store->bad() );
KoOasisStore oasisStore( store );

@ -648,7 +648,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
contentTmpFile.setAutoDelete( true );
TQFile* tmpFile = contentTmpFile.file();
KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 );
KoXmlWriter contentTmpWriter( tmpFile, 1 );
@ -765,7 +765,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
// And now we can copy over the contents from the tempfile to the real one
tmpFile->close();
contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
contentWriter->addCompleteElement( tmpFile );
contentTmpFile.close();

@ -216,7 +216,7 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore
bodyTmpFile.setAutoDelete( true );
TQFile* tmpFile = bodyTmpFile.file();
KoXmlWriter bodyTmpWriter( TQT_TQIODEVICE(tmpFile) );
KoXmlWriter bodyTmpWriter( tmpFile );
TQPtrListIterator<Sheet> it( m_lstSheets );
@ -229,7 +229,7 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore
tmpFile->close();
xmlWriter.addCompleteElement( TQT_TQIODEVICE(tmpFile) );
xmlWriter.addCompleteElement( tmpFile );
bodyTmpFile.close();
return true;

@ -7359,7 +7359,7 @@ TQString Sheet::saveOasisSheetStyleName( KoGenStyles &mainStyles )
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
saveOasisHeaderFooter(elementWriter);
TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
@ -8220,14 +8220,14 @@ bool Sheet::insertPicture( const KoPoint& point, const TQPixmap& pixmap )
TQBuffer buffer(data);
buffer.open( IO_ReadWrite );
pixmap.save( TQT_TQIODEVICE(&buffer) , "PNG" );
pixmap.save( &buffer , "PNG" );
//Reset the buffer so that KoPicture reads the whole file from the beginning
//(at the moment the read/write position is at the end)
buffer.reset();
KoPicture picture;
picture.load( TQT_TQIODEVICE(&buffer) , "PNG" );
picture.load( &buffer , "PNG" );
doc()->pictureCollection()->insertPicture(picture);

@ -4147,7 +4147,7 @@ void View::paste()
if( arr.isEmpty() )
return;
TQBuffer buffer( arr );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
KoOasisStore oasisStore( store );
TQDomDocument doc;

@ -214,7 +214,7 @@ void KugarPart::slotPreferredTemplate( const TQString &tpl )
{
/* kdDebug() << "RawXML" << endl;*/
f.open( IO_ReadOnly );
if ( !m_reportEngine -> setReportTemplate( TQT_TQIODEVICE(&f) ) )
if ( !m_reportEngine -> setReportTemplate( &f ) )
KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).arg( localtpl ) );
else
{

@ -269,7 +269,7 @@ KoTextCursor * KWOasisPasteCommand::execute( KoTextCursor *c )
TQBuffer buffer( m_data );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
KWDocument* kwdoc = textdoc->textFrameSet()->kWordDocument();
KWOasisLoader loader( kwdoc );
loader.insertOasisData( store, c );

@ -2843,7 +2843,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// storing the content into a buffer.
TQBuffer buffer( headerFooterContent );
buffer.open( IO_WriteOnly );
KoXmlWriter headerFooterTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter headerFooterTmpWriter( &buffer ); // TODO pass indentation level
// The order we write out header, header-left, etc. is important. So, we go here
// the dirty way to collect them first and then flush them ordered out.
@ -3021,7 +3021,7 @@ TQDragObject* KWDocument::dragSelectedPrivate( TQWidget *parent, const TQValueLi
// We'll create a store (ZIP format) in memory
TQBuffer buffer;
TQCString mimeType = KWOasisSaver::selectionMimeType();
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType );
KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store );
Q_ASSERT( !store->bad() );
KoOasisStore oasisStore( store );
@ -3189,7 +3189,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter footnoteSepTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter footnoteSepTmpWriter( &buffer ); // TODO pass indentation level
footnoteSepTmpWriter.startElement( "style:footnote-sep" );
TQString tmp;
switch( m_footNoteSeparatorLinePos )
@ -3237,7 +3237,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
if ( m_pageColumns.columns > 1 ) {
buffer.setBuffer(TQByteArray()); // clear data
buffer.open( IO_WriteOnly );
KoXmlWriter columnsTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter columnsTmpWriter( &buffer ); // TODO pass indentation level
columnsTmpWriter.startElement( "style:columns" );
columnsTmpWriter.addAttribute( "fo:column-count", m_pageColumns.columns );
columnsTmpWriter.addAttributePt( "fo:column-gap", m_pageColumns.ptColumnSpacing );

@ -275,7 +275,7 @@ void KWFormulaFrameSet::saveOasis(KoXmlWriter& writer, KoSavingContext& context,
writer.startElement( "draw:object" );
writer.startElement( "math:math" );
writer.addCompleteElement( TQT_TQIODEVICE(tmpFile) );
writer.addCompleteElement( tmpFile );
writer.endElement(); // math:math
writer.endElement(); // draw:object
writer.endElement(); // draw:frame

@ -27,7 +27,7 @@ KWOasisSaver::KWOasisSaver( KWDocument* doc )
: m_doc( doc )
{
const TQCString mimeType = selectionMimeType();
m_store = KoStore::createStore( TQT_TQIODEVICE(&m_buffer), KoStore::Write, mimeType );
m_store = KoStore::createStore( &m_buffer, KoStore::Write, mimeType );
Q_ASSERT( m_store );
Q_ASSERT( !m_store->bad() );

@ -2435,7 +2435,7 @@ void KWView::pasteData( TQMimeSource* data, bool drop )
if( !arr.isEmpty() )
{
TQBuffer buffer( arr );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
KWOasisLoader oasisLoader( m_doc );
TQValueList<KWFrame *> frames = oasisLoader.insertOasisData( store, 0 /* no cursor */ );
delete store;
@ -6118,7 +6118,7 @@ void KWView::savePicture()
TQFile file( url.path() );
if ( file.open( IO_ReadWrite ) )
{
picture.save( TQT_TQIODEVICE(&file) );
picture.save( &file );
file.close();
}
else
@ -6137,7 +6137,7 @@ void KWView::savePicture()
TQFile file( tempFile.name() );
if ( file.open( IO_ReadWrite ) )
{
picture.save( TQT_TQIODEVICE(&file) );
picture.save( &file );
file.close();
if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) )
{

@ -978,7 +978,7 @@ bool KoDocument::saveNativeFormat( const TQString & file )
TQFile f( file );
if ( f.open( IO_WriteOnly | IO_Translate ) )
{
bool success = saveToStream( TQT_TQIODEVICE(&f) );
bool success = saveToStream( &f );
f.close();
return success;
}
@ -1727,7 +1727,7 @@ bool KoDocument::loadNativeFormat( const TQString & file )
bool res;
if ( doc.setContent( &in, true, &errorMsg, &errorLine, &errorColumn ) )
{
res = loadXML( TQT_TQIODEVICE(&in), doc );
res = loadXML( &in, doc );
if ( res )
res = completeLoading( 0L );
}

@ -71,7 +71,7 @@ int KoEmbeddingFilter::embedPart( const TQCString& from, TQCString& to,
KTempFile tempIn;
tempIn.setAutoDelete( true );
savePartContents( TQT_TQIODEVICE(tempIn.file()) );
savePartContents( tempIn.file() );
tempIn.file()->close();
KoFilterManager *manager = new KoFilterManager( tempIn.name(), from, m_chain );

@ -78,7 +78,7 @@ KoXmlWriter* KoOasisStore::bodyWriter()
Q_ASSERT( !m_contentTmpFile );
m_contentTmpFile = new KTempFile;
m_contentTmpFile->setAutoDelete( true );
m_bodyWriter = new KoXmlWriter( TQT_TQIODEVICE(m_contentTmpFile->file()), 1 );
m_bodyWriter = new KoXmlWriter( m_contentTmpFile->file(), 1 );
}
return m_bodyWriter;
}
@ -92,7 +92,7 @@ bool KoOasisStore::closeContentWriter()
// copy over the contents from the tempfile to the real one
TQFile* tmpFile = m_contentTmpFile->file();
tmpFile->close();
m_contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
m_contentWriter->addCompleteElement( tmpFile );
m_contentTmpFile->close();
delete m_contentTmpFile; m_contentTmpFile = 0;
@ -113,7 +113,7 @@ KoXmlWriter* KoOasisStore::manifestWriter( const char* mimeType )
// the pointer to the buffer is already stored in the KoXmlWriter, no need to store it here as well
TQBuffer *manifestBuffer = new TQBuffer;
manifestBuffer->open( IO_WriteOnly );
m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(manifestBuffer) );
m_manifestWriter = new KoXmlWriter( manifestBuffer );
m_manifestWriter->startDocument( "manifest:manifest" );
m_manifestWriter->startElement( "manifest:manifest" );
m_manifestWriter->addAttribute( "xmlns:manifest", KoXmlNS::manifest );
@ -126,7 +126,7 @@ bool KoOasisStore::closeManifestWriter()
{
m_manifestWriter->endElement();
m_manifestWriter->endDocument();
TQBuffer* buffer = TQT_TQBUFFER( static_cast<TQIODevice*>(m_manifestWriter->device()) );
TQBuffer* buffer = static_cast<TQBuffer*>(m_manifestWriter->device());
delete m_manifestWriter; m_manifestWriter = 0;
bool ok = false;
if ( m_store->open( "META-INF/manifest.xml" ) )

@ -664,7 +664,7 @@ TQString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const TQStr
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TIME );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
if ( klocaleFormat )
{
@ -819,7 +819,7 @@ TQString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const TQStr
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_DATE );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
if ( klocaleFormat )
{
@ -993,7 +993,7 @@ TQString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const T
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_FRACTION );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
int integer = 0;
int numerator = 0;
@ -1057,7 +1057,7 @@ TQString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const TQS
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_NUMBER );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
int decimalplaces = 0;
int integerdigits = 0;
@ -1106,7 +1106,7 @@ TQString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_PERCENTAGE );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
int decimalplaces = 0;
int integerdigits = 0;
@ -1160,7 +1160,7 @@ TQString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const
int decimalplace = 0;
int integerdigits = 0;
int exponentdigits = 0;
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
bool beforeSeparator = true;
bool exponential = false;
@ -1236,7 +1236,7 @@ TQString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles,
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_CURRENCY );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
int decimalplaces = 0;
int integerdigits = 0;
@ -1292,7 +1292,7 @@ TQString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const TQStr
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TEXT );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text;
do
{

@ -95,7 +95,7 @@ bool KoPictureBase::saveAsBase64( KoXmlWriter& writer ) const
{
TQBuffer buffer;
buffer.open(IO_ReadWrite);
if ( !save( TQT_TQIODEVICE(&buffer) ) )
if ( !save( &buffer ) )
return false;
TQCString encoded = KCodecs::base64Encode( buffer.buffer() );
writer.addTextNode( encoded );

@ -208,7 +208,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array )
TQBuffer buffer(array);
buffer.open(IO_ReadOnly);
const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-gzip", "tmp" );
const bool flag = loadCompressed( &buffer, "application/x-gzip", "tmp" );
buffer.close();
return flag;
}
@ -217,7 +217,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array )
// BZip2
TQBuffer buffer(array);
buffer.open(IO_ReadOnly);
const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-bzip2", "tmp" );
const bool flag = loadCompressed( &buffer, "application/x-bzip2", "tmp" );
buffer.close();
return flag;
}
@ -252,7 +252,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array )
return false;
}
imageIO.setIODevice(TQT_TQIODEVICE(&buf));
imageIO.setIODevice(&buf);
imageIO.setFormat("PNG");
if (!imageIO.write())
@ -309,7 +309,7 @@ bool KoPictureShared::loadXpm(TQIODevice* io)
m_base=new KoPictureImage();
TQBuffer buffer(array);
bool check = m_base->load(TQT_TQIODEVICE(&buffer),"xpm");
bool check = m_base->load(&buffer,"xpm");
setExtension("xpm");
return check;
}
@ -441,13 +441,13 @@ bool KoPictureShared::loadFromFile(const TQString& fileName)
{
kdDebug(30003) << "File with no extension!" << endl;
// As we have no extension, consider it like a temporary file
flag = loadTmp( TQT_TQIODEVICE(&file) );
flag = loadTmp( &file );
}
else
{
const TQString extension( fileName.mid( pos+1 ) );
// ### TODO: check if the extension if gz or bz2 and find the previous extension
flag = load( TQT_TQIODEVICE(&file), extension );
flag = load( &file, extension );
}
file.close();
return flag;

@ -97,7 +97,7 @@ bool KoPictureWmf::loadData(const TQByteArray& array, const TQString& /* extensi
}
m_originalSize = wmf.boundingRect().size();
// draw wmf file with relative coordinate
wmf.play(*TQT_TQPAINTDEVICE(&m_clipart), true);
wmf.play(m_clipart, true);
return true;
}

@ -660,7 +660,7 @@ void KoTabBar::paintEvent( TQPaintEvent* )
TQPainter painter;
TQPixmap pm( size() );
pm.fill( colorGroup().background() );
painter.begin( TQT_TQPAINTDEVICE(&pm), this );
painter.begin( &pm, this );
painter.setPen( colorGroup().dark() );
painter.drawLine( 0, 0, width(), 0 );

@ -269,7 +269,7 @@ void KoParagCounter::saveOasis( KoGenStyle& listStyle, bool savingStyle ) const
// Prepare a sub-xmlwriter for the list-level-style-* element
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter listLevelWriter( TQT_TQIODEVICE(&buffer), 3 /*indentation*/ );
KoXmlWriter listLevelWriter( &buffer, 3 /*indentation*/ );
const char* tagName = isBullet() ? "text:list-level-style-bullet" : "text:list-level-style-number";
listLevelWriter.startElement( tagName );

@ -843,7 +843,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa
TQBuffer buffer;
buffer.open( IO_WriteOnly );
KoXmlWriter tabsWriter( TQT_TQIODEVICE(&buffer), 4 ); // indent==4: root,autostyle,style,parag-props
KoXmlWriter tabsWriter( &buffer, 4 ); // indent==4: root,autostyle,style,parag-props
tabsWriter.startElement( "style:tab-stops" );
KoTabulatorList::ConstIterator it = m_tabList.begin();
for ( ; it != m_tabList.end() ; it++ )

@ -71,7 +71,7 @@ bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode )
if ( !ret )
return false;
}
m_stream = TQT_TQIODEVICE(new TQFile( m_basePath + name ));
m_stream = new TQFile( m_basePath + name );
if ( !m_stream->open( iomode ) )
{
delete m_stream;

@ -69,7 +69,7 @@ KoStore* KoStore::createStore( const TQString& fileName, Mode mode, const TQCStr
{
TQFile file( fileName );
if ( file.open( IO_ReadOnly ) )
backend = determineBackend( TQT_TQIODEVICE(&file) );
backend = determineBackend( &file );
else
backend = DefaultFormat; // will create a "bad" store (bad()==true)
}
@ -143,7 +143,7 @@ KoStore* KoStore::createStore( TQWidget* window, const KURL& url, Mode mode, con
TQFile file( tmpFile );
if ( file.open( IO_ReadOnly ) )
{
backend = determineBackend( TQT_TQIODEVICE(&file) );
backend = determineBackend( &file );
file.close();
}
}

@ -126,7 +126,7 @@ bool KoTarStore::openWrite( const TQString& /*name*/ )
{
// Prepare memory buffer for writing
m_byteArray.resize( 0 );
m_stream = TQT_TQIODEVICE(new TQBuffer( m_byteArray ));
m_stream = new TQBuffer( m_byteArray );
m_stream->open( IO_WriteOnly );
return true;
}

Loading…
Cancel
Save