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

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

@ -689,7 +689,7 @@ bool FileRead::saveFile( const TQString &filename, bool copyimages, bool saveCom
TQFile file(filename);
TQStringList copyJOB;
stream.setDevice(TQT_TQIODEVICE(&buffer));
stream.setDevice(&buffer);
if ( (!file.open(IO_WriteOnly)) || (!buffer.open(IO_WriteOnly)) )
{
@ -862,7 +862,7 @@ bool FileRead::saveResults( const TQString &filename, const TQString &results )
TQFile file(filename);
TQStringList copyJOB;
stream.setDevice(TQT_TQIODEVICE(&file));
stream.setDevice(&file);
if(!file.open(IO_WriteOnly))
{

@ -30,7 +30,7 @@ bool mapReader::parseMap(const TQString &path)
TQFile xmlFile(path);
if (xmlFile.exists())
{
TQXmlInputSource source(TQT_TQIODEVICE(&xmlFile));
TQXmlInputSource source(&xmlFile);
setContentHandler(&handler);
if (parse(source)) return true;
p_error = handler.errorString();

@ -162,7 +162,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w )
TQPixmap img( TQSize( width, height ) );
img.fill( TQt::white );
KigPainter p( ScreenInfo( w.screenInfo().shownRect(), img.rect() ), TQT_TQPAINTDEVICE(&img), doc.document() );
KigPainter p( ScreenInfo( w.screenInfo().shownRect(), img.rect() ), &img, doc.document() );
p.setWholeWinOverlay();
p.drawGrid( doc.document().coordinateSystem(), showgrid, showaxes );
// FIXME: show the selections ?

@ -91,7 +91,7 @@ void SVGExporter::run( const KigPart& part, KigWidget& w )
TQPicture pic;
pic.setBoundingRect( r );
KigPainter* p = new KigPainter( ScreenInfo( w.screenInfo().shownRect(), viewrect ),
TQT_TQPAINTDEVICE(&pic), part.document() );
&pic, part.document() );
// p->setWholeWinOverlay();
// p->setBrushColor( TQt::white );
// p->setBrushStyle( TQt::SolidPattern );

@ -245,7 +245,7 @@ void KigWidget::redrawScreen( const std::vector<ObjectHolder*>& selection, bool
// update the screen...
clearStillPix();
KigPainter p( msi, TQT_TQPAINTDEVICE(&stillPix), mpart->document() );
KigPainter p( msi, &stillPix, mpart->document() );
p.drawGrid( mpart->document().coordinateSystem(), mpart->document().grid(),
mpart->document().axes() );
p.drawObjects( selection, true );

@ -182,7 +182,7 @@ void BaseConstructMode::mouseMoved( const std::vector<ObjectHolder*>& os, const
mdoc.emitStatusBarText( selectStatement( getCalcers( mparents ), w ) );
w.updateCurPix();
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() );
Coordinate ncoord = w.fromScreen( p );
if ( shiftpressed )
@ -330,7 +330,7 @@ void PointConstructMode::mouseMoved(
bool shiftpressed )
{
w.updateCurPix();
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() );
Coordinate ncoord = w.fromScreen( p );
if ( shiftpressed )
@ -529,7 +529,7 @@ void TestConstructMode::mouseMoved( const std::vector<ObjectHolder*>& os, const
w.setCursor( KCursor::blankCursor() );
w.updateCurPix();
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() );
TQPoint qloc = p + TQPoint( -40, 0 );
Coordinate loc = w.fromScreen( qloc );

@ -48,7 +48,7 @@ void DragRectMode::moved( const TQPoint& p, KigWidget& w )
std::vector<TQRect> overlay;
if ( mstartselected )
{
KigPainter pt( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
KigPainter pt( w.screenInfo(), &w.curPix, mdoc.document() );
pt.drawFilledRect( TQRect( p, mstart ) );
overlay = pt.overlay();
};

@ -231,7 +231,7 @@ void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w )
TQString s = d->locationparent->imp()->type()->attachToThisStatement();
mdoc.emitStatusBarText( s );
KigPainter p( w->screenInfo(), TQT_TQPAINTDEVICE(&w->curPix), mdoc.document() );
KigPainter p( w->screenInfo(), &w->curPix, mdoc.document() );
// set the text next to the arrow cursor
TQPoint point = e->pos();

@ -167,7 +167,7 @@ void DefineMacroMode::dragRect( const TQPoint& p, KigWidget& w )
std::vector<ObjectHolder*>* objs = mwizard->currentPage() == mwizard->mpgiven ? &mgiven : &mfinal;
DragRectMode dm( p, mdoc, w );
mdoc.runMode( &dm );
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
if ( ! dm.cancelled() )
{
std::vector<ObjectHolder*> ret = dm.ret();
@ -196,7 +196,7 @@ void DefineMacroMode::leftClickedObject( ObjectHolder* o, const TQPoint&,
if ( isselected ) objs->erase( iter );
else objs->push_back( o );
KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
KigPainter p( w.screenInfo(), &w.stillPix, mdoc.document() );
p.drawObject( o, !isselected );
w.updateCurPix( p.overlay() );
w.updateWidget();
@ -224,7 +224,7 @@ void DefineMacroMode::mouseMoved( const std::vector<ObjectHolder*>& os, const TQ
// statusbar text
mdoc.emitStatusBarText( selectstat );
KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() );
// set the text next to the arrow cursor
TQPoint point = pt;

@ -55,13 +55,13 @@ void MovingModeBase::initScreen( const std::vector<ObjectCalcer*>& in )
std::inserter( notmovingobjs, notmovingobjs.begin() ) );
mview.clearStillPix();
KigPainter p( mview.screenInfo(), TQT_TQPAINTDEVICE(&mview.stillPix), mdoc.document() );
KigPainter p( mview.screenInfo(), &mview.stillPix, mdoc.document() );
p.drawGrid( mdoc.document().coordinateSystem(), mdoc.document().grid(),
mdoc.document().axes() );
p.drawObjects( notmovingobjs.begin(), notmovingobjs.end(), false );
mview.updateCurPix();
KigPainter p2( mview.screenInfo(), TQT_TQPAINTDEVICE(&mview.curPix), mdoc.document() );
KigPainter p2( mview.screenInfo(), &mview.curPix, mdoc.document() );
p2.drawObjects( drawableset.begin(), drawableset.end(), true );
}
@ -91,7 +91,7 @@ void MovingModeBase::mouseMoved( TQMouseEvent* e, KigWidget* v )
for ( std::vector<ObjectCalcer*>::iterator i = mcalcable.begin();
i != mcalcable.end(); ++i )
( *i )->calc( mdoc.document() );
KigPainter p( v->screenInfo(), TQT_TQPAINTDEVICE(&v->curPix), mdoc.document() );
KigPainter p( v->screenInfo(), &v->curPix, mdoc.document() );
// TODO: only draw the explicitly moving objects as selected, the
// other ones as deselected.. Needs some support from the
// subclasses..

@ -133,7 +133,7 @@ void NormalMode::dragRect( const TQPoint& p, KigWidget& w )
DragRectMode d( p, mdoc, w );
mdoc.runMode( &d );
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
if ( ! d.cancelled() )
{
@ -174,7 +174,7 @@ void NormalMode::dragObject( const std::vector<ObjectHolder*>& oco, const TQPoin
void NormalMode::leftClickedObject( ObjectHolder* o, const TQPoint&,
KigWidget& w, bool ctrlOrShiftDown )
{
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
if ( ! o )
{
@ -269,7 +269,7 @@ void NormalMode::mouseMoved( const std::vector<ObjectHolder*>& os,
// statusbar text
mdoc.emitStatusBarText( stat );
KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() );
// set the text next to the arrow cursor
TQPoint point = plc;

@ -470,7 +470,7 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in
TQPixmap p( 20, 20 );
p.fill( popup.eraseColor() );
ScreenInfo si( Rect( -1, -1, 2, 2 ), p.rect() );
KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false );
KigPainter ptr( si, &p, popup.part().document(), false );
PointImp pt( Coordinate( 0, 0 ) );
ObjectDrawer d( color, -1, true, TQt::SolidLine, i );
d.draw( pt, ptr, false );
@ -484,7 +484,7 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in
TQPixmap p( 50, 20 );
p.fill( popup.eraseColor() );
ScreenInfo si( Rect( -2.5, -1, 5, 2 ), p.rect() );
KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false );
KigPainter ptr( si, &p, popup.part().document(), false );
LineImp line( Coordinate( -1, 0 ), Coordinate( 1, 0 ) );
TQt::PenStyle ps = penstyles[i];
ObjectDrawer d( color, -1, true, ps, 1 );

@ -45,7 +45,7 @@ void ScriptModeBase::dragRect( const TQPoint& p, KigWidget& w )
mdoc.runMode( &dm );
std::vector<ObjectHolder*> ret = dm.ret();
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
if ( dm.needClear() )
{
std::vector<ObjectHolder*> tmp( margs.begin(), margs.begin() );
@ -67,7 +67,7 @@ void ScriptModeBase::leftClickedObject( ObjectHolder* o, const TQPoint&,
if ( mwawd != SelectingArgs ) return;
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
if ( (dup_o = std::find( margs.begin(), margs.end(), o )) != margs.end() )
{
@ -105,7 +105,7 @@ void ScriptModeBase::mouseMoved( const std::vector<ObjectHolder*>& os,
// statusbar text
mdoc.emitStatusBarText( selectstat );
KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() );
// set the text next to the arrow cursor
TQPoint point = pt;
@ -246,7 +246,7 @@ void ScriptModeBase::setScriptType( ScriptType::Type type )
void ScriptModeBase::addArgs( const std::vector<ObjectHolder*>& obj, KigWidget& w )
{
KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
std::copy( obj.begin(), obj.end(), std::inserter( margs, margs.begin() ) );
pter.drawObjects( obj, true );

@ -298,7 +298,7 @@ void MainDlg::slotExport()
if( url.fileName().right(4).lower()==".svg")
{
TQPicture pic;
view->draw(TQT_TQPAINTDEVICE(&pic), 2);
view->draw(&pic, 2);
if (url.isLocalFile() )
pic.save( url.prettyURL(0,KURL::StripFileProtocol), "SVG");
else
@ -314,7 +314,7 @@ void MainDlg::slotExport()
else if( url.fileName().right(4).lower()==".bmp")
{
TQPixmap pic(100, 100);
view->draw(TQT_TQPAINTDEVICE(&pic), 3);
view->draw(&pic, 3);
if (url.isLocalFile() )
pic.save( url.prettyURL(0,KURL::StripFileProtocol), "BMP");
else
@ -330,7 +330,7 @@ void MainDlg::slotExport()
else if( url.fileName().right(4).lower()==".png")
{
TQPixmap pic(100, 100);
view->draw(TQT_TQPAINTDEVICE(&pic), 3);
view->draw(&pic, 3);
if (url.isLocalFile() )
pic.save( url.prettyURL(0,KURL::StripFileProtocol), "PNG");
else

@ -594,7 +594,7 @@ void View::drawPlot()
if( m_minmax->isShown() )
m_minmax->updateFunctions();
buffer.fill(backgroundcolor);
draw(TQT_TQPAINTDEVICE(&buffer), 0);
draw(&buffer, 0);
TQPainter p;
p.begin(this);
bitBlt( this, 0, 0, &buffer, 0, 0, width(), height() );
@ -1801,7 +1801,7 @@ void View::areaUnderGraph( Ufkt *ufkt, char const p_mode, double &dmin, double
DC->end();
setFocus();
update();
draw(TQT_TQPAINTDEVICE(&buffer),0);
draw(&buffer,0);
}
if ( calculated_area>0)

@ -420,7 +420,7 @@ void KStars::exportImage( const TQString url, int w, int h ) {
else if ( ext.lower() == "bmp" ) { format = "BMP"; }
else { kdWarning() << i18n( "Could not parse image format of %1; assuming PNG." ).arg( fname ) << endl; }
map()->exportSkyImage( TQT_TQPAINTDEVICE(&skyimage) );
map()->exportSkyImage( &skyimage );
kapp->processEvents(10000);
//skyImage is the size of the sky map. The requested image size is w x h.

@ -162,7 +162,7 @@ int main(int argc, char *argv[])
kapp->processEvents(100000);
map->setMapGeometry();
map->exportSkyImage( TQT_TQPAINTDEVICE(&sky) );
map->exportSkyImage( &sky );
kapp->processEvents(100000);
if ( ! sky.save( fname, format ) ) kdWarning() << i18n( "Unable to save image: %1 " ).arg( fname ) << endl;

@ -411,7 +411,7 @@ void KTouchSlideLine::updateSlidingLines() {
// draw the teacher pixmap text
TQPainter painter;
painter.begin (TQT_TQPAINTDEVICE(m_teacherPixmap), this);
painter.begin (m_teacherPixmap, this);
painter.setFont( m_font );
TQColor col_tt = Prefs::commonTypingLineColors() ?
@ -532,7 +532,7 @@ void KTouchSlideLine::updateStudentLine() {
// now let's draw the students pixmap
TQPainter painter;
painter.begin (TQT_TQPAINTDEVICE(m_studentPixmap), this);
painter.begin (m_studentPixmap, this);
if (Prefs::colorOnError()) {
// draw the student line depending on the colour settings
if (error) {

@ -21,7 +21,7 @@ KVTMLWriter::KVTMLWriter(TQFile *file)
outputFile = file;
if(outputFile->open(IO_WriteOnly))
{
outputStream.setDevice(TQT_TQIODEVICE(outputFile));
outputStream.setDevice(outputFile);
outputStream.setEncoding(TQTextStream::UnicodeUTF8);
outputStream << "<?xml version=\"1.0\"?>" << endl;

@ -22,7 +22,7 @@ WqlWriter::WqlWriter(TQFile *file)
outputFile = file;
if(outputFile->open(IO_WriteOnly))
{
outputStream.setDevice(TQT_TQIODEVICE(outputFile));
outputStream.setDevice(outputFile);
outputStream.setEncoding(TQTextStream::Latin1);
outputStream << "WordQuiz" << winendl;

Loading…
Cancel
Save