From 0a6e0958c03e41c87b15557b6f407874f20c2f8d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:39:55 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kig/kfile/kfile_drgeo.cpp | 36 ++++++++++++++++---------------- kig/kfile/kfile_drgeo.h | 2 +- kig/kfile/kfile_kig.cpp | 52 +++++++++++++++++++++++------------------------ kig/kfile/kfile_kig.h | 2 +- 4 files changed, 46 insertions(+), 46 deletions(-) (limited to 'kig/kfile') diff --git a/kig/kfile/kfile_drgeo.cpp b/kig/kfile/kfile_drgeo.cpp index 26ed7923..b921131b 100644 --- a/kig/kfile/kfile_drgeo.cpp +++ b/kig/kfile/kfile_drgeo.cpp @@ -20,8 +20,8 @@ #include "kfile_drgeo.h" -#include -#include +#include +#include #include @@ -29,16 +29,16 @@ typedef KGenericFactory drgeoFactory; K_EXPORT_COMPONENT_FACTORY( kfile_drgeo, drgeoFactory( "kfile_drgeo" ) ) -DrgeoPlugin::DrgeoPlugin( QObject *parent, const char *name, const QStringList &args ) +DrgeoPlugin::DrgeoPlugin( TQObject *parent, const char *name, const TQStringList &args ) : KFilePlugin( parent, name, args ) { info = addMimeTypeInfo( "application/x-drgeo" ); KFileMimeTypeInfo::GroupInfo* group = addGroupInfo( info, "DrgeoInfo", i18n( "Summary" ) ); KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo( group, "NumOfFigures", i18n( "Figures" ), QVariant::Int ); - item = addItemInfo( group, "NumOfTexts", i18n( "Texts" ), QVariant::Int ); - item = addItemInfo( group, "NumOfMacros", i18n( "Macros" ), QVariant::Int ); + item = addItemInfo( group, "NumOfFigures", i18n( "Figures" ), TQVariant::Int ); + item = addItemInfo( group, "NumOfTexts", i18n( "Texts" ), TQVariant::Int ); + item = addItemInfo( group, "NumOfMacros", i18n( "Macros" ), TQVariant::Int ); group_contents = addGroupInfo( info, "DrgeoContents", i18n( "Translators: what this drgeo " "file contains", "Contents" ) ); @@ -50,39 +50,39 @@ bool DrgeoPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) KFileMimeTypeInfo::ItemInfo* item; - QFile f( metainfo.path() ); - QDomDocument doc( "drgenius" ); + TQFile f( metainfo.path() ); + TQDomDocument doc( "drgenius" ); if ( !doc.setContent( &f ) ) return false; - QDomElement main = doc.documentElement(); + TQDomElement main = doc.documentElement(); int numfig = 0; int numtext = 0; int nummacro = 0; - QString sectname; + TQString sectname; // reading figures... - for ( QDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() ) continue; else if ( e.tagName() == "drgeo" ) { numfig++; - sectname = QString( "Figure" ) + QString::number( numfig ); - item = addItemInfo( group_contents, sectname, i18n( "Figure" ), QVariant::String ); + sectname = TQString( "Figure" ) + TQString::number( numfig ); + item = addItemInfo( group_contents, sectname, i18n( "Figure" ), TQVariant::String ); appendItem( metagroup, sectname, e.attribute( "name" ) ); } else if ( e.tagName() == "text" ) { numtext++; - sectname = QString( "Text" ) + QString::number( numtext ); - item = addItemInfo( group_contents, sectname, i18n( "Text" ), QVariant::String ); + sectname = TQString( "Text" ) + TQString::number( numtext ); + item = addItemInfo( group_contents, sectname, i18n( "Text" ), TQVariant::String ); appendItem( metagroup, sectname, e.attribute( "name" ) ); } else if ( e.tagName() == "macro" ) { nummacro++; - sectname = QString( "Macro" ) + QString::number( nummacro ); - item = addItemInfo( group_contents, sectname, i18n( "Macro" ), QVariant::String ); + sectname = TQString( "Macro" ) + TQString::number( nummacro ); + item = addItemInfo( group_contents, sectname, i18n( "Macro" ), TQVariant::String ); appendItem( metagroup, sectname, e.attribute( "name" ) ); } } diff --git a/kig/kfile/kfile_drgeo.h b/kig/kfile/kfile_drgeo.h index b6e388da..e2c5d156 100644 --- a/kig/kfile/kfile_drgeo.h +++ b/kig/kfile/kfile_drgeo.h @@ -30,7 +30,7 @@ class DrgeoPlugin: public KFilePlugin Q_OBJECT public: - DrgeoPlugin( QObject *parent, const char *name, const QStringList& args ); + DrgeoPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& metainfo, uint what); protected: diff --git a/kig/kfile/kfile_kig.cpp b/kig/kfile/kfile_kig.cpp index eca2f79d..bd54a036 100644 --- a/kig/kfile/kfile_kig.cpp +++ b/kig/kfile/kfile_kig.cpp @@ -20,9 +20,9 @@ #include "kfile_kig.h" -#include -#include -#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ typedef KGenericFactory kigFactory; K_EXPORT_COMPONENT_FACTORY( kfile_kig, kigFactory( "kfile_kig" ) ) -KigPlugin::KigPlugin( QObject *parent, const char *name, const QStringList &args ) +KigPlugin::KigPlugin( TQObject *parent, const char *name, const TQStringList &args ) : KFilePlugin( parent, name, args ) { KFileMimeTypeInfo::ItemInfo* item; @@ -43,33 +43,33 @@ KigPlugin::KigPlugin( QObject *parent, const char *name, const QStringList &args info = addMimeTypeInfo( "application/x-kig" ); group = addGroupInfo( info, "KigInfo", i18n( "Summary" ) ); - item = addItemInfo( group, "Version", i18n( "Version" ), QVariant::String ); - item = addItemInfo( group, "CompatVersion", i18n( "Compatibility Version" ), QVariant::String ); - item = addItemInfo( group, "CoordSystem", i18n( "Coordinate System" ), QVariant::String ); - item = addItemInfo( group, "Grid", i18n( "Grid" ), QVariant::String ); - item = addItemInfo( group, "Axes", i18n( "Axes" ), QVariant::String ); - item = addItemInfo( group, "Compressed", i18n( "Compressed" ), QVariant::String ); + item = addItemInfo( group, "Version", i18n( "Version" ), TQVariant::String ); + item = addItemInfo( group, "CompatVersion", i18n( "Compatibility Version" ), TQVariant::String ); + item = addItemInfo( group, "CoordSystem", i18n( "Coordinate System" ), TQVariant::String ); + item = addItemInfo( group, "Grid", i18n( "Grid" ), TQVariant::String ); + item = addItemInfo( group, "Axes", i18n( "Axes" ), TQVariant::String ); + item = addItemInfo( group, "Compressed", i18n( "Compressed" ), TQVariant::String ); } bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) { KFileMetaInfoGroup metagroup = appendGroup( metainfo, "KigInfo"); - QString sfile = metainfo.path(); + TQString sfile = metainfo.path(); bool iscompressed = false; - QFile f( sfile ); + TQFile f( sfile ); if ( !sfile.endsWith( ".kig", false ) ) { iscompressed = true; - QString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); + TQString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); if ( tempdir.isEmpty() ) return false; - QString tempname = sfile.section( '/', -1 ); + TQString tempname = sfile.section( '/', -1 ); if ( sfile.endsWith( ".kigz", false ) ) { - tempname.remove( QRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); + tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); } else return false; @@ -77,8 +77,8 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) KTar* ark = new KTar( sfile, "application/x-gzip" ); ark->open( IO_ReadOnly ); const KArchiveDirectory* dir = ark->directory(); - QStringList entries = dir->entries(); - QStringList kigfiles = entries.grep( QRegExp( "\\.kig$" ) ); + TQStringList entries = dir->entries(); + TQStringList kigfiles = entries.grep( TQRegExp( "\\.kig$" ) ); if ( kigfiles.count() != 1 ) return false; const KArchiveEntry* kigz = dir->entry( kigfiles[0] ); @@ -92,7 +92,7 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) if ( !f.open( IO_ReadOnly ) ) return false; - QDomDocument doc( "KigDocument" ); + TQDomDocument doc( "KigDocument" ); if ( !doc.setContent( &f ) ) return false; @@ -102,26 +102,26 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) if ( iscompressed ) f.remove(); - QDomElement main = doc.documentElement(); + TQDomElement main = doc.documentElement(); // reading the version... - QString version = main.attribute( "Version" ); + TQString version = main.attribute( "Version" ); if ( version.isEmpty() ) version = main.attribute( "version" ); if ( version.isEmpty() ) version = i18n( "Translators: Not Available", "n/a" ); appendItem( metagroup, "Version", version ); // reading the compatibility version... - QString compatversion = main.attribute( "CompatibilityVersion" ); + TQString compatversion = main.attribute( "CompatibilityVersion" ); if ( compatversion.isEmpty() ) compatversion = i18n( "%1 represents Kig version", "%1 (as the version)" ).arg( version ); appendItem( metagroup, "CompatVersion", compatversion ); // reading the Coordinate System... - QCString coordsystem; - for ( QDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) + TQCString coordsystem; + for ( TQDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() ) continue; if ( e.tagName() == "CoordinateSystem" ) coordsystem = e.text().latin1(); @@ -130,10 +130,10 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) // has Kig document the grid? bool btmp = true; - QString stmp = main.attribute( "grid" ); + TQString stmp = main.attribute( "grid" ); if ( !( stmp.isEmpty() || ( stmp != "0" ) ) ) btmp = ( stmp != "0" ); - QString stmp2 = btmp ? i18n( "Yes" ) : i18n( "No" ); + TQString stmp2 = btmp ? i18n( "Yes" ) : i18n( "No" ); appendItem( metagroup, "Grid", stmp2 ); // has Kig document the axes? diff --git a/kig/kfile/kfile_kig.h b/kig/kfile/kfile_kig.h index 8580ec48..8abacaaf 100644 --- a/kig/kfile/kfile_kig.h +++ b/kig/kfile/kfile_kig.h @@ -30,7 +30,7 @@ class KigPlugin: public KFilePlugin Q_OBJECT public: - KigPlugin( QObject *parent, const char *name, const QStringList& args ); + KigPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& metainfo, uint what); protected: -- cgit v1.2.1