summaryrefslogtreecommitdiffstats
path: root/kig/filters/cabri-filter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kig/filters/cabri-filter.cc')
-rw-r--r--kig/filters/cabri-filter.cc82
1 files changed, 41 insertions, 41 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;
}