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/misc/object_constructor.cc | |
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/misc/object_constructor.cc')
-rw-r--r-- | kig/misc/object_constructor.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kig/misc/object_constructor.cc b/kig/misc/object_constructor.cc index ce48a636..a5802d45 100644 --- a/kig/misc/object_constructor.cc +++ b/kig/misc/object_constructor.cc @@ -102,12 +102,12 @@ void StandardConstructorBase::handlePrelim( assert ( margsparser.check( os ) != ArgsParser::Invalid ); std::vector<ObjectCalcer*> args = margsparser.parse( os ); p.setBrushStyle( Qt::NoBrush ); - p.setBrushColor( Qt::red ); - p.setPen( TQPen ( Qt::red, 1) ); + p.setBrushColor( TQt::red ); + p.setPen( TQPen ( TQt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. - ObjectDrawer drawer( Qt::red ); + ObjectDrawer drawer( TQt::red ); drawprelim( drawer, p, args, d ); } @@ -124,12 +124,12 @@ SimpleObjectTypeConstructor::~SimpleObjectTypeConstructor() { } -void SimpleObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, +void SimpleObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& doc ) const { Args args; using namespace std; - transform( parents.begin(), parents.end(), + transform( tqparents.begin(), tqparents.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); ObjectImp* data = mtype->calc( args, doc ); drawer.draw( *data, p, true ); @@ -178,12 +178,12 @@ MultiObjectTypeConstructor::~MultiObjectTypeConstructor() { } -void MultiObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, +void MultiObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& doc ) const { Args args; using namespace std; - transform( parents.begin(), parents.end(), + transform( tqparents.begin(), tqparents.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); for ( vector<int>::const_iterator i = mparams.begin(); i != mparams.end(); ++i ) @@ -305,7 +305,7 @@ TQString StandardConstructorBase::useText( const ObjectCalcer& o, const std::vec transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = margsparser.usetext( o.imp(), args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); return i18n( ret.c_str() ); } @@ -318,7 +318,7 @@ TQString StandardConstructorBase::selectStatement( transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = margsparser.selectStatement( args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); return i18n( ret.c_str() ); } @@ -331,7 +331,7 @@ TQString MergeObjectConstructor::useText( const ObjectCalcer& o, const std::vect int w = (*i)->wantArgs( args, d, v ); if ( w != ArgsParser::Invalid ) return (*i)->useText( o, sel, d, v ); }; - return TQString::null; + return TQString(); } TQString MergeObjectConstructor::selectStatement( @@ -344,7 +344,7 @@ TQString MergeObjectConstructor::selectStatement( int wa = (*i)->wantArgs( args, d, w ); if ( wa != ArgsParser::Invalid ) return (*i)->selectStatement( sel, d, w ); }; - return TQString::null; + return TQString(); } MacroConstructor::MacroConstructor( const ObjectHierarchy& hier, const TQString& name, @@ -421,7 +421,7 @@ TQString MacroConstructor::selectStatement( transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = mparser.selectStatement( args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); else return i18n( ret.c_str() ); } @@ -434,7 +434,7 @@ TQString MacroConstructor::useText( const ObjectCalcer& o, const std::vector<Obj transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = mparser.usetext( o.imp(), args ); - if ( ret.empty() ) return TQString::null; + if ( ret.empty() ) return TQString(); else return i18n( ret.c_str() ); } @@ -551,26 +551,26 @@ PropertyObjectConstructor::~PropertyObjectConstructor() } void PropertyObjectConstructor::drawprelim( - const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, + const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& d ) const { - int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname ); + int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname ); assert ( index != -1 ); - ObjectImp* imp = parents[0]->imp()->property( index, d ); + ObjectImp* imp = tqparents[0]->imp()->property( index, d ); drawer.draw( *imp, p, true ); delete imp; } std::vector<ObjectHolder*> PropertyObjectConstructor::build( - const std::vector<ObjectCalcer*>& parents, KigDocument&, + const std::vector<ObjectCalcer*>& tqparents, KigDocument&, KigWidget& ) const { - int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname ); + int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname ); assert( index != -1 ); std::vector<ObjectHolder*> ret; ret.push_back( new ObjectHolder( - new ObjectPropertyCalcer( parents[0], index ) ) ); + new ObjectPropertyCalcer( tqparents[0], index ) ) ); return ret; } |