summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/ogg/kfile_ogg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kfile-plugins/ogg/kfile_ogg.cpp')
-rw-r--r--kfile-plugins/ogg/kfile_ogg.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/kfile-plugins/ogg/kfile_ogg.cpp b/kfile-plugins/ogg/kfile_ogg.cpp
index 0f131154..dc4a8f3e 100644
--- a/kfile-plugins/ogg/kfile_ogg.cpp
+++ b/kfile-plugins/ogg/kfile_ogg.cpp
@@ -21,12 +21,12 @@
#include "kfile_ogg.h"
#include "vcedit.h"
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qfileinfo.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kurl.h>
@@ -61,8 +61,8 @@ static const char* const knownTranslations[] = {
K_EXPORT_COMPONENT_FACTORY(kfile_ogg, KGenericFactory<KOggPlugin>("kfile_ogg"))
-KOggPlugin::KOggPlugin( QObject *parent, const char *name,
- const QStringList &args )
+KOggPlugin::KOggPlugin( TQObject *parent, const char *name,
+ const TQStringList &args )
: KFilePlugin( parent, name, args )
{
kdDebug(7034) << "ogg plugin\n";
@@ -78,40 +78,40 @@ KOggPlugin::KOggPlugin( QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item = 0;
- item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String);
+ item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Author);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Title", i18n("Title"), QVariant::String);
+ item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Name);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Album", i18n("Album"), QVariant::String);
+ item = addItemInfo(group, "Album", i18n("Album"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Genre", i18n("Genre"), QVariant::String);
+ item = addItemInfo(group, "Genre", i18n("Genre"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Tracknumber", i18n("Track Number"), QVariant::String);
+ item = addItemInfo(group, "Tracknumber", i18n("Track Number"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Date", i18n("Date"), QVariant::String);
+ item = addItemInfo(group, "Date", i18n("Date"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Description", i18n("Description"), QVariant::String);
+ item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Organization", i18n("Organization"), QVariant::String);
+ item = addItemInfo(group, "Organization", i18n("Organization"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Location", i18n("Location"), QVariant::String);
+ item = addItemInfo(group, "Location", i18n("Location"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::String);
+ item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
- addVariableInfo(group, QVariant::String, KFileMimeTypeInfo::Addable |
+ addVariableInfo(group, TQVariant::String, KFileMimeTypeInfo::Addable |
KFileMimeTypeInfo::Removable |
KFileMimeTypeInfo::Modifiable);
@@ -120,31 +120,31 @@ KOggPlugin::KOggPlugin( QObject *parent, const char *name,
group = addGroupInfo(info, "Technical", i18n("Technical Details"));
setAttributes(group, 0);
- addItemInfo(group, "Version", i18n("Version"), QVariant::Int);
- addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int);
+ addItemInfo(group, "Version", i18n("Version"), TQVariant::Int);
+ addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int);
- item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int);
+ item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int);
setSuffix(item, i18n(" Hz"));
item = addItemInfo(group, "UpperBitrate", i18n("Upper Bitrate"),
- QVariant::Int);
+ TQVariant::Int);
setSuffix(item, i18n(" kbps"));
item = addItemInfo(group, "LowerBitrate", i18n("Lower Bitrate"),
- QVariant::Int);
+ TQVariant::Int);
setSuffix(item, i18n(" kbps"));
item = addItemInfo(group, "NominalBitrate", i18n("Nominal Bitrate"),
- QVariant::Int);
+ TQVariant::Int);
setSuffix(item, i18n(" kbps"));
item = addItemInfo(group, "Bitrate", i18n("Average Bitrate"),
- QVariant::Int);
+ TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
setHint(item, KFileMimeTypeInfo::Bitrate);
setSuffix(item, i18n( " kbps"));
- item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int);
+ item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Cummulative);
setUnit(item, KFileMimeTypeInfo::Seconds);
}
@@ -173,10 +173,10 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what )
if ( info.path().isEmpty() ) // remote file
return false;
- fp = fopen(QFile::encodeName(info.path()),"rb");
+ fp = fopen(TQFile::encodeName(info.path()),"rb");
if (!fp)
{
- kdDebug(7034) << "Unable to open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Unable to open " << TQFile::encodeName(info.path()) << endl;
return false;
}
@@ -184,13 +184,13 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what )
if (rc < 0)
{
- kdDebug(7034) << "Unable to understand " << QFile::encodeName(info.path())
+ kdDebug(7034) << "Unable to understand " << TQFile::encodeName(info.path())
<< ", errorcode=" << rc << endl;
return false;
}
// info.insert(KFileMetaInfoItem("Vendor", i18n("Vendor"),
-// QVariant(QString(vi->vendor))));
+// TQVariant(TQString(vi->vendor))));
// get the vorbis comments
if (readComment)
@@ -202,7 +202,7 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what )
for (i=0; i < vc->comments; i++)
{
kdDebug(7034) << vc->user_comments[i] << endl;
- QStringList split = QStringList::split("=", QString::fromUtf8(vc->user_comments[i]));
+ TQStringList split = TQStringList::split("=", TQString::fromUtf8(vc->user_comments[i]));
split[0] = split[0].lower();
split[0][0] = split[0][0].upper();
@@ -252,7 +252,7 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const
// todo: add writing support
FILE* infile;
- infile = fopen(QFile::encodeName(info.path()), "r");
+ infile = fopen(TQFile::encodeName(info.path()), "r");
if (!infile)
{
@@ -284,19 +284,19 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const
KFileMetaInfoGroup group = info["Comment"];
- QStringList keys = group.keys();
- QStringList::Iterator it;
+ TQStringList keys = group.keys();
+ TQStringList::Iterator it;
for (it = keys.begin(); it!=keys.end(); ++it)
{
KFileMetaInfoItem item = group[*it];
- if (!item.isEditable() || !(item.type()==QVariant::String) )
+ if (!item.isEditable() || !(item.type()==TQVariant::String) )
continue;
- QCString key = item.key().upper().utf8();
- if (item.value().canCast(QVariant::String))
+ TQCString key = item.key().upper().utf8();
+ if (item.value().canCast(TQVariant::String))
{
- QCString value = item.value().toString().utf8();
+ TQCString value = item.value().toString().utf8();
kdDebug(7034) << " writing tag " << key << "=" << value << endl;
@@ -309,9 +309,9 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const
}
- QString filename;
+ TQString filename;
- QFileInfo fileinfo(info.path());
+ TQFileInfo fileinfo(info.path());
// follow symlinks
if (fileinfo.isSymLink())
@@ -321,7 +321,7 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const
// nothing in Qt or KDE to get the mode as an int?
struct stat s;
- stat(QFile::encodeName(filename), &s);
+ stat(TQFile::encodeName(filename), &s);
KSaveFile sf(filename, s.st_mode);
FILE* outfile = sf.fstream();
@@ -348,10 +348,10 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const
return true;
}
-QValidator* KOggPlugin::createValidator( const QString&,
- const QString &, const QString &,
- QObject* parent, const char* name) const {
- return new QRegExpValidator(QRegExp(".*"), parent, name);
+TQValidator* KOggPlugin::createValidator( const TQString&,
+ const TQString &, const TQString &,
+ TQObject* parent, const char* name) const {
+ return new TQRegExpValidator(TQRegExp(".*"), parent, name);
}
#include "kfile_ogg.moc"