diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
commit | 96698e12d1d6ba8072e9365334277438c3cf0e4a (patch) | |
tree | 81e81a49226aab2570d5fe8464576a6c960f1782 /kig/filters | |
parent | dcb06497ea70d050554422eec10b0756d926a5c0 (diff) | |
download | tdeedu-96698e12d1d6ba8072e9365334277438c3cf0e4a.tar.gz tdeedu-96698e12d1d6ba8072e9365334277438c3cf0e4a.zip |
Remove the tq in front of these incorrectly TQt4-converted methods/data members:
tqrepaint[...]
tqinvalidate[...]
tqparent[...]
tqmask[...]
tqlayout[...]
tqalignment[...]
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kig/filters')
-rw-r--r-- | kig/filters/cabri-filter.cc | 24 | ||||
-rw-r--r-- | kig/filters/drgeo-filter-chooserbase.ui | 2 | ||||
-rw-r--r-- | kig/filters/drgeo-filter.cc | 202 | ||||
-rw-r--r-- | kig/filters/imageexporteroptionsbase.ui | 2 | ||||
-rw-r--r-- | kig/filters/kgeo-filter.cc | 132 | ||||
-rw-r--r-- | kig/filters/kseg-filter.cc | 174 | ||||
-rw-r--r-- | kig/filters/kseg-filter.h | 2 | ||||
-rw-r--r-- | kig/filters/latexexporteroptions.ui | 2 | ||||
-rw-r--r-- | kig/filters/native-filter.cc | 56 | ||||
-rw-r--r-- | kig/filters/svgexporteroptions.ui | 2 | ||||
-rw-r--r-- | kig/filters/tests/locus.fgeo | 2 |
11 files changed, 300 insertions, 300 deletions
diff --git a/kig/filters/cabri-filter.cc b/kig/filters/cabri-filter.cc index 55ecf939..2348af86 100644 --- a/kig/filters/cabri-filter.cc +++ b/kig/filters/cabri-filter.cc @@ -56,7 +56,7 @@ * * Nr: Simple sequential numbering of the objects in a file. * Type: seen so far: Pt, Axes, Line, Cir - * NumberOfParents: The number of tqparents that will be specified in + * NumberOfParents: The number of parents that will be specified in * Parents * Color: * R -> red @@ -96,7 +96,7 @@ * Visible: * V means visible, I means invisible * Fixed: - * St means fix this object ( if you move one of its tqparents, it + * St means fix this object ( if you move one of its parents, it * won't move ), nSt ( the default ) means don't fix this object. * Parents: * The numbers of the objects this object depends on @@ -118,7 +118,7 @@ struct CabriObject int specialAppearanceSwitch; bool visible; bool fixed; - std::vector<int> tqparents; + std::vector<int> parents; std::vector<double> data; }; @@ -246,14 +246,14 @@ bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) KIG_FILTER_PARSE_ERROR; tmp = thirdlinere.cap( 2 ); - TQStringList tqparentsids = TQStringList::split( ' ', tmp ); - for ( TQStringList::iterator i = tqparentsids.begin(); - i != tqparentsids.end(); ++i ) + TQStringList parentsids = TQStringList::split( ' ', tmp ); + for ( TQStringList::iterator i = parentsids.begin(); + i != parentsids.end(); ++i ) { - myobj.tqparents.push_back( ( *i ).toInt( &ok ) ); + myobj.parents.push_back( ( *i ).toInt( &ok ) ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; } - if ( myobj.tqparents.size() != myobj.numberOfParents ) + if ( myobj.parents.size() != myobj.numberOfParents ) KIG_FILTER_PARSE_ERROR; tmp = thirdlinere.cap( 4 ); @@ -277,8 +277,8 @@ bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) // << "specialAppearanceSwitch = " << myobj.specialAppearanceSwitch << endl // << "visible = " << visible << endl // << "fixed = " << myobj.fixed << endl -// << "tqparents =" << endl; -// for ( std::vector<int>::iterator i = myobj.tqparents.begin(); i != myobj.tqparents.end(); ++i ) +// << "parents =" << endl; +// for ( std::vector<int>::iterator i = myobj.parents.begin(); i != myobj.parents.end(); ++i ) // kdDebug() << " " << *i << endl; // kdDebug() << "vals = " << endl; // for ( std::vector<double>::iterator i = myobj.data.begin(); i != myobj.data.end(); ++i ) @@ -352,8 +352,8 @@ KigDocument* KigFilterCabri::load( const TQString& file ) int ps = 0; args.clear(); - for ( std::vector<int>::iterator i = obj.tqparents.begin(); - i != obj.tqparents.end(); ++i ) + for ( std::vector<int>::iterator i = obj.parents.begin(); + i != obj.parents.end(); ++i ) args.push_back( calcers[*i-3] ); // two fake objects at the start ( origin and axes.. ) diff --git a/kig/filters/drgeo-filter-chooserbase.ui b/kig/filters/drgeo-filter-chooserbase.ui index b58e3dc1..1a9589b2 100644 --- a/kig/filters/drgeo-filter-chooserbase.ui +++ b/kig/filters/drgeo-filter-chooserbase.ui @@ -131,7 +131,7 @@ Please select which to import:</string> </widget> </vbox> </widget> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistbox.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kig/filters/drgeo-filter.cc b/kig/filters/drgeo-filter.cc index 3f213146..856d995c 100644 --- a/kig/filters/drgeo-filter.cc +++ b/kig/filters/drgeo-filter.cc @@ -62,7 +62,7 @@ struct DrGeoHierarchyElement { TQString id; - std::vector<TQString> tqparents; + std::vector<TQString> parents; }; KigFilterDrgeo::KigFilterDrgeo() @@ -202,7 +202,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co TQDomElement ce = c.toElement(); if ( ce.isNull() ) continue; else if ( ce.tagName() == "tqparent" ) - elem.tqparents.push_back( ce.attribute( "ref" ) ); + elem.parents.push_back( ce.attribute( "ref" ) ); } TQString curid = domelem.attribute( "id" ); elem.id = !curid.isNull() ? curid : TQString::number( withoutid++ ) ; @@ -216,9 +216,9 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co for ( uint i = 0; i < elems.size(); ++i ) { x = ""; - for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) + for ( uint j = 0; j < elems[i].parents.size(); ++j ) { - x += elems[i].tqparents[j] + "_"; + x += elems[i].parents[j] + "_"; } kdDebug() << " --> " << i << " - " << elems[i].id << " - " << x << endl; } @@ -241,25 +241,25 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co kdDebug() << "+++ id: " << curid << endl; #endif const DrGeoHierarchyElement& el = elems[curid]; - std::vector<ObjectCalcer*> tqparents; - for ( uint j = 0; j < el.tqparents.size(); ++j ) + std::vector<ObjectCalcer*> parents; + for ( uint j = 0; j < el.parents.size(); ++j ) { - int tqparentid = convertDrgeoIndex( elems, el.tqparents[j] ); - if ( tqparentid == -1 ) + int parentid = convertDrgeoIndex( elems, el.parents[j] ); + if ( parentid == -1 ) KIG_FILTER_PARSE_ERROR; - tqparents.push_back( holders[tqparentid-nignored]->calcer() ); + parents.push_back( holders[parentid-nignored]->calcer() ); }; TQDomElement domelem = a.toElement(); #ifdef DRGEO_DEBUG - if ( tqparents.size() > 0 ) - for ( uint j = 0; j < tqparents.size(); ++j ) + if ( parents.size() > 0 ) + for ( uint j = 0; j < parents.size(); ++j ) { - kdDebug() << "+++++++++ tqparent[" << j << "]: " << tqparents[j] << " - " - << tqparents[j]->imp()->type()->internalName() << endl; + kdDebug() << "+++++++++ tqparent[" << j << "]: " << parents[j] << " - " + << parents[j]->imp()->type()->internalName() << endl; } else - kdDebug() << "+++++++++ tqparents: NO" << endl; + kdDebug() << "+++++++++ parents: NO" << endl; kdDebug() << "+++++++++ " << domelem.tagName() << " - " << domelem.attribute("type") << endl; #endif @@ -291,15 +291,15 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co oc = fact->fixedPointCalcer( Coordinate( x, y ) ); } else if ( domelem.attribute( "type" ) == "Middle_2pts" ) - oc = new ObjectTypeCalcer( MidPointType::instance(), tqparents ); + oc = new ObjectTypeCalcer( MidPointType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Middle_segment" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - if ( !tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( !parents[0]->imp()->inherits( SegmentImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - ObjectPropertyCalcer* o1 = fact->propertyObjectCalcer( tqparents[0], "end-point-A" ); + ObjectPropertyCalcer* o1 = fact->propertyObjectCalcer( parents[0], "end-point-A" ); o1->calc( *ret ); - ObjectPropertyCalcer* o2 = fact->propertyObjectCalcer( tqparents[0], "end-point-B" ); + ObjectPropertyCalcer* o2 = fact->propertyObjectCalcer( parents[0], "end-point-B" ); o2->calc( *ret ); std::vector<ObjectCalcer*> args; args.push_back( o1 ); @@ -312,26 +312,26 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co double value = values.toDouble( &ok3 ); if ( ! ok3 ) KIG_FILTER_PARSE_ERROR; - if ( ( tqparents[0]->imp()->inherits( CircleImp::stype() ) ) || - ( tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) ) - oc = fact->constrainedPointCalcer( tqparents[0], value ); - else if ( tqparents[0]->imp()->inherits( LineImp::stype() ) ) + if ( ( parents[0]->imp()->inherits( CircleImp::stype() ) ) || + ( parents[0]->imp()->inherits( SegmentImp::stype() ) ) ) + oc = fact->constrainedPointCalcer( parents[0], value ); + else if ( parents[0]->imp()->inherits( LineImp::stype() ) ) { - const LineData l = static_cast<const LineImp*>( tqparents[0]->imp() )->data(); + const LineData l = static_cast<const LineImp*>( parents[0]->imp() )->data(); const Coordinate p = convertDrgeoLineParam( value, l ); - oc = fact->constrainedPointCalcer( tqparents[0], p, *ret ); + oc = fact->constrainedPointCalcer( parents[0], p, *ret ); } - else if ( tqparents[0]->imp()->inherits( RayImp::stype() ) ) + else if ( parents[0]->imp()->inherits( RayImp::stype() ) ) { - const LineData l = static_cast<const RayImp*>( tqparents[0]->imp() )->data(); + const LineData l = static_cast<const RayImp*>( parents[0]->imp() )->data(); const Coordinate p = convertDrgeoHalflineParam( value, l ); - oc = fact->constrainedPointCalcer( tqparents[0], p, *ret ); + oc = fact->constrainedPointCalcer( parents[0], p, *ret ); } - else if ( tqparents[0]->imp()->inherits( ArcImp::stype() ) ) - oc = fact->constrainedPointCalcer( tqparents[0], 1 - value ); + else if ( parents[0]->imp()->inherits( ArcImp::stype() ) ) + oc = fact->constrainedPointCalcer( parents[0], 1 - value ); else { -// oc = fact->constrainedPointCalcer( tqparents[0], value ); +// oc = fact->constrainedPointCalcer( parents[0], value ); notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); @@ -340,9 +340,9 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co } else if ( domelem.attribute( "type" ) == "Intersection" ) { - if ( ( tqparents[0]->imp()->inherits( AbstractLineImp::stype() ) ) && - ( tqparents[1]->imp()->inherits( AbstractLineImp::stype() ) ) ) - oc = new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ); + if ( ( parents[0]->imp()->inherits( AbstractLineImp::stype() ) ) && + ( parents[1]->imp()->inherits( AbstractLineImp::stype() ) ) ) + oc = new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ); else { bool ok; @@ -351,21 +351,21 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co if ( which == 1 ) which = -1; else if ( which == 0 ) which = 1; else KIG_FILTER_PARSE_ERROR; - std::vector<ObjectCalcer*> args = tqparents; + std::vector<ObjectCalcer*> args = parents; const ObjectType* type = 0; args.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - if ( ( tqparents[0]->imp()->inherits( CircleImp::stype() ) ) && - ( tqparents[1]->imp()->inherits( CircleImp::stype() ) ) ) + if ( ( parents[0]->imp()->inherits( CircleImp::stype() ) ) && + ( parents[1]->imp()->inherits( CircleImp::stype() ) ) ) type = CircleCircleIntersectionType::instance(); - else if ( ( tqparents[0]->imp()->inherits( CircleImp::stype() ) && - tqparents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || - ( tqparents[1]->imp()->inherits( CircleImp::stype() ) && - tqparents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) + else if ( ( parents[0]->imp()->inherits( CircleImp::stype() ) && + parents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || + ( parents[1]->imp()->inherits( CircleImp::stype() ) && + parents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) type = ConicLineIntersectionType::instance(); - else if ( ( tqparents[0]->imp()->inherits( ArcImp::stype() ) && - tqparents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || - ( tqparents[1]->imp()->inherits( ArcImp::stype() ) && - tqparents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) + else if ( ( parents[0]->imp()->inherits( ArcImp::stype() ) && + parents[1]->imp()->inherits( AbstractLineImp::stype() ) ) || + ( parents[1]->imp()->inherits( ArcImp::stype() ) && + parents[0]->imp()->inherits( AbstractLineImp::stype() ) ) ) type = ArcLineIntersectionType::instance(); else { @@ -377,13 +377,13 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co } } else if ( domelem.attribute( "type" ) == "Reflexion" ) - oc = new ObjectTypeCalcer( LineReflectionType::instance(), tqparents ); + oc = new ObjectTypeCalcer( LineReflectionType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Symmetry" ) - oc = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); + oc = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Translation" ) - oc = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); + oc = new ObjectTypeCalcer( TranslatedType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Rotation" ) - oc = new ObjectTypeCalcer( RotationType::instance(), tqparents ); + oc = new ObjectTypeCalcer( RotationType::instance(), parents ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " @@ -423,7 +423,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, tqparents ); + oc = new ObjectTypeCalcer( type, parents ); } else if( domelem.attribute( "type" ) == "3pts" ) { @@ -436,19 +436,19 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, tqparents ); + oc = new ObjectTypeCalcer( type, parents ); } else if( domelem.attribute( "type" ) == "segment" ) { if( domelem.tagName() == "circle" ) { type = CircleBPRType::instance(); - ObjectPropertyCalcer* o = fact->propertyObjectCalcer( tqparents[1], "length" ); + ObjectPropertyCalcer* o = fact->propertyObjectCalcer( parents[1], "length" ); o->calc( *ret ); - ObjectCalcer* a = tqparents[0]; - tqparents.clear(); - tqparents.push_back( a ); - tqparents.push_back( o ); + ObjectCalcer* a = parents[0]; + parents.clear(); + parents.push_back( a ); + parents.push_back( o ); } else { @@ -457,13 +457,13 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, tqparents ); + oc = new ObjectTypeCalcer( type, parents ); } else if( domelem.attribute( "type" ) == "npts" ) { if( domelem.tagName() == "polygon" ) { - if ( tqparents.size() < 3 ) KIG_FILTER_PARSE_ERROR; + if ( parents.size() < 3 ) KIG_FILTER_PARSE_ERROR; type = PolygonBNPType::instance(); } else @@ -473,20 +473,20 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, tqparents ); + oc = new ObjectTypeCalcer( type, parents ); } else if ( domelem.attribute( "type" ) == "perpendicular" ) - oc = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); + oc = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); else if ( domelem.attribute( "type" ) == "parallel" ) - oc = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); + oc = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Reflexion" ) - oc = new ObjectTypeCalcer( LineReflectionType::instance(), tqparents ); + oc = new ObjectTypeCalcer( LineReflectionType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Symmetry" ) - oc = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); + oc = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Translation" ) - oc = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); + oc = new ObjectTypeCalcer( TranslatedType::instance(), parents ); else if ( domelem.attribute( "type" ) == "Rotation" ) - oc = new ObjectTypeCalcer( RotationType::instance(), tqparents ); + oc = new ObjectTypeCalcer( RotationType::instance(), parents ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " @@ -534,71 +534,71 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co } else if ( domelem.attribute( "type" ) == "pt_abscissa" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "coordinate-x", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "coordinate-x", *ret, false ); } else if ( domelem.attribute( "type" ) == "pt_ordinate" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "coordinate-y", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "coordinate-y", *ret, false ); } else if ( domelem.attribute( "type" ) == "segment_length" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "length", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "circle_perimeter" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "circumference", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "circumference", *ret, false ); } else if ( domelem.attribute( "type" ) == "arc_length" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "arc-length", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "arc-length", *ret, false ); } else if ( domelem.attribute( "type" ) == "distance_2pts" ) { - if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); + if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), parents ); so->calc( *ret ); oc = filtersConstructTextObject( m, so, "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_norm" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "length", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_abscissa" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "length-x", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "length-x", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_ordinate" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "length-y", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "length-y", *ret, false ); } else if ( domelem.attribute( "type" ) == "slope" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "slope", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "slope", *ret, false ); } else if ( domelem.attribute( "type" ) == "distance_pt_line" ) { - if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; std::vector<ObjectCalcer*> args; - args.push_back( tqparents[1] ); - args.push_back( tqparents[0] ); + args.push_back( parents[1] ); + args.push_back( parents[0] ); ObjectTypeCalcer* po = new ObjectTypeCalcer( LinePerpendLPType::instance(), args ); po->calc( *ret ); args.clear(); - args.push_back( tqparents[1] ); + args.push_back( parents[1] ); args.push_back( po ); ObjectTypeCalcer* io = new ObjectTypeCalcer( LineLineIntersectionType::instance(), args ); io->calc( *ret ); args.clear(); - args.push_back( tqparents[0] ); + args.push_back( parents[0] ); args.push_back( io ); ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), args ); so->calc( *ret ); @@ -607,13 +607,13 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co // types of 'equation' else if ( domelem.attribute( "type" ) == "line" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "equation", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "equation", *ret, false ); } else if ( domelem.attribute( "type" ) == "circle" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, tqparents[0], "simply-cartesian-equation", *ret, false ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, parents[0], "simply-cartesian-equation", *ret, false ); } else { @@ -630,8 +630,8 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co { if ( domelem.attribute( "type" ) == "3pts" ) { - if ( tqparents.size() != 3 ) KIG_FILTER_PARSE_ERROR; - oc = new ObjectTypeCalcer( HalfAngleType::instance(), tqparents ); + if ( parents.size() != 3 ) KIG_FILTER_PARSE_ERROR; + oc = new ObjectTypeCalcer( HalfAngleType::instance(), parents ); } else { @@ -669,7 +669,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co // since Kig doesn't support Guile scripts, it will write script's text // in a label, so the user can freely see the code and make whatever // he/she wants - // possible idea: construct a new script object with the tqparents of Guile + // possible idea: construct a new script object with the parents of Guile // one and the Guile code inserted commented... depends on a better // handling of arguments in scripts? if ( domelem.attribute( "type" ) == "nitems" ) @@ -685,7 +685,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else if ( domelem.tagName() == "locus" ) { if ( domelem.attribute( "type" ) == "None" ) - oc = fact->locusCalcer( tqparents[0], tqparents[1] ); + oc = fact->locusCalcer( parents[0], parents[1] ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " @@ -747,8 +747,8 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co TQString ps = domelem.attribute( "style" ); int pointstyle = ObjectDrawer::pointStyleFromString( ps ); // show this object? - bool show = ( ( domelem.attribute( "tqmasked" ) != "True" ) && - ( domelem.attribute( "tqmasked" ) != "Alway" ) ); + bool show = ( ( domelem.attribute( "masked" ) != "True" ) && + ( domelem.attribute( "masked" ) != "Alway" ) ); // costructing the ObjectDrawer* ObjectDrawer* d = new ObjectDrawer( co, w, show, s, pointstyle ); // reading object name @@ -779,7 +779,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else if ( domelem.tagName() == "angle" ) { oc2 = filtersConstructTextObject( - static_cast<const PointImp*>( holders[curid-1-nignored]->calcer()->tqparents()[1]->imp() )->coordinate(), + static_cast<const PointImp*>( holders[curid-1-nignored]->calcer()->parents()[1]->imp() )->coordinate(), holders[curid-1-nignored]->calcer(), "angle-degrees", *ret, false ); } diff --git a/kig/filters/imageexporteroptionsbase.ui b/kig/filters/imageexporteroptionsbase.ui index 5b2fbb67..2a9156bf 100644 --- a/kig/filters/imageexporteroptionsbase.ui +++ b/kig/filters/imageexporteroptionsbase.ui @@ -144,7 +144,7 @@ </widget> </vbox> </widget> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kig/filters/kgeo-filter.cc b/kig/filters/kgeo-filter.cc index 379af11d..2405e46b 100644 --- a/kig/filters/kgeo-filter.cc +++ b/kig/filters/kgeo-filter.cc @@ -74,7 +74,7 @@ void KigFilterKGeo::loadMetrics(KSimpleConfig* c ) struct KGeoHierarchyElement { int id; - std::vector<int> tqparents; + std::vector<int> parents; }; static void visitElem( std::vector<KGeoHierarchyElement>& ret, @@ -84,8 +84,8 @@ static void visitElem( std::vector<KGeoHierarchyElement>& ret, { if ( !seen[i] ) { - for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) - visitElem( ret, elems, seen, elems[i].tqparents[j] ); + for ( uint j = 0; j < elems[i].parents.size(); ++j ) + visitElem( ret, elems, seen, elems[i].parents[j] ); ret.push_back( elems[i] ); seen[i] = true; }; @@ -113,7 +113,7 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c // first we determine the tqparent relationships, and sort the // elements in an order that we can be sure all of an object's - // tqparents will have been handled before it is handled itself.. + // parents will have been handled before it is handled itself.. // ( aka topological sort of the tqparent relations graph.. std::vector<KGeoHierarchyElement> elems; elems.reserve( number ); @@ -125,15 +125,15 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c group.setNum( i + 1 ); group.prepend( "Object " ); c->setGroup( group ); - TQStrList tqparents; - c->readListEntry( "Parents", tqparents ); + TQStrList parents; + c->readListEntry( "Parents", parents ); elems.push_back( elem ); - for ( const char* tqparent = tqparents.first(); tqparent; tqparent = tqparents.next() ) + for ( const char* tqparent = parents.first(); tqparent; tqparent = parents.next() ) { - int tqparentIndex = TQString::tqfromLatin1( tqparent ).toInt( &ok ); + int parentIndex = TQString::tqfromLatin1( tqparent ).toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; - if ( tqparentIndex != 0 ) - elems[i].tqparents.push_back( tqparentIndex - 1 ); + if ( parentIndex != 0 ) + elems[i].parents.push_back( parentIndex - 1 ); }; }; @@ -153,11 +153,11 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c c->setGroup( group ); int objID = c->readNumEntry( "Geo" ); - std::vector<ObjectCalcer*> tqparents; - for ( uint j = 0; j < e.tqparents.size(); ++j ) + std::vector<ObjectCalcer*> parents; + for ( uint j = 0; j < e.parents.size(); ++j ) { - int tqparentid = e.tqparents[j]; - tqparents.push_back( os[tqparentid]->calcer() ); + int parentid = e.parents[j]; + parents.push_back( os[parentid]->calcer() ); }; ObjectCalcer* o = 0; @@ -173,77 +173,77 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c double y = strY.toDouble(&ok); if (!ok) KIG_FILTER_PARSE_ERROR; Coordinate m( x, y ); - uint ntqparents = tqparents.size(); - if ( ntqparents == 0 ) + uint nparents = parents.size(); + if ( nparents == 0 ) o = factory->fixedPointCalcer( m ); - else if ( ntqparents == 1 ) - o = factory->constrainedPointCalcer( tqparents[0], m, *ret ); + else if ( nparents == 1 ) + o = factory->constrainedPointCalcer( parents[0], m, *ret ); else KIG_FILTER_PARSE_ERROR; break; } case ID_segment: { - o = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); + o = new ObjectTypeCalcer( SegmentABType::instance(), parents ); break; } case ID_circle: { - o = new ObjectTypeCalcer( CircleBCPType::instance(), tqparents ); + o = new ObjectTypeCalcer( CircleBCPType::instance(), parents ); break; } case ID_line: { - o = new ObjectTypeCalcer( LineABType::instance(), tqparents ); + o = new ObjectTypeCalcer( LineABType::instance(), parents ); break; } case ID_bisection: { // if this is the bisection of two points, first build a segment // between them.. - if ( tqparents.size() == 2 ) + if ( parents.size() == 2 ) { - ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); - tqparents.clear(); - tqparents.push_back( seg ); + ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + parents.clear(); + parents.push_back( seg ); } - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - o = factory->propertyObjectCalcer( tqparents[0], "mid-point" ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + o = factory->propertyObjectCalcer( parents[0], "mid-point" ); break; }; case ID_perpendicular: { - o = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); + o = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); break; } case ID_parallel: { - o = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); + o = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); break; } case ID_vector: { - o = new ObjectTypeCalcer( VectorType::instance(), tqparents ); + o = new ObjectTypeCalcer( VectorType::instance(), parents ); break; } case ID_ray: { - o = new ObjectTypeCalcer( RayABType::instance(), tqparents ); + o = new ObjectTypeCalcer( RayABType::instance(), parents ); break; } case ID_move: { - o = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); + o = new ObjectTypeCalcer( TranslatedType::instance(), parents ); break; } case ID_mirrorPoint: { - o = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); + o = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); break; } case ID_pointOfConc: { - o = new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ); + o = new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ); break; } case ID_text: @@ -264,79 +264,79 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c case ID_fixedCircle: { double r = c->readDoubleNumEntry( "Radius" ); - tqparents.push_back( new ObjectConstCalcer( new DoubleImp( r ) ) ); - o = new ObjectTypeCalcer( CircleBPRType::instance(), tqparents ); + parents.push_back( new ObjectConstCalcer( new DoubleImp( r ) ) ); + o = new ObjectTypeCalcer( CircleBPRType::instance(), parents ); break; } case ID_angle: { - if ( tqparents.size() == 3 ) + if ( parents.size() == 3 ) { - ObjectTypeCalcer* ao = new ObjectTypeCalcer( AngleType::instance(), tqparents ); + ObjectTypeCalcer* ao = new ObjectTypeCalcer( AngleType::instance(), parents ); ao->calc( *ret ); - tqparents.clear(); - tqparents.push_back( ao ); + parents.clear(); + parents.push_back( ao ); }; - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* angle = tqparents[0]; - tqparents.clear(); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* angle = parents[0]; + parents.clear(); const Coordinate c = - static_cast<const PointImp*>( angle->tqparents()[1]->imp() )->coordinate(); + static_cast<const PointImp*>( angle->parents()[1]->imp() )->coordinate(); o = filtersConstructTextObject( c, angle, "angle-degrees", *ret, true ); break; } case ID_distance: { - if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectTypeCalcer* segment = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); + if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + ObjectTypeCalcer* segment = new ObjectTypeCalcer( SegmentABType::instance(), parents ); segment->calc( *ret ); - Coordinate m = ( static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate() + - static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate() ) / 2; + Coordinate m = ( static_cast<const PointImp*>( parents[0]->imp() )->coordinate() + + static_cast<const PointImp*>( parents[1]->imp() )->coordinate() ) / 2; o = filtersConstructTextObject( m, segment, "length", *ret, true ); break; } case ID_arc: { - o = new ObjectTypeCalcer( AngleType::instance(), tqparents ); + o = new ObjectTypeCalcer( AngleType::instance(), parents ); break; } case ID_area: { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - const CircleImp* circle = static_cast<const CircleImp*>( tqparents[0]->imp() ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + const CircleImp* circle = static_cast<const CircleImp*>( parents[0]->imp() ); const Coordinate c = circle->center() + Coordinate( circle->radius(), 0 ); - o = filtersConstructTextObject( c, tqparents[0], "surface", *ret, true ); + o = filtersConstructTextObject( c, parents[0], "surface", *ret, true ); break; } case ID_slope: { - // if tqparents contains a segment, line, vector or whatever, we - // take its tqparents cause we want points.. - if ( tqparents.size() == 1 ) tqparents = tqparents[0]->tqparents(); - if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + // if parents contains a segment, line, vector or whatever, we + // take its parents cause we want points.. + if ( parents.size() == 1 ) parents = parents[0]->parents(); + if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; const Coordinate c = ( - static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate() + - static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate() ) / 2; - ObjectTypeCalcer* line = new ObjectTypeCalcer( LineABType::instance(), tqparents ); + static_cast<const PointImp*>( parents[0]->imp() )->coordinate() + + static_cast<const PointImp*>( parents[1]->imp() )->coordinate() ) / 2; + ObjectTypeCalcer* line = new ObjectTypeCalcer( LineABType::instance(), parents ); line->calc( *ret ); o = filtersConstructTextObject( c, line, "slope", *ret, true ); break; } case ID_circumference: { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - const CircleImp* c = static_cast<const CircleImp*>( tqparents[0]->imp() ); + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + const CircleImp* c = static_cast<const CircleImp*>( parents[0]->imp() ); const Coordinate m = c->center() + Coordinate( c->radius(), 0 ); - o = filtersConstructTextObject( m, tqparents[0], "circumference", *ret, true ); + o = filtersConstructTextObject( m, parents[0], "circumference", *ret, true ); break; } case ID_rotation: { // in kig, the rotated object should be last.. - ObjectCalcer* t = tqparents[2]; - tqparents[2] = tqparents[0]; - tqparents[0] = t; - o = new ObjectTypeCalcer( RotationType::instance(), tqparents ); + ObjectCalcer* t = parents[2]; + parents[2] = parents[0]; + parents[0] = t; + o = new ObjectTypeCalcer( RotationType::instance(), parents ); break; } default: diff --git a/kig/filters/kseg-filter.cc b/kig/filters/kseg-filter.cc index 6f784759..27edc762 100644 --- a/kig/filters/kseg-filter.cc +++ b/kig/filters/kseg-filter.cc @@ -93,50 +93,50 @@ static Coordinate readKSegCoordinate( TQDataStream& stream ) return t + Coordinate( -7, -7 ); } -static ObjectTypeCalcer* intersectionPoint( const std::vector<ObjectCalcer*>& tqparents, int which ) +static ObjectTypeCalcer* intersectionPoint( const std::vector<ObjectCalcer*>& parents, int which ) { - if ( tqparents.size() != 2 ) return 0; + if ( parents.size() != 2 ) return 0; int nlines = 0; int nconics = 0; int narcs = 0; for ( int i = 0; i < 2; ++i ) { - if ( tqparents[i]->imp()->inherits( AbstractLineImp::stype() ) ) ++nlines; - else if ( tqparents[i]->imp()->inherits( ConicImp::stype() ) ) ++nconics; - else if ( tqparents[i]->imp()->inherits( ArcImp::stype() ) ) ++narcs; + if ( parents[i]->imp()->inherits( AbstractLineImp::stype() ) ) ++nlines; + else if ( parents[i]->imp()->inherits( ConicImp::stype() ) ) ++nconics; + else if ( parents[i]->imp()->inherits( ArcImp::stype() ) ) ++narcs; else return 0; }; if ( nlines == 2 ) - return which == -1 ? new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ) : 0; + return which == -1 ? new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ) : 0; else if ( nlines == 1 && nconics == 1 ) { - std::vector<ObjectCalcer*> inttqparents( tqparents ); - inttqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), inttqparents ); + std::vector<ObjectCalcer*> intparents( parents ); + intparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), intparents ); } else if ( nlines == 0 && nconics == 2 ) { - std::vector<ObjectCalcer*> rtqparents( tqparents ); - rtqparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); - rtqparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); - rtqparents.push_back( new ObjectTypeCalcer( ConicRadicalType::instance(), rtqparents ) ); - std::vector<ObjectCalcer*> itqparents; - itqparents.push_back( tqparents[0] ); - itqparents.push_back( rtqparents.back() ); - itqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), itqparents ); + std::vector<ObjectCalcer*> rparents( parents ); + rparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); + rparents.push_back( new ObjectConstCalcer( new IntImp( 1 ) ) ); + rparents.push_back( new ObjectTypeCalcer( ConicRadicalType::instance(), rparents ) ); + std::vector<ObjectCalcer*> iparents; + iparents.push_back( parents[0] ); + iparents.push_back( rparents.back() ); + iparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), iparents ); } else if ( nlines == 1 && narcs == 1 ) { - std::vector<ObjectCalcer*> inttqparents( tqparents ); - inttqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ArcLineIntersectionType::instance(), inttqparents ); + std::vector<ObjectCalcer*> intparents( parents ); + intparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ArcLineIntersectionType::instance(), intparents ); } else return 0; } ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& kigdoc, - std::vector<ObjectCalcer*>& tqparents, + std::vector<ObjectCalcer*>& parents, int subtype, bool& ok ) { ok = true; @@ -145,34 +145,34 @@ ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& { case G_TRANSLATED: { - std::vector<ObjectCalcer*> vectortqparents( tqparents.begin() + 1, tqparents.end() ); - ObjectTypeCalcer* vector = new ObjectTypeCalcer( VectorType::instance(), vectortqparents ); + std::vector<ObjectCalcer*> vectorparents( parents.begin() + 1, parents.end() ); + ObjectTypeCalcer* vector = new ObjectTypeCalcer( VectorType::instance(), vectorparents ); vector->calc( kigdoc ); std::vector<ObjectCalcer*> transparents; - transparents.push_back( tqparents[0] ); + transparents.push_back( parents[0] ); transparents.push_back( vector ); retobj = new ObjectTypeCalcer( TranslatedType::instance(), transparents ); break; } case G_ROTATED: { - std::vector<ObjectCalcer*> angletqparents( tqparents.begin() + 2, tqparents.end() ); - ObjectTypeCalcer* angle = new ObjectTypeCalcer( AngleType::instance(), angletqparents ); + std::vector<ObjectCalcer*> angleparents( parents.begin() + 2, parents.end() ); + ObjectTypeCalcer* angle = new ObjectTypeCalcer( AngleType::instance(), angleparents ); angle->calc( kigdoc ); - std::vector<ObjectCalcer*> rottqparents; - rottqparents.push_back( tqparents[0] ); - rottqparents.push_back( tqparents[1] ); - rottqparents.push_back( angle ); - retobj = new ObjectTypeCalcer( RotationType::instance(), rottqparents ); + std::vector<ObjectCalcer*> rotparents; + rotparents.push_back( parents[0] ); + rotparents.push_back( parents[1] ); + rotparents.push_back( angle ); + retobj = new ObjectTypeCalcer( RotationType::instance(), rotparents ); break; } case G_SCALED: { - if ( tqparents.size() == 4 ) + if ( parents.size() == 4 ) { - retobj = new ObjectTypeCalcer( ScalingOverCenter2Type::instance(), tqparents ); + retobj = new ObjectTypeCalcer( ScalingOverCenter2Type::instance(), parents ); } else { @@ -187,8 +187,8 @@ ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& } case G_REFLECTED: { - std::vector<ObjectCalcer*> mirtqparents( tqparents.begin(), tqparents.end() ); - retobj = new ObjectTypeCalcer( LineReflectionType::instance(), mirtqparents ); + std::vector<ObjectCalcer*> mirparents( parents.begin(), parents.end() ); + retobj = new ObjectTypeCalcer( LineReflectionType::instance(), mirparents ); break; } } @@ -250,14 +250,14 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) { short styleid; stream >> styleid; - short ntqparents; - stream >> ntqparents; - std::vector<ObjectCalcer*> tqparents( ntqparents, 0 ); - for ( short j = 0; j < ntqparents; ++j ) + short nparents; + stream >> nparents; + std::vector<ObjectCalcer*> parents( nparents, 0 ); + for ( short j = 0; j < nparents; ++j ) { int tqparent; stream >> tqparent; - tqparents[j] = ret[tqparent]->calcer(); + parents[j] = ret[tqparent]->calcer(); }; // read the object.. @@ -318,13 +318,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } case G_FREE_POINT: { // fixed point - if ( ntqparents != 0 ) KIG_FILTER_PARSE_ERROR; + if ( nparents != 0 ) KIG_FILTER_PARSE_ERROR; Coordinate c = readKSegCoordinate( stream ); o = fact->fixedPointCalcer( c ); break; @@ -334,8 +334,8 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) // constrained point double p; stream >> p; - if ( ntqparents != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* tqparent = tqparents[0]; + if ( nparents != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = parents[0]; assert( tqparent ); o = fact->constrainedPointCalcer( tqparent, p ); break; @@ -344,27 +344,27 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) { // KSeg has somewhat weird intersection objects.. // for all objects G_INTERSECTION_POINT gets the - // first intersection of its tqparents, G_INTERSECTION2_POINT + // first intersection of its parents, G_INTERSECTION2_POINT // represents the second, if present. - o = intersectionPoint( tqparents, -1 ); + o = intersectionPoint( parents, -1 ); if ( ! o ) KIG_FILTER_PARSE_ERROR; break; } case G_INTERSECTION2_POINT: { - o = intersectionPoint( tqparents, 1 ); + o = intersectionPoint( parents, 1 ); if ( ! o ) KIG_FILTER_PARSE_ERROR; break; } case G_MID_POINT: { // midpoint of a segment.. - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - if ( !tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( !parents[0]->imp()->inherits( SegmentImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( "mid-point" ); + int index = parents[0]->imp()->propertiesInternalNames().tqfindIndex( "mid-point" ); assert( index != -1 ); - o = new ObjectPropertyCalcer( tqparents[0], index ); + o = new ObjectPropertyCalcer( parents[0], index ); break; } default: @@ -383,13 +383,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } case G_ENDPOINTS_SEGMENT: { - if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); + if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( SegmentABType::instance(), parents ); break; } default: @@ -406,18 +406,18 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } case G_TWOPOINTS_RAY: { - if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( RayABType::instance(), tqparents ); + if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( RayABType::instance(), parents ); break; } case G_BISECTOR_RAY: { - ObjectTypeCalcer* angle = new ObjectTypeCalcer( HalfAngleType::instance(), tqparents ); + ObjectTypeCalcer* angle = new ObjectTypeCalcer( HalfAngleType::instance(), parents ); angle->calc( *retdoc ); o = fact->propertyObjectCalcer( angle, "angle-bisector" ); break; @@ -436,25 +436,25 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } case G_TWOPOINTS_LINE: { - if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LineABType::instance(), tqparents ); + if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LineABType::instance(), parents ); break; } case G_PARALLEL_LINE: { - if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); + if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); break; } case G_PERPENDICULAR_LINE: { - if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); + if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); break; } default: @@ -471,37 +471,37 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } case G_CENTERPOINT_CIRCLE: { - if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( CircleBCPType::instance(), tqparents ); + if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( CircleBCPType::instance(), parents ); break; } case G_CENTERRADIUS_CIRCLE: { ObjectCalcer* point; ObjectCalcer* segment; - if ( tqparents[0]->imp()->inherits( PointImp::stype() ) ) + if ( parents[0]->imp()->inherits( PointImp::stype() ) ) { - point = tqparents[0]; - segment = tqparents[1]; + point = parents[0]; + segment = parents[1]; } else { - point = tqparents[1]; - segment = tqparents[0]; + point = parents[1]; + segment = parents[0]; }; int index = segment->imp()->propertiesInternalNames().tqfindIndex( "length" ); if ( index == -1 ) KIG_FILTER_PARSE_ERROR; ObjectPropertyCalcer* length = new ObjectPropertyCalcer( segment, index ); length->calc( *retdoc ); - std::vector<ObjectCalcer*> ctqparents; - ctqparents.push_back( point ); - ctqparents.push_back( length ); - o = new ObjectTypeCalcer( CircleBPRType::instance(), ctqparents ); + std::vector<ObjectCalcer*> cparents; + cparents.push_back( point ); + cparents.push_back( length ); + o = new ObjectTypeCalcer( CircleBPRType::instance(), cparents ); break; } default: @@ -518,13 +518,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } case G_THREEPOINTS_ARC: { - if ( ntqparents != 3 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( ArcBTPType::instance(), tqparents ); + if ( nparents != 3 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( ArcBTPType::instance(), parents ); break; } default: @@ -541,13 +541,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } default: { - if ( ntqparents < 3 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( PolygonBNPType::instance(), tqparents ); + if ( nparents < 3 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( PolygonBNPType::instance(), parents ); } } // default: @@ -581,13 +581,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, tqparents, descendtype, ok ); + o = transformObject( file, *retdoc, parents, descendtype, ok ); break; } case G_OBJECT_LOCUS: { - if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = fact->locusCalcer( tqparents[0], tqparents[1] ); + if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = fact->locusCalcer( parents[0], parents[1] ); break; } default: diff --git a/kig/filters/kseg-filter.h b/kig/filters/kseg-filter.h index d8909282..03d03958 100644 --- a/kig/filters/kseg-filter.h +++ b/kig/filters/kseg-filter.h @@ -29,7 +29,7 @@ class KigFilterKSeg ~KigFilterKSeg(); ObjectCalcer* transformObject( const TQString& file, KigDocument& kigdoc, - std::vector<ObjectCalcer*>& tqparents, + std::vector<ObjectCalcer*>& parents, int subtype, bool& ok ); public: diff --git a/kig/filters/latexexporteroptions.ui b/kig/filters/latexexporteroptions.ui index 2e9354bc..6db39ed9 100644 --- a/kig/filters/latexexporteroptions.ui +++ b/kig/filters/latexexporteroptions.ui @@ -63,7 +63,7 @@ </widget> <customwidgets> </customwidgets> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> </includehints> </UI> diff --git a/kig/filters/native-filter.cc b/kig/filters/native-filter.cc index 4a3d0a04..9e92130d 100644 --- a/kig/filters/native-filter.cc +++ b/kig/filters/native-filter.cc @@ -51,7 +51,7 @@ struct HierElem { int id; - std::vector<int> tqparents; + std::vector<int> parents; TQDomElement el; }; @@ -73,8 +73,8 @@ static void visitElem( std::vector<HierElem>& ret, { if ( !seen[i] ) { - for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) - visitElem( ret, elems, seen, elems[i].tqparents[j] - 1); + for ( uint j = 0; j < elems[i].parents.size(); ++j ) + visitElem( ret, elems, seen, elems[i].parents[j] - 1); ret.push_back( elems[i] ); seen[i] = true; }; @@ -273,7 +273,7 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& if ( ! ok ) KIG_FILTER_PARSE_ERROR; extendVect( elems, id ); - elems[id-1].tqparents.push_back( pid ); + elems[id-1].parents.push_back( pid ); } } }; @@ -315,8 +315,8 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& propname = ec.text().latin1(); }; - if ( i->tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* tqparent = retcalcers[i->tqparents[0] -1]; + if ( i->parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = retcalcers[i->parents[0] -1]; QCStringList propnames = tqparent->imp()->propertiesInternalNames(); int propid = propnames.tqfindIndex( propname ); if ( propid == -1 ) @@ -342,12 +342,12 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& return false; }; - std::vector<ObjectCalcer*> tqparents; - for ( std::vector<int>::iterator j = i->tqparents.begin(); - j != i->tqparents.end(); ++j ) - tqparents.push_back( retcalcers[*j - 1] ); + std::vector<ObjectCalcer*> parents; + for ( std::vector<int>::iterator j = i->parents.begin(); + j != i->parents.end(); ++j ) + parents.push_back( retcalcers[*j - 1] ); - o = new ObjectTypeCalcer( type, tqparents ); + o = new ObjectTypeCalcer( type, parents ); } else continue; @@ -434,25 +434,25 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& uint id = tmp.toInt( &ok ); if ( id <= 0 ) KIG_FILTER_PARSE_ERROR; - std::vector<ObjectCalcer*> tqparents; - for ( TQDomElement tqparentel = e.firstChild().toElement(); ! tqparentel.isNull(); - tqparentel = tqparentel.nextSibling().toElement() ) + std::vector<ObjectCalcer*> parents; + for ( TQDomElement parentel = e.firstChild().toElement(); ! parentel.isNull(); + parentel = parentel.nextSibling().toElement() ) { - if ( tqparentel.tagName() != "Parent" ) continue; - TQString tmp = tqparentel.attribute( "id" ); - uint tqparentid = tmp.toInt( &ok ); + if ( parentel.tagName() != "Parent" ) continue; + TQString tmp = parentel.attribute( "id" ); + uint parentid = tmp.toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; - if ( tqparentid == 0 || tqparentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* tqparent = calcers[tqparentid - 1].get(); + if ( parentid == 0 || parentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = calcers[parentid - 1].get(); if ( ! tqparent ) KIG_FILTER_PARSE_ERROR; - tqparents.push_back( tqparent ); + parents.push_back( tqparent ); } ObjectCalcer* o = 0; if ( e.tagName() == "Data" ) { - if ( !tqparents.empty() ) KIG_FILTER_PARSE_ERROR; + if ( !parents.empty() ) KIG_FILTER_PARSE_ERROR; TQString tmp = e.attribute( "type" ); TQString error; ObjectImp* imp = ObjectImpFactory::instance()->deserialize( tmp, e, error ); @@ -465,10 +465,10 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& } else if ( e.tagName() == "Property" ) { - if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; TQCString propname = e.attribute( "which" ).latin1(); - ObjectCalcer* tqparent = tqparents[0]; + ObjectCalcer* tqparent = parents[0]; int propid = tqparent->imp()->propertiesInternalNames().tqfindIndex( propname ); if ( propid == -1 ) KIG_FILTER_PARSE_ERROR; @@ -490,17 +490,17 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& } // mp: (I take the responsibility for this!) explanation: the usual ObjectTypeCalcer - // constructor also "sortArgs" the tqparents. I believe that this *must not* be done + // constructor also "sortArgs" the parents. I believe that this *must not* be done // when loading from a saved kig file for the following reasons: // 1. the arguments should already be in their intended order, since the file was // saved from a working hierarchy; furthermore we actually want to restore the original // hierarchy, not really to also fix possible problems with the original hierarchy; // 2. calling sortArgs could have undesirable side effects in particular situations, // since kig actually allow an ObjectType to produce different type of ObjectImp's - // it may happen that the tqparents of an object do not satisfy the requirements + // it may happen that the parents of an object do not satisfy the requirements // enforced by sortArgs (while moving around the free objects) but still be // perfectly valid - o = new ObjectTypeCalcer( type, tqparents, false ); + o = new ObjectTypeCalcer( type, parents, false ); } else KIG_FILTER_PARSE_ERROR; @@ -615,8 +615,8 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) } else assert( false ); - const std::vector<ObjectCalcer*> tqparents = ( *i )->tqparents(); - for ( std::vector<ObjectCalcer*>::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) + const std::vector<ObjectCalcer*> parents = ( *i )->parents(); + for ( std::vector<ObjectCalcer*>::const_iterator i = parents.begin(); i != parents.end(); ++i ) { std::map<const ObjectCalcer*,int>::const_iterator idp = idmap.find( *i ); assert( idp != idmap.end() ); diff --git a/kig/filters/svgexporteroptions.ui b/kig/filters/svgexporteroptions.ui index feca8ca1..2677650d 100644 --- a/kig/filters/svgexporteroptions.ui +++ b/kig/filters/svgexporteroptions.ui @@ -55,7 +55,7 @@ </widget> <customwidgets> </customwidgets> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> </includehints> </UI> diff --git a/kig/filters/tests/locus.fgeo b/kig/filters/tests/locus.fgeo index 4ad79bbd..55fa562f 100644 --- a/kig/filters/tests/locus.fgeo +++ b/kig/filters/tests/locus.fgeo @@ -1,2 +1,2 @@ <?xml version="1.0"?> -<drgenius><drgeo name="Figuur 1" scale="30.000000" origin_x="0.000000" origin_y="0.000000" grid="False"><point id="8293DE0" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name=""><x>-1.666666</x><y>3.216667</y></point><point id="8306C70" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name=""><x>-2.766667</x><y>0.550000</y></point><circle id="8307268" type="2pts" color="Black" thickness="Normal" style="Cross" filled="False" tqmasked="False" name=""><tqparent ref="8293DE0"/><tqparent ref="8306C70"/></circle><point id="8309098" type="On_curve" color="Red" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name=""><value>0.080691</value><tqparent ref="8307268"/></point><point id="830A920" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name=""><x>3.000000</x><y>3.016667</y></point><line id="8172970" type="2pts" color="Black" thickness="Normal" style="Cross" filled="False" tqmasked="False" name=""><tqparent ref="8309098"/><tqparent ref="830A920"/></line><point id="8339730" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name=""><x>2.866667</x><y>-0.750000</y></point><line id="833AD18" type="2pts" color="Black" thickness="Normal" style="Cross" filled="False" tqmasked="False" name=""><tqparent ref="8309098"/><tqparent ref="8339730"/></line><point id="8338A50" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name=""><x>2.600000</x><y>3.816667</y></point><line id="833BBB8" type="perpendicular" color="Black" thickness="Normal" style="Cross" filled="False" tqmasked="False" name=""><tqparent ref="8338A50"/><tqparent ref="833AD18"/></line><point id="8342478" type="Intersection" color="Red" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name="" extra="0"><tqparent ref="8172970"/><tqparent ref="833BBB8"/></point><locus id="8345D60" type="None" color="Black" thickness="Dashed" style="Cross" filled="False" tqmasked="False" name=""><tqparent ref="8309098"/><tqparent ref="8342478"/></locus></drgeo></drgenius> +<drgenius><drgeo name="Figuur 1" scale="30.000000" origin_x="0.000000" origin_y="0.000000" grid="False"><point id="8293DE0" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><x>-1.666666</x><y>3.216667</y></point><point id="8306C70" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><x>-2.766667</x><y>0.550000</y></point><circle id="8307268" type="2pts" color="Black" thickness="Normal" style="Cross" filled="False" masked="False" name=""><tqparent ref="8293DE0"/><tqparent ref="8306C70"/></circle><point id="8309098" type="On_curve" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><value>0.080691</value><tqparent ref="8307268"/></point><point id="830A920" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><x>3.000000</x><y>3.016667</y></point><line id="8172970" type="2pts" color="Black" thickness="Normal" style="Cross" filled="False" masked="False" name=""><tqparent ref="8309098"/><tqparent ref="830A920"/></line><point id="8339730" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><x>2.866667</x><y>-0.750000</y></point><line id="833AD18" type="2pts" color="Black" thickness="Normal" style="Cross" filled="False" masked="False" name=""><tqparent ref="8309098"/><tqparent ref="8339730"/></line><point id="8338A50" type="Free" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><x>2.600000</x><y>3.816667</y></point><line id="833BBB8" type="perpendicular" color="Black" thickness="Normal" style="Cross" filled="False" masked="False" name=""><tqparent ref="8338A50"/><tqparent ref="833AD18"/></line><point id="8342478" type="Intersection" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name="" extra="0"><tqparent ref="8172970"/><tqparent ref="833BBB8"/></point><locus id="8345D60" type="None" color="Black" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><tqparent ref="8309098"/><tqparent ref="8342478"/></locus></drgeo></drgenius> |