From a374efce3a207b39514be3c52264091400ce297e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:44:41 +0000 Subject: TQt4 port kdeedu This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kig/modes/base_mode.cc | 28 +++++++------- kig/modes/base_mode.h | 2 +- kig/modes/construct_mode.cc | 82 ++++++++++++++++++++-------------------- kig/modes/construct_mode.h | 2 +- kig/modes/dragrectmode.cc | 2 +- kig/modes/edittype.cc | 8 ++-- kig/modes/edittype.h | 3 +- kig/modes/edittypebase.ui | 40 ++++++++++---------- kig/modes/label.cc | 68 ++++++++++++++++----------------- kig/modes/label.h | 10 ++--- kig/modes/linkslabel.cpp | 34 ++++++++--------- kig/modes/linkslabel.h | 5 ++- kig/modes/macro.cc | 6 +-- kig/modes/macrowizard.cc | 8 ++-- kig/modes/macrowizard.h | 3 +- kig/modes/macrowizardbase.ui | 28 +++++++------- kig/modes/mode.h | 2 +- kig/modes/moving.cc | 54 +++++++++++++------------- kig/modes/moving.h | 2 +- kig/modes/normal.cc | 6 +-- kig/modes/popup.cc | 52 ++++++++++++------------- kig/modes/popup.h | 2 + kig/modes/textlabelwizard.cc | 12 +++--- kig/modes/textlabelwizard.h | 5 ++- kig/modes/textlabelwizardbase.ui | 22 +++++------ kig/modes/typesdialog.cpp | 14 +++---- kig/modes/typesdialog.h | 3 +- kig/modes/typesdialogbase.ui | 38 +++++++++---------- 28 files changed, 274 insertions(+), 267 deletions(-) (limited to 'kig/modes') diff --git a/kig/modes/base_mode.cc b/kig/modes/base_mode.cc index d968566b..e470f938 100644 --- a/kig/modes/base_mode.cc +++ b/kig/modes/base_mode.cc @@ -38,7 +38,7 @@ BaseMode::~BaseMode() void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v ) { // touch screens don't send a mouseMoved event before a click event, - // apparently, so we simulate it. + // aptqparently, so we simulate it. mouseMoved( e, v ); // get rid of text still showing... @@ -46,9 +46,9 @@ void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v ) v->updateWidget(); mplc = e->pos(); - moco = mdoc.document().whatAmIOn( v->fromScreen( mplc ), *v ); + tqmoco = mdoc.document().whatAmIOn( v->fromScreen( mplc ), *v ); - if( moco.empty() ) + if( tqmoco.empty() ) { // clicked on an empty spot --> we show the rectangle for // selecting stuff... @@ -66,8 +66,8 @@ void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v ) void BaseMode::leftMouseMoved( TQMouseEvent* e, KigWidget* w ) { - if( !moco.empty() && ( mplc - e->pos() ).manhattanLength() > 3 ) - dragObject( moco, mplc, *w, + if( !tqmoco.empty() && ( mplc - e->pos() ).manhattanLength() > 3 ) + dragObject( tqmoco, mplc, *w, ( e->state() & (ShiftButton | ControlButton ) ) != 0 ); } @@ -79,16 +79,16 @@ void BaseMode::leftReleased( TQMouseEvent* e, KigWidget* v ) ObjectHolder* o = 0; bool keyCtrl = ( e->state() & ControlButton ) != 0; bool keyShift = ( e->state() & ShiftButton ) != 0; - if ( ! moco.empty() ) + if ( ! tqmoco.empty() ) { if ( keyShift ) { - int id = ObjectChooserPopup::getObjectFromList( e->pos(), v, moco ); + int id = ObjectChooserPopup::getObjectFromList( e->pos(), v, tqmoco ); if ( id >= 0 ) - o = moco[id]; + o = tqmoco[id]; } else - o = moco.front(); + o = tqmoco.front(); } leftClickedObject( o, e->pos(), *v, keyCtrl ); } @@ -100,7 +100,7 @@ void BaseMode::midClicked( TQMouseEvent* e, KigWidget* v ) v->updateWidget(); mplc = e->pos(); - moco = mdoc.document().whatAmIOn( v->fromScreen( e->pos() ), *v ); + tqmoco = mdoc.document().whatAmIOn( v->fromScreen( e->pos() ), *v ); } void BaseMode::midReleased( TQMouseEvent* e, KigWidget* v ) @@ -119,15 +119,15 @@ void BaseMode::rightClicked( TQMouseEvent* e, KigWidget* w ) w->setCursor( KCursor::arrowCursor() ); mplc = e->pos(); - moco = mdoc.document().whatAmIOn( w->fromScreen( mplc ), *w ); + tqmoco = mdoc.document().whatAmIOn( w->fromScreen( mplc ), *w ); - rightClicked( moco, mplc, *w ); + rightClicked( tqmoco, mplc, *w ); } void BaseMode::mouseMoved( TQMouseEvent* e, KigWidget* w ) { std::vector os = mdoc.document().whatAmIOn( w->fromScreen( e->pos() ), *w ); - mouseMoved( os, e->pos(), *w, e->state() & Qt::ShiftButton ); + mouseMoved( os, e->pos(), *w, e->state() & TQt::ShiftButton ); } void BaseMode::dragRect( const TQPoint&, KigWidget& ) @@ -151,7 +151,7 @@ void BaseMode::enableActions() std::vector BaseMode::oco() { - return moco; + return tqmoco; } TQPoint BaseMode::pointLocation() diff --git a/kig/modes/base_mode.h b/kig/modes/base_mode.h index cb029abf..044b8b65 100644 --- a/kig/modes/base_mode.h +++ b/kig/modes/base_mode.h @@ -31,7 +31,7 @@ class BaseMode : public KigMode { TQPoint mplc; - std::vector moco; + std::vector tqmoco; void leftClicked( TQMouseEvent* e, KigWidget* v ); void leftMouseMoved( TQMouseEvent*, KigWidget* ); diff --git a/kig/modes/construct_mode.cc b/kig/modes/construct_mode.cc index b535ee5c..67f83632 100644 --- a/kig/modes/construct_mode.cc +++ b/kig/modes/construct_mode.cc @@ -69,20 +69,20 @@ void BaseConstructMode::leftReleased( TQMouseEvent* e, KigWidget* v ) ObjectHolder* o = 0; bool keyCtrlOrShift = ( e->state() & ( ControlButton | ShiftButton) ) != 0; - std::vector moco = oco(); - if ( ! moco.empty() ) + std::vector tqmoco = oco(); + if ( ! tqmoco.empty() ) { std::vector goodargs; - if ( !moco.empty() ) + if ( !tqmoco.empty() ) { std::vector::const_iterator it; - std::vector testargs = getCalcers( mparents ); - for ( std::vector::const_iterator i = moco.begin(); i != moco.end(); ++i ) + std::vector testargs = getCalcers( mtqparents ); + for ( std::vector::const_iterator i = tqmoco.begin(); i != tqmoco.end(); ++i ) { - it = std::find( mparents.begin(), mparents.end(), *i ); + it = std::find( mtqparents.begin(), mtqparents.end(), *i ); bool newdup = - ( it == mparents.end() ) || - isAlreadySelectedOK( testargs, it - mparents.begin() ); + ( it == mtqparents.end() ) || + isAlreadySelectedOK( testargs, it - mtqparents.begin() ); if ( newdup ) { testargs.push_back( ( *i )->calcer() ); @@ -103,16 +103,16 @@ void BaseConstructMode::leftReleased( TQMouseEvent* e, KigWidget* v ) void BaseConstructMode::leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ) { - std::vector::iterator it = std::find( mparents.begin(), mparents.end(), o ); - std::vector nargs = getCalcers( mparents ); + std::vector::iterator it = std::find( mtqparents.begin(), mtqparents.end(), o ); + std::vector nargs = getCalcers( mtqparents ); // // mp: duplicationchecked controls whether the arguments list is // free of duplications or if a duplication is safe (asking this to // the Constructor class through the "isAlreadySelectedOK" method). // bool duplicationchecked = - ( it == mparents.end() ) || - isAlreadySelectedOK( nargs, it - mparents.begin() ); + ( it == mtqparents.end() ) || + isAlreadySelectedOK( nargs, it - mtqparents.begin() ); if ( o && duplicationchecked ) { nargs.push_back( o->calcer() ); @@ -123,7 +123,7 @@ void BaseConstructMode::leftClickedObject( } } - nargs = getCalcers( mparents ); + nargs = getCalcers( mtqparents ); nargs.push_back( mpt.get() ); if ( wantArgs( nargs, mdoc.document(), w ) ) { @@ -137,7 +137,7 @@ void BaseConstructMode::leftClickedObject( return; } - nargs = getCalcers( mparents ); + nargs = getCalcers( mtqparents ); nargs.push_back( mcursor ); if ( wantArgs( nargs, mdoc.document(), w ) ) @@ -157,7 +157,7 @@ void BaseConstructMode::leftClickedObject( void BaseConstructMode::midClicked( const TQPoint& p, KigWidget& w ) { - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); args.push_back( mpt.get() ); if ( wantArgs( args, mdoc.document(), w ) ) { @@ -179,10 +179,10 @@ void BaseConstructMode::rightClicked( const std::vector&, const T void BaseConstructMode::mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ) { - mdoc.emitStatusBarText( selectStatement( getCalcers( mparents ), w ) ); + mdoc.emitStatusBarText( selectStatement( getCalcers( mtqparents ), w ) ); w.updateCurPix(); - KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); Coordinate ncoord = w.fromScreen( p ); if ( shiftpressed ) @@ -192,19 +192,19 @@ void BaseConstructMode::mouseMoved( const std::vector& os, const mcursor->move( ncoord, mdoc.document() ); mcursor->calc( mdoc.document() ); - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); bool duplicationchecked = false; std::vector goodargs; if ( ! os.empty() ) { std::vector::const_iterator it; - std::vector testargs = getCalcers( mparents ); + std::vector testargs = getCalcers( mtqparents ); for ( std::vector::const_iterator i = os.begin(); i != os.end(); ++i ) { - it = std::find( mparents.begin(), mparents.end(), *i ); + it = std::find( mtqparents.begin(), mtqparents.end(), *i ); bool newdup = - ( it == mparents.end() ) || - isAlreadySelectedOK( args, it - mparents.begin() ); + ( it == mtqparents.end() ) || + isAlreadySelectedOK( args, it - mtqparents.begin() ); if ( newdup ) { testargs.push_back( ( *i )->calcer() ); @@ -229,9 +229,9 @@ void BaseConstructMode::mouseMoved( const std::vector& os, const } else { - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); args.push_back( mpt.get() ); - std::vector argscursor = getCalcers( mparents ); + std::vector argscursor = getCalcers( mtqparents ); argscursor.push_back( mcursor ); bool text = true; if ( wantArgs( args, mdoc.document(), w ) ) @@ -274,15 +274,15 @@ void BaseConstructMode::mouseMoved( const std::vector& os, const void BaseConstructMode::selectObject( ObjectHolder* o, KigWidget& w ) { - mparents.push_back( o ); - std::vector args = getCalcers( mparents ); + mtqparents.push_back( o ); + std::vector args = getCalcers( mtqparents ); if ( wantArgs( args, mdoc.document(), w ) == ArgsParser::Complete ) { handleArgs( args, w ); }; - w.redrawScreen( mparents ); + w.redrawScreen( mtqparents ); } PointConstructMode::PointConstructMode( KigPart& d ) @@ -308,7 +308,7 @@ void PointConstructMode::leftClickedObject( mdoc.addObject( new ObjectHolder( mpt.get() ) ); w.redrawScreen( std::vector() ); - mdoc.emitStatusBarText( TQString::null ); + mdoc.emitStatusBarText( TQString() ); mdoc.doneMode( this ); } @@ -330,7 +330,7 @@ void PointConstructMode::mouseMoved( bool shiftpressed ) { w.updateCurPix(); - KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); Coordinate ncoord = w.fromScreen( p ); if ( shiftpressed ) @@ -373,7 +373,7 @@ void BaseConstructMode::selectObjects( const std::vector& os, Kig { for ( std::vector::const_iterator i = os.begin(); i != os.end(); ++i ) { - std::vector args = getCalcers( mparents ); + std::vector args = getCalcers( mtqparents ); assert( wantArgs( args, mdoc.document(), w ) != ArgsParser::Complete ); selectObject( *i, w ); }; @@ -482,22 +482,22 @@ void TestConstructMode::leftClickedObject( ObjectHolder* o, const TQPoint& p, TQPoint qloc = p + TQPoint( -40, 0 ); Coordinate loc = w.fromScreen( qloc ); - std::vector parents; - parents.push_back( new ObjectConstCalcer( new IntImp( test_has_frame_dflt ) ) ); - parents.push_back( new ObjectConstCalcer( new PointImp( loc ) ) ); - parents.push_back( new ObjectConstCalcer( new StringImp( TQString::fromLatin1( "%1" ) ) ) ); + std::vector tqparents; + tqparents.push_back( new ObjectConstCalcer( new IntImp( test_has_frame_dflt ) ) ); + tqparents.push_back( new ObjectConstCalcer( new PointImp( loc ) ) ); + tqparents.push_back( new ObjectConstCalcer( new StringImp( TQString::tqfromLatin1( "%1" ) ) ) ); assert( mresult->imp()->inherits( TestResultImp::stype() ) ); - parents.push_back( + tqparents.push_back( new ObjectPropertyCalcer( - mresult.get(), mresult->imp()->propertiesInternalNames().findIndex( "test-result" ) ) ); - parents.back()->calc( mdoc.document() ); + mresult.get(), mresult->imp()->propertiesInternalNames().tqfindIndex( "test-result" ) ) ); + tqparents.back()->calc( mdoc.document() ); - ObjectCalcer* ret = new ObjectTypeCalcer( TextType::instance(), parents ); + ObjectCalcer* ret = new ObjectTypeCalcer( TextType::instance(), tqparents ); ret->calc( mdoc.document() ); mdoc.addObject( new ObjectHolder( ret ) ); w.unsetCursor(); - mdoc.emitStatusBarText( TQString::null ); + mdoc.emitStatusBarText( TQString() ); finish(); } @@ -529,7 +529,7 @@ void TestConstructMode::mouseMoved( const std::vector& os, const w.setCursor( KCursor::blankCursor() ); w.updateCurPix(); - KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); TQPoint qloc = p + TQPoint( -40, 0 ); Coordinate loc = w.fromScreen( qloc ); @@ -557,7 +557,7 @@ TQString TestConstructMode::selectStatement( const std::vector& s transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = mtype->argsParser().selectStatement( args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); return i18n( ret.c_str() ); } diff --git a/kig/modes/construct_mode.h b/kig/modes/construct_mode.h index be937723..67fe5e28 100644 --- a/kig/modes/construct_mode.h +++ b/kig/modes/construct_mode.h @@ -71,7 +71,7 @@ class BaseConstructMode // only sensible place where to deallocate it is in the destructor // of this class // ObjectHolder* mcursorholder; - std::vector mparents; + std::vector mtqparents; void leftReleased( TQMouseEvent* e, KigWidget* v ); diff --git a/kig/modes/dragrectmode.cc b/kig/modes/dragrectmode.cc index 3a827009..8091f8cb 100644 --- a/kig/modes/dragrectmode.cc +++ b/kig/modes/dragrectmode.cc @@ -48,7 +48,7 @@ void DragRectMode::moved( const TQPoint& p, KigWidget& w ) std::vector overlay; if ( mstartselected ) { - KigPainter pt( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter pt( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); pt.drawFilledRect( TQRect( p, mstart ) ); overlay = pt.overlay(); }; diff --git a/kig/modes/edittype.cc b/kig/modes/edittype.cc index f4ed323e..e9776204 100644 --- a/kig/modes/edittype.cc +++ b/kig/modes/edittype.cc @@ -31,8 +31,8 @@ #include #include -EditType::EditType( TQWidget* parent, TQString name, TQString desc, TQString icon ) - : EditTypeBase( parent, "edittype", true ), mname( name ), mdesc( desc ), micon( icon ) +EditType::EditType( TQWidget* tqparent, TQString name, TQString desc, TQString icon ) + : EditTypeBase( tqparent, "edittype", true ), mname( name ), mdesc( desc ), micon( icon ) { // improving GUI look'n'feel... buttonHelp->setGuiItem( KStdGuiItem::help() ); @@ -50,8 +50,8 @@ EditType::~EditType() void EditType::helpSlot() { - kapp->invokeHelp( TQString::fromLatin1( "working-with-types" ), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "working-with-types" ), + TQString::tqfromLatin1( "kig" ) ); } void EditType::okSlot() diff --git a/kig/modes/edittype.h b/kig/modes/edittype.h index c6f40783..ac578808 100644 --- a/kig/modes/edittype.h +++ b/kig/modes/edittype.h @@ -28,12 +28,13 @@ class EditType : public EditTypeBase { Q_OBJECT + TQ_OBJECT TQString mname; TQString mdesc; TQString micon; public: - EditType( TQWidget* parent, TQString name = TQString::null, TQString desc = TQString::null, TQString icon = TQString::null ); + EditType( TQWidget* tqparent, TQString name = TQString(), TQString desc = TQString(), TQString icon = TQString() ); ~EditType(); const TQString name() const; const TQString description() const; diff --git a/kig/modes/edittypebase.ui b/kig/modes/edittypebase.ui index 0dc8129d..705bc92d 100644 --- a/kig/modes/edittypebase.ui +++ b/kig/modes/edittypebase.ui @@ -1,10 +1,10 @@ EditTypeBase - + EditTypeBase - + 0 0 @@ -33,7 +33,7 @@ 6 - + label15 @@ -41,23 +41,23 @@ Here you can modify the name, the description and the icon of this macro type. - + - layout8 + tqlayout8 unnamed - + - layout8 + tqlayout8 unnamed - + Layout2 @@ -71,7 +71,7 @@ 6 - + label16 @@ -89,7 +89,7 @@ - + Layout1 @@ -103,7 +103,7 @@ 6 - + label17 @@ -123,9 +123,9 @@ - + - layout23 + tqlayout23 @@ -152,7 +152,7 @@ Expanding - + 20 20 @@ -177,9 +177,9 @@ Horizontal - + - layout24 + tqlayout24 @@ -212,7 +212,7 @@ Expanding - + 20 20 @@ -270,12 +270,12 @@ cancelSlot() - + helpSlot() okSlot() cancelSlot() - - + + klineedit.h klineedit.h diff --git a/kig/modes/label.cc b/kig/modes/label.cc index 578e15dd..3471d6dc 100644 --- a/kig/modes/label.cc +++ b/kig/modes/label.cc @@ -55,8 +55,8 @@ public: TQPoint plc; // the currently selected coordinate Coordinate mcoord; - // the possible parent object that defines the location of the label.. - ObjectCalcer* locationparent; + // the possible tqparent object that defines the location of the label.. + ObjectCalcer* locationtqparent; // the text is only kept in the text input widget, not here // TQString mtext; @@ -64,8 +64,8 @@ public: // the property objects we'll be using as args, we keep a reference // to them in the args object, and keep a pointer to them ( or 0 ) // in the correct order in args ( separately, because we can't use - // the order of the parents of a ReferenceObject, and certainly - // can't give 0 as a parent.. + // the order of the tqparents of a ReferenceObject, and certainly + // can't give 0 as a tqparent.. argvect args; // if we're ReallySelectingArgs, then this var points to the arg @@ -90,7 +90,7 @@ TextLabelModeBase::~TextLabelModeBase() TextLabelModeBase::TextLabelModeBase( KigPart& doc ) : KigMode( doc ), d( new Private ) { - d->locationparent = 0; + d->locationtqparent = 0; d->lpc = 0; d->mwawd = SelectingLocation; d->wiz = new TextLabelWizard( doc.widget(), this ); @@ -212,7 +212,7 @@ void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w ) { std::vector os = mdoc.document().whatAmIOn( w->fromScreen( e->pos() ), *w ); bool attachable = false; - d->locationparent = 0; + d->locationtqparent = 0; for ( std::vector::iterator i = os.begin(); i != os.end(); ++i ) { if( (*i)->imp()->attachPoint().valid() || @@ -220,7 +220,7 @@ void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w ) (*i)->imp()->inherits( CurveImp::stype() ) ) { attachable = true; - d->locationparent = (*i)->calcer(); + d->locationtqparent = (*i)->calcer(); break; }; }; @@ -228,10 +228,10 @@ void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w ) if ( attachable ) { w->setCursor( KCursor::handCursor() ); - TQString s = d->locationparent->imp()->type()->attachToThisStatement(); + TQString s = d->locationtqparent->imp()->type()->attachToThisStatement(); mdoc.emitStatusBarText( s ); - KigPainter p( w->screenInfo(), &w->curPix, mdoc.document() ); + KigPainter p( w->screenInfo(), TQT_TQPAINTDEVICE(&w->curPix), mdoc.document() ); // set the text next to the arrow cursor TQPoint point = e->pos(); @@ -296,7 +296,7 @@ void TextLabelModeBase::finishPressed() "value for. Please remove them or select enough arguments." ) ); else { - finish( d->mcoord, s, d->args, needframe, d->locationparent ); + finish( d->mcoord, s, d->args, needframe, d->locationtqparent ); killMode(); }; } @@ -376,7 +376,7 @@ void TextLabelModeBase::updateLinksLabel() } else // otherwise, we show a stub... - linktext = i18n( "argument %1" ).arg( count + 1 ); + linktext = i18n( "argument %1" ).tqarg( count + 1 ); d->wiz->myCustomWidget1->addLink( linktext, buf ); // set pos and prevpos to the next char after the last match, so @@ -391,7 +391,7 @@ void TextLabelModeBase::updateLinksLabel() d->wiz->myCustomWidget1->addText( s.mid( prevpos ), buf ); d->wiz->myCustomWidget1->applyEdit( buf ); - d->wiz->relayoutArgsPage(); + d->wiz->retqlayoutArgsPage(); d->wiz->resize( d->wiz->size() ); } @@ -406,7 +406,7 @@ void TextLabelModeBase::linkClicked( int i ) d->mwawd = ReallySelectingArgs; d->mwaaws = i; - mdoc.emitStatusBarText( i18n( "Selecting argument %1" ).arg( i + 1 ) ); + mdoc.emitStatusBarText( i18n( "Selecting argument %1" ).tqarg( i + 1 ) ); } void TextLabelModeBase::redrawScreen( KigWidget* w ) @@ -452,7 +452,7 @@ TextLabelConstructionMode::~TextLabelConstructionMode() void TextLabelConstructionMode::finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ) + ObjectCalcer* locationtqparent ) { std::vector args; for ( argvect::const_iterator i = props.begin(); @@ -460,8 +460,8 @@ void TextLabelConstructionMode::finish( args.push_back( i->get() ); ObjectHolder* label = 0; - if ( locationparent ) - label = ObjectFactory::instance()->attachedLabel( s, locationparent, coord, needframe, args, mdoc.document() ); + if ( locationtqparent ) + label = ObjectFactory::instance()->attachedLabel( s, locationtqparent, coord, needframe, args, mdoc.document() ); else label = ObjectFactory::instance()->label( s, coord, needframe, args, mdoc.document() ); mdoc.addObject( label ); @@ -471,10 +471,10 @@ TextLabelRedefineMode::TextLabelRedefineMode( KigPart& d, ObjectTypeCalcer* labe : TextLabelModeBase( d ), mlabel( label ) { assert( label->imp()->inherits( TextImp::stype() ) ); - std::vector parents = label->parents(); - assert( parents.size() >= 3 ); - std::vector firstthree( parents.begin(), parents.begin() + 3 ); - std::vector rest( parents.begin() + 3, parents.end() ); + std::vector tqparents = label->tqparents(); + assert( tqparents.size() >= 3 ); + std::vector firstthree( tqparents.begin(), tqparents.begin() + 3 ); + std::vector rest( tqparents.begin() + 3, tqparents.end() ); firstthree = TextType::instance()->argParser().parse( firstthree ); assert( firstthree[0]->imp()->inherits( IntImp::stype() ) ); @@ -507,12 +507,12 @@ TextLabelRedefineMode::~TextLabelRedefineMode() void TextLabelRedefineMode::finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ) + ObjectCalcer* locationtqparent ) { - std::vector parents = mlabel->parents(); - assert( parents.size() >= 3 ); - std::vector firstthree( parents.begin(), parents.begin() + 3 ); - std::vector rest( parents.begin() + 3, parents.end() ); + std::vector tqparents = mlabel->tqparents(); + assert( tqparents.size() >= 3 ); + std::vector firstthree( tqparents.begin(), tqparents.begin() + 3 ); + std::vector rest( tqparents.begin() + 3, tqparents.end() ); firstthree = TextType::instance()->argParser().parse( firstthree ); KigCommand* kc = new KigCommand( mdoc, i18n( "Change Label" ) ); @@ -538,7 +538,7 @@ void TextLabelRedefineMode::finish( static_cast( firstthree[2] )->setImp( new StringImp( s ) ); mon.finish( kc ); - std::vector oldparents = mlabel->parents(); + std::vector oldtqparents = mlabel->tqparents(); std::vector p; for ( argvect::const_iterator i = props.begin(); i != props.end(); ++i ) @@ -552,19 +552,19 @@ void TextLabelRedefineMode::finish( * take advantage of the method "getAttachPoint" that should * do all the work; it is also used when creating a new label */ - np[1] = ObjectFactory::instance()->getAttachPoint( locationparent, coord, mdoc.document() ); + np[1] = ObjectFactory::instance()->getAttachPoint( locationtqparent, coord, mdoc.document() ); /* this is the old code, just in case... */ -// if ( locationparent && locationparent->imp()->inherits( CurveImp::stype() ) ) +// if ( locationtqparent && locationtqparent->imp()->inherits( CurveImp::stype() ) ) // { -// double param = static_cast( locationparent->imp() )->getParam( coord, mdoc.document() ); -// np[1] = ObjectFactory::instance()->constrainedPointCalcer( locationparent, param ); +// double param = static_cast( locationtqparent->imp() )->getParam( coord, mdoc.document() ); +// np[1] = ObjectFactory::instance()->constrainedPointCalcer( locationtqparent, param ); // np[1]->calc( mdoc.document() ); // } -// else if ( locationparent ) +// else if ( locationtqparent ) // { -// assert( locationparent->imp()->inherits( PointImp::stype() ) ); -// np[1] = locationparent; +// assert( locationtqparent->imp()->inherits( PointImp::stype() ) ); +// np[1] = locationtqparent; // } // else // np[1] = new ObjectConstCalcer( new PointImp( coord ) ); @@ -585,5 +585,5 @@ void TextLabelModeBase::setFrame( bool f ) void TextLabelModeBase::setLocationParent( ObjectCalcer* o ) { - d->locationparent = o; + d->locationtqparent = o; } diff --git a/kig/modes/label.h b/kig/modes/label.h index 828c2e29..7d8f842a 100644 --- a/kig/modes/label.h +++ b/kig/modes/label.h @@ -35,7 +35,7 @@ class ObjectCalcer; /** * this is the base class for TextLabelConstructionMode and * TextLabelRedefineMode.. most of the work is done in this class, - * with some specific things delegated to the children.. Template + * with some specific things delegated to the tqchildren.. Template * method pattern, right ? :) */ class TextLabelModeBase @@ -65,14 +65,14 @@ protected: void setLocationParent( ObjectCalcer* o ); /** * objects you pass here, should be newly created property objects, - * that have no children.. + * that have no tqchildren.. */ void setPropertyObjects( const argvect& props ); void setFrame( bool f ); virtual void finish( const Coordinate& c, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ) = 0; + ObjectCalcer* locationtqparent ) = 0; private: // the KigMode interface.. @@ -111,7 +111,7 @@ public: void finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ); + ObjectCalcer* locationtqparent ); }; class TextLabelRedefineMode @@ -120,7 +120,7 @@ class TextLabelRedefineMode ObjectTypeCalcer* mlabel; void finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, - ObjectCalcer* locationparent ); + ObjectCalcer* locationtqparent ); public: TextLabelRedefineMode( KigPart& d, ObjectTypeCalcer* label ); ~TextLabelRedefineMode(); diff --git a/kig/modes/linkslabel.cpp b/kig/modes/linkslabel.cpp index 96a73a8f..8d711d65 100644 --- a/kig/modes/linkslabel.cpp +++ b/kig/modes/linkslabel.cpp @@ -33,31 +33,31 @@ using namespace std; class LinksLabel::Private { public: - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; std::vector labels; std::vector urllabels; }; -LinksLabel::LinksLabel( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +LinksLabel::LinksLabel( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { p = new Private; - p->layout = new TQHBoxLayout( this ); + p->tqlayout = new TQHBoxLayout( this ); TQLabel* l = new TQLabel( TQString::fromUtf8( "Dit is een " ), this ); p->labels.push_back( l ); - p->layout->addWidget( l ); + p->tqlayout->addWidget( l ); KURLLabel* u = new KURLLabel( TQString::fromUtf8( "http://www.kde.org/" ), TQString::fromUtf8( "url"), this ); p->urllabels.push_back( u ); - p->layout->addWidget( u ); + p->tqlayout->addWidget( u ); l = new TQLabel( TQString::fromUtf8( " !" ), this ); p->labels.push_back( l ); - p->layout->addWidget(l ); + p->tqlayout->addWidget(l ); - p->layout->activate(); + p->tqlayout->activate(); } LinksLabel::~LinksLabel() @@ -67,8 +67,8 @@ LinksLabel::~LinksLabel() void LinksLabel::urlClicked() { - const TQObject* o = sender(); - std::vector::iterator i = std::find( p->urllabels.begin(), p->urllabels.end(), static_cast( o ) ); + const TQObject* o = TQT_TQOBJECT_CONST(const_cast(sender())); + std::vector::iterator i = std::find( p->urllabels.begin(), p->urllabels.end(), static_cast(TQT_TQWIDGET_CONST( o )) ); assert( i != p->urllabels.end() ); emit linkClicked( i - p->urllabels.begin() ); } @@ -89,7 +89,7 @@ void LinksLabel::addLink( const TQString& s, LinksLabelEditBuf& buf ) } namespace { - void deleteObj( TQObject* o ) { delete o; } + void deleteObj( TQWidget* o ) { delete o; } } void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) @@ -99,8 +99,8 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) p->urllabels.clear(); p->labels.clear(); - delete p->layout; - p->layout = new TQHBoxLayout( this ); + delete p->tqlayout; + p->tqlayout = new TQHBoxLayout( this ); for ( LinksLabelEditBuf::vec::iterator i = buf.data.begin(); i != buf.data.end(); ++i ) { @@ -111,7 +111,7 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) KURLLabel* l = new KURLLabel( TQString::fromUtf8( "http://edu.kde.org/kig" ), i->second, this ); p->urllabels.push_back( l ); - p->layout->addWidget( l ); + p->tqlayout->addWidget( l ); connect( l, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( urlClicked() ) ); } else @@ -119,15 +119,15 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) // we need a normal label... TQLabel* l = new TQLabel( i->second, this ); p->labels.push_back( l ); - p->layout->addWidget( l ); + p->tqlayout->addWidget( l ); }; }; TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - p->layout->addItem( spacer ); + p->tqlayout->addItem( spacer ); - p->layout->activate(); + p->tqlayout->activate(); std::for_each( p->urllabels.begin(), p->urllabels.end(), mem_fun( &TQWidget::show ) ); std::for_each( p->labels.begin(), p->labels.end(), mem_fun( &TQWidget::show ) ); diff --git a/kig/modes/linkslabel.h b/kig/modes/linkslabel.h index 89d1c76e..8ed8b04a 100644 --- a/kig/modes/linkslabel.h +++ b/kig/modes/linkslabel.h @@ -27,12 +27,13 @@ * this widget shows a line of text, with some links underlined, and * emits a signal if one of the links is clicked... */ -class LinksLabel : public QWidget +class LinksLabel : public TQWidget { Q_OBJECT + TQ_OBJECT public: - LinksLabel( TQWidget* parent = 0, const char* name = 0 ); + LinksLabel( TQWidget* tqparent = 0, const char* name = 0 ); ~LinksLabel(); class LinksLabelEditBuf diff --git a/kig/modes/macro.cc b/kig/modes/macro.cc index bc6f5dc5..ba6f98ab 100644 --- a/kig/modes/macro.cc +++ b/kig/modes/macro.cc @@ -167,7 +167,7 @@ void DefineMacroMode::dragRect( const TQPoint& p, KigWidget& w ) std::vector* objs = mwizard->currentPage() == mwizard->mpgiven ? &mgiven : &mfinal; DragRectMode dm( p, mdoc, w ); mdoc.runMode( &dm ); - KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); if ( ! dm.cancelled() ) { std::vector 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(), &w.stillPix, mdoc.document() ); + KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); p.drawObject( o, !isselected ); w.updateCurPix( p.overlay() ); w.updateWidget(); @@ -224,7 +224,7 @@ void DefineMacroMode::mouseMoved( const std::vector& os, const TQ // statusbar text mdoc.emitStatusBarText( selectstat ); - KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); // set the text next to the arrow cursor TQPoint point = pt; diff --git a/kig/modes/macrowizard.cc b/kig/modes/macrowizard.cc index 662e3a0d..4a240b74 100644 --- a/kig/modes/macrowizard.cc +++ b/kig/modes/macrowizard.cc @@ -24,8 +24,8 @@ #include #include -MacroWizard::MacroWizard( TQWidget* parent, DefineMacroMode* m ) - : MacroWizardBase( parent, "Define Macro Wizard", false ), mmode( m ) +MacroWizard::MacroWizard( TQWidget* tqparent, DefineMacroMode* m ) + : MacroWizardBase( tqparent, "Define Macro Wizard", false ), mmode( m ) { connect( KLineEdit2, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( nameTextChanged( const TQString& ) ) ); @@ -85,6 +85,6 @@ void MacroWizard::accept() void MacroWizard::slotHelpClicked() { - kapp->invokeHelp( TQString::fromLatin1( "defining-macros"), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "defining-macros"), + TQString::tqfromLatin1( "kig" ) ); } diff --git a/kig/modes/macrowizard.h b/kig/modes/macrowizard.h index 96318ec9..b3b59c66 100644 --- a/kig/modes/macrowizard.h +++ b/kig/modes/macrowizard.h @@ -25,8 +25,9 @@ class DefineMacroMode; class MacroWizard : public MacroWizardBase { Q_OBJECT + TQ_OBJECT public: - MacroWizard( TQWidget* parent, DefineMacroMode* m ); + MacroWizard( TQWidget* tqparent, DefineMacroMode* m ); ~MacroWizard(); void back(); diff --git a/kig/modes/macrowizardbase.ui b/kig/modes/macrowizardbase.ui index d3929ad8..db62a8b1 100644 --- a/kig/modes/macrowizardbase.ui +++ b/kig/modes/macrowizardbase.ui @@ -1,10 +1,10 @@ MacroWizardBase - + MacroWizardBase - + 4 0 @@ -23,7 +23,7 @@ Define New Macro - + mpgiven @@ -40,7 +40,7 @@ 6 - + TextLabel1 @@ -55,13 +55,13 @@ Select the "given" objects for your new macro and press "Next". - + WordBreak|AlignVCenter - + mpfinal @@ -78,7 +78,7 @@ 6 - + TextLabel2 @@ -88,7 +88,7 @@ - + mpname @@ -105,7 +105,7 @@ 6 - + TextLabel1_2 @@ -113,7 +113,7 @@ Enter a name and description for your new type. - + Layout2 @@ -127,7 +127,7 @@ 6 - + TextLabel2_2 @@ -145,7 +145,7 @@ - + Layout1 @@ -159,7 +159,7 @@ 6 - + TextLabel2_2_2 @@ -180,7 +180,7 @@ - + klineedit.h klineedit.h diff --git a/kig/modes/mode.h b/kig/modes/mode.h index 18425d2d..e9fdd9ea 100644 --- a/kig/modes/mode.h +++ b/kig/modes/mode.h @@ -34,7 +34,7 @@ class StdConstructionMode; * document... It tells us how to respond to a certain event. */ class KigMode - : public Qt + : public TQt { public: virtual ~KigMode(); diff --git a/kig/modes/moving.cc b/kig/modes/moving.cc index 533b15d4..980a5feb 100644 --- a/kig/modes/moving.cc +++ b/kig/modes/moving.cc @@ -55,13 +55,13 @@ void MovingModeBase::initScreen( const std::vector& in ) std::inserter( notmovingobjs, notmovingobjs.begin() ) ); mview.clearStillPix(); - KigPainter p( mview.screenInfo(), &mview.stillPix, mdoc.document() ); + KigPainter p( mview.screenInfo(), TQT_TQPAINTDEVICE(&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(), &mview.curPix, mdoc.document() ); + KigPainter p2( mview.screenInfo(), TQT_TQPAINTDEVICE(&mview.curPix), mdoc.document() ); p2.drawObjects( drawableset.begin(), drawableset.end(), true ); } @@ -86,12 +86,12 @@ void MovingModeBase::mouseMoved( TQMouseEvent* e, KigWidget* v ) v->updateCurPix(); Coordinate c = v->fromScreen( e->pos() ); - bool snaptogrid = e->state() & Qt::ShiftButton; + bool snaptogrid = e->state() & TQt::ShiftButton; moveTo( c, snaptogrid ); for ( std::vector::iterator i = mcalcable.begin(); i != mcalcable.end(); ++i ) ( *i )->calc( mdoc.document() ); - KigPainter p( v->screenInfo(), &v->curPix, mdoc.document() ); + KigPainter p( v->screenInfo(), TQT_TQPAINTDEVICE(&v->curPix), mdoc.document() ); // TODO: only draw the explicitly moving objects as selected, the // other ones as deselected.. Needs some support from the // subclasses.. @@ -129,8 +129,8 @@ MovingMode::MovingMode( const std::vector& os, const Coordinate& emo.push_back( ( *i )->calcer() ); d->refmap[( *i )->calcer()] = (*i)->moveReferencePoint(); objs.insert( ( *i )->calcer() ); - std::vector parents = ( *i )->calcer()->movableParents(); - objs.insert( parents.begin(), parents.end() ); + std::vector tqparents = ( *i )->calcer()->movableParents(); + objs.insert( tqparents.begin(), tqparents.end() ); }; emo = calcPath( emo ); @@ -143,8 +143,8 @@ MovingMode::MovingMode( const std::vector& os, const Coordinate& std::set tmp = objs; for ( std::set::const_iterator i = tmp.begin(); i != tmp.end(); ++i ) { - std::set children = getAllChildren(*i); - objs.insert( children.begin(), children.end() ); + std::set tqchildren = getAllChildren(*i); + objs.insert( tqchildren.begin(), tqchildren.end() ); } initScreen( calcPath( std::vector( objs.begin(), objs.end() ) ) ); @@ -154,7 +154,7 @@ void MovingMode::stopMove() { TQString text = d->emo.size() == 1 ? d->emo[0]->imp()->type()->moveAStatement() : - i18n( "Move %1 Objects" ).arg( d->emo.size() ); + i18n( "Move %1 Objects" ).tqarg( d->emo.size() ); KigCommand* mc = new KigCommand( mdoc, text ); d->mon->finish( mc ); mdoc.history()->addCommand( mc ); @@ -164,7 +164,7 @@ void MovingMode::moveTo( const Coordinate& o, bool snaptogrid ) { for( std::vector::iterator i = d->emo.begin(); i != d->emo.end(); ++i ) { - assert( d->refmap.find( *i ) != d->refmap.end() ); + assert( d->refmap.tqfind( *i ) != d->refmap.end() ); Coordinate nc = d->refmap[*i] + ( o - d->pwwsm ); if ( snaptogrid ) nc = mdoc.document().coordinateSystem().snapToGrid( nc, mview ); (*i)->move( nc, mdoc.document() ); @@ -176,14 +176,14 @@ PointRedefineMode::PointRedefineMode( ObjectHolder* p, KigPart& d, KigWidget& v { assert( dynamic_cast( p->calcer() ) ); moldtype = static_cast( p->calcer() )->type(); - std::vector oldparents = p->calcer()->parents(); - std::copy( oldparents.begin(), oldparents.end(), std::back_inserter( moldparents ) ); - - std::vector parents = getAllParents( mp->calcer() ); - mmon = new MonitorDataObjects( parents ); - std::vector moving = parents; - std::set children = getAllChildren( mp->calcer() ); - std::copy( children.begin(), children.end(), std::back_inserter( moving ) ); + std::vector oldtqparents = p->calcer()->tqparents(); + std::copy( oldtqparents.begin(), oldtqparents.end(), std::back_inserter( moldtqparents ) ); + + std::vector tqparents = getAllParents( mp->calcer() ); + mmon = new MonitorDataObjects( tqparents ); + std::vector moving = tqparents; + std::set tqchildren = getAllChildren( mp->calcer() ); + std::copy( tqchildren.begin(), tqchildren.end(), std::back_inserter( moving ) ); initScreen( moving ); } @@ -224,22 +224,22 @@ void PointRedefineMode::stopMove() assert( dynamic_cast( mp->calcer() ) ); ObjectTypeCalcer* mpcalc = static_cast( mp->calcer() ); - std::vector newparents = mpcalc->parents(); - std::vector newparentsref( - newparents.begin(), newparents.end() ); + std::vector newtqparents = mpcalc->tqparents(); + std::vector newtqparentsref( + newtqparents.begin(), newtqparents.end() ); const ObjectType* newtype = mpcalc->type(); - std::vector oldparents; - for( std::vector::iterator i = moldparents.begin(); - i != moldparents.end(); ++i ) - oldparents.push_back( i->get() ); + std::vector oldtqparents; + for( std::vector::iterator i = moldtqparents.begin(); + i != moldtqparents.end(); ++i ) + oldtqparents.push_back( i->get() ); mpcalc->setType( moldtype ); - mpcalc->setParents( oldparents ); + mpcalc->setParents( oldtqparents ); mp->calc( mdoc.document() ); KigCommand* command = new KigCommand( mdoc, i18n( "Redefine Point" ) ); command->addTask( - new ChangeParentsAndTypeTask( mpcalc, newparents, newtype ) ); + new ChangeParentsAndTypeTask( mpcalc, newtqparents, newtype ) ); mmon->finish( command ); mdoc.history()->addCommand( command ); } diff --git a/kig/modes/moving.h b/kig/modes/moving.h index 7c27aa4e..8a75e62a 100644 --- a/kig/modes/moving.h +++ b/kig/modes/moving.h @@ -88,7 +88,7 @@ class PointRedefineMode : public MovingModeBase { ObjectHolder* mp; - std::vector moldparents; + std::vector moldtqparents; const ObjectType* moldtype; MonitorDataObjects* mmon; void stopMove(); diff --git a/kig/modes/normal.cc b/kig/modes/normal.cc index 1fa45d00..c4dd7f4f 100644 --- a/kig/modes/normal.cc +++ b/kig/modes/normal.cc @@ -133,7 +133,7 @@ void NormalMode::dragRect( const TQPoint& p, KigWidget& w ) DragRectMode d( p, mdoc, w ); mdoc.runMode( &d ); - KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); if ( ! d.cancelled() ) { @@ -174,7 +174,7 @@ void NormalMode::dragObject( const std::vector& oco, const TQPoin void NormalMode::leftClickedObject( ObjectHolder* o, const TQPoint&, KigWidget& w, bool ctrlOrShiftDown ) { - KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() ); + KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() ); if ( ! o ) { @@ -269,7 +269,7 @@ void NormalMode::mouseMoved( const std::vector& os, // statusbar text mdoc.emitStatusBarText( stat ); - KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() ); + KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() ); // set the text next to the arrow cursor TQPoint point = plc; diff --git a/kig/modes/popup.cc b/kig/modes/popup.cc index 489b4985..8a3d05e1 100644 --- a/kig/modes/popup.cc +++ b/kig/modes/popup.cc @@ -198,12 +198,12 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, else if ( single ) { if ( !objs[0]->name().isNull() ) - title = TQString::fromLatin1( "%1 %2" ).arg( objs[0]->imp()->type()->translatedName() ).arg( objs[0]->name() ); + title = TQString::tqfromLatin1( "%1 %2" ).tqarg( objs[0]->imp()->type()->translatedName() ).tqarg( objs[0]->name() ); else title = objs[0]->imp()->type()->translatedName(); } else - title = i18n( "%1 Objects" ).arg( objs.size() ); + title = i18n( "%1 Objects" ).tqarg( objs.size() ); insertTitle( title, 1 ); if ( !empty ) @@ -281,22 +281,22 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, i18n( "Set Co&lor" ), i18n( "Set &Pen Width" ), i18n( "Set St&yle" ), - TQString::null, + TQString(), i18n( "Set Coordinate S&ystem" ) }; static const TQString menuicons[NumberOfMenus] = { "centralsymmetry", "test", - TQString::null, + TQString(), "launch", "kig_text", "color_fill", // "colorize", "sizer", "paintbrush", - TQString::null, - TQString::null + TQString(), + TQString() }; int index = 1; for ( int i = 0; i < NumberOfMenus; ++i ) @@ -360,14 +360,14 @@ NormalModePopupObjects::~NormalModePopupObjects() static const TQColor* colors[] = { - &Qt::blue, - &Qt::black, - &Qt::gray, - &Qt::red, - &Qt::green, - &Qt::cyan, - &Qt::yellow, - &Qt::darkRed + &TQt::blue, + &TQt::black, + &TQt::gray, + &TQt::red, + &TQt::green, + &TQt::cyan, + &TQt::yellow, + &TQt::darkRed }; static const int numberofcolors = sizeof( colors ) / sizeof( TQColor* ); @@ -424,14 +424,14 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in point = false; if ( (*i)->drawer()->color() != color ) samecolor = false; }; - if ( ! samecolor ) color = Qt::blue; + if ( ! samecolor ) color = TQt::blue; TQPixmap p( point ? 20 : 50, 20 ); for ( int i = 1; i < 8; ++i ) { p.fill( popup.eraseColor() ); TQPainter ptr( &p ); ptr.setPen( TQPen( color, 1 ) ); - ptr.setBrush( TQBrush( color, Qt::SolidPattern ) ); + ptr.setBrush( TQBrush( color, TQt::SolidPattern ) ); if ( point ) { int size = 2*i; @@ -463,14 +463,14 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in if ( (*i)->drawer()->color() != color ) samecolor = false; }; bool point = ( npoints > nothers ); - if ( ! samecolor ) color = Qt::blue; + if ( ! samecolor ) color = TQt::blue; if ( point ) for ( int i = 0; i < 5; ++i ) { TQPixmap p( 20, 20 ); p.fill( popup.eraseColor() ); ScreenInfo si( Rect( -1, -1, 2, 2 ), p.rect() ); - KigPainter ptr( si, &p, popup.part().document(), false ); + KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false ); PointImp pt( Coordinate( 0, 0 ) ); ObjectDrawer d( color, -1, true, Qt::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, &p, popup.part().document(), false ); + KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false ); LineImp line( Coordinate( -1, 0 ), Coordinate( 1, 0 ) ); Qt::PenStyle ps = penstyles[i]; ObjectDrawer d( color, -1, true, ps, 1 ); @@ -518,7 +518,7 @@ static void addNameLabel( ObjectCalcer* object, ObjectCalcer* namecalcer, const object->imp()->inherits( CurveImp::stype() ) ) attachto = object; ObjectHolder* label = ObjectFactory::instance()->attachedLabel( - TQString::fromLatin1( "%1" ), attachto, loc, namelabelneedsframe, args, doc.document() ); + TQString::tqfromLatin1( "%1" ), attachto, loc, namelabelneedsframe, args, doc.document() ); doc.addObject( label ); } @@ -871,7 +871,7 @@ void PropertiesActionsProvider::fillUpMenu( NormalModePopupObjects& popup, add &= ! prop->inherits( BogusImp::stype() ); // we don't want to construct PointImp's coordinate property, // since it would construct a point at the same place as its - // parent.. + // tqparent.. add &= ! ( o->imp()->inherits( PointImp::stype() ) && prop->inherits( PointImp::stype() ) ); } @@ -909,11 +909,11 @@ bool PropertiesActionsProvider::executeAction( } int propid = mprops[menu-1][id]; assert( os.size() == 1 ); - ObjectHolder* parent = os[0]; + ObjectHolder* tqparent = os[0]; if ( menu == NormalModePopupObjects::ShowMenu ) { std::vector args; - args.push_back( new ObjectPropertyCalcer( parent->calcer(), propid ) ); + args.push_back( new ObjectPropertyCalcer( tqparent->calcer(), propid ) ); args.back()->calc( doc.document() ); // TODO: recover the cursor position somehow... the following does not work // in general... @@ -924,14 +924,14 @@ bool PropertiesActionsProvider::executeAction( // /////// Coordinate c = Coordinate::invalidCoord(); Coordinate c = w.fromScreen( popup.plc() ); ObjectHolder* label = ObjectFactory::instance()->attachedLabel( - TQString::fromLatin1( "%1" ), parent->calcer(), c, + TQString::tqfromLatin1( "%1" ), tqparent->calcer(), c, false, args, doc.document() ); doc.addObject( label ); } else { ObjectHolder* h = new ObjectHolder( - new ObjectPropertyCalcer( parent->calcer(), propid ) ); + new ObjectPropertyCalcer( tqparent->calcer(), propid ) ); h->calc( doc.document() ); doc.addObject( h ); }; @@ -1182,7 +1182,7 @@ ObjectChooserPopup::ObjectChooserPopup( const TQPoint& p, KigWidget& view, for ( uint i = 0; i < mobjs.size(); i++ ) { insertItem( !mobjs[i]->name().isEmpty() - ? TQString::fromLatin1( "%1 %2" ).arg( mobjs[i]->imp()->type()->translatedName() ).arg( mobjs[i]->name() ) + ? TQString::tqfromLatin1( "%1 %2" ).tqarg( mobjs[i]->imp()->type()->translatedName() ).tqarg( mobjs[i]->name() ) : mobjs[i]->imp()->type()->translatedName(), i ); } diff --git a/kig/modes/popup.h b/kig/modes/popup.h index 76574b74..4db6838f 100644 --- a/kig/modes/popup.h +++ b/kig/modes/popup.h @@ -47,6 +47,7 @@ class NormalModePopupObjects : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: NormalModePopupObjects( KigPart& part, KigWidget& view, @@ -117,6 +118,7 @@ class ObjectChooserPopup : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kig/modes/textlabelwizard.cc b/kig/modes/textlabelwizard.cc index d562bbf3..70f484d8 100644 --- a/kig/modes/textlabelwizard.cc +++ b/kig/modes/textlabelwizard.cc @@ -26,8 +26,8 @@ #include -TextLabelWizard::TextLabelWizard( TQWidget* parent, TextLabelModeBase* mode ) - : TextLabelWizardBase( parent, "TextLabelWizard", false ), mmode( mode ) +TextLabelWizard::TextLabelWizard( TQWidget* tqparent, TextLabelModeBase* mode ) + : TextLabelWizardBase( tqparent, "TextLabelWizard", false ), mmode( mode ) { connect( labelTextInput, TQT_SIGNAL( textChanged() ), TQT_SLOT( textChanged() ) ); @@ -81,15 +81,15 @@ void TextLabelWizard::linkClicked( int which ) mmode->linkClicked( which ); } -void TextLabelWizard::relayoutArgsPage() +void TextLabelWizard::retqlayoutArgsPage() { select_arguments_pageLayout->activate(); - repaint(); + tqrepaint(); } void TextLabelWizard::slotHelpClicked() { - kapp->invokeHelp( TQString::fromLatin1( "text-labels" ), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "text-labels" ), + TQString::tqfromLatin1( "kig" ) ); } diff --git a/kig/modes/textlabelwizard.h b/kig/modes/textlabelwizard.h index bd51c1e0..2d192e7c 100644 --- a/kig/modes/textlabelwizard.h +++ b/kig/modes/textlabelwizard.h @@ -25,8 +25,9 @@ class TextLabelModeBase; class TextLabelWizard : public TextLabelWizardBase { Q_OBJECT + TQ_OBJECT public: - TextLabelWizard( TQWidget* parent, TextLabelModeBase* mode ); + TextLabelWizard( TQWidget* tqparent, TextLabelModeBase* mode ); ~TextLabelWizard(); void back(); @@ -34,7 +35,7 @@ public: void reject(); void accept(); - void relayoutArgsPage(); + void retqlayoutArgsPage(); private slots: void textChanged(); void linkClicked( int which ); diff --git a/kig/modes/textlabelwizardbase.ui b/kig/modes/textlabelwizardbase.ui index 4e195b0d..5cbace2c 100644 --- a/kig/modes/textlabelwizardbase.ui +++ b/kig/modes/textlabelwizardbase.ui @@ -1,10 +1,10 @@ TextLabelWizardBase - + TextLabelWizardBase - + 0 0 @@ -15,7 +15,7 @@ Construct Label - + enter_text_page @@ -26,7 +26,7 @@ unnamed - + enterTextLabel @@ -34,16 +34,16 @@ Enter the text for your label here and press "Next". If you want to show variable parts, then put %1, %2, ... at the appropriate places (e.g. "This segment is %1 units long."). - + WordBreak|AlignVCenter - + labelTextInput - + needFrameCheckBox @@ -53,7 +53,7 @@ If you want to show variable parts, then put %1, %2, ... at the appropriate plac - + select_arguments_page @@ -64,14 +64,14 @@ If you want to show variable parts, then put %1, %2, ... at the appropriate plac unnamed - + selectArgsLabel Now select the argument(s) you need. For every argument, click on it, select an object and a property in the Kig window, and click finish when you are done... - + WordBreak|AlignVCenter @@ -106,7 +106,7 @@ If you want to show variable parts, then put %1, %2, ... at the appropriate plac 789c9d97c76e24490e86effd1442f3d65870d2451a0ce6206f5adeb4cc620f8c34f2553225b5a4c1befb46927fe6a1d4c0ccac4287fa8a0c26834193f5dbb785b3fd9d856fbf7d799ec9ecba5ea8afe469e15bf3727ffffeeffffcf1e797af49b2d0ffc7d142f2f55f5fbe1ecc16ea85dde9a4ed81290045faa77ca49cf4ab67ba1e3953969173651ab9d4fdf1c8a27c3872ad7c3c72d3b32c2a67c3f3444636fbef23eb7e590267e68fcc4656395d8dacf6d938ef97eaef289781cddebdb2846fccff44b989ba58e3411f3dc75158e6df1d3889539517ca49bf54fe43398d1dec4f46567f685fd9c539f43fc025f80c1c3ce8d93f28e77185f8bf0c6cfae4c0b5f9c3c6e5c0542a4b5876fe13708df39d2bd7716372aa8c93c4e4723bb2f977aadc26ceec4bdb7310e6b0bfab9c2445ecd49f1370694cebca65d260ffa6711a41aef14d24e94cee6be3348e0ae5e9c8765f07ca3e8db17f0f9c825794eb3489351fe9bb7217e4969f29388bd51ee9fda5715a19730696b852fea95c6471647ca95cf64bcf43e0cef4657b647bfe6acf213d6bb32f9a9f5992b5a64f9a8f990b6cf9ecc15d6cf9acf6b2da55a8a75cb973dee4b2d1b38b5c05de02434e87e01aacfb351df5bebddea74b5c67f9c795711ea15e357e2ecde358fb87efc0a867df8cac728a074e62e527706afb59f3cf6583be5c28bb3c35f693812d1fbdc6dbe57966fec932d899ffa4f7e38adca17e34beaeca4b9c271a18f1d5fc739257b0d70d9c68be7bed7fcee7827ab91cd8e4740cf6b19d4ffb87ab07b9bf516e72d4a3ac821b9cef6e60d84f47367ded2fae1d9f7704f6163f79000ffde27660f387ed3c5dbf54dfeebb0bf6acbe6b706bfa5ef32f8f8b18f5bf0f463f20edb77956a4e68fbc80b3c4facd163847be6bfde72ec86dbeac82715fbc0286be683cf3bc081d44f7df80d344fb0b6b7de64581fb916765297263d6fccd9b7ee97e566e8b06cfdb1f59cf2bda2f8bbc2c11df0c5c41aefdb328ca22b1feb0012eedbce24736f91b18fb796d64eb87cb60817dcdafb07d906bfd14d22f659d8785ef97b2f6d7b2df6ef1d6fb2babaac6f92e8c25b27ecc1f239b7f3a5fca5a8678ea7c2d9bc0e6ef1238b3fca2c7814d5f4cbf9334b5f833384bed3c7a5f5514f4adbe2ec07962e7590457f06f6f649b977afe2a16f42f5e070bfc591e18f7a5f1a812a9e0df39d827da4fbd8c6ccfd7785569bf945f953371a9d5a3de67950bfa2d75c63eb2fb15bdcfaaf011e6c7263846bf8f4636f91618f3c7d3c0f047fb69550efab2074e12bd6fd27957553ec33c5b043bcc7f9d0795f818fdb501a3df8ae673e507ff69021eea37063bc45ffb73550736ff36c0a84f3e0317a86f8b5f139e6ffe1f821de6d9127898ff3be00a7c3ab2cd03e3d697560ff40016e47b3bb2e96bbd559d8f32bbff4b7065f193042c98873acf240af6adbf3c83c5f2954bb0c7bcd77c107d81d2fdebc63e33ff640aaecc9e1c8151df5c803dfaadc64b52dfa03ed64636ffb4ff4b2867f453ede7227586fcd3f9264ded91fffafe236d5da37fe83c91ceb7b9e5b7f6731ff92ed7f747d6fbf7e185cf58347e3e6932e47b3430fa893edf87d795c2fc3f003b67f5f902cec17abfde0dfa3c053b3c5ffb832fc2eb8fddcf233887fc195c801f46b6f3cdc02558fba72f7d2d1a7f7e321ee58fe0cad86bbff24dd3e2fe74fef836b0c6eb60d62fa6bf5e07b3419f853dd7dc70fb8bd5f1255fd90ed30f9f3c5ff30ddff21ddff384a7fcc08ffcc4cf61cdf8855ff9e79c7e1db4dff89d3f7891977899577895d7789d377893b7f83b6fcfe937bc13b477798ff7f9800ff928ac633ee11f7cca6761d7f99c7e1b3cb908da11c7413be1943376e153cc39175c72f549ff9e17c31744429e6a6aa8a58e2ee98aaee9866e7f617fc24b7417a4f734a1293dd0233dd133cd8285177aa5f9f3b63ca5377aa78f607b919668995682e62aadd17ab0b1419b9ff41f682b48bed336edd02eed05ed7d5ea3033a0cdf1ed1f127fd273ae123fa41a774a6b685cee982228a837e42e927fd47caf8985c38651eb40b2ac38e4a5842658a97fab33fd248cb87d2c9a55cc9b5dcc82d1fc99ddccb44a6f230af2f8ff224cf417f262ff22a3fe54ddee543166549966545567f617f4dd66523dc6b2c9bb225df655b7682f692ecca9eeccfe97772c09b722847722c27c1f3eb70f66bf9116c9fca999ccbc59cfe25bf4a143a5ef8992561324a78bd92522acf9ebc78efe7cf7b153276db37bef59dbff457fedadff85b7f27abfede4ffcd4cf9ff76faeff4fffefeff8c7f5fedfdfbffc0fa355c495 - + linkslabel.h diff --git a/kig/modes/typesdialog.cpp b/kig/modes/typesdialog.cpp index e14ceee8..0371ca7f 100644 --- a/kig/modes/typesdialog.cpp +++ b/kig/modes/typesdialog.cpp @@ -44,7 +44,7 @@ #include class MacroListElement - : public QListViewItem + : public TQListViewItem { Macro* macro; public: @@ -53,13 +53,13 @@ public: }; MacroListElement::MacroListElement( KListView* lv, Macro* m ) - : TQListViewItem( lv, TQString::null, m->action->descriptiveName(), m->action->description() ), + : TQListViewItem( lv, TQString(), m->action->descriptiveName(), m->action->description() ), macro( m ) { } -TypesDialog::TypesDialog( TQWidget* parent, KigPart& part ) - : TypesDialogBase( parent, "types_dialog", true ), mpart( part ) +TypesDialog::TypesDialog( TQWidget* tqparent, KigPart& part ) + : TypesDialogBase( tqparent, "types_dialog", true ), mpart( part ) { // improving GUI look'n'feel... buttonHelp->setGuiItem( KStdGuiItem::help() ); @@ -106,8 +106,8 @@ TypesDialog::~TypesDialog() void TypesDialog::helpSlot() { - kapp->invokeHelp( TQString::fromLatin1( "working-with-types" ), - TQString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::tqfromLatin1( "working-with-types" ), + TQString::tqfromLatin1( "kig" ) ); } void TypesDialog::okSlot() @@ -171,7 +171,7 @@ void TypesDialog::exportType() TQFile fi( file_name ); if ( fi.exists() ) if ( KMessageBox::warningContinueCancel( this, i18n( "The file \"%1\" already exists. " - "Do you wish to overwrite it?" ).arg( fi.name() ), + "Do you wish to overwrite it?" ).tqarg( fi.name() ), i18n( "Overwrite File?" ), i18n("Overwrite") ) == KMessageBox::Cancel ) return; MacroList::instance()->save( types, file_name ); diff --git a/kig/modes/typesdialog.h b/kig/modes/typesdialog.h index 2e914bcd..8275b653 100644 --- a/kig/modes/typesdialog.h +++ b/kig/modes/typesdialog.h @@ -39,13 +39,14 @@ class KigDocument; class TypesDialog : public TypesDialogBase { Q_OBJECT + TQ_OBJECT // necessary because some MacroList functions need it.. KigPart& mpart; const KIconLoader* il; TQPopupMenu* popup; public: - TypesDialog( TQWidget* parent, KigPart& ); + TypesDialog( TQWidget* tqparent, KigPart& ); ~TypesDialog(); public slots: diff --git a/kig/modes/typesdialogbase.ui b/kig/modes/typesdialogbase.ui index 7cc7effb..7d3e012f 100644 --- a/kig/modes/typesdialogbase.ui +++ b/kig/modes/typesdialogbase.ui @@ -1,10 +1,10 @@ TypesDialogBase - + TypesDialogBase - + 0 0 @@ -28,9 +28,9 @@ 6 - + - layout1 + tqlayout1 @@ -88,17 +88,17 @@ - + - layout4 + tqlayout4 unnamed - + - layout3 + tqlayout3 @@ -138,16 +138,16 @@ Expanding - + 20 20 - + - layout4 + tqlayout4 @@ -193,7 +193,7 @@ Horizontal - + Layout1 @@ -228,7 +228,7 @@ Expanding - + 20 20 @@ -302,9 +302,9 @@ typeList - contextMenuRequested(QListViewItem*,const QPoint&,int) + contextMenuRequested(TQListViewItem*,const QPoint&,int) TypesDialogBase - contextMenuRequested(QListViewItem*,const QPoint&,int) + contextMenuRequested(TQListViewItem*,const QPoint&,int) buttonCancel @@ -313,17 +313,17 @@ cancelSlot() - + deleteType() exportType() helpSlot() importTypes() okSlot() editType() - contextMenuRequested( QListViewItem* i, const QPoint& p, int c ) + contextMenuRequested( TQListViewItem* i, const QPoint& p, int c ) cancelSlot() - - + + klistview.h kpushbutton.h -- cgit v1.2.1