diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
commit | a374efce3a207b39514be3c52264091400ce297e (patch) | |
tree | 77bdf654b55826d4f59b53a5621310206bcaead1 /kig/filters | |
parent | f81a494f3957d5cf38c787973415597941934727 (diff) | |
download | tdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip |
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
Diffstat (limited to 'kig/filters')
-rw-r--r-- | kig/filters/cabri-filter.cc | 82 | ||||
-rw-r--r-- | kig/filters/drgeo-filter-chooser.h | 1 | ||||
-rw-r--r-- | kig/filters/drgeo-filter-chooserbase.ui | 16 | ||||
-rw-r--r-- | kig/filters/drgeo-filter.cc | 240 | ||||
-rw-r--r-- | kig/filters/drgeo-filter.h | 2 | ||||
-rw-r--r-- | kig/filters/exporter.cc | 38 | ||||
-rw-r--r-- | kig/filters/filter.cc | 8 | ||||
-rw-r--r-- | kig/filters/filter.h | 6 | ||||
-rw-r--r-- | kig/filters/filters-common.cc | 2 | ||||
-rw-r--r-- | kig/filters/imageexporteroptions.cc | 4 | ||||
-rw-r--r-- | kig/filters/imageexporteroptions.h | 3 | ||||
-rw-r--r-- | kig/filters/imageexporteroptionsbase.ui | 24 | ||||
-rw-r--r-- | kig/filters/kgeo-filter.cc | 142 | ||||
-rw-r--r-- | kig/filters/kgeo-filter.h | 4 | ||||
-rw-r--r-- | kig/filters/kgeo-resource.h | 2 | ||||
-rw-r--r-- | kig/filters/kseg-defs.h | 8 | ||||
-rw-r--r-- | kig/filters/kseg-filter.cc | 188 | ||||
-rw-r--r-- | kig/filters/kseg-filter.h | 2 | ||||
-rw-r--r-- | kig/filters/latexexporter.cc | 16 | ||||
-rw-r--r-- | kig/filters/latexexporteroptions.ui | 14 | ||||
-rw-r--r-- | kig/filters/native-filter.cc | 98 | ||||
-rw-r--r-- | kig/filters/svgexporter.cc | 14 | ||||
-rw-r--r-- | kig/filters/svgexporteroptions.ui | 12 | ||||
-rw-r--r-- | kig/filters/tests/locus.fgeo | 2 |
24 files changed, 465 insertions, 463 deletions
diff --git a/kig/filters/cabri-filter.cc b/kig/filters/cabri-filter.cc index 3cadf522..55ecf939 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 parents that will be specified in + * NumberOfParents: The number of tqparents 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 parents, it + * St means fix this object ( if you move one of its tqparents, 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> parents; + std::vector<int> tqparents; std::vector<double> data; }; @@ -151,25 +151,25 @@ static TQString readLine( TQFile& file ) static TQColor translatecolor( const TQString& s ) { - if ( s == "R" ) return Qt::red; - if ( s == "O" ) return Qt::magenta; - if ( s == "Y" ) return Qt::yellow; - if ( s == "P" ) return Qt::darkMagenta; - if ( s == "V" ) return Qt::darkBlue; - if ( s == "Bl" ) return Qt::blue; - if ( s == "lBl" ) return Qt::cyan; // TODO: bright blue - if ( s == "G" ) return Qt::green; - if ( s == "dG" ) return Qt::darkGreen; + if ( s == "R" ) return TQt::red; + if ( s == "O" ) return TQt::magenta; + if ( s == "Y" ) return TQt::yellow; + if ( s == "P" ) return TQt::darkMagenta; + if ( s == "V" ) return TQt::darkBlue; + if ( s == "Bl" ) return TQt::blue; + if ( s == "lBl" ) return TQt::cyan; // TODO: bright blue + if ( s == "G" ) return TQt::green; + if ( s == "dG" ) return TQt::darkGreen; if ( s == "Br" ) return TQColor( 165, 42, 42 ); if ( s == "dBr" ) return TQColor( 128, 128, 0 ); - if ( s == "lGr" ) return Qt::lightGray; - if ( s == "Gr" ) return Qt::gray; - if ( s == "dGr" ) return Qt::darkGray; - if ( s == "B" ) return Qt::black; - if ( s == "W" ) return Qt::white; + if ( s == "lGr" ) return TQt::lightGray; + if ( s == "Gr" ) return TQt::gray; + if ( s == "dGr" ) return TQt::darkGray; + if ( s == "B" ) return TQt::black; + if ( s == "W" ) return TQt::white; kdDebug() << k_funcinfo << "unknown color: " << s << endl; - return Qt::black; + return TQt::black; } bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) @@ -246,14 +246,14 @@ bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) KIG_FILTER_PARSE_ERROR; tmp = thirdlinere.cap( 2 ); - TQStringList parentsids = TQStringList::split( ' ', tmp ); - for ( TQStringList::iterator i = parentsids.begin(); - i != parentsids.end(); ++i ) + TQStringList tqparentsids = TQStringList::split( ' ', tmp ); + for ( TQStringList::iterator i = tqparentsids.begin(); + i != tqparentsids.end(); ++i ) { - myobj.parents.push_back( ( *i ).toInt( &ok ) ); + myobj.tqparents.push_back( ( *i ).toInt( &ok ) ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; } - if ( myobj.parents.size() != myobj.numberOfParents ) + if ( myobj.tqparents.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 -// << "parents =" << endl; -// for ( std::vector<int>::iterator i = myobj.parents.begin(); i != myobj.parents.end(); ++i ) +// << "tqparents =" << endl; +// for ( std::vector<int>::iterator i = myobj.tqparents.begin(); i != myobj.tqparents.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.parents.begin(); - i != obj.parents.end(); ++i ) + for ( std::vector<int>::iterator i = obj.tqparents.begin(); + i != obj.tqparents.end(); ++i ) args.push_back( calcers[*i-3] ); // two fake objects at the start ( origin and axes.. ) @@ -441,10 +441,10 @@ KigDocument* KigFilterCabri::load( const TQString& file ) obj.thick *= 2; if ( args.size() != 1 || obj.data.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = args[0]; - if ( !parent->imp()->inherits( CurveImp::stype() ) ) + ObjectCalcer* tqparent = args[0]; + if ( !tqparent->imp()->inherits( CurveImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - const CurveImp* curve = static_cast<const CurveImp*>( parent->imp() ); + const CurveImp* curve = static_cast<const CurveImp*>( tqparent->imp() ); Coordinate pt = Coordinate( obj.data[0], obj.data[1] ); double param = curve->getParam( pt, *ret ); args.push_back( new ObjectConstCalcer( new DoubleImp( param ) ) ); @@ -486,11 +486,11 @@ KigDocument* KigFilterCabri::load( const TQString& file ) // points, or a vector... if ( args.size() != 1 || !obj.data.empty() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = args[0]; - if ( parent->imp()->inherits( SegmentImp::stype() ) ) - oc = fact->propertyObjectCalcer( parent, "mid-point" ) ; - else if ( parent->imp()->inherits( VectorImp::stype() ) ) - oc = fact->propertyObjectCalcer( parent, "vect-mid-point" ); + ObjectCalcer* tqparent = args[0]; + if ( tqparent->imp()->inherits( SegmentImp::stype() ) ) + oc = fact->propertyObjectCalcer( tqparent, "mid-point" ) ; + else if ( tqparent->imp()->inherits( VectorImp::stype() ) ) + oc = fact->propertyObjectCalcer( tqparent, "vect-mid-point" ); else KIG_FILTER_PARSE_ERROR; } else if ( obj.type == "PBiss" ) @@ -505,12 +505,12 @@ KigDocument* KigFilterCabri::load( const TQString& file ) } if ( args.size() != 1 || !obj.data.empty() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = args[0]; + ObjectCalcer* tqparent = args[0]; ObjectCalcer* midpoint = 0; - if ( parent->imp()->inherits( SegmentImp::stype() ) ) - midpoint = fact->propertyObjectCalcer( parent, "mid-point" ) ; -// else if ( parent->imp()->inherits( VectorImp::stype() ) ) -// midpoint = fact->propertyObjectCalcer( parent, "vect-mid-point" ); + if ( tqparent->imp()->inherits( SegmentImp::stype() ) ) + midpoint = fact->propertyObjectCalcer( tqparent, "mid-point" ) ; +// else if ( tqparent->imp()->inherits( VectorImp::stype() ) ) +// midpoint = fact->propertyObjectCalcer( tqparent, "vect-mid-point" ); else KIG_FILTER_PARSE_ERROR; midpoint->calc( *ret ); args.push_back( midpoint ); @@ -549,7 +549,7 @@ KigDocument* KigFilterCabri::load( const TQString& file ) else { notSupported( file, i18n( "This Cabri file contains a \"%1\" object, " - "which Kig does not currently support." ).arg( obj.type ) ); + "which Kig does not currently support." ).tqarg( TQString(obj.type) ) ); return 0; } diff --git a/kig/filters/drgeo-filter-chooser.h b/kig/filters/drgeo-filter-chooser.h index f5057361..1adb47c0 100644 --- a/kig/filters/drgeo-filter-chooser.h +++ b/kig/filters/drgeo-filter-chooser.h @@ -28,6 +28,7 @@ class KigFilterDrgeoChooser : public KigFilterDrgeoChooserBase { Q_OBJECT + TQ_OBJECT public: KigFilterDrgeoChooser( const TQStringList& l ); diff --git a/kig/filters/drgeo-filter-chooserbase.ui b/kig/filters/drgeo-filter-chooserbase.ui index 829d84cc..aa4361ee 100644 --- a/kig/filters/drgeo-filter-chooserbase.ui +++ b/kig/filters/drgeo-filter-chooserbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KigFilterDrgeoChooserBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KigFilterDrgeoChooserBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>ExplanationTextLabel</cstring> </property> @@ -33,11 +33,11 @@ <string>The current Dr. Geo file contains more than one figure. Please select which to import:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -72,7 +72,7 @@ Please select which to import:</string> <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout7</cstring> </property> @@ -96,7 +96,7 @@ Please select which to import:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -131,7 +131,7 @@ Please select which to import:</string> </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults 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 82438a57..3f213146 100644 --- a/kig/filters/drgeo-filter.cc +++ b/kig/filters/drgeo-filter.cc @@ -62,7 +62,7 @@ struct DrGeoHierarchyElement { TQString id; - std::vector<TQString> parents; + std::vector<TQString> tqparents; }; KigFilterDrgeo::KigFilterDrgeo() @@ -106,9 +106,9 @@ KigDocument* KigFilterDrgeo::load( const TQString& file ) if ( figures.isEmpty() ) { if( nmacros > 0 ) warning( i18n( "The Dr. Geo file \"%1\" is a macro file so it contains no " - "figures." ).arg( file ) ); + "figures." ).tqarg( file ) ); else - warning( i18n( "There are no figures in Dr. Geo file \"%1\"." ).arg( file ) ); + warning( i18n( "There are no figures in Dr. Geo file \"%1\"." ).tqarg( file ) ); return false; } @@ -201,8 +201,8 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co { TQDomElement ce = c.toElement(); if ( ce.isNull() ) continue; - else if ( ce.tagName() == "parent" ) - elem.parents.push_back( ce.attribute( "ref" ) ); + else if ( ce.tagName() == "tqparent" ) + elem.tqparents.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].parents.size(); ++j ) + for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) { - x += elems[i].parents[j] + "_"; + x += elems[i].tqparents[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*> parents; - for ( uint j = 0; j < el.parents.size(); ++j ) + std::vector<ObjectCalcer*> tqparents; + for ( uint j = 0; j < el.tqparents.size(); ++j ) { - int parentid = convertDrgeoIndex( elems, el.parents[j] ); - if ( parentid == -1 ) + int tqparentid = convertDrgeoIndex( elems, el.tqparents[j] ); + if ( tqparentid == -1 ) KIG_FILTER_PARSE_ERROR; - parents.push_back( holders[parentid-nignored]->calcer() ); + tqparents.push_back( holders[tqparentid-nignored]->calcer() ); }; TQDomElement domelem = a.toElement(); #ifdef DRGEO_DEBUG - if ( parents.size() > 0 ) - for ( uint j = 0; j < parents.size(); ++j ) + if ( tqparents.size() > 0 ) + for ( uint j = 0; j < tqparents.size(); ++j ) { - kdDebug() << "+++++++++ parent[" << j << "]: " << parents[j] << " - " - << parents[j]->imp()->type()->internalName() << endl; + kdDebug() << "+++++++++ tqparent[" << j << "]: " << tqparents[j] << " - " + << tqparents[j]->imp()->type()->internalName() << endl; } else - kdDebug() << "+++++++++ parents: NO" << endl; + kdDebug() << "+++++++++ tqparents: 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(), parents ); + oc = new ObjectTypeCalcer( MidPointType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Middle_segment" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - if ( !parents[0]->imp()->inherits( SegmentImp::stype() ) ) + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( !tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - ObjectPropertyCalcer* o1 = fact->propertyObjectCalcer( parents[0], "end-point-A" ); + ObjectPropertyCalcer* o1 = fact->propertyObjectCalcer( tqparents[0], "end-point-A" ); o1->calc( *ret ); - ObjectPropertyCalcer* o2 = fact->propertyObjectCalcer( parents[0], "end-point-B" ); + ObjectPropertyCalcer* o2 = fact->propertyObjectCalcer( tqparents[0], "end-point-B" ); o2->calc( *ret ); std::vector<ObjectCalcer*> args; args.push_back( o1 ); @@ -312,37 +312,37 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co double value = values.toDouble( &ok3 ); if ( ! ok3 ) KIG_FILTER_PARSE_ERROR; - 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() ) ) + 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() ) ) { - const LineData l = static_cast<const LineImp*>( parents[0]->imp() )->data(); + const LineData l = static_cast<const LineImp*>( tqparents[0]->imp() )->data(); const Coordinate p = convertDrgeoLineParam( value, l ); - oc = fact->constrainedPointCalcer( parents[0], p, *ret ); + oc = fact->constrainedPointCalcer( tqparents[0], p, *ret ); } - else if ( parents[0]->imp()->inherits( RayImp::stype() ) ) + else if ( tqparents[0]->imp()->inherits( RayImp::stype() ) ) { - const LineData l = static_cast<const RayImp*>( parents[0]->imp() )->data(); + const LineData l = static_cast<const RayImp*>( tqparents[0]->imp() )->data(); const Coordinate p = convertDrgeoHalflineParam( value, l ); - oc = fact->constrainedPointCalcer( parents[0], p, *ret ); + oc = fact->constrainedPointCalcer( tqparents[0], p, *ret ); } - else if ( parents[0]->imp()->inherits( ArcImp::stype() ) ) - oc = fact->constrainedPointCalcer( parents[0], 1 - value ); + else if ( tqparents[0]->imp()->inherits( ArcImp::stype() ) ) + oc = fact->constrainedPointCalcer( tqparents[0], 1 - value ); else { -// oc = fact->constrainedPointCalcer( parents[0], value ); +// oc = fact->constrainedPointCalcer( tqparents[0], value ); notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } } else if ( domelem.attribute( "type" ) == "Intersection" ) { - if ( ( parents[0]->imp()->inherits( AbstractLineImp::stype() ) ) && - ( parents[1]->imp()->inherits( AbstractLineImp::stype() ) ) ) - oc = new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ); + if ( ( tqparents[0]->imp()->inherits( AbstractLineImp::stype() ) ) && + ( tqparents[1]->imp()->inherits( AbstractLineImp::stype() ) ) ) + oc = new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ); 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 = parents; + std::vector<ObjectCalcer*> args = tqparents; const ObjectType* type = 0; args.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - if ( ( parents[0]->imp()->inherits( CircleImp::stype() ) ) && - ( parents[1]->imp()->inherits( CircleImp::stype() ) ) ) + if ( ( tqparents[0]->imp()->inherits( CircleImp::stype() ) ) && + ( tqparents[1]->imp()->inherits( CircleImp::stype() ) ) ) type = CircleCircleIntersectionType::instance(); - 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() ) ) ) + 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() ) ) ) type = ConicLineIntersectionType::instance(); - 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() ) ) ) + 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() ) ) ) type = ArcLineIntersectionType::instance(); else { @@ -377,17 +377,17 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co } } else if ( domelem.attribute( "type" ) == "Reflexion" ) - oc = new ObjectTypeCalcer( LineReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( LineReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Symmetry" ) - oc = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Translation" ) - oc = new ObjectTypeCalcer( TranslatedType::instance(), parents ); + oc = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Rotation" ) - oc = new ObjectTypeCalcer( RotationType::instance(), parents ); + oc = new ObjectTypeCalcer( RotationType::instance(), tqparents ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -419,11 +419,11 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if( domelem.attribute( "type" ) == "3pts" ) { @@ -432,65 +432,65 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if( domelem.attribute( "type" ) == "segment" ) { if( domelem.tagName() == "circle" ) { type = CircleBPRType::instance(); - ObjectPropertyCalcer* o = fact->propertyObjectCalcer( parents[1], "length" ); + ObjectPropertyCalcer* o = fact->propertyObjectCalcer( tqparents[1], "length" ); o->calc( *ret ); - ObjectCalcer* a = parents[0]; - parents.clear(); - parents.push_back( a ); - parents.push_back( o ); + ObjectCalcer* a = tqparents[0]; + tqparents.clear(); + tqparents.push_back( a ); + tqparents.push_back( o ); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if( domelem.attribute( "type" ) == "npts" ) { if( domelem.tagName() == "polygon" ) { - if ( parents.size() < 3 ) KIG_FILTER_PARSE_ERROR; + if ( tqparents.size() < 3 ) KIG_FILTER_PARSE_ERROR; type = PolygonBNPType::instance(); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } - oc = new ObjectTypeCalcer( type, parents ); + oc = new ObjectTypeCalcer( type, tqparents ); } else if ( domelem.attribute( "type" ) == "perpendicular" ) - oc = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); + oc = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "parallel" ) - oc = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); + oc = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Reflexion" ) - oc = new ObjectTypeCalcer( LineReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( LineReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Symmetry" ) - oc = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); + oc = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Translation" ) - oc = new ObjectTypeCalcer( TranslatedType::instance(), parents ); + oc = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); else if ( domelem.attribute( "type" ) == "Rotation" ) - oc = new ObjectTypeCalcer( RotationType::instance(), parents ); + oc = new ObjectTypeCalcer( RotationType::instance(), tqparents ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -529,76 +529,76 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co bool ok3; double dvalue = value.toDouble( &ok3 ); if ( ok3 ) - value = TQString( "%1" ).arg( dvalue, 0, 'g', 3 ); + value = TQString( "%1" ).tqarg( dvalue, 0, 'g', 3 ); oc = fact->labelCalcer( value, m, false, std::vector<ObjectCalcer*>(), *ret ); } else if ( domelem.attribute( "type" ) == "pt_abscissa" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "coordinate-x", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "coordinate-x", *ret, false ); } else if ( domelem.attribute( "type" ) == "pt_ordinate" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "coordinate-y", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "coordinate-y", *ret, false ); } else if ( domelem.attribute( "type" ) == "segment_length" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "circle_perimeter" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "circumference", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "circumference", *ret, false ); } else if ( domelem.attribute( "type" ) == "arc_length" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "arc-length", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "arc-length", *ret, false ); } else if ( domelem.attribute( "type" ) == "distance_2pts" ) { - if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); so->calc( *ret ); oc = filtersConstructTextObject( m, so, "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_norm" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_abscissa" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length-x", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length-x", *ret, false ); } else if ( domelem.attribute( "type" ) == "vector_ordinate" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "length-y", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "length-y", *ret, false ); } else if ( domelem.attribute( "type" ) == "slope" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "slope", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "slope", *ret, false ); } else if ( domelem.attribute( "type" ) == "distance_pt_line" ) { - if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; std::vector<ObjectCalcer*> args; - args.push_back( parents[1] ); - args.push_back( parents[0] ); + args.push_back( tqparents[1] ); + args.push_back( tqparents[0] ); ObjectTypeCalcer* po = new ObjectTypeCalcer( LinePerpendLPType::instance(), args ); po->calc( *ret ); args.clear(); - args.push_back( parents[1] ); + args.push_back( tqparents[1] ); args.push_back( po ); ObjectTypeCalcer* io = new ObjectTypeCalcer( LineLineIntersectionType::instance(), args ); io->calc( *ret ); args.clear(); - args.push_back( parents[0] ); + args.push_back( tqparents[0] ); args.push_back( io ); ObjectTypeCalcer* so = new ObjectTypeCalcer( SegmentABType::instance(), args ); so->calc( *ret ); @@ -607,18 +607,18 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co // types of 'equation' else if ( domelem.attribute( "type" ) == "line" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "equation", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "equation", *ret, false ); } else if ( domelem.attribute( "type" ) == "circle" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - oc = filtersConstructTextObject( m, parents[0], "simply-cartesian-equation", *ret, false ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + oc = filtersConstructTextObject( m, tqparents[0], "simply-cartesian-equation", *ret, false ); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -630,13 +630,13 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co { if ( domelem.attribute( "type" ) == "3pts" ) { - if ( parents.size() != 3 ) KIG_FILTER_PARSE_ERROR; - oc = new ObjectTypeCalcer( HalfAngleType::instance(), parents ); + if ( tqparents.size() != 3 ) KIG_FILTER_PARSE_ERROR; + oc = new ObjectTypeCalcer( HalfAngleType::instance(), tqparents ); } else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -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 parents of Guile + // possible idea: construct a new script object with the tqparents of Guile // one and the Guile code inserted commented... depends on a better // handling of arguments in scripts? if ( domelem.attribute( "type" ) == "nitems" ) @@ -677,7 +677,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -685,11 +685,11 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co else if ( domelem.tagName() == "locus" ) { if ( domelem.attribute( "type" ) == "None" ) - oc = fact->locusCalcer( parents[0], parents[1] ); + oc = fact->locusCalcer( tqparents[0], tqparents[1] ); else { notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -709,7 +709,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co kdDebug() << ">>>>>>>>> UNKNOWN OBJECT" << endl; #endif notSupported( file, i18n( "This Dr. Geo file contains a \"%1 %2\" object, " - "which Kig does not currently support." ).arg( domelem.tagName() ).arg( + "which Kig does not currently support." ).tqarg( domelem.tagName() ).tqarg( domelem.attribute( "type" ) ) ); return false; } @@ -723,7 +723,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co if ( domelem.attribute( "color" ) == "Bordeaux" ) co.setRgb( 145, 0, 0 ); else - co = Qt::blue; + co = TQt::blue; // reading width and style // Dashed -> the little one // Normal -> the medium @@ -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( "masked" ) != "True" ) && - ( domelem.attribute( "masked" ) != "Alway" ) ); + bool show = ( ( domelem.attribute( "tqmasked" ) != "True" ) && + ( domelem.attribute( "tqmasked" ) != "Alway" ) ); // costructing the ObjectDrawer* ObjectDrawer* d = new ObjectDrawer( co, w, show, s, pointstyle ); // reading object name @@ -770,16 +770,16 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co { std::vector<ObjectCalcer*> args2; args2.push_back( o->nameCalcer() ); - oc2 = fact->attachedLabelCalcer( TQString::fromLatin1( "%1" ), oc, + oc2 = fact->attachedLabelCalcer( TQString::tqfromLatin1( "%1" ), oc, static_cast<const PointImp*>( oc->imp() )->coordinate(), false, args2, *ret ); - co = Qt::black; + co = TQt::black; } } else if ( domelem.tagName() == "angle" ) { oc2 = filtersConstructTextObject( - static_cast<const PointImp*>( holders[curid-1-nignored]->calcer()->parents()[1]->imp() )->coordinate(), + static_cast<const PointImp*>( holders[curid-1-nignored]->calcer()->tqparents()[1]->imp() )->coordinate(), holders[curid-1-nignored]->calcer(), "angle-degrees", *ret, false ); } diff --git a/kig/filters/drgeo-filter.h b/kig/filters/drgeo-filter.h index 9b0ef369..ddd2359e 100644 --- a/kig/filters/drgeo-filter.h +++ b/kig/filters/drgeo-filter.h @@ -26,7 +26,7 @@ class KigDocument; class TQString; /** - * This is an import filter for the GNOME geometry program DrGeo. + * This is an import filter for the GNOME tqgeometry program DrGeo. */ class KigFilterDrgeo : public KigFilter diff --git a/kig/filters/exporter.cc b/kig/filters/exporter.cc index b44888f0..f2847c0a 100644 --- a/kig/filters/exporter.cc +++ b/kig/filters/exporter.cc @@ -65,13 +65,13 @@ class ExporterAction KigWidget* mw; public: ExporterAction( const KigPart* doc, KigWidget* w, - KActionCollection* parent, KigExporter* exp ); + KActionCollection* tqparent, KigExporter* exp ); void slotActivated(); }; ExporterAction::ExporterAction( const KigPart* doc, KigWidget* w, - KActionCollection* parent, KigExporter* exp ) - : KAction( exp->menuEntryName(), KShortcut(), 0, 0, parent ), + KActionCollection* tqparent, KigExporter* exp ) + : KAction( exp->menuEntryName(), KShortcut(), 0, 0, tqparent ), mexp( exp ), mdoc( doc ), mw( w ) { TQString iconstr = exp->menuIcon(); @@ -121,7 +121,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) } KigFileDialog* kfd = new KigFileDialog( - TQString::null, KImageIO::pattern( KImageIO::Writing ), + TQString(), KImageIO::pattern( KImageIO::Writing ), i18n( "Export as Image" ), &w ); kfd->setOptionCaption( i18n( "Image Options" ) ); ImageExporterOptions* opts = new ImageExporterOptions( 0L, w.size() ); @@ -156,20 +156,20 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please check if the file permissions are set correctly." ) - .arg( filename ) ); + .tqarg( filename ) ); return; }; TQPixmap img( TQSize( width, height ) ); - img.fill( Qt::white ); - KigPainter p( ScreenInfo( w.screenInfo().shownRect(), img.rect() ), &img, doc.document() ); + img.fill( TQt::white ); + KigPainter p( ScreenInfo( w.screenInfo().shownRect(), img.rect() ), TQT_TQPAINTDEVICE(&img), doc.document() ); p.setWholeWinOverlay(); p.drawGrid( doc.document().coordinateSystem(), showgrid, showaxes ); // FIXME: show the selections ? p.drawObjects( doc.document().objects(), false ); if ( ! img.save( filename, type.latin1() ) ) { - KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to image \"%1\"" ).arg( filename ) ); + KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to image \"%1\"" ).tqarg( filename ) ); } } @@ -244,7 +244,7 @@ class XFigExportImpVisitor // << "c: " << c << endl; ret *= 9450; ret /= msr.width(); - return ret.toQPoint(); + return ret.toTQPoint(); } void emitLine( const Coordinate& a, const Coordinate& b, int width, bool vector = false ); @@ -257,14 +257,14 @@ public: mnextcolorid( 32 ) { // predefined colors in XFig.. - mcolormap[Qt::black] = 0; - mcolormap[Qt::blue] = 1; - mcolormap[Qt::green] = 2; - mcolormap[Qt::cyan] = 3; - mcolormap[Qt::red] = 4; - mcolormap[Qt::magenta] = 5; - mcolormap[Qt::yellow] = 6; - mcolormap[Qt::white] = 7; + mcolormap[TQt::black] = 0; + mcolormap[TQt::blue] = 1; + mcolormap[TQt::green] = 2; + mcolormap[TQt::cyan] = 3; + mcolormap[TQt::red] = 4; + mcolormap[TQt::magenta] = 5; + mcolormap[TQt::yellow] = 6; + mcolormap[TQt::white] = 7; } void visit( const LineImp* imp ); void visit( const PointImp* imp ); @@ -297,7 +297,7 @@ void XFigExportImpVisitor::mapColor( const ObjectDrawer* obj ) void XFigExportImpVisitor::visit( ObjectHolder* obj ) { if ( ! obj->drawer()->shown() ) return; - assert( mcolormap.find( obj->drawer()->color() ) != mcolormap.end() ); + assert( mcolormap.tqfind( obj->drawer()->color() ) != mcolormap.end() ); mcurcolorid = mcolormap[ obj->drawer()->color() ]; mcurobj = obj; obj->imp()->visit( this ); @@ -593,7 +593,7 @@ void XFigExporter::run( const KigPart& doc, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " "check if the file permissions are set correctly." ) - .arg( file_name ) ); + .tqarg( file_name ) ); return; }; TQTextStream stream( &file ); diff --git a/kig/filters/filter.cc b/kig/filters/filter.cc index 81cd1ef4..0cfe1479 100644 --- a/kig/filters/filter.cc +++ b/kig/filters/filter.cc @@ -31,7 +31,7 @@ KigFilters* KigFilters::sThis; -KigFilter* KigFilters::find(const TQString& mime) +KigFilter* KigFilters::tqfind(const TQString& mime) { for (vect::iterator i = mFilters.begin(); i != mFilters.end(); ++i) { @@ -73,14 +73,14 @@ void KigFilter::fileNotFound( const TQString& file ) const i18n( "The file \"%1\" could not be opened. " "This probably means that it does not " "exist, or that it cannot be opened due to " - "its permissions" ).arg( file ) ); + "its permissions" ).tqarg( file ) ); } void KigFilter::parseError( const TQString& file, const TQString& explanation ) const { const TQString text = i18n( "An error was encountered while parsing the file \"%1\". It " - "cannot be opened." ).arg( file ); + "cannot be opened." ).tqarg( file ); const TQString title = i18n( "Parse Error" ); if ( explanation.isNull() ) @@ -92,7 +92,7 @@ void KigFilter::parseError( const TQString& file, const TQString& explanation ) void KigFilter::notSupported( const TQString& file, const TQString& explanation ) const { KMessageBox::detailedSorry( 0, - i18n( "Kig cannot open the file \"%1\"." ).arg( file ), + i18n( "Kig cannot open the file \"%1\"." ).tqarg( file ), explanation, i18n( "Not Supported" ) ); } diff --git a/kig/filters/filter.h b/kig/filters/filter.h index c887b05c..af087818 100644 --- a/kig/filters/filter.h +++ b/kig/filters/filter.h @@ -34,7 +34,7 @@ class KigFilters { public: static KigFilters* instance(); - KigFilter* find (const TQString& mime); + KigFilter* tqfind (const TQString& mime); // bool save ( const KigDocument& data, TQTextStream& stream ); /** @@ -55,7 +55,7 @@ protected: { \ TQString locs = i18n( "An error was encountered at " \ "line %1 in file %2." ) \ - .arg( __LINE__ ).arg( __FILE__ ); \ + .tqarg( __LINE__ ).tqarg( __FILE__ ); \ parseError( file, locs ); \ return 0; \ } @@ -71,7 +71,7 @@ class KigFilter protected: // shows errors to the user.. void fileNotFound( const TQString& file ) const; - void parseError( const TQString& file, const TQString& explanation = TQString::null ) const; + void parseError( const TQString& file, const TQString& explanation = TQString() ) const; void notSupported( const TQString& file, const TQString& explanation ) const; void warning( const TQString& explanation ) const; public: diff --git a/kig/filters/filters-common.cc b/kig/filters/filters-common.cc index 4ba24e9f..6ae6cef9 100644 --- a/kig/filters/filters-common.cc +++ b/kig/filters/filters-common.cc @@ -34,6 +34,6 @@ ObjectTypeCalcer* filtersConstructTextObject( propo->calc( doc ); std::vector<ObjectCalcer*> args; args.push_back( propo ); - return fact->labelCalcer( TQString::fromLatin1( "%1" ), c, needframe, + return fact->labelCalcer( TQString::tqfromLatin1( "%1" ), c, needframe, args, doc ); } diff --git a/kig/filters/imageexporteroptions.cc b/kig/filters/imageexporteroptions.cc index cd68a0af..d88792fc 100644 --- a/kig/filters/imageexporteroptions.cc +++ b/kig/filters/imageexporteroptions.cc @@ -23,8 +23,8 @@ #include <knuminput.h> -ImageExporterOptions::ImageExporterOptions( TQWidget* parent, const TQSize& s ) - : ImageExporterOptionsBase( parent, "imageexporteroptions" ), msize( s ), +ImageExporterOptions::ImageExporterOptions( TQWidget* tqparent, const TQSize& s ) + : ImageExporterOptionsBase( tqparent, "imageexporteroptions" ), msize( s ), minternallysettingstuff( false ) { keepAspectRatio->setChecked( true ); diff --git a/kig/filters/imageexporteroptions.h b/kig/filters/imageexporteroptions.h index eacbe859..82db4950 100644 --- a/kig/filters/imageexporteroptions.h +++ b/kig/filters/imageexporteroptions.h @@ -26,6 +26,7 @@ class ImageExporterOptions : public ImageExporterOptionsBase { Q_OBJECT + TQ_OBJECT TQSize msize; @@ -34,7 +35,7 @@ class ImageExporterOptions // value like to user changes... bool minternallysettingstuff; public: - ImageExporterOptions( TQWidget* parent, const TQSize& s ); + ImageExporterOptions( TQWidget* tqparent, const TQSize& s ); ~ImageExporterOptions(); protected slots: diff --git a/kig/filters/imageexporteroptionsbase.ui b/kig/filters/imageexporteroptionsbase.ui index 03145dec..6399fd7e 100644 --- a/kig/filters/imageexporteroptionsbase.ui +++ b/kig/filters/imageexporteroptionsbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>ImageExporterOptionsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ImageExporterOptionsBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout2_2</cstring> </property> @@ -47,7 +47,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>WidthLabel_2</cstring> </property> @@ -68,7 +68,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout3_2</cstring> </property> @@ -82,7 +82,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>HeightLabel_2</cstring> </property> @@ -103,7 +103,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>keepAspectRatio</cstring> </property> @@ -113,7 +113,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -124,7 +124,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>showGridCheckBox</cstring> </property> @@ -132,7 +132,7 @@ <string>Show grid</string> </property> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>showAxesCheckBox</cstring> </property> @@ -144,7 +144,7 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults 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 02c1efde..379af11d 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> parents; + std::vector<int> tqparents; }; 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].parents.size(); ++j ) - visitElem( ret, elems, seen, elems[i].parents[j] ); + for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) + visitElem( ret, elems, seen, elems[i].tqparents[j] ); ret.push_back( elems[i] ); seen[i] = true; }; @@ -111,10 +111,10 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c c->setGroup("Main"); int number = c->readNumEntry ("Number"); - // first we determine the parent relationships, and sort the + // first we determine the tqparent relationships, and sort the // elements in an order that we can be sure all of an object's - // parents will have been handled before it is handled itself.. - // ( aka topological sort of the parent relations graph.. + // tqparents 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 parents; - c->readListEntry( "Parents", parents ); + TQStrList tqparents; + c->readListEntry( "Parents", tqparents ); elems.push_back( elem ); - for ( const char* parent = parents.first(); parent; parent = parents.next() ) + for ( const char* tqparent = tqparents.first(); tqparent; tqparent = tqparents.next() ) { - int parentIndex = TQString::fromLatin1( parent ).toInt( &ok ); + int tqparentIndex = TQString::tqfromLatin1( tqparent ).toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; - if ( parentIndex != 0 ) - elems[i].parents.push_back( parentIndex - 1 ); + if ( tqparentIndex != 0 ) + elems[i].tqparents.push_back( tqparentIndex - 1 ); }; }; @@ -153,11 +153,11 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c c->setGroup( group ); int objID = c->readNumEntry( "Geo" ); - std::vector<ObjectCalcer*> parents; - for ( uint j = 0; j < e.parents.size(); ++j ) + std::vector<ObjectCalcer*> tqparents; + for ( uint j = 0; j < e.tqparents.size(); ++j ) { - int parentid = e.parents[j]; - parents.push_back( os[parentid]->calcer() ); + int tqparentid = e.tqparents[j]; + tqparents.push_back( os[tqparentid]->calcer() ); }; ObjectCalcer* o = 0; @@ -166,84 +166,84 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c case ID_point: { // fetch the coordinates... - TQString strX = c->readEntry("QPointX"); - TQString strY = c->readEntry("QPointY"); + TQString strX = c->readEntry("TQPointX"); + TQString strY = c->readEntry("TQPointY"); double x = strX.toDouble(&ok); if (!ok) KIG_FILTER_PARSE_ERROR; double y = strY.toDouble(&ok); if (!ok) KIG_FILTER_PARSE_ERROR; Coordinate m( x, y ); - uint nparents = parents.size(); - if ( nparents == 0 ) + uint ntqparents = tqparents.size(); + if ( ntqparents == 0 ) o = factory->fixedPointCalcer( m ); - else if ( nparents == 1 ) - o = factory->constrainedPointCalcer( parents[0], m, *ret ); + else if ( ntqparents == 1 ) + o = factory->constrainedPointCalcer( tqparents[0], m, *ret ); else KIG_FILTER_PARSE_ERROR; break; } case ID_segment: { - o = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + o = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); break; } case ID_circle: { - o = new ObjectTypeCalcer( CircleBCPType::instance(), parents ); + o = new ObjectTypeCalcer( CircleBCPType::instance(), tqparents ); break; } case ID_line: { - o = new ObjectTypeCalcer( LineABType::instance(), parents ); + o = new ObjectTypeCalcer( LineABType::instance(), tqparents ); break; } case ID_bisection: { // if this is the bisection of two points, first build a segment // between them.. - if ( parents.size() == 2 ) + if ( tqparents.size() == 2 ) { - ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), parents ); - parents.clear(); - parents.push_back( seg ); + ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); + tqparents.clear(); + tqparents.push_back( seg ); } - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - o = factory->propertyObjectCalcer( parents[0], "mid-point" ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + o = factory->propertyObjectCalcer( tqparents[0], "mid-point" ); break; }; case ID_perpendicular: { - o = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); + o = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); break; } case ID_parallel: { - o = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); + o = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); break; } case ID_vector: { - o = new ObjectTypeCalcer( VectorType::instance(), parents ); + o = new ObjectTypeCalcer( VectorType::instance(), tqparents ); break; } case ID_ray: { - o = new ObjectTypeCalcer( RayABType::instance(), parents ); + o = new ObjectTypeCalcer( RayABType::instance(), tqparents ); break; } case ID_move: { - o = new ObjectTypeCalcer( TranslatedType::instance(), parents ); + o = new ObjectTypeCalcer( TranslatedType::instance(), tqparents ); break; } case ID_mirrorPoint: { - o = new ObjectTypeCalcer( PointReflectionType::instance(), parents ); + o = new ObjectTypeCalcer( PointReflectionType::instance(), tqparents ); break; } case ID_pointOfConc: { - o = new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ); + o = new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ); break; } case ID_text: @@ -264,79 +264,79 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c case ID_fixedCircle: { double r = c->readDoubleNumEntry( "Radius" ); - parents.push_back( new ObjectConstCalcer( new DoubleImp( r ) ) ); - o = new ObjectTypeCalcer( CircleBPRType::instance(), parents ); + tqparents.push_back( new ObjectConstCalcer( new DoubleImp( r ) ) ); + o = new ObjectTypeCalcer( CircleBPRType::instance(), tqparents ); break; } case ID_angle: { - if ( parents.size() == 3 ) + if ( tqparents.size() == 3 ) { - ObjectTypeCalcer* ao = new ObjectTypeCalcer( AngleType::instance(), parents ); + ObjectTypeCalcer* ao = new ObjectTypeCalcer( AngleType::instance(), tqparents ); ao->calc( *ret ); - parents.clear(); - parents.push_back( ao ); + tqparents.clear(); + tqparents.push_back( ao ); }; - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* angle = parents[0]; - parents.clear(); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* angle = tqparents[0]; + tqparents.clear(); const Coordinate c = - static_cast<const PointImp*>( angle->parents()[1]->imp() )->coordinate(); + static_cast<const PointImp*>( angle->tqparents()[1]->imp() )->coordinate(); o = filtersConstructTextObject( c, angle, "angle-degrees", *ret, true ); break; } case ID_distance: { - if ( parents.size() != 2 ) KIG_FILTER_PARSE_ERROR; - ObjectTypeCalcer* segment = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + if ( tqparents.size() != 2 ) KIG_FILTER_PARSE_ERROR; + ObjectTypeCalcer* segment = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); segment->calc( *ret ); - Coordinate m = ( static_cast<const PointImp*>( parents[0]->imp() )->coordinate() + - static_cast<const PointImp*>( parents[1]->imp() )->coordinate() ) / 2; + Coordinate m = ( static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate() + + static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate() ) / 2; o = filtersConstructTextObject( m, segment, "length", *ret, true ); break; } case ID_arc: { - o = new ObjectTypeCalcer( AngleType::instance(), parents ); + o = new ObjectTypeCalcer( AngleType::instance(), tqparents ); break; } case ID_area: { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - const CircleImp* circle = static_cast<const CircleImp*>( parents[0]->imp() ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + const CircleImp* circle = static_cast<const CircleImp*>( tqparents[0]->imp() ); const Coordinate c = circle->center() + Coordinate( circle->radius(), 0 ); - o = filtersConstructTextObject( c, parents[0], "surface", *ret, true ); + o = filtersConstructTextObject( c, tqparents[0], "surface", *ret, true ); break; } case ID_slope: { - // 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; + // 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; const Coordinate c = ( - static_cast<const PointImp*>( parents[0]->imp() )->coordinate() + - static_cast<const PointImp*>( parents[1]->imp() )->coordinate() ) / 2; - ObjectTypeCalcer* line = new ObjectTypeCalcer( LineABType::instance(), parents ); + static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate() + + static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate() ) / 2; + ObjectTypeCalcer* line = new ObjectTypeCalcer( LineABType::instance(), tqparents ); line->calc( *ret ); o = filtersConstructTextObject( c, line, "slope", *ret, true ); break; } case ID_circumference: { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - const CircleImp* c = static_cast<const CircleImp*>( parents[0]->imp() ); + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + const CircleImp* c = static_cast<const CircleImp*>( tqparents[0]->imp() ); const Coordinate m = c->center() + Coordinate( c->radius(), 0 ); - o = filtersConstructTextObject( m, parents[0], "circumference", *ret, true ); + o = filtersConstructTextObject( m, tqparents[0], "circumference", *ret, true ); break; } case ID_rotation: { // in kig, the rotated object should be last.. - ObjectCalcer* t = parents[2]; - parents[2] = parents[0]; - parents[0] = t; - o = new ObjectTypeCalcer( RotationType::instance(), parents ); + ObjectCalcer* t = tqparents[2]; + tqparents[2] = tqparents[0]; + tqparents[0] = t; + o = new ObjectTypeCalcer( RotationType::instance(), tqparents ); break; } default: @@ -346,7 +346,7 @@ KigDocument* KigFilterKGeo::loadObjects( const TQString& file, KSimpleConfig* c // set the color... TQColor co = c->readColorEntry( "Color" ); if( !co.isValid() ) - co = Qt::blue; + co = TQt::blue; ObjectDrawer* d = new ObjectDrawer( co ); os[i] = new ObjectHolder( o, d ); diff --git a/kig/filters/kgeo-filter.h b/kig/filters/kgeo-filter.h index f8accd91..0eb8d462 100644 --- a/kig/filters/kgeo-filter.h +++ b/kig/filters/kgeo-filter.h @@ -25,11 +25,11 @@ class KSimpleConfig; /** * This is an import filter for files generated by the program KGeo, - * which was an interactive geometry program in kdeedu. Kig is + * which was an interactive tqgeometry program in kdeedu. Kig is * supposed to be its successor, and this import filter is part of my * attempt to achieve that :) * - * Status: a significant part of KGeo's format is supported, not all + * tqStatus: a significant part of KGeo's format is supported, not all * yet, though.. */ class KigFilterKGeo diff --git a/kig/filters/kgeo-resource.h b/kig/filters/kgeo-resource.h index f7af0f64..9a392ac8 100644 --- a/kig/filters/kgeo-resource.h +++ b/kig/filters/kgeo-resource.h @@ -71,7 +71,7 @@ #define ID_FILE_PRINT 10080 -#define ID_FILE_QUIT 10090 +#define ID_FILE_TQUIT 10090 /////////////////////////////////////////////////////////////////// // Edit-menu entries diff --git a/kig/filters/kseg-defs.h b/kig/filters/kseg-defs.h index 59dd3e4c..5319afaf 100644 --- a/kig/filters/kseg-defs.h +++ b/kig/filters/kseg-defs.h @@ -58,10 +58,10 @@ using namespace std; inline int ROUND(double x) { return ((int)(x + 0.5)); } inline int SIGN(double x) { return (x < 0) ? -1 : 1; } -inline int INTRAND(int a, int b) { return QMIN(a, b) + rand() % abs(a - b); } +inline int INTRAND(int a, int b) { return TQMIN(a, b) + rand() % abs(a - b); } #define SQR(x) ((x) * (x)) #define CUBE(x) ((x) * (x) * (x)) -#define QUAD(x) (((x) * (x)) * ((x) * (x))) +#define TQUAD(x) (((x) * (x)) * ((x) * (x))) enum G_Type { @@ -254,9 +254,9 @@ enum MenuIDs ID_CONSTRUCTION_MAKE_INITIAL, ID_CONSTRUCTION_RECURSE, - ID_PLAY_QUICKPLAY, + ID_PLAY_TQUICKPLAY, - ID_QUICKPLAY_SET_DIRECTORY, + ID_TQUICKPLAY_SET_DIRECTORY, ID_FILE_RECENTLIST_START //should be the last entry }; diff --git a/kig/filters/kseg-filter.cc b/kig/filters/kseg-filter.cc index fb96c25c..6f784759 100644 --- a/kig/filters/kseg-filter.cc +++ b/kig/filters/kseg-filter.cc @@ -67,7 +67,7 @@ bool KigFilterKSeg::supportMime( const TQString& mime ) struct drawstyle { - Q_INT8 pointstyle; + TQ_INT8 pointstyle; TQFont font; TQPen pen; TQBrush brush; @@ -93,50 +93,50 @@ static Coordinate readKSegCoordinate( TQDataStream& stream ) return t + Coordinate( -7, -7 ); } -static ObjectTypeCalcer* intersectionPoint( const std::vector<ObjectCalcer*>& parents, int which ) +static ObjectTypeCalcer* intersectionPoint( const std::vector<ObjectCalcer*>& tqparents, int which ) { - if ( parents.size() != 2 ) return 0; + if ( tqparents.size() != 2 ) return 0; int nlines = 0; int nconics = 0; int narcs = 0; for ( int i = 0; i < 2; ++i ) { - 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; + 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; else return 0; }; if ( nlines == 2 ) - return which == -1 ? new ObjectTypeCalcer( LineLineIntersectionType::instance(), parents ) : 0; + return which == -1 ? new ObjectTypeCalcer( LineLineIntersectionType::instance(), tqparents ) : 0; else if ( nlines == 1 && nconics == 1 ) { - std::vector<ObjectCalcer*> intparents( parents ); - intparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), intparents ); + std::vector<ObjectCalcer*> inttqparents( tqparents ); + inttqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ConicLineIntersectionType::instance(), inttqparents ); } else if ( nlines == 0 && nconics == 2 ) { - 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 ); + 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 ); } else if ( nlines == 1 && narcs == 1 ) { - std::vector<ObjectCalcer*> intparents( parents ); - intparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); - return new ObjectTypeCalcer( ArcLineIntersectionType::instance(), intparents ); + std::vector<ObjectCalcer*> inttqparents( tqparents ); + inttqparents.push_back( new ObjectConstCalcer( new IntImp( which ) ) ); + return new ObjectTypeCalcer( ArcLineIntersectionType::instance(), inttqparents ); } else return 0; } ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& kigdoc, - std::vector<ObjectCalcer*>& parents, + std::vector<ObjectCalcer*>& tqparents, int subtype, bool& ok ) { ok = true; @@ -145,34 +145,34 @@ ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& { case G_TRANSLATED: { - std::vector<ObjectCalcer*> vectorparents( parents.begin() + 1, parents.end() ); - ObjectTypeCalcer* vector = new ObjectTypeCalcer( VectorType::instance(), vectorparents ); + std::vector<ObjectCalcer*> vectortqparents( tqparents.begin() + 1, tqparents.end() ); + ObjectTypeCalcer* vector = new ObjectTypeCalcer( VectorType::instance(), vectortqparents ); vector->calc( kigdoc ); std::vector<ObjectCalcer*> transparents; - transparents.push_back( parents[0] ); + transparents.push_back( tqparents[0] ); transparents.push_back( vector ); retobj = new ObjectTypeCalcer( TranslatedType::instance(), transparents ); break; } case G_ROTATED: { - std::vector<ObjectCalcer*> angleparents( parents.begin() + 2, parents.end() ); - ObjectTypeCalcer* angle = new ObjectTypeCalcer( AngleType::instance(), angleparents ); + std::vector<ObjectCalcer*> angletqparents( tqparents.begin() + 2, tqparents.end() ); + ObjectTypeCalcer* angle = new ObjectTypeCalcer( AngleType::instance(), angletqparents ); angle->calc( kigdoc ); - std::vector<ObjectCalcer*> rotparents; - rotparents.push_back( parents[0] ); - rotparents.push_back( parents[1] ); - rotparents.push_back( angle ); - retobj = new ObjectTypeCalcer( RotationType::instance(), rotparents ); + std::vector<ObjectCalcer*> rottqparents; + rottqparents.push_back( tqparents[0] ); + rottqparents.push_back( tqparents[1] ); + rottqparents.push_back( angle ); + retobj = new ObjectTypeCalcer( RotationType::instance(), rottqparents ); break; } case G_SCALED: { - if ( parents.size() == 4 ) + if ( tqparents.size() == 4 ) { - retobj = new ObjectTypeCalcer( ScalingOverCenter2Type::instance(), parents ); + retobj = new ObjectTypeCalcer( ScalingOverCenter2Type::instance(), tqparents ); } else { @@ -187,8 +187,8 @@ ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& } case G_REFLECTED: { - std::vector<ObjectCalcer*> mirparents( parents.begin(), parents.end() ); - retobj = new ObjectTypeCalcer( LineReflectionType::instance(), mirparents ); + std::vector<ObjectCalcer*> mirtqparents( tqparents.begin(), tqparents.end() ); + retobj = new ObjectTypeCalcer( LineReflectionType::instance(), mirtqparents ); break; } } @@ -250,14 +250,14 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) { short styleid; stream >> styleid; - short nparents; - stream >> nparents; - std::vector<ObjectCalcer*> parents( nparents, 0 ); - for ( short j = 0; j < nparents; ++j ) + short ntqparents; + stream >> ntqparents; + std::vector<ObjectCalcer*> tqparents( ntqparents, 0 ); + for ( short j = 0; j < ntqparents; ++j ) { - int parent; - stream >> parent; - parents[j] = ret[parent]->calcer(); + int tqparent; + stream >> tqparent; + tqparents[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, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_FREE_POINT: { // fixed point - if ( nparents != 0 ) KIG_FILTER_PARSE_ERROR; + if ( ntqparents != 0 ) KIG_FILTER_PARSE_ERROR; Coordinate c = readKSegCoordinate( stream ); o = fact->fixedPointCalcer( c ); break; @@ -334,37 +334,37 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) // constrained point double p; stream >> p; - if ( nparents != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = parents[0]; - assert( parent ); - o = fact->constrainedPointCalcer( parent, p ); + if ( ntqparents != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = tqparents[0]; + assert( tqparent ); + o = fact->constrainedPointCalcer( tqparent, p ); break; } case G_INTERSECTION_POINT: { // KSeg has somewhat weird intersection objects.. // for all objects G_INTERSECTION_POINT gets the - // first intersection of its parents, G_INTERSECTION2_POINT + // first intersection of its tqparents, G_INTERSECTION2_POINT // represents the second, if present. - o = intersectionPoint( parents, -1 ); + o = intersectionPoint( tqparents, -1 ); if ( ! o ) KIG_FILTER_PARSE_ERROR; break; } case G_INTERSECTION2_POINT: { - o = intersectionPoint( parents, 1 ); + o = intersectionPoint( tqparents, 1 ); if ( ! o ) KIG_FILTER_PARSE_ERROR; break; } case G_MID_POINT: { // midpoint of a segment.. - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - if ( !parents[0]->imp()->inherits( SegmentImp::stype() ) ) + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( !tqparents[0]->imp()->inherits( SegmentImp::stype() ) ) KIG_FILTER_PARSE_ERROR; - int index = parents[0]->imp()->propertiesInternalNames().findIndex( "mid-point" ); + int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( "mid-point" ); assert( index != -1 ); - o = new ObjectPropertyCalcer( parents[0], index ); + o = new ObjectPropertyCalcer( tqparents[0], index ); break; } default: @@ -383,13 +383,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_ENDPOINTS_SEGMENT: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( SegmentABType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( SegmentABType::instance(), tqparents ); break; } default: @@ -406,18 +406,18 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_TWOPOINTS_RAY: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( RayABType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( RayABType::instance(), tqparents ); break; } case G_BISECTOR_RAY: { - ObjectTypeCalcer* angle = new ObjectTypeCalcer( HalfAngleType::instance(), parents ); + ObjectTypeCalcer* angle = new ObjectTypeCalcer( HalfAngleType::instance(), tqparents ); 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, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_TWOPOINTS_LINE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LineABType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LineABType::instance(), tqparents ); break; } case G_PARALLEL_LINE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LineParallelLPType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LineParallelLPType::instance(), tqparents ); break; } case G_PERPENDICULAR_LINE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( LinePerpendLPType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( LinePerpendLPType::instance(), tqparents ); break; } default: @@ -471,37 +471,37 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_CENTERPOINT_CIRCLE: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( CircleBCPType::instance(), parents ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( CircleBCPType::instance(), tqparents ); break; } case G_CENTERRADIUS_CIRCLE: { ObjectCalcer* point; ObjectCalcer* segment; - if ( parents[0]->imp()->inherits( PointImp::stype() ) ) + if ( tqparents[0]->imp()->inherits( PointImp::stype() ) ) { - point = parents[0]; - segment = parents[1]; + point = tqparents[0]; + segment = tqparents[1]; } else { - point = parents[1]; - segment = parents[0]; + point = tqparents[1]; + segment = tqparents[0]; }; - int index = segment->imp()->propertiesInternalNames().findIndex( "length" ); + 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*> cparents; - cparents.push_back( point ); - cparents.push_back( length ); - o = new ObjectTypeCalcer( CircleBPRType::instance(), cparents ); + std::vector<ObjectCalcer*> ctqparents; + ctqparents.push_back( point ); + ctqparents.push_back( length ); + o = new ObjectTypeCalcer( CircleBPRType::instance(), ctqparents ); break; } default: @@ -518,13 +518,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_THREEPOINTS_ARC: { - if ( nparents != 3 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( ArcBTPType::instance(), parents ); + if ( ntqparents != 3 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( ArcBTPType::instance(), tqparents ); break; } default: @@ -541,13 +541,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } default: { - if ( nparents < 3 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectTypeCalcer( PolygonBNPType::instance(), parents ); + if ( ntqparents < 3 ) KIG_FILTER_PARSE_ERROR; + o = new ObjectTypeCalcer( PolygonBNPType::instance(), tqparents ); } } // default: @@ -581,13 +581,13 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) case G_SCALED: case G_REFLECTED: { - o = transformObject( file, *retdoc, parents, descendtype, ok ); + o = transformObject( file, *retdoc, tqparents, descendtype, ok ); break; } case G_OBJECT_LOCUS: { - if ( nparents != 2 ) KIG_FILTER_PARSE_ERROR; - o = fact->locusCalcer( parents[0], parents[1] ); + if ( ntqparents != 2 ) KIG_FILTER_PARSE_ERROR; + o = fact->locusCalcer( tqparents[0], tqparents[1] ); break; } default: @@ -636,7 +636,7 @@ KigDocument* KigFilterKSeg::load( const TQString& file ) std::vector<ObjectCalcer*> args2; args2.push_back( object->nameCalcer() ); ObjectCalcer* oc2 = fact->attachedLabelCalcer( - TQString::fromLatin1( "%1" ), object->calcer(), + TQString::tqfromLatin1( "%1" ), object->calcer(), static_cast<const PointImp*>( object->imp() )->coordinate(), false, args2, *retdoc ); oc2->calc( *retdoc ); diff --git a/kig/filters/kseg-filter.h b/kig/filters/kseg-filter.h index 03d03958..d8909282 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*>& parents, + std::vector<ObjectCalcer*>& tqparents, int subtype, bool& ok ); public: diff --git a/kig/filters/latexexporter.cc b/kig/filters/latexexporter.cc index 98d3fc2e..811cfd9b 100644 --- a/kig/filters/latexexporter.cc +++ b/kig/filters/latexexporter.cc @@ -194,7 +194,7 @@ void LatexExportImpVisitor::mapColor( TQColor color ) ColorMap newcolor; newcolor.color = color; TQString tmpname = color.name(); - tmpname.replace( "#", "" ); + tmpname.tqreplace( "#", "" ); newcolor.name = tmpname; mcolors.push_back( newcolor ); mstream << "\\newrgbcolor{" << tmpname << "}{" @@ -213,9 +213,9 @@ double LatexExportImpVisitor::dimRealToCoord( int dim ) TQString LatexExportImpVisitor::writeStyle( Qt::PenStyle style ) { TQString ret( "linestyle=" ); - if ( style == Qt::DashLine ) + if ( style == TQt::DashLine ) ret += "dashed"; - else if ( style == Qt::DotLine ) + else if ( style == TQt::DotLine ) ret += "dotted,dotsep=2pt"; else ret += "solid"; @@ -228,9 +228,9 @@ void LatexExportImpVisitor::plotGenericCurve( const CurveImp* imp ) if ( width == -1 ) width = 1; TQString prefix = TQString( "\\pscurve[linecolor=%1,linewidth=%2,%3]" ) - .arg( mcurcolorid ) - .arg( width / 100.0 ) - .arg( writeStyle( mcurobj->drawer()->style() ) ); + .tqarg( mcurcolorid ) + .tqarg( width / 100.0 ) + .tqarg( writeStyle( mcurobj->drawer()->style() ) ); std::vector< std::vector< Coordinate > > coordlist; coordlist.push_back( std::vector< Coordinate >() ); @@ -483,7 +483,7 @@ void LatexExportImpVisitor::visit( const PolygonImp* imp ) void LatexExporter::run( const KigPart& doc, KigWidget& w ) { KigFileDialog* kfd = new KigFileDialog( - TQString::null, i18n( "*.tex|Latex Documents (*.tex)" ), + TQString(), i18n( "*.tex|Latex Documents (*.tex)" ), i18n( "Export as Latex" ), &w ); kfd->setOptionCaption( i18n( "Latex Options" ) ); LatexExporterOptions* opts = new LatexExporterOptions( 0L ); @@ -507,7 +507,7 @@ void LatexExporter::run( const KigPart& doc, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " "check if the file permissions are set correctly." ) - .arg( file_name ) ); + .tqarg( file_name ) ); return; }; diff --git a/kig/filters/latexexporteroptions.ui b/kig/filters/latexexporteroptions.ui index d2e60c5b..04275dd7 100644 --- a/kig/filters/latexexporteroptions.ui +++ b/kig/filters/latexexporteroptions.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>LatexExporterOptions</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>LatexExporterOptions</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>showGridCheckBox</cstring> </property> @@ -41,7 +41,7 @@ <string>Show grid</string> </property> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>showAxesCheckBox</cstring> </property> @@ -49,7 +49,7 @@ <string>Show axes</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>showExtraFrameCheckBox</cstring> </property> @@ -63,7 +63,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> </includehints> </UI> diff --git a/kig/filters/native-filter.cc b/kig/filters/native-filter.cc index a5378263..4a3d0a04 100644 --- a/kig/filters/native-filter.cc +++ b/kig/filters/native-filter.cc @@ -51,7 +51,7 @@ struct HierElem { int id; - std::vector<int> parents; + std::vector<int> tqparents; TQDomElement el; }; @@ -73,8 +73,8 @@ static void visitElem( std::vector<HierElem>& ret, { if ( !seen[i] ) { - for ( uint j = 0; j < elems[i].parents.size(); ++j ) - visitElem( ret, elems, seen, elems[i].parents[j] - 1); + for ( uint j = 0; j < elems[i].tqparents.size(); ++j ) + visitElem( ret, elems, seen, elems[i].tqparents[j] - 1); ret.push_back( elems[i] ); seen[i] = true; }; @@ -114,7 +114,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) TQFile kigdoc( file ); #ifndef KIG_NO_COMPRESSED_FILES bool iscompressed = false; - if ( !file.endsWith( ".kig", false ) ) + if ( !file.tqendsWith( ".kig", false ) ) { // the file is compressed, so we have to decompress it and fetch the // kig file inside it... @@ -125,7 +125,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) KIG_FILTER_PARSE_ERROR; TQString tempname = file.section( '/', -1 ); - if ( file.endsWith( ".kigz", false ) ) + if ( file.tqendsWith( ".kigz", false ) ) { tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); } @@ -193,7 +193,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) if ( major > 0 || minor > 9 ) { notSupported( file, i18n( "This file was created by Kig version \"%1\", " - "which this version cannot open." ).arg( version ) ); + "which this version cannot open." ).tqarg( version ) ); return false; } else if ( major == 0 && minor <= 3 ) @@ -204,7 +204,7 @@ KigDocument* KigFilterNative::load( const TQString& file ) "You can try to open this file with an older Kig " "version (0.4 to 0.6),\n" "and then save it again, which will save it in the " - "new format." ).arg( version ) ); + "new format." ).tqarg( version ) ); return false; } else if ( major == 0 && minor <= 6 ) @@ -226,7 +226,7 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& if ( e.tagName() == "CoordinateSystem" ) { const TQCString type = e.text().latin1(); - CoordinateSystem* s = CoordinateSystemFactory::build( type ); + CoordinateSystem* s = CoordinateSystemFactory::build( type.data() ); if ( ! s ) { warning( i18n( "This Kig file has a coordinate system " @@ -273,7 +273,7 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& if ( ! ok ) KIG_FILTER_PARSE_ERROR; extendVect( elems, id ); - elems[id-1].parents.push_back( pid ); + elems[id-1].tqparents.push_back( pid ); } } }; @@ -315,14 +315,14 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& propname = ec.text().latin1(); }; - if ( i->parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = retcalcers[i->parents[0] -1]; - QCStringList propnames = parent->imp()->propertiesInternalNames(); - int propid = propnames.findIndex( propname ); + if ( i->tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = retcalcers[i->tqparents[0] -1]; + QCStringList propnames = tqparent->imp()->propertiesInternalNames(); + int propid = propnames.tqfindIndex( propname ); if ( propid == -1 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectPropertyCalcer( parent, propid ); + o = new ObjectPropertyCalcer( tqparent, propid ); } else if ( e.tagName() == "Object" ) { @@ -331,23 +331,23 @@ KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& KIG_FILTER_PARSE_ERROR; const ObjectType* type = - ObjectTypeFactory::instance()->find( tmp.latin1() ); + ObjectTypeFactory::instance()->tqfind( tmp.latin1() ); if ( !type ) { notSupported( file, i18n( "This Kig file uses an object of type \"%1\", " "which this Kig version does not support." "Perhaps you have compiled Kig without support " "for this object type," - "or perhaps you are using an older Kig version." ).arg( tmp ) ); + "or perhaps you are using an older Kig version." ).tqarg( tmp ) ); return false; }; - std::vector<ObjectCalcer*> parents; - for ( std::vector<int>::iterator j = i->parents.begin(); - j != i->parents.end(); ++j ) - parents.push_back( retcalcers[*j - 1] ); + std::vector<ObjectCalcer*> tqparents; + for ( std::vector<int>::iterator j = i->tqparents.begin(); + j != i->tqparents.end(); ++j ) + tqparents.push_back( retcalcers[*j - 1] ); - o = new ObjectTypeCalcer( type, parents ); + o = new ObjectTypeCalcer( type, tqparents ); } else continue; @@ -415,7 +415,7 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& ret->setAxes( false ); } const TQCString type = tmptype.latin1(); - CoordinateSystem* s = CoordinateSystemFactory::build( type ); + CoordinateSystem* s = CoordinateSystemFactory::build( type.data() ); if ( ! s ) { warning( i18n( "This Kig file has a coordinate system " @@ -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*> parents; - for ( TQDomElement parentel = e.firstChild().toElement(); ! parentel.isNull(); - parentel = parentel.nextSibling().toElement() ) + std::vector<ObjectCalcer*> tqparents; + for ( TQDomElement tqparentel = e.firstChild().toElement(); ! tqparentel.isNull(); + tqparentel = tqparentel.nextSibling().toElement() ) { - if ( parentel.tagName() != "Parent" ) continue; - TQString tmp = parentel.attribute( "id" ); - uint parentid = tmp.toInt( &ok ); + if ( tqparentel.tagName() != "Parent" ) continue; + TQString tmp = tqparentel.attribute( "id" ); + uint tqparentid = tmp.toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; - if ( parentid == 0 || parentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; - ObjectCalcer* parent = calcers[parentid - 1].get(); - if ( ! parent ) KIG_FILTER_PARSE_ERROR; - parents.push_back( parent ); + if ( tqparentid == 0 || tqparentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; + ObjectCalcer* tqparent = calcers[tqparentid - 1].get(); + if ( ! tqparent ) KIG_FILTER_PARSE_ERROR; + tqparents.push_back( tqparent ); } ObjectCalcer* o = 0; if ( e.tagName() == "Data" ) { - if ( !parents.empty() ) KIG_FILTER_PARSE_ERROR; + if ( !tqparents.empty() ) KIG_FILTER_PARSE_ERROR; TQString tmp = e.attribute( "type" ); TQString error; ObjectImp* imp = ObjectImpFactory::instance()->deserialize( tmp, e, error ); @@ -465,42 +465,42 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& } else if ( e.tagName() == "Property" ) { - if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; + if ( tqparents.size() != 1 ) KIG_FILTER_PARSE_ERROR; TQCString propname = e.attribute( "which" ).latin1(); - ObjectCalcer* parent = parents[0]; - int propid = parent->imp()->propertiesInternalNames().findIndex( propname ); + ObjectCalcer* tqparent = tqparents[0]; + int propid = tqparent->imp()->propertiesInternalNames().tqfindIndex( propname ); if ( propid == -1 ) KIG_FILTER_PARSE_ERROR; - o = new ObjectPropertyCalcer( parent, propid ); + o = new ObjectPropertyCalcer( tqparent, propid ); } else if ( e.tagName() == "Object" ) { TQString tmp = e.attribute( "type" ); const ObjectType* type = - ObjectTypeFactory::instance()->find( tmp.latin1() ); + ObjectTypeFactory::instance()->tqfind( tmp.latin1() ); if ( ! type ) { notSupported( file, i18n( "This Kig file uses an object of type \"%1\", " "which this Kig version does not support." "Perhaps you have compiled Kig without support " "for this object type," - "or perhaps you are using an older Kig version." ).arg( tmp ) ); + "or perhaps you are using an older Kig version." ).tqarg( tmp ) ); return false; } // mp: (I take the responsibility for this!) explanation: the usual ObjectTypeCalcer - // constructor also "sortArgs" the parents. I believe that this *must not* be done + // constructor also "sortArgs" the tqparents. 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 parents of an object do not satisfy the requirements + // it may happen that the tqparents 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, parents, false ); + o = new ObjectTypeCalcer( type, tqparents, false ); } else KIG_FILTER_PARSE_ERROR; @@ -604,8 +604,8 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) const ObjectPropertyCalcer* o = static_cast<const ObjectPropertyCalcer*>( *i ); objectelem = doc.createElement( "Property" ); - TQCString propname = o->parent()->imp()->propertiesInternalNames()[o->propId()]; - objectelem.setAttribute( "which", propname ); + TQCString propname = o->tqparent()->imp()->propertiesInternalNames()[o->propId()]; + objectelem.setAttribute( TQString("which"), TQString(propname) ); } else if ( dynamic_cast<const ObjectTypeCalcer*>( *i ) ) { @@ -615,8 +615,8 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) } else assert( false ); - const std::vector<ObjectCalcer*> parents = ( *i )->parents(); - for ( std::vector<ObjectCalcer*>::const_iterator i = parents.begin(); i != parents.end(); ++i ) + const std::vector<ObjectCalcer*> tqparents = ( *i )->tqparents(); + for ( std::vector<ObjectCalcer*>::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i ) { std::map<const ObjectCalcer*,int>::const_iterator idp = idmap.find( *i ); assert( idp != idmap.end() ); @@ -642,7 +642,7 @@ bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) TQDomElement drawelem = doc.createElement( "Draw" ); drawelem.setAttribute( "object", id ); drawelem.setAttribute( "color", d->color().name() ); - drawelem.setAttribute( "shown", TQString::fromLatin1( d->shown() ? "true" : "false" ) ); + drawelem.setAttribute( "shown", TQString::tqfromLatin1( d->shown() ? "true" : "false" ) ); drawelem.setAttribute( "width", TQString::number( d->width() ) ); drawelem.setAttribute( "style", d->styleToString() ); drawelem.setAttribute( "point-style", d->pointStyleToString() ); @@ -683,7 +683,7 @@ bool KigFilterNative::save07( const KigDocument& data, const TQString& outfile ) return save07( data, stdoutstream ); } #ifndef KIG_NO_COMPRESSED_FILES - if ( !outfile.endsWith( ".kig", false ) ) + if ( !outfile.tqendsWith( ".kig", false ) ) { // the user wants to save a compressed file, so we have to save our kig // file to a temp file and then compress it... @@ -693,7 +693,7 @@ bool KigFilterNative::save07( const KigDocument& data, const TQString& outfile ) return false; TQString tempname = outfile.section( '/', -1 ); - if ( outfile.endsWith( ".kigz", false ) ) + if ( outfile.tqendsWith( ".kigz", false ) ) tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); else return false; diff --git a/kig/filters/svgexporter.cc b/kig/filters/svgexporter.cc index 57413004..93801b3b 100644 --- a/kig/filters/svgexporter.cc +++ b/kig/filters/svgexporter.cc @@ -59,7 +59,7 @@ TQString SVGExporter::menuIcon() const void SVGExporter::run( const KigPart& part, KigWidget& w ) { KigFileDialog* kfd = new KigFileDialog( - TQString::null, i18n( "*.svg|Scalable Vector Graphics (*.svg)" ), + TQString(), i18n( "*.svg|Scalable Vector Graphics (*.svg)" ), i18n( "Export as SVG" ), &w ); kfd->setOptionCaption( i18n( "SVG Options" ) ); SVGExporterOptions* opts = new SVGExporterOptions( 0L ); @@ -81,7 +81,7 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " "check if the file permissions are set correctly." ) - .arg( file_name ) ); + .tqarg( file_name ) ); return; }; @@ -91,12 +91,12 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) TQPicture pic; pic.setBoundingRect( r ); KigPainter* p = new KigPainter( ScreenInfo( w.screenInfo().shownRect(), viewrect ), - &pic, part.document() ); + TQT_TQPAINTDEVICE(&pic), part.document() ); // p->setWholeWinOverlay(); -// p->setBrushColor( Qt::white ); -// p->setBrushStyle( Qt::SolidPattern ); +// p->setBrushColor( TQt::white ); +// p->setBrushStyle( TQt::SolidPattern ); // p->drawRect( r ); -// p->setBrushStyle( Qt::NoBrush ); +// p->setBrushStyle( TQt::NoBrush ); // p->setWholeWinOverlay(); p->drawGrid( part.document().coordinateSystem(), showgrid, showaxes ); p->drawObjects( part.document().objects(), false ); @@ -105,7 +105,7 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) if ( !pic.save( file_name, "SVG" ) ) { - KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to SVG file \"%1\"" ).arg( file_name ) ); + KMessageBox::error( &w, i18n( "Sorry, something went wrong while saving to SVG file \"%1\"" ).tqarg( file_name ) ); } } diff --git a/kig/filters/svgexporteroptions.ui b/kig/filters/svgexporteroptions.ui index 2de679cb..58176edf 100644 --- a/kig/filters/svgexporteroptions.ui +++ b/kig/filters/svgexporteroptions.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SVGExporterOptions</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SVGExporterOptions</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>showGridCheckBox</cstring> </property> @@ -41,7 +41,7 @@ <string>Show grid</string> </property> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>showAxesCheckBox</cstring> </property> @@ -55,7 +55,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> </includehints> </UI> diff --git a/kig/filters/tests/locus.fgeo b/kig/filters/tests/locus.fgeo index a914068c..4ad79bbd 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" 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=""><parent ref="8293DE0"/><parent ref="8306C70"/></circle><point id="8309098" type="On_curve" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><value>0.080691</value><parent 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=""><parent ref="8309098"/><parent 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=""><parent ref="8309098"/><parent 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=""><parent ref="8338A50"/><parent ref="833AD18"/></line><point id="8342478" type="Intersection" color="Red" thickness="Dashed" style="Cross" filled="False" masked="False" name="" extra="0"><parent ref="8172970"/><parent ref="833BBB8"/></point><locus id="8345D60" type="None" color="Black" thickness="Dashed" style="Cross" filled="False" masked="False" name=""><parent ref="8309098"/><parent 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" 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> |