diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-29 00:55:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-29 00:55:34 +0000 |
commit | c4189d200e71c7ef82e9a6e34935ad225154d658 (patch) | |
tree | f7f29a1159e0402472ff2ab22617a8113f66263c /fileplugin/kfile_kbarcode.cpp | |
parent | 2f888b1578e65ec1bc514996eb509fcaf34462d6 (diff) | |
download | kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.tar.gz kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.zip |
TQt4 port kbarcode
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1233956 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'fileplugin/kfile_kbarcode.cpp')
-rw-r--r-- | fileplugin/kfile_kbarcode.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fileplugin/kfile_kbarcode.cpp b/fileplugin/kfile_kbarcode.cpp index bd2c1c8..465cae7 100644 --- a/fileplugin/kfile_kbarcode.cpp +++ b/fileplugin/kfile_kbarcode.cpp @@ -7,15 +7,15 @@ #include <kgenericfactory.h> #include <klocale.h> -#include <qfile.h> -#include <qdom.h> +#include <tqfile.h> +#include <tqdom.h> K_EXPORT_COMPONENT_FACTORY(kfile_kbarcode, KGenericFactory<KBarcodePlugin>( "kfile_kbarcode" )); -KBarcodePlugin::KBarcodePlugin(QObject *parent, const char *name, - const QStringList &args) +KBarcodePlugin::KBarcodePlugin(TQObject *tqparent, const char *name, + const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "application/kbarcode-label" ); @@ -25,11 +25,11 @@ KBarcodePlugin::KBarcodePlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Manufacturer", i18n("Manufacturer"), QVariant::String ); - item = addItemInfo(group, "Type", i18n("Type"), QVariant::String); - item = addItemInfo(group, "Description", i18n("Description"), QVariant::String ); - item = addItemInfo(group, "Id", i18n("Label Id"), QVariant::String ); - item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size); + item = addItemInfo(group, "Manufacturer", i18n("Manufacturer"), TQVariant::String ); + item = addItemInfo(group, "Type", i18n("Type"), TQVariant::String); + item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String ); + item = addItemInfo(group, "Id", i18n("Label Id"), TQVariant::String ); + item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size); setHint( item, KFileMimeTypeInfo::Size ); setUnit(item, KFileMimeTypeInfo::Centimeters ); } @@ -37,11 +37,11 @@ KBarcodePlugin::KBarcodePlugin(QObject *parent, const char *name, bool KBarcodePlugin::readInfo( KFileMetaInfo& info, uint ) { - QFile f( info.path() ); + TQFile f( info.path() ); if ( !f.open( IO_ReadOnly ) ) return false; - QDomDocument doc( "KBarcodeLabel" ); + TQDomDocument doc( "KBarcodeLabel" ); if ( !doc.setContent( &f ) ) { f.close(); return false; @@ -49,14 +49,14 @@ bool KBarcodePlugin::readInfo( KFileMetaInfo& info, uint ) KFileMetaInfoGroup group = appendGroup(info, "Label"); - QDomNode n = doc.documentElement().firstChild(); + TQDomNode n = doc.documentElement().firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); // try to convert the node to an element. + TQDomElement e = n.toElement(); // try to convert the node to an element. if( !e.isNull() ) if( e.tagName() == "label" ) { - QDomNode node = e.firstChild(); + TQDomNode node = e.firstChild(); while( !node.isNull() ) { - QDomElement e = node.toElement(); // try to convert the node to an element. + TQDomElement e = node.toElement(); // try to convert the node to an element. if( !e.isNull() ) if( e.tagName() == "description" ) appendItem(group, "Description", e.text() ); @@ -65,7 +65,7 @@ bool KBarcodePlugin::readInfo( KFileMetaInfo& info, uint ) appendItem(group, "Type", e.attribute("type", "") ); appendItem(group, "Id", e.text() ); appendItem(group, "Dimensions", - QSize( int(e.attribute("width", "0").toDouble()/10), int(e.attribute("height", "0").toDouble()/10) ) ); + TQSize( int(e.attribute("width", "0").toDouble()/10), int(e.attribute("height", "0").toDouble()/10) ) ); } node = node.nextSibling(); |