diff options
Diffstat (limited to 'kig/modes/label.cc')
-rw-r--r-- | kig/modes/label.cc | 68 |
1 files changed, 34 insertions, 34 deletions
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<ObjectHolder*> os = mdoc.document().whatAmIOn( w->fromScreen( e->pos() ), *w ); bool attachable = false; - d->locationparent = 0; + d->locationtqparent = 0; for ( std::vector<ObjectHolder*>::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<ObjectCalcer*> 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<ObjectCalcer*> parents = label->parents(); - assert( parents.size() >= 3 ); - std::vector<ObjectCalcer*> firstthree( parents.begin(), parents.begin() + 3 ); - std::vector<ObjectCalcer*> rest( parents.begin() + 3, parents.end() ); + std::vector<ObjectCalcer*> tqparents = label->tqparents(); + assert( tqparents.size() >= 3 ); + std::vector<ObjectCalcer*> firstthree( tqparents.begin(), tqparents.begin() + 3 ); + std::vector<ObjectCalcer*> 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<ObjectCalcer*> parents = mlabel->parents(); - assert( parents.size() >= 3 ); - std::vector<ObjectCalcer*> firstthree( parents.begin(), parents.begin() + 3 ); - std::vector<ObjectCalcer*> rest( parents.begin() + 3, parents.end() ); + std::vector<ObjectCalcer*> tqparents = mlabel->tqparents(); + assert( tqparents.size() >= 3 ); + std::vector<ObjectCalcer*> firstthree( tqparents.begin(), tqparents.begin() + 3 ); + std::vector<ObjectCalcer*> 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<ObjectConstCalcer*>( firstthree[2] )->setImp( new StringImp( s ) ); mon.finish( kc ); - std::vector<ObjectCalcer*> oldparents = mlabel->parents(); + std::vector<ObjectCalcer*> oldtqparents = mlabel->tqparents(); std::vector<ObjectCalcer*> 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<const CurveImp*>( locationparent->imp() )->getParam( coord, mdoc.document() ); -// np[1] = ObjectFactory::instance()->constrainedPointCalcer( locationparent, param ); +// double param = static_cast<const CurveImp*>( 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; } |