summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cddb.cpp162
-rwxr-xr-xsrc/cddb.h55
-rwxr-xr-xsrc/cdmanager.cpp42
-rwxr-xr-xsrc/cdmanager.h25
-rwxr-xr-xsrc/cdopener.cpp272
-rwxr-xr-xsrc/cdopener.h35
-rwxr-xr-xsrc/combobutton.cpp46
-rwxr-xr-xsrc/combobutton.h25
-rwxr-xr-xsrc/config.cpp444
-rwxr-xr-xsrc/config.h125
-rwxr-xr-xsrc/configbackendspage.cpp250
-rwxr-xr-xsrc/configbackendspage.h45
-rwxr-xr-xsrc/configdialog.cpp78
-rwxr-xr-xsrc/configdialog.h17
-rwxr-xr-xsrc/configenvironmentpage.cpp98
-rwxr-xr-xsrc/configenvironmentpage.h5
-rwxr-xr-xsrc/configgeneralpage.cpp178
-rwxr-xr-xsrc/configgeneralpage.h23
-rwxr-xr-xsrc/configpagebase.cpp4
-rwxr-xr-xsrc/configpagebase.h7
-rwxr-xr-xsrc/configpluginspage.cpp346
-rwxr-xr-xsrc/configpluginspage.h9
-rwxr-xr-xsrc/conversionoptions.h18
-rwxr-xr-xsrc/convert.cpp476
-rwxr-xr-xsrc/convert.h29
-rwxr-xr-xsrc/cuesheeteditor.cpp110
-rwxr-xr-xsrc/cuesheeteditor.h5
-rwxr-xr-xsrc/dcopinterface.h14
-rwxr-xr-xsrc/dirdialog.cpp62
-rwxr-xr-xsrc/dirdialog.h11
-rwxr-xr-xsrc/filelist.cpp398
-rwxr-xr-xsrc/filelist.h73
-rwxr-xr-xsrc/logger.cpp34
-rwxr-xr-xsrc/logger.h31
-rwxr-xr-xsrc/logviewer.cpp104
-rwxr-xr-xsrc/logviewer.h18
-rwxr-xr-xsrc/main.cpp2
-rw-r--r--src/metadata/asf/asfattribute.cpp8
-rw-r--r--src/metadata/asf/asfattribute.h6
-rw-r--r--src/metadata/asf/asffile.cpp8
-rw-r--r--src/metadata/asf/asffile.h2
-rw-r--r--src/metadata/m4a/mp4file.h2
-rw-r--r--src/metadata/m4a/mp4mvhdbox.cpp2
-rw-r--r--src/metadata/m4a/mp4mvhdbox.h2
-rw-r--r--src/metadata/m4a/mp4propsproxy.h2
-rwxr-xr-xsrc/metadata/tagengine.cpp98
-rwxr-xr-xsrc/metadata/tagengine.h30
-rwxr-xr-xsrc/metadata/tplugins.cpp4
-rw-r--r--src/metadata/trueaudio/ttafile.h2
-rw-r--r--src/metadata/wavpack/wvfile.h2
-rwxr-xr-xsrc/options.cpp146
-rwxr-xr-xsrc/options.h21
-rwxr-xr-xsrc/optionsdetailed.cpp306
-rwxr-xr-xsrc/optionsdetailed.h69
-rwxr-xr-xsrc/optionseditor.cpp248
-rwxr-xr-xsrc/optionseditor.h45
-rwxr-xr-xsrc/optionsrequester.cpp38
-rwxr-xr-xsrc/optionsrequester.h15
-rwxr-xr-xsrc/optionssimple.cpp128
-rwxr-xr-xsrc/optionssimple.h41
-rwxr-xr-xsrc/outputdirectory.cpp308
-rwxr-xr-xsrc/outputdirectory.h31
-rwxr-xr-xsrc/paranoia.cpp52
-rwxr-xr-xsrc/paranoia.h8
-rwxr-xr-xsrc/pluginloader/convertpluginloader.cpp30
-rwxr-xr-xsrc/pluginloader/convertpluginloader.h113
-rwxr-xr-xsrc/pluginloader/formatinfoloader.cpp32
-rwxr-xr-xsrc/pluginloader/formatinfoloader.h23
-rwxr-xr-xsrc/pluginloader/pluginloaderbase.cpp4
-rwxr-xr-xsrc/pluginloader/pluginloaderbase.h19
-rwxr-xr-xsrc/pluginloader/replaygainpluginloader.cpp22
-rwxr-xr-xsrc/pluginloader/replaygainpluginloader.h43
-rwxr-xr-xsrc/pluginloader/ripperpluginloader.cpp20
-rwxr-xr-xsrc/pluginloader/ripperpluginloader.h33
-rwxr-xr-xsrc/progressindicator.cpp52
-rwxr-xr-xsrc/progressindicator.h25
-rwxr-xr-xsrc/replaygain.cpp32
-rwxr-xr-xsrc/replaygain.h11
-rwxr-xr-xsrc/replaygainfilelist.cpp380
-rwxr-xr-xsrc/replaygainfilelist.h71
-rwxr-xr-xsrc/replaygainscanner.cpp98
-rwxr-xr-xsrc/replaygainscanner.h17
-rwxr-xr-xsrc/soundkonverter.cpp238
-rwxr-xr-xsrc/soundkonverter.h27
-rwxr-xr-xsrc/soundkonverterapp.cpp38
-rwxr-xr-xsrc/soundkonverterapp.h1
86 files changed, 3332 insertions, 3297 deletions
diff --git a/src/cddb.cpp b/src/cddb.cpp
index 58ebde7..5129987 100755
--- a/src/cddb.cpp
+++ b/src/cddb.cpp
@@ -29,12 +29,12 @@
#endif
#include <errno.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-//#include <qapp.h>
-#include <qstring.h>
-// #include <qcursor.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+//#include <tqapp.h>
+#include <tqstring.h>
+// #include <tqcursor.h>
//#include <kdebug.h>
#include <ksock.h>
#include <kextsock.h>
@@ -49,7 +49,7 @@
CDDB::CDDB()
: ks(0), port(80), remote(false), save_local(false)
{
- QString s = QDir::homeDirPath()+"/.cddb";
+ TQString s = TQDir::homeDirPath()+"/.cddb";
cddb_dirs +=s;
}
@@ -86,7 +86,7 @@ CDDB::set_server(const char *hostname, unsigned short int _port)
h_name = hostname;
port = _port;
- QCString r;
+ TQCString r;
readLine(r); // the server greeting
writeLine("cddb hello kde-user blubb kio_audiocd 0.4");
readLine(r);
@@ -102,7 +102,7 @@ CDDB::deinit()
if (ks)
{
writeLine("quit");
- QCString r;
+ TQCString r;
readLine(r);
ks->close();
}
@@ -116,7 +116,7 @@ CDDB::deinit()
bool
-CDDB::readLine(QCString& ret)
+CDDB::readLine(TQCString& ret)
{
int read_length = 0;
char small_b[128];
@@ -126,7 +126,7 @@ CDDB::readLine(QCString& ret)
while (read_length < 40000)
{
// Look for a \n in buf
- int ni = buf.find('\n');
+ int ni = buf.tqfind('\n');
if (ni >= 0)
{
// Nice, so return this substring (without the \n),
@@ -157,7 +157,7 @@ CDDB::readLine(QCString& ret)
bool
-CDDB::writeLine(const QCString& line)
+CDDB::writeLine(const TQCString& line)
{
const char *b = line.data();
int l = line.length();
@@ -189,7 +189,7 @@ CDDB::writeLine(const QCString& line)
unsigned int
-CDDB::get_discid(QValueList<int>& track_ofs)
+CDDB::get_discid(TQValueList<int>& track_ofs)
{
unsigned int id = 0;
int num_tracks = track_ofs.count() - 2;
@@ -216,7 +216,7 @@ CDDB::get_discid(QValueList<int>& track_ofs)
static int
-get_code (const QCString &s)
+get_code (const TQCString &s)
{
bool ok;
int code = s.left(3).toInt(&ok);
@@ -228,17 +228,17 @@ get_code (const QCString &s)
static void
-parse_query_resp (const QCString& _r, QCString& catg, QCString& d_id, QCString& title)
+parse_query_resp (const TQCString& _r, TQCString& catg, TQCString& d_id, TQCString& title)
{
- QCString r = _r.stripWhiteSpace();
- int i = r.find(' ');
+ TQCString r = _r.stripWhiteSpace();
+ int i = r.tqfind(' ');
if (i)
{
catg = r.left(i).stripWhiteSpace();
r.remove(0, i+1);
r = r.stripWhiteSpace();
}
- i = r.find(' ');
+ i = r.tqfind(' ');
if (i)
{
d_id = r.left(i).stripWhiteSpace();
@@ -250,32 +250,32 @@ parse_query_resp (const QCString& _r, QCString& catg, QCString& d_id, QCString&
-QString
+TQString
CDDB::track(int i) const
{
if (i < 0 || i >= int(m_names.count()))
- return QString();
+ return TQString();
return m_names[i].utf8();
}
-QString
+TQString
CDDB::artist(int i) const
{
if (i < 0 || i >= int(m_artists.count()))
- return QString();
+ return TQString();
return m_artists[i].utf8();
}
bool
-CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream)
+CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream)
{
/* Note, that m_names and m_title should be empty */
- QCString end = ".";
+ TQCString end = ".";
m_disc = 0;
m_year = 0;
@@ -289,7 +289,7 @@ CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream)
}
while (1)
{
- QCString r;
+ TQCString r;
if (stream)
{
if (stream->atEnd())
@@ -313,12 +313,12 @@ CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream)
if (r.left(7) == "DTITLE=")
{
r.remove(0, 7);
- m_title += QString::fromLocal8Bit(r.stripWhiteSpace());
+ m_title += TQString::fromLocal8Bit(r.stripWhiteSpace());
}
else if (r.left(6) == "TTITLE")
{
r.remove(0, 6);
- int e = r.find('=');
+ int e = r.tqfind('=');
if (e)
{
bool ok;
@@ -326,28 +326,28 @@ CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream)
if (ok && i >= 0 && i < m_tracks)
{
r.remove(0, e+1);
- m_names[i] += QString::fromLocal8Bit(r);
+ m_names[i] += TQString::fromLocal8Bit(r);
}
}
}
else if (r.left(6) == "DYEAR=")
{
r.remove(0, 6);
- QString year = QString::fromLocal8Bit(r.stripWhiteSpace());
+ TQString year = TQString::fromLocal8Bit(r.stripWhiteSpace());
m_year = year.toInt();
- //kdDebug(7101) << "CDDB: found Year: " << QString().sprintf("%04i",m_year) << endl;
+ //kdDebug(7101) << "CDDB: found Year: " << TQString().sprintf("%04i",m_year) << endl;
}
else if (r.left(7) == "DGENRE=")
{
r.remove(0, 7);
- m_genre = QString::fromLocal8Bit(r.stripWhiteSpace());
+ m_genre = TQString::fromLocal8Bit(r.stripWhiteSpace());
//kdDebug(7101) << "CDDB: found Genre: " << m_genre << endl;
}
}
/* XXX We should canonicalize the strings ("\n" --> '\n' e.g.) */
- int si = m_title.find(" / ");
+ int si = m_title.tqfind(" / ");
if (si > 0)
{
m_artist = m_title.left(si).stripWhiteSpace();
@@ -355,10 +355,10 @@ CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream)
m_title = m_title.stripWhiteSpace();
}
- si = m_title.find(" - CD");
+ si = m_title.tqfind(" - CD");
if (si > 0)
{
- QString disc = m_title.right(m_title.length()-(si+5)).stripWhiteSpace();
+ TQString disc = m_title.right(m_title.length()-(si+5)).stripWhiteSpace();
m_disc = disc.toInt();
//kdDebug(7101) << "CDDB: found Disc: " << disc << endl;
m_title = m_title.left(si).stripWhiteSpace();
@@ -367,22 +367,22 @@ CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream)
if (m_title.isEmpty())
m_title = i18n("No Title");
/*else
- m_title.replace(QRegExp("/"), "%2f");*/
+ m_title.tqreplace(TQRegExp("/"), "%2f");*/
if (m_artist.isEmpty())
m_artist = i18n("Unknown");
/*else
- m_artist.replace(QRegExp("/"), "%2f");*/
+ m_artist.tqreplace(TQRegExp("/"), "%2f");*/
//kdDebug(7101) << "CDDB: found Title: `" << m_title << "'" << endl;
for (int i = 0; i < m_tracks; i++)
{
if (m_names[i].isEmpty())
- m_names[i] += i18n("Track %1").arg(i);
- //m_names[i].replace(QRegExp("/"), "%2f");
- si = m_names[i].find(" - ");
+ m_names[i] += i18n("Track %1").tqarg(i);
+ //m_names[i].tqreplace(TQRegExp("/"), "%2f");
+ si = m_names[i].tqfind(" - ");
if (si < 0)
{
- si = m_names[i].find(" / ");
+ si = m_names[i].tqfind(" / ");
}
if (si > 0)
{
@@ -402,9 +402,9 @@ CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream)
void
-CDDB::add_cddb_dirs(const QStringList& list)
+CDDB::add_cddb_dirs(const TQStringList& list)
{
- QString s = QDir::homeDirPath()+"/.cddb";
+ TQString s = TQDir::homeDirPath()+"/.cddb";
cddb_dirs = list;
if (cddb_dirs.isEmpty())
@@ -416,15 +416,15 @@ CDDB::add_cddb_dirs(const QStringList& list)
/* Locates and opens the local file corresponding to that discid.
Returns TRUE, if file is found and ready for reading.
Returns FALSE, if file isn't found. In this case ret_file is initialized
- with a QFile which resides in the first cddb_dir, and has a temp name
+ with a TQFile which resides in the first cddb_dir, and has a temp name
(the ID + getpid()). You can open it for writing. */
bool
-CDDB::searchLocal(unsigned int id, QFile *ret_file)
+CDDB::searchLocal(unsigned int id, TQFile *ret_file)
{
- QDir dir;
- QString filename;
- filename = QString("%1").arg(id, 0, 16).rightJustify(8, '0');
- QStringList::ConstIterator it;
+ TQDir dir;
+ TQString filename;
+ filename = TQString("%1").tqarg(id, 0, 16).rightJustify(8, '0');
+ TQStringList::ConstIterator it;
for (it = cddb_dirs.begin(); it != cddb_dirs.end(); ++it)
{
dir.setPath(*it);
@@ -436,9 +436,9 @@ CDDB::searchLocal(unsigned int id, QFile *ret_file)
return true;
/* And then in the subdirs of dir (representing the categories normally).
*/
- const QFileInfoList *subdirs = dir.entryInfoList (QDir::Dirs);
- QFileInfoListIterator fiit(*subdirs);
- QFileInfo *fi;
+ const TQFileInfoList *subdirs = dir.entryInfoList (TQDir::Dirs);
+ TQFileInfoListIterator fiit(*subdirs);
+ TQFileInfo *fi;
while ((fi = fiit.current()) != 0)
{
ret_file->setName (*it + "/" + fi->fileName() + "/" + filename);
@@ -447,14 +447,14 @@ CDDB::searchLocal(unsigned int id, QFile *ret_file)
++fiit;
}
}
- QString pid;
+ TQString pid;
pid.setNum(::getpid());
ret_file->setName (cddb_dirs[0] + "/" + filename + "." + pid);
/* Try to create the save location. */
dir.setPath(cddb_dirs[0]);
if (save_local && !dir.exists())
{
- //dir = QDir::current();
+ //dir = TQDir::current();
dir.mkdir(cddb_dirs[0]);
}
return false;
@@ -463,13 +463,13 @@ CDDB::searchLocal(unsigned int id, QFile *ret_file)
bool
-CDDB::queryCD(QValueList<int>& track_ofs)
+CDDB::queryCD(TQValueList<int>& track_ofs)
{
int num_tracks = track_ofs.count() - 2;
if (num_tracks < 1)
return false;
unsigned int id = get_discid(track_ofs);
- QFile file;
+ TQFile file;
bool local;
/* Already read this ID. */
@@ -477,7 +477,7 @@ CDDB::queryCD(QValueList<int>& track_ofs)
return true;
emit cddbMessage(i18n("Searching local cddb entry ..."));
- qApp->processEvents();
+ tqApp->processEvents();
/* First look for a local file. */
local = searchLocal (id, &file);
@@ -492,41 +492,41 @@ CDDB::queryCD(QValueList<int>& track_ofs)
m_discid = id;
if (local)
{
- QTextStream stream(&file);
+ TQTextStream stream(&file);
/* XXX Hmm, what encoding is used by CDDB files? local? Unicode?
Nothing? */
- //stream.setEncoding(QTextStream::Locale);
+ //stream.setEncoding(TQTextStream::Locale);
parse_read_resp(&stream, 0);
file.close();
return true;
}
emit cddbMessage(i18n("Searching remote cddb entry ..."));
- qApp->processEvents();
+ tqApp->processEvents();
/* Remote CDDB query. */
unsigned int length = track_ofs[num_tracks+1] - track_ofs[num_tracks];
- QCString q;
+ TQCString q;
q.sprintf("cddb query %08x %d", id, num_tracks);
- QCString num;
+ TQCString num;
for (int i = 0; i < num_tracks; i++)
q += " " + num.setNum(track_ofs[i]);
q += " " + num.setNum(length / 75);
if (!writeLine(q))
return false;
- QCString r;
+ TQCString r;
if (!readLine(r))
return false;
r = r.stripWhiteSpace();
int code = get_code(r);
if (code == 200)
{
- QCString catg, d_id, title;
- QDir dir;
- QCString s, pid;
+ TQCString catg, d_id, title;
+ TQDir dir;
+ TQCString s, pid;
emit cddbMessage(i18n("Found exact match cddb entry ..."));
- qApp->processEvents();
+ tqApp->processEvents();
/* an exact match */
r.remove(0, 3);
@@ -553,16 +553,16 @@ CDDB::queryCD(QValueList<int>& track_ofs)
if (save_local && file.open(IO_WriteOnly))
{
//kdDebug(7101) << "CDDB: file name to save =" << file.name() << endl;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
if (!parse_read_resp(0, &stream))
{
file.remove();
return false;
}
file.close();
- /*QString newname (file.name());
- newname.truncate(newname.findRev('.'));
- if (QDir::current().rename(file.name(), newname)) {
+ /*TQString newname (file.name());
+ newname.truncate(newname.tqfindRev('.'));
+ if (TQDir::current().rename(file.name(), newname)) {
//kdDebug(7101) << "CDDB: rename failed" << endl;
file.remove();
} */
@@ -574,16 +574,16 @@ CDDB::queryCD(QValueList<int>& track_ofs)
{
// Found some close matches. We'll read the query response and ask the user
// which one should be fetched from the server.
- QCString end = ".";
- QCString catg, d_id, title;
- QDir dir;
- QCString s, pid, first_match;
- QStringList disc_ids;
+ TQCString end = ".";
+ TQCString catg, d_id, title;
+ TQDir dir;
+ TQCString s, pid, first_match;
+ TQStringList disc_ids;
/* some close matches */
//XXX may be try to find marker based on r
emit cddbMessage(i18n("Found close cddb entry ..."));
- qApp->processEvents();
+ tqApp->processEvents();
int i=0;
while (1)
@@ -602,12 +602,12 @@ CDDB::queryCD(QValueList<int>& track_ofs)
bool ok = false;
// We don't want to be thinking too much, do we?
-// QApplication::restoreOverrideCursor();
+// TQApplication::restoreOverrideCursor();
// Oh, mylord, which match should I serve you?
- QString _answer = KInputDialog::getItem(i18n("CDDB Matches"), i18n("Several close CDDB entries found. Choose one:"),
+ TQString _answer = KInputDialog::getItem(i18n("CDDB Matches"), i18n("Several close CDDB entries found. Choose one:"),
disc_ids, 0, false, &ok );
- QCString answer = _answer.utf8();
+ TQCString answer = _answer.utf8();
if (ok){ // Get user selected match
parse_query_resp(answer, catg, d_id, title);
@@ -617,7 +617,7 @@ CDDB::queryCD(QValueList<int>& track_ofs)
}
// Now we can continue thinking...
-// QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
+// TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) );
/*kdDebug(7101) << "CDDB: found close CD: category=" << catg << " DiscId="
<< d_id << " Title=`" << title << "'" << endl;*/
@@ -644,7 +644,7 @@ CDDB::queryCD(QValueList<int>& track_ofs)
if (save_local && file.open(IO_WriteOnly))
{
//kdDebug(7101) << "CDDB: file name to save =" << file.name() << endl;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
if (!parse_read_resp(0, &stream))
{
file.remove();
diff --git a/src/cddb.h b/src/cddb.h
index 62c38a7..e201093 100755
--- a/src/cddb.h
+++ b/src/cddb.h
@@ -20,60 +20,61 @@
#ifndef CDDB_H
#define CDDB_H
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
-class QFile;
-class QTextStream;
+class TQFile;
+class TQTextStream;
class KExtendedSocket;
-class CDDB : public QObject
+class CDDB : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
CDDB();
~CDDB();
bool set_server(const char *hostname = 0, unsigned short int port = 0);
- void add_cddb_dirs(const QStringList& list);
+ void add_cddb_dirs(const TQStringList& list);
void save_cddb (bool save) { save_local = save; }
- unsigned int get_discid(QValueList<int>& track_ofs);
- bool queryCD(QValueList<int>& track_ofs);
- QString title() const { return m_title.utf8(); }
- QString artist(int i) const;
+ unsigned int get_discid(TQValueList<int>& track_ofs);
+ bool queryCD(TQValueList<int>& track_ofs);
+ TQString title() const { return m_title.utf8(); }
+ TQString artist(int i) const;
int trackCount() const { return m_tracks; }
- QString track(int i) const;
+ TQString track(int i) const;
int disc() const { return m_disc; }
- QString genre() const { return m_genre.utf8(); }
+ TQString genre() const { return m_genre.utf8(); }
int year() const { return m_year; }
private:
- bool readLine(QCString& s);
- bool writeLine(const QCString& s);
+ bool readLine(TQCString& s);
+ bool writeLine(const TQCString& s);
bool deinit();
- bool parse_read_resp(QTextStream*, QTextStream*);
- bool searchLocal(unsigned int id, QFile *ret_file);
+ bool parse_read_resp(TQTextStream*, TQTextStream*);
+ bool searchLocal(unsigned int id, TQFile *ret_file);
KExtendedSocket *ks;
- QCString h_name;
+ TQCString h_name;
unsigned short int port;
bool remote;
bool save_local;
- QStringList cddb_dirs;
- QCString buf;
+ TQStringList cddb_dirs;
+ TQCString buf;
unsigned int m_discid;
int m_tracks;
int m_disc;
int m_year;
- QString m_genre;
- QString m_title;
- QString m_artist;
- QStringList m_artists;
- QStringList m_names;
+ TQString m_genre;
+ TQString m_title;
+ TQString m_artist;
+ TQStringList m_artists;
+ TQStringList m_names;
signals:
- void cddbMessage( QString );
+ void cddbMessage( TQString );
};
#endif // CDDB_H
diff --git a/src/cdmanager.cpp b/src/cdmanager.cpp
index cd9dd27..758c7ee 100755
--- a/src/cdmanager.cpp
+++ b/src/cdmanager.cpp
@@ -4,8 +4,8 @@
#include "cddb.h"
#include "conversionoptions.h"
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -17,13 +17,13 @@
// TODO implement reading of cd data
-CDDevice::CDDevice( const QString& _device )
+CDDevice::CDDevice( const TQString& _device )
{
- QStringList s;
+ TQStringList s;
bool init = false;
- QValueList<int> qvl;
+ TQValueList<int> qvl;
int i;
- QStringList dcopList, devList;
+ TQStringList dcopList, devList;
bool ok = false;
tags.clear();
@@ -43,7 +43,7 @@ CDDevice::CDDevice( const QString& _device )
i += 13;
}
if( devList.count() > 1 ) {
- QString choice = KInputDialog::getItem( i18n("Audio CD"), i18n("Several audio CDs found. Choose one:"), devList, 0, false, &ok );
+ TQString choice = KInputDialog::getItem( i18n("Audio CD"), i18n("Several audio CDs found. Choose one:"), devList, 0, false, &ok );
if( ok ) s.append( choice );
else s.append( 0 ); // TODO if canceled, the cd opener should close, not use the first item
}
@@ -120,11 +120,11 @@ CDManager::~CDManager()
while( cdDevices.count() > 0 ) delete cdDevices.first();
}
-QString CDManager::newCDDevice( const QString& device )
+TQString CDManager::newCDDevice( const TQString& device )
{
CDDevice* cdDevice = new CDDevice( device );
- for( QValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
+ for( TQValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
if( (*it)->device = cdDevice->device ) {
cdDevices.remove( *it );
delete (*it);
@@ -136,22 +136,22 @@ QString CDManager::newCDDevice( const QString& device )
return cdDevice->device;
}
-QValueList<TagData*> CDManager::getTrackList( const QString& device )
+TQValueList<TagData*> CDManager::getTrackList( const TQString& device )
{
- for( QValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
+ for( TQValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
if( (*it)->device = device ) return (*it)->tags;
}
- QValueList<TagData*> list;
+ TQValueList<TagData*> list;
return list;
}
-TagData* CDManager::getTags( const QString& device, int track )
+TagData* CDManager::getTags( const TQString& device, int track )
{
- for( QValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
+ for( TQValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
if( (*it)->device = device ) {
if( track > 0 ) {
- QValueList<TagData*>::Iterator tag = (*it)->tags.at( track - 1 );
+ TQValueList<TagData*>::Iterator tag = (*it)->tags.at( track - 1 );
return (*tag);
}
else {
@@ -163,27 +163,27 @@ TagData* CDManager::getTags( const QString& device, int track )
return 0;
}
-int CDManager::getTrackCount( const QString& device )
+int CDManager::getTrackCount( const TQString& device )
{
- for( QValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
+ for( TQValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
if( (*it)->device = device ) return (*it)->trackCount;
}
return 0;
}
-int CDManager::getTimeCount( const QString& device )
+int CDManager::getTimeCount( const TQString& device )
{
- for( QValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
+ for( TQValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
if( (*it)->device = device ) return (*it)->timeCount;
}
return 0;
}
-void CDManager::setDiscTags( const QString& device, TagData* tags )
+void CDManager::setDiscTags( const TQString& device, TagData* tags )
{
- for( QValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
+ for( TQValueList<CDDevice*>::Iterator it = cdDevices.begin(); it != cdDevices.end(); ++it ) {
if( (*it)->device = device ) (*it)->discTags = tags;
}
}
diff --git a/src/cdmanager.h b/src/cdmanager.h
index 9af80c8..4cc8aa8 100755
--- a/src/cdmanager.h
+++ b/src/cdmanager.h
@@ -5,7 +5,7 @@
#include "tagengine.h"
-#include <qobject.h>
+#include <tqobject.h>
class ConversionOptions;
class Paranoia;
@@ -21,16 +21,16 @@ public:
/**
* Constructor
*/
- CDDevice( const QString& _device="" );
+ CDDevice( const TQString& _device="" );
/**
* Destructor
*/
virtual ~CDDevice();
- QString device;
+ TQString device;
Paranoia* para;
- QValueList<TagData*> tags;
+ TQValueList<TagData*> tags;
TagData* discTags;
int trackCount;
int timeCount;
@@ -41,9 +41,10 @@ public:
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class CDManager : public QObject
+class CDManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -59,36 +60,36 @@ public:
* Create a new CDDevice entry in cdDevices. Use @param device or auto search for an audio cd
* Return the used device (usefull, if auto searching was used)
*/
- QString newCDDevice( const QString& device="" );
+ TQString newCDDevice( const TQString& device="" );
/**
* Return a list of all tracks on the cd in drive @param device
*/
- QValueList<TagData*> getTrackList( const QString& device );
+ TQValueList<TagData*> getTrackList( const TQString& device );
/**
* Return the tags of the track @param track on the cd in drive @param device
*/
- TagData* getTags( const QString& device, int track );
+ TagData* getTags( const TQString& device, int track );
/**
* Set the tags of the cd in drive @param device
*/
- void setDiscTags( const QString& device, TagData* tags );
+ void setDiscTags( const TQString& device, TagData* tags );
/**
* Return the sum of all tracks of the cd in drive @param device
*/
- int getTrackCount( const QString& device );
+ int getTrackCount( const TQString& device );
/**
* Return the complete length of the cd in drive @param device
*/
- int getTimeCount( const QString& device );
+ int getTimeCount( const TQString& device );
private:
/** a list of all devices */
- QValueList<CDDevice*> cdDevices;
+ TQValueList<CDDevice*> cdDevices;
};
diff --git a/src/cdopener.cpp b/src/cdopener.cpp
index acabbc8..7737638 100755
--- a/src/cdopener.cpp
+++ b/src/cdopener.cpp
@@ -17,18 +17,18 @@
#include <kfiledialog.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qdatetime.h>
-#include <qcolor.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
+#include <tqdir.h>
+#include <tqfile.h>
// ### soundkonverter 0.4: implement cd info text
-CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngine, const QString& _device, QWidget* parent, const char* name, /*Mode default_mode, const QString& default_text,*/ bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngine, const TQString& _device, TQWidget* tqparent, const char* name, /*Mode default_mode, const TQString& default_text,*/ bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
cdManager = _cdManager;
tagEngine = _tagEngine;
@@ -42,37 +42,37 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
setIcon( iconLoader->loadIcon("cdaudio_unmount",KIcon::Small) );
// the grid for all widgets in the dialog
- QGridLayout* gridLayout = new QGridLayout( this, 1, 1, 11, 6, "gridLayout" );
+ TQGridLayout* gridLayout = new TQGridLayout( this, 1, 1, 11, 6, "gridLayout" );
// the grid for the artist and album input
- QGridLayout* topGridLayout = new QGridLayout( this, 1, 1, 0, 6, "topGridLayout" );
+ TQGridLayout* topGridLayout = new TQGridLayout( this, 1, 1, 0, 6, "topGridLayout" );
gridLayout->addLayout( topGridLayout, 0, 0 );
// set up the first row at the top
- QLabel* lArtistLabel = new QLabel( i18n("Artist:"), this, "lArtistLabel" );
+ TQLabel* lArtistLabel = new TQLabel( i18n("Artist:"), this, "lArtistLabel" );
topGridLayout->addWidget( lArtistLabel, 0, 0 );
cArtist = new KComboBox( true, this, "cArtist" );
topGridLayout->addWidget( cArtist, 0, 1 );
cArtist->setMinimumWidth( 200 );
cArtist->insertItem( i18n("Various Artists") );
cArtist->setCurrentText( "" );
- connect( cArtist, SIGNAL(textChanged(const QString&)),
- this, SLOT(artistChanged(const QString&))
+ connect( cArtist, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(artistChanged(const TQString&))
);
- // add a horizontal box layout for the composer
- QHBoxLayout* artistBox = new QHBoxLayout( -1, "artistBox" );
+ // add a horizontal box tqlayout for the composer
+ TQHBoxLayout* artistBox = new TQHBoxLayout( -1, "artistBox" );
topGridLayout->addLayout( artistBox, 0, 3 );
// and fill it up
- QLabel* lComposerLabel = new QLabel( i18n("Composer:"), this, "lComposerLabel" );
- lComposerLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ TQLabel* lComposerLabel = new TQLabel( i18n("Composer:"), this, "lComposerLabel" );
+ lComposerLabel->tqsetAlignment( TQt::AlignRight | TQt::AlignVCenter );
topGridLayout->addWidget( lComposerLabel, 0, 2 );
cComposer = new KComboBox( true, this, "cComposer" );
artistBox->addWidget( cComposer );
cComposer->insertItem( i18n("Various Composer") );
cComposer->setCurrentText( "" );
- //cComposer->setSizePolicy( QSizePolicy::Maximum );
- connect( cComposer, SIGNAL(textChanged(const QString&)),
- this, SLOT(composerChanged(const QString&))
+ //cComposer->tqsetSizePolicy( TQSizePolicy::Maximum );
+ connect( cComposer, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(composerChanged(const TQString&))
);
//artistBox->addStretch();
artistBox->addSpacing( 130 );
@@ -80,24 +80,24 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
// topGridLayout->addWidget( pCDDB, 0, 8 );
// set up the second row at the top
- QLabel* lAlbumLabel = new QLabel( i18n("Album:"), this, "lAlbumLabel" );
+ TQLabel* lAlbumLabel = new TQLabel( i18n("Album:"), this, "lAlbumLabel" );
topGridLayout->addWidget( lAlbumLabel, 1, 0 );
lAlbum = new KLineEdit( this, "lAlbum" );
topGridLayout->addWidget( lAlbum, 1, 1 );
- // add a horizontal box layout for the disc number, year and genre
- QHBoxLayout* albumBox = new QHBoxLayout( -1, "albumBox" );
+ // add a horizontal box tqlayout for the disc number, year and genre
+ TQHBoxLayout* albumBox = new TQHBoxLayout( -1, "albumBox" );
topGridLayout->addLayout( albumBox, 1, 3 );
// and fill it up
- QLabel* lDiscLabel = new QLabel( i18n("Disc No.:"), this, "lDiscLabel" );
- lDiscLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ TQLabel* lDiscLabel = new TQLabel( i18n("Disc No.:"), this, "lDiscLabel" );
+ lDiscLabel->tqsetAlignment( TQt::AlignRight | TQt::AlignVCenter );
topGridLayout->addWidget( lDiscLabel, 1, 2 );
iDisc = new KIntSpinBox( 1, 99, 1, 1, 10, this, "iDisc" );
albumBox->addWidget( iDisc );
- QLabel* lYearLabel = new QLabel( i18n("Year:"), this, "lYearLabel" );
+ TQLabel* lYearLabel = new TQLabel( i18n("Year:"), this, "lYearLabel" );
albumBox->addWidget( lYearLabel );
- iYear = new KIntSpinBox( 0, 99999, 1, QDate::currentDate().year(), 10, this, "iYear" );
+ iYear = new KIntSpinBox( 0, 99999, 1, TQDate::tqcurrentDate().year(), 10, this, "iYear" );
albumBox->addWidget( iYear );
- QLabel* lGenreLabel = new QLabel( i18n("Genre:"), this, "lGenreLabel" );
+ TQLabel* lGenreLabel = new TQLabel( i18n("Genre:"), this, "lGenreLabel" );
albumBox->addWidget( lGenreLabel );
cGenre = new KComboBox( true, this, "cGenre" );
cGenre->insertStringList( tagEngine->genreList );
@@ -116,133 +116,133 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
trackList->addColumn( i18n("Composer"), 0 );
trackList->addColumn( i18n("Title") );
trackList->addColumn( i18n("Time") );
- trackList->setSelectionMode( QListView::Extended );
+ trackList->setSelectionMode( TQListView::Extended );
trackList->setAllColumnsShowFocus( true );
- trackList->setResizeMode( QListView::LastColumn );
- connect( trackList, SIGNAL(selectionChanged()),
- this, SLOT(trackChanged())
+ trackList->setResizeMode( TQListView::LastColumn );
+ connect( trackList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(trackChanged())
);
- connect( trackList, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- this, SLOT(addClicked())
+ connect( trackList, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ this, TQT_SLOT(addClicked())
);
gridLayout->setRowStretch( 1, 1 );
// create the box at the bottom for editing the tags
- tagGroupBox = new QGroupBox( i18n("No track selected"), this, "tagGroupBox" );
+ tagGroupBox = new TQGroupBox( i18n("No track selected"), this, "tagGroupBox" );
gridLayout->addWidget( tagGroupBox, 2, 0 );
tagGroupBox->setColumnLayout( 0, Qt::Vertical );
- tagGroupBox->layout()->setSpacing( 6 );
- tagGroupBox->layout()->setMargin( 6 );
- QGridLayout* tagGridLayout = new QGridLayout( tagGroupBox->layout(), 1, 1, -1, "tagGridLayout" );
+ tagGroupBox->tqlayout()->setSpacing( 6 );
+ tagGroupBox->tqlayout()->setMargin( 6 );
+ TQGridLayout* tagGridLayout = new TQGridLayout( tagGroupBox->tqlayout(), 1, 1, -1, "tagGridLayout" );
// add the up and down buttons
pTrackUp = new KPushButton( " ", tagGroupBox, "pTrackUp" );
pTrackUp->setPixmap( iconLoader->loadIcon("up",KIcon::Toolbar) );
pTrackUp->setAutoRepeat( true );
- connect( pTrackUp, SIGNAL(clicked()),
- this, SLOT(trackUpPressed())
+ connect( pTrackUp, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(trackUpPressed())
);
tagGridLayout->addWidget( pTrackUp, 0, 0 );
pTrackDown = new KPushButton( " ", tagGroupBox, "pTrackDown" );
pTrackDown->setPixmap( iconLoader->loadIcon("down",KIcon::Toolbar) );
pTrackDown->setAutoRepeat( true );
- connect( pTrackDown, SIGNAL(clicked()),
- this, SLOT(trackDownPressed())
+ connect( pTrackDown, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(trackDownPressed())
);
tagGridLayout->addWidget( pTrackDown, 1, 0 );
// add the inputs
- // add a horizontal box layout for the title
- QHBoxLayout* trackTitleBox = new QHBoxLayout( -1, "trackTitleBox" );
+ // add a horizontal box tqlayout for the title
+ TQHBoxLayout* trackTitleBox = new TQHBoxLayout( -1, "trackTitleBox" );
tagGridLayout->addLayout( trackTitleBox, 0, 2 );
// and fill it up
- QLabel *lTrackTitleLabel = new QLabel( i18n("Title:"), tagGroupBox, "lTrackTitleLabel" );
+ TQLabel *lTrackTitleLabel = new TQLabel( i18n("Title:"), tagGroupBox, "lTrackTitleLabel" );
tagGridLayout->addWidget( lTrackTitleLabel, 0, 1 );
lTrackTitle = new KLineEdit( tagGroupBox, "lTrackTitle" );
trackTitleBox->addWidget( lTrackTitle );
- connect( lTrackTitle, SIGNAL(textChanged(const QString&)),
- this, SLOT(trackTitleChanged(const QString&))
+ connect( lTrackTitle, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(trackTitleChanged(const TQString&))
);
pTrackTitleEdit = new KPushButton( " ", tagGroupBox, "pTrackTitleEdit" );
pTrackTitleEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackTitleEdit->setFixedSize( lTrackTitle->sizeHint().height(), lTrackTitle->sizeHint().height() );
+ pTrackTitleEdit->setFixedSize( lTrackTitle->tqsizeHint().height(), lTrackTitle->tqsizeHint().height() );
pTrackTitleEdit->hide();
trackTitleBox->addWidget( pTrackTitleEdit );
- connect( pTrackTitleEdit, SIGNAL(clicked()),
- this, SLOT(editTrackTitleClicked())
+ connect( pTrackTitleEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackTitleClicked())
);
- // add a horizontal box layout for the composer
- QHBoxLayout* trackArtistBox = new QHBoxLayout( -1, "trackArtistBox" );
+ // add a horizontal box tqlayout for the composer
+ TQHBoxLayout* trackArtistBox = new TQHBoxLayout( -1, "trackArtistBox" );
tagGridLayout->addLayout( trackArtistBox, 1, 2 );
// and fill it up
- QLabel* lTrackArtistLabel = new QLabel( i18n("Artist:"), tagGroupBox, "lTrackArtistLabel" );
+ TQLabel* lTrackArtistLabel = new TQLabel( i18n("Artist:"), tagGroupBox, "lTrackArtistLabel" );
tagGridLayout->addWidget( lTrackArtistLabel, 1, 1 );
lTrackArtist = new KLineEdit( tagGroupBox, "lTrackArtist" );
trackArtistBox->addWidget( lTrackArtist );
- connect( lTrackArtist, SIGNAL(textChanged(const QString&)),
- this, SLOT(trackArtistChanged(const QString&))
+ connect( lTrackArtist, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(trackArtistChanged(const TQString&))
);
pTrackArtistEdit = new KPushButton( " ", tagGroupBox, "pTrackArtistEdit" );
pTrackArtistEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackArtistEdit->setFixedSize( lTrackArtist->sizeHint().height(), lTrackArtist->sizeHint().height() );
+ pTrackArtistEdit->setFixedSize( lTrackArtist->tqsizeHint().height(), lTrackArtist->tqsizeHint().height() );
pTrackArtistEdit->hide();
trackArtistBox->addWidget( pTrackArtistEdit );
- connect( pTrackArtistEdit, SIGNAL(clicked()),
- this, SLOT(editTrackArtistClicked())
+ connect( pTrackArtistEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackArtistClicked())
);
- QLabel* lTrackComposerLabel = new QLabel( i18n("Composer:"), tagGroupBox, "lTrackComposerLabel" );
+ TQLabel* lTrackComposerLabel = new TQLabel( i18n("Composer:"), tagGroupBox, "lTrackComposerLabel" );
trackArtistBox->addWidget( lTrackComposerLabel );
lTrackComposer = new KLineEdit( tagGroupBox, "lTrackComposer" );
trackArtistBox->addWidget( lTrackComposer );
- connect( lTrackComposer, SIGNAL(textChanged(const QString&)),
- this, SLOT(trackComposerChanged(const QString&))
+ connect( lTrackComposer, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(trackComposerChanged(const TQString&))
);
pTrackComposerEdit = new KPushButton( " ", tagGroupBox, "pTrackComposerEdit" );
pTrackComposerEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackComposerEdit->setFixedSize( lTrackComposer->sizeHint().height(), lTrackComposer->sizeHint().height() );
+ pTrackComposerEdit->setFixedSize( lTrackComposer->tqsizeHint().height(), lTrackComposer->tqsizeHint().height() );
pTrackComposerEdit->hide();
trackArtistBox->addWidget( pTrackComposerEdit );
- connect( pTrackComposerEdit, SIGNAL(clicked()),
- this, SLOT(editTrackComposerClicked())
+ connect( pTrackComposerEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackComposerClicked())
);
- // add a horizontal box layout for the comment
- QHBoxLayout* trackCommentBox = new QHBoxLayout( -1, "trackCommentBox" );
+ // add a horizontal box tqlayout for the comment
+ TQHBoxLayout* trackCommentBox = new TQHBoxLayout( -1, "trackCommentBox" );
tagGridLayout->addLayout( trackCommentBox, 2, 2 );
// and fill it up
- QLabel* lTrackCommentLabel = new QLabel( i18n("Comment:"), tagGroupBox, "lTrackCommentLabel" );
+ TQLabel* lTrackCommentLabel = new TQLabel( i18n("Comment:"), tagGroupBox, "lTrackCommentLabel" );
tagGridLayout->addWidget( lTrackCommentLabel, 2, 1 );
tTrackComment = new KTextEdit( tagGroupBox, "tTrackComment" );
trackCommentBox->addWidget( tTrackComment );
tTrackComment->setFixedHeight( 65 );
- connect( tTrackComment, SIGNAL(textChanged()),
- this, SLOT(trackCommentChanged())
+ connect( tTrackComment, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(trackCommentChanged())
);
pTrackCommentEdit = new KPushButton( " ", tagGroupBox, "pTrackCommentEdit" );
pTrackCommentEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackCommentEdit->setFixedSize( lTrackTitle->sizeHint().height(), lTrackTitle->sizeHint().height() );
+ pTrackCommentEdit->setFixedSize( lTrackTitle->tqsizeHint().height(), lTrackTitle->tqsizeHint().height() );
pTrackCommentEdit->hide();
trackCommentBox->addWidget( pTrackCommentEdit );
- connect( pTrackCommentEdit, SIGNAL(clicked()),
- this, SLOT(editTrackCommentClicked())
+ connect( pTrackCommentEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackCommentClicked())
);
// draw a horizontal line
- QFrame* lineFrame = new QFrame( this, "lineFrame" );
- lineFrame->setFrameShape( QFrame::HLine );
- lineFrame->setFrameShadow( QFrame::Sunken );
- lineFrame->setFrameShape( QFrame::HLine );
+ TQFrame* lineFrame = new TQFrame( this, "lineFrame" );
+ lineFrame->setFrameShape( TQFrame::HLine );
+ lineFrame->setFrameShadow( TQFrame::Sunken );
+ lineFrame->setFrameShape( TQFrame::HLine );
gridLayout->addWidget( lineFrame, 3, 0 );
gridLayout->setRowSpacing( 3, 16 );
- // add a horizontal box layout for the control elements
- QHBoxLayout* controlBox = new QHBoxLayout( -1, "controlBox" );
+ // add a horizontal box tqlayout for the control elements
+ TQHBoxLayout* controlBox = new TQHBoxLayout( -1, "controlBox" );
gridLayout->addLayout( controlBox, 4, 0 );
// add the control elements
pSaveCue = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Save cuesheet ..."), this, "pSaveCue" );
controlBox->addWidget( pSaveCue );
- connect( pSaveCue, SIGNAL(clicked()),
- this, SLOT(saveCuesheetClicked())
+ connect( pSaveCue, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(saveCuesheetClicked())
);
controlBox->addStretch();
@@ -253,13 +253,13 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
if( plugin != 0 && plugin->rip.full_disc.enabled ) cAdd->insertItem( iconLoader->loadIcon("cdaudio_unmount",KIcon::Small),i18n("Add full CD as one file") );
//cAdd->setSizeMode( ComboButton::Min );
controlBox->addWidget( cAdd );
- connect( cAdd, SIGNAL(clicked(int)),
- this, SLOT(addClicked(int))
+ connect( cAdd, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(addClicked(int))
);
pCancel = new KPushButton( iconLoader->loadIcon("cancel",KIcon::Small), i18n("Cancel"), this, "pCancel" );
controlBox->addWidget( pCancel );
- connect( pCancel, SIGNAL(clicked()),
- this, SLOT(reject())
+ connect( pCancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject())
);
// delete the icon loader object
@@ -267,19 +267,19 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
bool various_artists = false;
bool various_composer = false;
- QString artist = "";
- QString composer = "";
- QString album = "";
+ TQString artist = "";
+ TQString composer = "";
+ TQString album = "";
int disc = 0;
int year = 0;
- QString genre = "";
+ TQString genre = "";
device = cdManager->newCDDevice( _device );
// don't execute the dialog, if no audio cd was found
noCD = device.isEmpty();
- QValueList<TagData*> tags = cdManager->getTrackList( device );
- for( QValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
+ TQValueList<TagData*> tags = cdManager->getTrackList( device );
+ for( TQValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
if( artist == "" ) artist = (*it)->artist;
else if( artist != (*it)->artist ) various_artists = true;
@@ -291,7 +291,7 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
if( year == 0 ) year = (*it)->year;
if( genre == "" ) genre = (*it)->genre;
- new KListViewItem( trackList, QString().sprintf("%02i",(*it)->track), (*it)->artist, (*it)->composer, (*it)->title, QString().sprintf("%i:%02i",(*it)->length/60,(*it)->length%60) );
+ new KListViewItem( trackList, TQString().sprintf("%02i",(*it)->track), (*it)->artist, (*it)->composer, (*it)->title, TQString().sprintf("%i:%02i",(*it)->length/60,(*it)->length%60) );
}
trackList->setSorting( -1 );
@@ -329,7 +329,7 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
CDOpener::~CDOpener()
{}
-int CDOpener::columnByName( const QString& name )
+int CDOpener::columnByName( const TQString& name )
{
for( int i = 0; i < trackList->columns(); ++i ) {
if( trackList->columnText( i ) == name ) return i;
@@ -339,20 +339,20 @@ int CDOpener::columnByName( const QString& name )
void CDOpener::trackUpPressed()
{
- QListViewItem* item = selectedItems.first()->itemAbove();
+ TQListViewItem* item = selectedItems.first()->itemAbove();
if( item != 0 ) {
item->setSelected( true );
- trackList->repaintItem( item );
+ trackList->tqrepaintItem( item );
trackList->ensureItemVisible( item );
}
else {
return; // NULL pointer (cannot be)
}
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setSelected( false );
- trackList->repaintItem( *it );
+ trackList->tqrepaintItem( *it );
}
if( item->itemAbove() == 0 ) {
@@ -366,20 +366,20 @@ void CDOpener::trackUpPressed()
void CDOpener::trackDownPressed()
{
- QListViewItem* item = selectedItems.last()->itemBelow();
+ TQListViewItem* item = selectedItems.last()->itemBelow();
if( item != 0 ) {
item->setSelected( true );
- trackList->repaintItem( item );
+ trackList->tqrepaintItem( item );
trackList->ensureItemVisible( item );
}
else {
return; // NULL pointer (cannot be)
}
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setSelected( false );
- trackList->repaintItem( *it );
+ trackList->tqrepaintItem( *it );
}
pTrackUp->setEnabled( true );
@@ -399,7 +399,7 @@ void CDOpener::trackChanged()
// rebuild the list of the selected tracks
selectedTracks.clear();
selectedItems.clear();
- for( QListViewItem *item = trackList->firstChild(); item != NULL; item = item->nextSibling() ) {
+ for( TQListViewItem *item = trackList->firstChild(); item != NULL; item = item->nextSibling() ) {
i++;
if( item->isSelected() ) {
selectedTracks.append( i );
@@ -435,29 +435,29 @@ void CDOpener::trackChanged()
if( selectedItems.last()->itemBelow() != 0 ) pTrackDown->setEnabled( true );
else pTrackDown->setEnabled( false );
- QString trackListString = "";
+ TQString trackListString = "";
if( selectedTracks.count() == trackList->childCount() ) {
trackListString = i18n("All tracks");
}
else {
- trackListString = i18n("Tracks") + QString().sprintf(" %02i",selectedTracks.first());
- QValueList<int>::Iterator track = selectedTracks.begin();
+ trackListString = i18n("Tracks") + TQString().sprintf(" %02i",selectedTracks.first());
+ TQValueList<int>::Iterator track = selectedTracks.begin();
track++;
for( ; track != selectedTracks.end(); ++track ) {
- trackListString += QString().sprintf(", %02i",*track);
+ trackListString += TQString().sprintf(", %02i",*track);
}
}
tagGroupBox->setTitle( trackListString );
- QString title = cdManager->getTags( device, selectedTracks.first() )->title;
+ TQString title = cdManager->getTags( device, selectedTracks.first() )->title;
bool equalTitles = true;
- QString artist = cdManager->getTags( device, selectedTracks.first() )->artist;
+ TQString artist = cdManager->getTags( device, selectedTracks.first() )->artist;
bool equalArtists = true;
- QString composer = cdManager->getTags( device, selectedTracks.first() )->composer;
+ TQString composer = cdManager->getTags( device, selectedTracks.first() )->composer;
bool equalComposers = true;
- QString comment = cdManager->getTags( device, selectedTracks.first() )->comment;
+ TQString comment = cdManager->getTags( device, selectedTracks.first() )->comment;
bool equalComments = true;
- for( QValueList<int>::Iterator track = selectedTracks.begin(); track != selectedTracks.end(); ++track ) {
+ for( TQValueList<int>::Iterator track = selectedTracks.begin(); track != selectedTracks.end(); ++track ) {
TagData* tags = cdManager->getTags( device, *track );
if( title != tags->title ) equalTitles = false;
@@ -529,7 +529,7 @@ void CDOpener::trackChanged()
if( selectedItems.first()->itemBelow() != 0 ) pTrackDown->setEnabled( true );
else pTrackDown->setEnabled( false );
- tagGroupBox->setTitle( i18n("Track") + QString().sprintf(" %02i",selectedTracks.first()) );
+ tagGroupBox->setTitle( i18n("Track") + TQString().sprintf(" %02i",selectedTracks.first()) );
TagData* tags = cdManager->getTags( device, selectedTracks.first() );
lTrackTitle->setEnabled( true );
@@ -562,7 +562,7 @@ void CDOpener::trackChanged()
}
}
-void CDOpener::artistChanged( const QString& text )
+void CDOpener::artistChanged( const TQString& text )
{
if( text == i18n("Various Artists") ) {
trackList->adjustColumn( columnByName( i18n("Artist") ) );
@@ -574,7 +574,7 @@ void CDOpener::artistChanged( const QString& text )
trackChanged();
}
-void CDOpener::composerChanged( const QString& text )
+void CDOpener::composerChanged( const TQString& text )
{
if( text == i18n("Various Composer") ) {
trackList->adjustColumn( columnByName( i18n("Composer") ) );
@@ -586,40 +586,40 @@ void CDOpener::composerChanged( const QString& text )
trackChanged();
}
-void CDOpener::trackTitleChanged( const QString& text )
+void CDOpener::trackTitleChanged( const TQString& text )
{
if( !lTrackTitle->isEnabled() ) return;
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setText( columnByName( i18n("Title") ), text );
}
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->title = text;
}
}
-void CDOpener::trackArtistChanged( const QString& text )
+void CDOpener::trackArtistChanged( const TQString& text )
{
if( !lTrackArtist->isEnabled() ) return;
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setText( columnByName( i18n("Artist") ), text );
}
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->artist = text;
}
}
-void CDOpener::trackComposerChanged( const QString& text )
+void CDOpener::trackComposerChanged( const TQString& text )
{
if( !lTrackComposer->isEnabled() ) return;
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setText( columnByName( i18n("Composer") ), text );
}
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->composer = text;
}
@@ -627,11 +627,11 @@ void CDOpener::trackComposerChanged( const QString& text )
void CDOpener::trackCommentChanged()
{
- QString text = tTrackComment->text();
+ TQString text = tTrackComment->text();
if( !tTrackComment->isEnabled() ) return;
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->comment = text;
}
@@ -674,7 +674,7 @@ void CDOpener::addClicked( int index )
{
if( index == 0 )
{
- QValueList<int> allTracks;
+ TQValueList<int> allTracks;
// TODO save all options (album artist, disc, genre, etc.)
for( int it = 1; it <= cdManager->getTrackCount(device); ++it ) {
@@ -692,7 +692,7 @@ void CDOpener::addClicked( int index )
else if( index == 1 )
{
// TODO save all options (album artist, disc, genre, etc.)
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
if( cArtist->currentText() != i18n("Various Artists") ) tags->artist = cArtist->currentText();
if( cComposer->currentText() != i18n("Various Composer") ) tags->composer = cComposer->currentText();
@@ -733,10 +733,10 @@ void CDOpener::addClicked( int index )
void CDOpener::saveCuesheetClicked()
{
- QString filename = KFileDialog::getSaveFileName( QDir::homeDirPath(), "*.cue" );
+ TQString filename = KFileDialog::getSaveFileName( TQDir::homeDirPath(), "*.cue" );
if( filename.isEmpty() ) return;
- QFile cueFile( filename );
+ TQFile cueFile( filename );
if( cueFile.exists() ) {
int ret = KMessageBox::questionYesNo( this,
i18n("A file with this name already exists.\n\nDo you want to overwrite the existing one?"),
@@ -745,7 +745,7 @@ void CDOpener::saveCuesheetClicked()
}
if( !cueFile.open( IO_WriteOnly ) ) return;
- QString content;
+ TQString content;
content.append( "TITLE \"" + lAlbum->text() + "\"\n" );
content.append( "PERFORMER \"" + cArtist->currentText() + "\"\n" );
@@ -753,25 +753,25 @@ void CDOpener::saveCuesheetClicked()
int INDEX = 0;
bool addFrames = false;
- QValueList<TagData*> tags = cdManager->getTrackList( device );
- for( QValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
- content.append( QString().sprintf(" TRACK %02i AUDIO\n",(*it)->track ) );
+ TQValueList<TagData*> tags = cdManager->getTrackList( device );
+ for( TQValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
+ content.append( TQString().sprintf(" TRACK %02i AUDIO\n",(*it)->track ) );
content.append( " TITLE \"" + (*it)->title + "\"\n" );
content.append( " PERFORMER \"" + (*it)->artist + "\"\n" );
if( addFrames ) {
- content.append( QString().sprintf(" INDEX 01 %02i:%02i:37\n",INDEX/60,INDEX%60) );
+ content.append( TQString().sprintf(" INDEX 01 %02i:%02i:37\n",INDEX/60,INDEX%60) );
INDEX++;
addFrames = false;
}
else {
- content.append( QString().sprintf(" INDEX 01 %02i:%02i:00\n",INDEX/60,INDEX%60) );
+ content.append( TQString().sprintf(" INDEX 01 %02i:%02i:00\n",INDEX/60,INDEX%60) );
addFrames = true;
}
INDEX += (*it)->length;
}
- QTextStream ts( &cueFile );
+ TQTextStream ts( &cueFile );
ts << content;
cueFile.close();
diff --git a/src/cdopener.h b/src/cdopener.h
index 09e941a..2730cd0 100755
--- a/src/cdopener.h
+++ b/src/cdopener.h
@@ -15,8 +15,8 @@ class KLineEdit;
class KComboBox;
class KIntSpinBox;
class KTextEdit;
-class QGroupBox;
-class QListViewItem;
+class TQGroupBox;
+class TQListViewItem;
/**
* @short Shows a dialog for selecting files from a CD
@@ -26,6 +26,7 @@ class QListViewItem;
class CDOpener : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
// enum Mode {
// all_tracks,
@@ -35,12 +36,12 @@ public:
/**
* Constructor
- * @param parent The parent widget
+ * @param tqparent The tqparent widget
* @param name The name of the file list
* @p modal Sets whether the dialog is modal or not
* @p f Some flags
*/
- CDOpener( Config*, CDManager*, TagEngine*, const QString &device, QWidget *parent = 0, const char *name = 0, /*Mode default_mode = all_tracks, const QString& default_text = "",*/ bool modal = true, WFlags f = 0 );
+ CDOpener( Config*, CDManager*, TagEngine*, const TQString &device, TQWidget *tqparent = 0, const char *name = 0, /*Mode default_mode = all_tracks, const TQString& default_text = "",*/ bool modal = true, WFlags f = 0 );
/**
* Destructor
@@ -71,7 +72,7 @@ private:
// KPushButton *pCDDB;
/** The groupbox shows the selected track numbers */
- QGroupBox *tagGroupBox;
+ TQGroupBox *tagGroupBox;
/** Set the focus of the tag editor to the track over it */
KPushButton *pTrackUp;
@@ -105,22 +106,22 @@ private:
TagEngine* tagEngine;
Config* config;
- QString device;
+ TQString device;
- QValueList<int> selectedTracks;
- QValueList<QListViewItem*> selectedItems;
+ TQValueList<int> selectedTracks;
+ TQValueList<TQListViewItem*> selectedItems;
- int columnByName( const QString& name );
+ int columnByName( const TQString& name );
private slots:
void trackChanged();
void trackUpPressed();
void trackDownPressed();
- void artistChanged( const QString& text );
- void composerChanged( const QString& text );
- void trackTitleChanged( const QString& text );
- void trackArtistChanged( const QString& text );
- void trackComposerChanged( const QString& text );
+ void artistChanged( const TQString& text );
+ void composerChanged( const TQString& text );
+ void trackTitleChanged( const TQString& text );
+ void trackArtistChanged( const TQString& text );
+ void trackComposerChanged( const TQString& text );
void trackCommentChanged();
void editTrackTitleClicked();
void editTrackArtistClicked();
@@ -131,9 +132,9 @@ private slots:
void saveCuesheetClicked();
signals:
- void addTracks( const QString& device, QValueList<int> );
- void addDisc( const QString& device );
- //void openCuesheetEditor( const QString& content );
+ void addTracks( const TQString& device, TQValueList<int> );
+ void addDisc( const TQString& device );
+ //void openCuesheetEditor( const TQString& content );
};
#endif // CDOPENER_H
diff --git a/src/combobutton.cpp b/src/combobutton.cpp
index ff5d758..edf4780 100755
--- a/src/combobutton.cpp
+++ b/src/combobutton.cpp
@@ -1,32 +1,32 @@
#include "combobutton.h"
-#include <qlayout.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qstyle.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
#include <kpushbutton.h>
#include <kcombobox.h>
-ComboButton::ComboButton( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ComboButton::ComboButton( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
m_increaseHeight = 0;
- QGridLayout *grid = new QGridLayout( this, 1, 1 );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
m_box = new KComboBox(this);
grid->addWidget(m_box,0,0);
- connect( m_box, SIGNAL(activated(int)),
- this, SLOT(boxActivated(int))
+ connect( m_box, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(boxActivated(int))
);
- m_button = new KPushButton( QString::null, this, "pushbutton" );
+ m_button = new KPushButton( TQString(), this, "pushbutton" );
grid->addWidget( m_button, 0, 0 );
- connect( m_button, SIGNAL(clicked()),
- this, SLOT(buttonClicked())
+ connect( m_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(buttonClicked())
);
m_sizeMode = Max;
@@ -43,17 +43,17 @@ void ComboButton::balanceSize()
int width;
if( m_sizeMode == Max )
- width = m_box->sizeHint().width()-17;
+ width = m_box->tqsizeHint().width()-17;
else
- width = m_button->sizeHint().width();
+ width = m_button->tqsizeHint().width();
- int height = ( m_box->sizeHint().height() > m_button->sizeHint().height() ) ? m_box->sizeHint().height() : m_button->sizeHint().height();
+ int height = ( m_box->tqsizeHint().height() > m_button->tqsizeHint().height() ) ? m_box->tqsizeHint().height() : m_button->tqsizeHint().height();
m_box->setFixedSize( width+17, height+m_increaseHeight );
m_button->setFixedSize( width, height+m_increaseHeight );
}
-void ComboButton::repaintButton()
+void ComboButton::tqrepaintButton()
{
m_button->setText( m_box->currentText() );
if(m_box->pixmap( m_box->currentItem()) )
@@ -61,16 +61,16 @@ void ComboButton::repaintButton()
balanceSize();
}
-void ComboButton::insertItem( const QString &text, int index )
+void ComboButton::insertItem( const TQString &text, int index )
{
m_box->insertItem( text, index );
- repaintButton();
+ tqrepaintButton();
}
-void ComboButton::insertItem( const QPixmap &pixmap, const QString &text, int index )
+void ComboButton::insertItem( const TQPixmap &pixmap, const TQString &text, int index )
{
m_box->insertItem( pixmap, text, index );
- repaintButton();
+ tqrepaintButton();
}
void ComboButton::increaseHeight( int height )
@@ -81,7 +81,7 @@ void ComboButton::increaseHeight( int height )
void ComboButton::boxActivated( int index )
{
- repaintButton();
+ tqrepaintButton();
emit clicked( index );
}
@@ -101,13 +101,13 @@ int ComboButton::sizeMode()
return m_sizeMode;
}
-void ComboButton::setFont( const QFont& font )
+void ComboButton::setFont( const TQFont& font )
{
m_button->setFont( font );
m_box->setFont( font );
}
-QFont ComboButton::font()
+TQFont ComboButton::font()
{
return m_button->font();
}
diff --git a/src/combobutton.h b/src/combobutton.h
index 3f07199..f7c0d41 100755
--- a/src/combobutton.h
+++ b/src/combobutton.h
@@ -3,10 +3,10 @@
#ifndef COMBOBUTTON_H
#define COMBOBUTTON_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QString;
-class QPixmap;
+class TQString;
+class TQPixmap;
class KPushButton;
class KComboBox;
@@ -15,9 +15,10 @@ class KComboBox;
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class ComboButton : public QWidget
+class ComboButton : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum SizeMode {
Min, Max
@@ -25,10 +26,10 @@ public:
/**
* Constructor
- * @param parent The parent widget
+ * @param tqparent The tqparent widget
* @param name The name of the file list
*/
- ComboButton( QWidget *parent, const char *name = 0 );
+ ComboButton( TQWidget *tqparent, const char *name = 0 );
/**
* Destructor
@@ -38,11 +39,11 @@ public:
/**
* Insert a new item with @p text at position @p index
*/
- void insertItem( const QString &text, int index = -1 );
+ void insertItem( const TQString &text, int index = -1 );
/**
* Insert a new item with an icon @p pixmap and @p text at position @p index
*/
- void insertItem( const QPixmap &pixmap, const QString &text, int index = -1 );
+ void insertItem( const TQPixmap &pixmap, const TQString &text, int index = -1 );
/**
* Increase the combobutton's height by @p height
@@ -62,12 +63,12 @@ public:
/**
* Sets the font of the combobutton
*/
- void setFont( const QFont& font );
+ void setFont( const TQFont& font );
/**
* Returns the font of the button
*/
- QFont font();
+ TQFont font();
private:
/** A pointer to the button */
@@ -83,10 +84,10 @@ private:
/** Recalculate the size of the combobutton */
void balanceSize();
/** The button gets a new label, etc. */
- void repaintButton();
+ void tqrepaintButton();
//public slots:
- //void setCurrentItem(const QString &item, bool insert=false, int index=-1);
+ //void setCurrentItem(const TQString &item, bool insert=false, int index=-1);
//void setCurrentItem(int index);
private slots:
diff --git a/src/config.cpp b/src/config.cpp
index b8b1904..0c6995c 100755
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -6,8 +6,8 @@
#include "ripperpluginloader.h"
#include "options.h"
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kglobal.h>
@@ -59,13 +59,13 @@ void Config::read()
readProfiles();
KConfig *conf = kapp->config();
- QStringList listDefaults;
+ TQStringList listDefaults;
int intDefault;
bool boolDefault;
- QString ripper;
- QString encoder;
- QString decoder;
- QString replaygain;
+ TQString ripper;
+ TQString encoder;
+ TQString decoder;
+ TQString replaygain;
int rank;
conf->setGroup( "General" ) ;
@@ -79,10 +79,10 @@ void Config::read()
conf->setGroup( "Backends" );
listDefaults.clear();
- QString datadir = locateLocal( "data", "soundkonverter/bin/" );
+ TQString datadir = locateLocal( "data", "soundkonverter/bin/" );
datadir.remove( datadir.length() - 1, 1 );
listDefaults.append( datadir );
- listDefaults.append( QDir::homeDirPath() + "/bin" );
+ listDefaults.append( TQDir::homeDirPath() + "/bin" );
listDefaults.append( "/usr/local/bin" );
listDefaults.append( "/usr/bin" );
data.environment.directories = conf->readListEntry( "directories", listDefaults );
@@ -102,10 +102,10 @@ void Config::read()
data.general.lastTab = conf->readNumEntry( "lastTab", 0 );
data.general.defaultProfile = conf->readEntry( "defaultProfile", i18n("Last used") );
data.general.defaultFormat = conf->readEntry( "defaultFormat", i18n("Last used") );
-// data.general.defaultOutputDirectory = conf->readEntry( "defaultOutputDirectory", QDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
- data.general.specifyOutputDirectory = conf->readEntry( "specifyOutputDirectory", QDir::homeDirPath() + "/soundKonverter" );
- data.general.metaDataOutputDirectory = conf->readEntry( "metaDataOutputDirectory", QDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
- data.general.copyStructureOutputDirectory = conf->readEntry( "copyStructureOutputDirectory", QDir::homeDirPath() + "/soundKonverter" );
+// data.general.defaultOutputDirectory = conf->readEntry( "defaultOutputDirectory", TQDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
+ data.general.specifyOutputDirectory = conf->readEntry( "specifyOutputDirectory", TQDir::homeDirPath() + "/soundKonverter" );
+ data.general.metaDataOutputDirectory = conf->readEntry( "metaDataOutputDirectory", TQDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
+ data.general.copyStructureOutputDirectory = conf->readEntry( "copyStructureOutputDirectory", TQDir::homeDirPath() + "/soundKonverter" );
data.general.useVFATNames = conf->readBoolEntry( "useVFATNames", true );
data.general.conflictHandling = conf->readNumEntry( "conflictHandling", 0 );
data.general.priority = conf->readNumEntry( "priority", 10 );
@@ -120,10 +120,10 @@ void Config::read()
conf->setGroup( "Environment" );
listDefaults.clear();
- QString datadir = locateLocal( "data", "soundkonverter/bin/" );
+ TQString datadir = locateLocal( "data", "soundkonverter/bin/" );
datadir.remove( datadir.length() - 1, 1 );
listDefaults.append( datadir );
- listDefaults.append( QDir::homeDirPath() + "/bin" );
+ listDefaults.append( TQDir::homeDirPath() + "/bin" );
listDefaults.append( "/usr/local/bin" );
listDefaults.append( "/usr/bin" );
data.environment.directories = conf->readListEntry( "directories", listDefaults );
@@ -136,7 +136,7 @@ void Config::read()
if( ripper == "kio_audiocd" ) rank = 10000;
else rank = 60; // kio_audiocd ranking
currentRipper = 0; // this is a valid ripper (kio_audiocd)
- for( QValueList<RipperPlugin*>::Iterator b = rippers.begin(); b != rippers.end(); ++b ) {
+ for( TQValueList<RipperPlugin*>::Iterator b = rippers.begin(); b != rippers.end(); ++b ) {
binaries[ (*b)->rip.bin ] = "";
if( (*b)->rip.rank > rank ) {
rank = (*b)->rip.rank;
@@ -148,30 +148,30 @@ void Config::read()
}
}
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it )
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it )
{
- for( QValueList<ConvertPlugin*>::Iterator b = (*it).encoders.begin(); b != (*it).encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = (*it).encoders.begin(); b != (*it).encoders.end(); ++b ) {
binaries[ (*b)->enc.bin ] = "";
}
- for( QValueList<ConvertPlugin*>::Iterator b = (*it).decoders.begin(); b != (*it).decoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = (*it).decoders.begin(); b != (*it).decoders.end(); ++b ) {
binaries[ (*b)->dec.bin ] = "";
}
- for( QValueList<ReplayGainPlugin*>::Iterator b = (*it).replaygains.begin(); b != (*it).replaygains.end(); ++b ) {
+ for( TQValueList<ReplayGainPlugin*>::Iterator b = (*it).replaygains.begin(); b != (*it).replaygains.end(); ++b ) {
binaries[ (*b)->replaygain.bin ] = "";
}
- for( QMap<QString, QString>::Iterator b = binaries.begin(); b != binaries.end(); ++b ) {
- for( QStringList::Iterator c = data.environment.directories.begin(); c != data.environment.directories.end(); ++c )
+ for( TQMap<TQString, TQString>::Iterator b = binaries.begin(); b != binaries.end(); ++b ) {
+ for( TQStringList::Iterator c = data.environment.directories.begin(); c != data.environment.directories.end(); ++c )
{
- if( b.data() == "" && QFile::exists((*c) + "/" + b.key()) ) {
+ if( b.data() == "" && TQFile::exists((*c) + "/" + b.key()) ) {
b.data() = (*c) + "/" + b.key();
}
}
}
- QStringList foundPrograms;
- for( QMap<QString, QString>::Iterator b = binaries.begin(); b != binaries.end(); ++b ) {
+ TQStringList foundPrograms;
+ for( TQMap<TQString, TQString>::Iterator b = binaries.begin(); b != binaries.end(); ++b ) {
if( b.data() != "" ) {
foundPrograms.append( b.data() );
}
@@ -184,7 +184,7 @@ void Config::read()
}
}
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it )
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it )
{
conf->setGroup( (*it).mime_types.first() );
encoder = conf->readEntry( "encoder" );
@@ -196,7 +196,7 @@ void Config::read()
(*it).replaygain = 0;
rank = 0;
- for( QValueList<ConvertPlugin*>::Iterator b = (*it).encoders.begin(); b != (*it).encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = (*it).encoders.begin(); b != (*it).encoders.end(); ++b ) {
if( (*b)->enc.rank > rank && binaries[(*b)->enc.bin] != "" ) {
rank = (*b)->enc.rank;
(*it).encoder = (*b);
@@ -208,7 +208,7 @@ void Config::read()
}
rank = 0;
- for( QValueList<ConvertPlugin*>::Iterator b = (*it).decoders.begin(); b != (*it).decoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = (*it).decoders.begin(); b != (*it).decoders.end(); ++b ) {
if( (*b)->dec.rank > rank && binaries[(*b)->dec.bin] != "" ) {
rank = (*b)->dec.rank;
(*it).decoder = (*b);
@@ -220,7 +220,7 @@ void Config::read()
}
rank = 0;
- for( QValueList<ReplayGainPlugin*>::Iterator b = (*it).replaygains.begin(); b != (*it).replaygains.end(); ++b ) {
+ for( TQValueList<ReplayGainPlugin*>::Iterator b = (*it).replaygains.begin(); b != (*it).replaygains.end(); ++b ) {
if( (*b)->replaygain.rank > rank && binaries[(*b)->replaygain.bin] != "" ) {
rank = (*b)->replaygain.rank;
(*it).replaygain = (*b);
@@ -259,7 +259,7 @@ void Config::read()
void Config::write( bool sync )
{
- QTime time;
+ TQTime time;
time.start();
writeProfiles();
@@ -271,7 +271,7 @@ void Config::write( bool sync )
conf->setGroup( "Ripper" );
conf->writeEntry( "ripper", (currentRipper)?currentRipper->rip.bin:"kio_audiocd" );
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it )
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it )
{
conf->setGroup( (*it).mime_types.first() );
if( (*it).encoder ) conf->writeEntry( "encoder", (*it).encoder->enc.bin );
@@ -306,7 +306,7 @@ void Config::write( bool sync )
conf->setGroup( "Environment" );
conf->writeEntry( "directories", data.environment.directories );
data.environment.foundPrograms.clear();
- for( QMap<QString, QString>::Iterator b = binaries.begin(); b != binaries.end(); ++b ) {
+ for( TQMap<TQString, TQString>::Iterator b = binaries.begin(); b != binaries.end(); ++b ) {
if( b.data() != "" ) {
data.environment.foundPrograms.append( b.data() );
}
@@ -317,24 +317,24 @@ void Config::write( bool sync )
emit configChanged();
- logger->log( 1000, "wrote preferences: " + QString::number(time.elapsed()) );
+ logger->log( 1000, "wrote preferences: " + TQString::number(time.elapsed()) );
}
void Config::readProfiles()
{
int version;
- QString name;
+ TQString name;
ConversionOptions options;
- QDomDocument domTree;
- QFile opmlFile( locateLocal("data","soundkonverter/profiles.xml") );
+ TQDomDocument domTree;
+ TQFile opmlFile( locateLocal("data","soundkonverter/profiles.xml") );
if( !opmlFile.open( IO_ReadOnly ) ) return;
if( !domTree.setContent( &opmlFile ) ) return;
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "profiles" ) return;
- QDomNode node, sub1Node, sub2Node;
+ TQDomNode node, sub1Node, sub2Node;
node = root.firstChild();
while( !node.isNull() ) {
@@ -403,20 +403,20 @@ void Config::readProfiles()
void Config::writeProfiles()
{
- QDomDocument domTree;
- QDomElement root = domTree.createElement( "soundkonverter" );
+ TQDomDocument domTree;
+ TQDomElement root = domTree.createElement( "soundkonverter" );
root.setAttribute( "type", "profiles" );
domTree.appendChild( root );
- QDomElement info = domTree.createElement( "info" );
+ TQDomElement info = domTree.createElement( "info" );
info.setAttribute( "version", "300" );
root.appendChild( info );
- for( QValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
- QDomElement profile = domTree.createElement( "profile" );
+ for( TQValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
+ TQDomElement profile = domTree.createElement( "profile" );
profile.setAttribute( "name", (*it).name );
- QDomElement encodingOptions = domTree.createElement( "encodingOptions" );
+ TQDomElement encodingOptions = domTree.createElement( "encodingOptions" );
encodingOptions.setAttribute( "sFormat", (*it).options.encodingOptions.sFormat );
encodingOptions.setAttribute( "sQualityMode", (*it).options.encodingOptions.sQualityMode );
@@ -426,21 +426,21 @@ void Config::writeProfiles()
encodingOptions.setAttribute( "iMinBitrate", (*it).options.encodingOptions.iMinBitrate );
encodingOptions.setAttribute( "iMaxBitrate", (*it).options.encodingOptions.iMaxBitrate );
- QDomElement samplingRate = domTree.createElement( "samplingRate" );
+ TQDomElement samplingRate = domTree.createElement( "samplingRate" );
samplingRate.setAttribute( "bEnabled", (*it).options.encodingOptions.samplingRate.bEnabled );
samplingRate.setAttribute( "iSamplingRate", (*it).options.encodingOptions.samplingRate.iSamplingRate );
encodingOptions.appendChild( samplingRate );
- QDomElement channels = domTree.createElement( "channels" );
+ TQDomElement channels = domTree.createElement( "channels" );
channels.setAttribute( "bEnabled", (*it).options.encodingOptions.channels.bEnabled );
channels.setAttribute( "sChannels", (*it).options.encodingOptions.channels.sChannels );
encodingOptions.appendChild( channels );
- QDomElement replaygain = domTree.createElement( "replaygain" );
+ TQDomElement replaygain = domTree.createElement( "replaygain" );
replaygain.setAttribute( "bEnabled", (*it).options.encodingOptions.replaygain.bEnabled );
@@ -450,7 +450,7 @@ void Config::writeProfiles()
profile.appendChild( encodingOptions );
- QDomElement outputOptions = domTree.createElement( "outputOptions" );
+ TQDomElement outputOptions = domTree.createElement( "outputOptions" );
outputOptions.setAttribute( "mode", int((*it).options.outputOptions.mode) );
outputOptions.setAttribute( "directory", (*it).options.outputOptions.directory );
@@ -460,10 +460,10 @@ void Config::writeProfiles()
root.appendChild( profile );
}
- QFile opmlFile( locateLocal("data","soundkonverter/profiles.xml") );
+ TQFile opmlFile( locateLocal("data","soundkonverter/profiles.xml") );
if( !opmlFile.open( IO_WriteOnly ) ) return;
- QTextStream ts( &opmlFile );
+ TQTextStream ts( &opmlFile );
ts << domTree.toString();
opmlFile.close();
@@ -472,24 +472,24 @@ void Config::writeProfiles()
void Config::writeServiceMenu()
{
int num;
- QString content;
- QFile file;
+ TQString content;
+ TQFile file;
num = 0;
content = "";
content += "[Desktop Entry]\n";
content += "ServiceTypes=";
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
// if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) {
// if( !(*it).encoder->enc.lossy.enabled && !(*it).encoder->enc.lossless.enabled && !(*it).encoder->enc.hybrid.enabled ) continue;
-// for( QStringList::Iterator b = (*it).mime_types.begin(); b != (*it).mime_types.end(); ++b ) {
+// for( TQStringList::Iterator b = (*it).mime_types.begin(); b != (*it).mime_types.end(); ++b ) {
// content += (*b) + ",";
// num++;
// }
// }
if( (*it).decoder != 0 && binaries[(*it).decoder->dec.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) {
- for( QStringList::Iterator b = (*it).mime_types.begin(); b != (*it).mime_types.end(); ++b ) {
+ for( TQStringList::Iterator b = (*it).mime_types.begin(); b != (*it).mime_types.end(); ++b ) {
content += (*b) + ",";
num++;
}
@@ -511,7 +511,7 @@ void Config::writeServiceMenu()
file.setName( locateLocal("data","konqueror/servicemenus/")+"convert_with_soundkonverter.desktop" );
if ( file.open( IO_WriteOnly ) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
stream << content;
file.close();
}
@@ -522,9 +522,9 @@ void Config::writeServiceMenu()
content += "[Desktop Entry]\n";
content += "ServiceTypes=";
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
if( (*it).replaygain != 0 && binaries[(*it).replaygain->replaygain.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) {
- for( QStringList::Iterator b = (*it).mime_types.begin(); b != (*it).mime_types.end(); ++b ) {
+ for( TQStringList::Iterator b = (*it).mime_types.begin(); b != (*it).mime_types.end(); ++b ) {
content += (*b) + ",";
num++;
}
@@ -546,7 +546,7 @@ void Config::writeServiceMenu()
file.setName( locateLocal("data","konqueror/servicemenus/")+"add_replaygain_with_soundkonverter.desktop" );
if( file.open(IO_WriteOnly) ) {
- QTextStream st( &file );
+ TQTextStream st( &file );
st << content;
file.close();
}
@@ -556,8 +556,8 @@ void Config::writeServiceMenu()
void Config::writeAmarokScript()
{
int num, num1, num2;
- QString content, content1, content2;
- QFile file;
+ TQString content, content1, content2;
+ TQFile file;
num = 0;
content = "";
@@ -566,11 +566,11 @@ void Config::writeAmarokScript()
content += "[Transcode]\n";
content += "target_formats = ";
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) {
if( !(*it).encoder->enc.lossy.enabled && !(*it).encoder->enc.lossless.enabled && !(*it).encoder->enc.hybrid.enabled ) continue;
- for( QStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) {
- if( content.find(" "+(*b).lower()+" ") == -1 ) content += (*b).lower() + " ";
+ for( TQStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) {
+ if( content.tqfind(" "+(*b).lower()+" ") == -1 ) content += (*b).lower() + " ";
num++;
}
}
@@ -583,7 +583,7 @@ void Config::writeAmarokScript()
file.setName( locateLocal("data","amarok/scripts/soundKonverter/")+"soundKonverter.spec" );
if( file.open(IO_WriteOnly) ) {
- QTextStream st( &file );
+ TQTextStream st( &file );
st << content;
file.close();
}
@@ -593,17 +593,17 @@ void Config::writeAmarokScript()
content = content1 = content2 = "";
// NOTE duplicate entries won't be shown to the user at any time, so they aren't filtered
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) {
if( (*it).encoder->enc.lossless.enabled ) {
- for( QStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) {
- if( content1.find(","+(*b).lower()+",") == -1 ) content1 += (*b).lower() + ","; // NOTE the first entry will be shown twice
+ for( TQStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) {
+ if( content1.tqfind(","+(*b).lower()+",") == -1 ) content1 += (*b).lower() + ","; // NOTE the first entry will be shown twice
num1++;
}
}
if( (*it).encoder->enc.hybrid.enabled ) {
- for( QStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) {
- if( content2.find(","+(*b).lower()+",") == -1 ) content2 += (*b).lower() + ","; // NOTE the first entry will be shown twice
+ for( TQStringList::Iterator b = (*it).extensions.begin(); b != (*it).extensions.end(); ++b ) {
+ if( content2.tqfind(","+(*b).lower()+",") == -1 ) content2 += (*b).lower() + ","; // NOTE the first entry will be shown twice
num2++;
}
}
@@ -632,17 +632,17 @@ void Config::writeAmarokScript()
{
file.setName( locateLocal("data","amarok/scripts/soundKonverter/")+"formats" );
if( file.open(IO_WriteOnly) ) {
- QTextStream st( &file );
+ TQTextStream st( &file );
st << content;
file.close();
}
}
KStandardDirs* stdDirs = new KStandardDirs();
- if( !QFile::exists(locateLocal("data","amarok/scripts/soundKonverter/soundKonverter.rb")) ) {
+ if( !TQFile::exists(locateLocal("data","amarok/scripts/soundKonverter/soundKonverter.rb")) ) {
KIO::NetAccess::file_copy( stdDirs->findResource("data","soundkonverter/amarokscript/soundKonverter.rb"), locateLocal("data","amarok/scripts/soundKonverter/soundKonverter.rb"), 0755, true );
}
- if( !QFile::exists(locateLocal("data","amarok/scripts/soundKonverter/README")) ) {
+ if( !TQFile::exists(locateLocal("data","amarok/scripts/soundKonverter/README")) ) {
KIO::NetAccess::file_copy( stdDirs->findResource("data","soundkonverter/amarokscript/README"), locateLocal("data","amarok/scripts/soundKonverter/README"), -1, true );
}
delete stdDirs;
@@ -657,15 +657,15 @@ void Config::loadPlugins()
//kdDebug() << "entering: `" << "Config::loadPlugins()" << "'" << endl;
logger->log( 1000, "entering: `Config::loadPlugins()'" );
- QStringList list;
- QDir dir;
- QString correction_file_mime_type;
+ TQStringList list;
+ TQDir dir;
+ TQString correction_file_mime_type;
/** a map that holds the _identifier_ and the _version_ number of all plugins */
- QMap<QString, PluginMapData> pluginMap;
+ TQMap<TQString, PluginMapData> pluginMap;
int version;
- QString identifier;
+ TQString identifier;
int i;
ConvertPluginLoader* convertPluginLoader = new ConvertPluginLoader();
@@ -673,29 +673,29 @@ void Config::loadPlugins()
RipperPluginLoader* ripperPluginLoader = new RipperPluginLoader();
KStandardDirs stddir;
- QStringList directories = stddir.findDirs( "data", "soundkonverter/plugins/" );
- for( QStringList::Iterator a = directories.begin(); a != directories.end(); ++a )
+ TQStringList directories = stddir.findDirs( "data", "soundkonverter/plugins/" );
+ for( TQStringList::Iterator a = directories.begin(); a != directories.end(); ++a )
{
//kdDebug() << " searching directory: `" << *a << "'" << endl;
logger->log( 1000, " searching directory: `" + *a + "'" );
dir.setPath( *a );
- list = dir.entryList( "*", QDir::All, QDir::Name );
- for( QStringList::Iterator b = list.begin(); b != list.end(); ++b )
+ list = dir.entryList( "*", TQDir::All, TQDir::Name );
+ for( TQStringList::Iterator b = list.begin(); b != list.end(); ++b )
{
if( *b != "." && *b != ".." && (*b).right(19) == ".soundkonverter.xml" )
{
//kdDebug() << " found file: `" << *b << "'" << endl;
logger->log( 1000, " found file: `" + *b + "'" );
- if( convertPluginLoader->verifyFile( QString(*a).append(*b) ) != -1 )
+ if( convertPluginLoader->verifyFile( TQString(*a).append(*b) ) != -1 )
{
- version = convertPluginLoader->verifyFile( QString(*a).append(*b) );
+ version = convertPluginLoader->verifyFile( TQString(*a).append(*b) );
identifier = *b;
identifier.remove( identifier.length() - 19, 19 );
- i = identifier.findRev( "-" );
+ i = identifier.tqfindRev( "-" );
identifier.remove( i, identifier.length() - i );
-// i = identifier.find( "." );
+// i = identifier.tqfind( "." );
// identifier.remove( 0, i + 1 );
- if( !pluginMap.contains(identifier) ) {
+ if( !pluginMap.tqcontains(identifier) ) {
PluginMapData data;
data.version = 0;
pluginMap.insert( identifier, data );
@@ -703,21 +703,21 @@ void Config::loadPlugins()
if( pluginMap[identifier].version < version )
{
pluginMap[identifier].version = version;
- pluginMap[identifier].filename = QString(*a).append(*b);
+ pluginMap[identifier].filename = TQString(*a).append(*b);
pluginMap[identifier].type = "converter";
logger->log( 1000, " updating version for: `" + identifier + "'" );
}
}
- else if( replaygainPluginLoader->verifyFile( QString(*a).append(*b) ) != -1 )
+ else if( replaygainPluginLoader->verifyFile( TQString(*a).append(*b) ) != -1 )
{
- version = replaygainPluginLoader->verifyFile( QString(*a).append(*b) );
+ version = replaygainPluginLoader->verifyFile( TQString(*a).append(*b) );
identifier = *b;
identifier.remove( identifier.length() - 19, 19 );
- i = identifier.findRev( "-" );
+ i = identifier.tqfindRev( "-" );
identifier.remove( i, identifier.length() - i );
-// i = identifier.find( "." );
+// i = identifier.tqfind( "." );
// identifier.remove( 0, i + 1 );
- if( !pluginMap.contains(identifier) ) {
+ if( !pluginMap.tqcontains(identifier) ) {
PluginMapData data;
data.version = 0;
pluginMap.insert( identifier, data );
@@ -725,21 +725,21 @@ void Config::loadPlugins()
if( pluginMap[identifier].version < version )
{
pluginMap[identifier].version = version;
- pluginMap[identifier].filename = QString(*a).append(*b);
+ pluginMap[identifier].filename = TQString(*a).append(*b);
pluginMap[identifier].type = "replaygain";
logger->log( 1000, " updating version for: `" + identifier + "'" );
}
}
- else if( ripperPluginLoader->verifyFile( QString(*a).append(*b) ) != -1 )
+ else if( ripperPluginLoader->verifyFile( TQString(*a).append(*b) ) != -1 )
{
- version = ripperPluginLoader->verifyFile( QString(*a).append(*b) );
+ version = ripperPluginLoader->verifyFile( TQString(*a).append(*b) );
identifier = *b;
identifier.remove( identifier.length() - 19, 19 );
- i = identifier.findRev( "-" );
+ i = identifier.tqfindRev( "-" );
identifier.remove( i, identifier.length() - i );
-// i = identifier.find( "." );
+// i = identifier.tqfind( "." );
// identifier.remove( 0, i + 1 );
- if( !pluginMap.contains(identifier) ) {
+ if( !pluginMap.tqcontains(identifier) ) {
PluginMapData data;
data.version = 0;
pluginMap.insert( identifier, data );
@@ -747,7 +747,7 @@ void Config::loadPlugins()
if( pluginMap[identifier].version < version )
{
pluginMap[identifier].version = version;
- pluginMap[identifier].filename = QString(*a).append(*b);
+ pluginMap[identifier].filename = TQString(*a).append(*b);
pluginMap[identifier].type = "ripper";
logger->log( 1000, " updating version for: `" + identifier + "'" );
}
@@ -761,7 +761,7 @@ void Config::loadPlugins()
}
}
- for( QMap<QString, PluginMapData>::Iterator a = pluginMap.begin(); a != pluginMap.end(); ++a ) {
+ for( TQMap<TQString, PluginMapData>::Iterator a = pluginMap.begin(); a != pluginMap.end(); ++a ) {
if( a.data().type == "converter" )
{
ConvertPlugin* plugin = convertPluginLoader->loadFile( a.data().filename );
@@ -773,7 +773,7 @@ void Config::loadPlugins()
}
if( plugin->enc.enabled )
{
- for( QStringList::Iterator b = plugin->enc.mime_types.begin(); b != plugin->enc.mime_types.end(); ++b )
+ for( TQStringList::Iterator b = plugin->enc.mime_types.begin(); b != plugin->enc.mime_types.end(); ++b )
{
//kdDebug() << " registering encoder for: `" << *b << "'" << endl;
logger->log( 1000, " registering encoder for: `" + *b + "'" );
@@ -782,7 +782,7 @@ void Config::loadPlugins()
}
if( plugin->dec.enabled )
{
- for( QStringList::Iterator b = plugin->dec.mime_types.begin(); b != plugin->dec.mime_types.end(); ++b )
+ for( TQStringList::Iterator b = plugin->dec.mime_types.begin(); b != plugin->dec.mime_types.end(); ++b )
{
//kdDebug() << " registering decoder for: `" << *b << "'" << endl;
logger->log( 1000, " registering decoder for: `" + *b + "'" );
@@ -804,7 +804,7 @@ void Config::loadPlugins()
ReplayGainPlugin* plugin = replaygainPluginLoader->loadFile( a.data().filename );
if( plugin->info.version != -1 )
{
- for( QStringList::Iterator b = plugin->replaygain.mime_types.begin(); b != plugin->replaygain.mime_types.end(); ++b )
+ for( TQStringList::Iterator b = plugin->replaygain.mime_types.begin(); b != plugin->replaygain.mime_types.end(); ++b )
{
//kdDebug() << " registering replaygain for: `" << *b << "'" << endl;
logger->log( 1000, " registering replaygain for: `" + *b + "'" );
@@ -852,36 +852,36 @@ void Config::loadPlugins()
// directories = stddir.findDirs( "data", "soundkonverter/format_infos/"+language+"/" );
// if( directories.isEmpty() ) directories = stddir.findDirs( "data", "soundkonverter/format_infos/en/" );
directories = stddir.findDirs( "data", "soundkonverter/format_infos/" );
- for( QStringList::Iterator a = directories.begin(); a != directories.end(); ++a )
+ for( TQStringList::Iterator a = directories.begin(); a != directories.end(); ++a )
{
//kdDebug() << " searching directory: `" << *a << "'" << endl;
logger->log( 1000, " searching directory: `" + *a + "'" );
dir.setPath( *a );
- list = dir.entryList( "*", QDir::All, QDir::Name );
- for( QStringList::Iterator b = list.begin(); b != list.end(); ++b )
+ list = dir.entryList( "*", TQDir::All, TQDir::Name );
+ for( TQStringList::Iterator b = list.begin(); b != list.end(); ++b )
{
if( *b != "." && *b != ".." && (*b).right(4) == ".xml" )
{
//kdDebug() << " found file: `" << *b << "'" << endl;
logger->log( 1000, " found file: `" + *b + "'" );
- if( formatInfoLoader->verifyFile( QString(*a).append(*b) ) )
+ if( formatInfoLoader->verifyFile( TQString(*a).append(*b) ) )
{
- FormatInfo* formatInfo = formatInfoLoader->loadFile( QString(*a).append(*b) );
+ FormatInfo* formatInfo = formatInfoLoader->loadFile( TQString(*a).append(*b) );
- for( QValueList<FormatItem>::Iterator c = formats.begin(); c != formats.end(); ++c ) {
- for( QStringList::Iterator d = formatInfo->mime_types.begin(); d != formatInfo->mime_types.end(); ++d ) {
- if( (*c).mime_types.findIndex(*d) != -1 ) {
+ for( TQValueList<FormatItem>::Iterator c = formats.begin(); c != formats.end(); ++c ) {
+ for( TQStringList::Iterator d = formatInfo->mime_types.begin(); d != formatInfo->mime_types.end(); ++d ) {
+ if( (*c).mime_types.tqfindIndex(*d) != -1 ) {
(*c).description = "<p>" + formatInfo->description + "</p>";
- (*c).description.replace("\\n","</p>\n<p>");
- for( QStringList::Iterator d = formatInfo->urls.begin(); d != formatInfo->urls.end(); ++d ) {
+ (*c).description.tqreplace("\\n","</p>\n<p>");
+ for( TQStringList::Iterator d = formatInfo->urls.begin(); d != formatInfo->urls.end(); ++d ) {
(*c).description += "\n<p><a href=\"" + (*d) + "\">" + (*d) + "</a></p>";
}
(*c).compressionType = formatInfo->compressionType;
(*c).size = formatInfo->size;
// add extensions for mime types
logger->log( 1000, " found mime type: `" + *d + "'" );
- QStringList extensions = KMimeType::mimeType( *d )->patterns();
- for( QStringList::Iterator c = extensions.begin(); c != extensions.end(); ++c ) {
+ TQStringList extensions = KMimeType::mimeType( *d )->patterns();
+ for( TQStringList::Iterator c = extensions.begin(); c != extensions.end(); ++c ) {
(*c).remove( 0, 2 );
logger->log( 1000, " adding extension: `" + *c + "'" );
}
@@ -890,16 +890,16 @@ void Config::loadPlugins()
extensions = formatInfo->extensions;
if( !extensions.isEmpty() ) {
logger->log( 1000, " found extensions..." );
- for( QStringList::Iterator c = extensions.begin(); c != extensions.end(); ++c ) {
+ for( TQStringList::Iterator c = extensions.begin(); c != extensions.end(); ++c ) {
logger->log( 1000, " adding extension: `" + *c + "'" );
}
(*c).extensions += extensions;
}
// add extensions for correction file mime types
- for( QStringList::Iterator d = (*c).correction_file_mime_types.begin(); d != (*c).correction_file_mime_types.end(); ++d ) {
+ for( TQStringList::Iterator d = (*c).correction_file_mime_types.begin(); d != (*c).correction_file_mime_types.end(); ++d ) {
logger->log( 1000, " found correction mime type: `" + *d + "'" );
- QStringList extensions = KMimeType::mimeType( *d )->patterns();
- for( QStringList::Iterator e = extensions.begin(); e != extensions.end(); ++e ) {
+ TQStringList extensions = KMimeType::mimeType( *d )->patterns();
+ for( TQStringList::Iterator e = extensions.begin(); e != extensions.end(); ++e ) {
(*e).remove( 0, 2 );
logger->log( 1000, " adding correction extension: `" + *e + "'" );
(*c).correction_file_extensions += (*e);
@@ -916,17 +916,17 @@ void Config::loadPlugins()
delete formatInfoLoader;
}
-void Config::registerFormatFeatures( const QString &mime_type,
+void Config::registerFormatFeatures( const TQString &mime_type,
ConvertPlugin* encoder, ConvertPlugin* decoder,
ReplayGainPlugin* replaygain/*, RepairPlugin* repairer*/,
- const QString &correction_file_mime_type )
+ const TQString &correction_file_mime_type )
{
//kdDebug() << " entering: `" << "Config::registerFormatFeatures( ... )" << "'" << endl;
logger->log( 1000, " entering: `Config::registerFormatFeatures( ... )'" );
// iterate through all file formats and search for an existing one
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(mime_type) != -1 ) { // we found an existing entry for our file format
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(mime_type) != -1 ) { // we found an existing entry for our file format
//kdDebug() << " found an existing entry: `" << mime_type << "'" << endl;
logger->log( 1000, " found an existing entry: `" + mime_type + "'" );
@@ -948,7 +948,7 @@ void Config::registerFormatFeatures( const QString &mime_type,
logger->log( 1000, " creating a new entry: `" + mime_type + "'" );
// well it seems, we haven't found an entry. create a new!
- QValueList<FormatItem>::Iterator newItem = formats.append( FormatItem() );
+ TQValueList<FormatItem>::Iterator newItem = formats.append( FormatItem() );
(*newItem).mime_types = mime_type;
if( encoder != 0 ) (*newItem).encoders.append( encoder );
// if( encoder != 0 ) (*newItem).encoder = encoder;
@@ -961,10 +961,10 @@ void Config::registerFormatFeatures( const QString &mime_type,
}
-/*void Config::registerFileFormat( const QString &mime_type, const QString &option, const QString &value )
+/*void Config::registerFileFormat( const TQString &mime_type, const TQString &option, const TQString &value )
{
// iterate through all file formats and search for an existing one
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
if( (*it).mime_types.findIndex(mime_type) != -1 ) { // we found an existing entry for our file format
if( option == "mime_type" ) (*it).mime_types.append( value );
//else if( option == "description" ) // TODO implement a qmap ?!
@@ -981,7 +981,7 @@ void Config::registerFormatFeatures( const QString &mime_type,
}
// well it seems, we haven't found an entry. create a new!
- QValueList<FormatItem>::Iterator newItem = formats.append( FormatItem() );
+ TQValueList<FormatItem>::Iterator newItem = formats.append( FormatItem() );
if( option == "mime_type" ) (*newItem).mime_types.append( value );
//else if( option == "description" ) // TODO implement a qmap ?!
else if( option == "size" ) (*newItem).size = value.toInt();
@@ -992,11 +992,11 @@ void Config::registerFormatFeatures( const QString &mime_type,
}
}*/
-ConvertPlugin* Config::encoderForFormat( const QString &format )
+ConvertPlugin* Config::encoderForFormat( const TQString &format )
{
// iterate through all file formats and search for our format in mime_types and extensions
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
return (*it).encoder;
}
}
@@ -1004,11 +1004,11 @@ ConvertPlugin* Config::encoderForFormat( const QString &format )
return 0;
}
-ConvertPlugin* Config::decoderForFormat( const QString &format )
+ConvertPlugin* Config::decoderForFormat( const TQString &format )
{
// iterate through all file formats and search for our format in mime_types and extensions
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
return (*it).decoder;
}
}
@@ -1016,11 +1016,11 @@ ConvertPlugin* Config::decoderForFormat( const QString &format )
return 0;
}
-ReplayGainPlugin* Config::replaygainForFormat( const QString &format )
+ReplayGainPlugin* Config::replaygainForFormat( const TQString &format )
{
// iterate through all file formats and search for our format in mime_types and extensions
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
return (*it).replaygain;
}
}
@@ -1028,11 +1028,11 @@ ReplayGainPlugin* Config::replaygainForFormat( const QString &format )
return 0;
}
-FormatItem* Config::getFormatItem( const QString &format )
+FormatItem* Config::getFormatItem( const TQString &format )
{
// iterate through all file formats and search for our format in mime_types and extensions
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
return &(*it);
}
}
@@ -1042,23 +1042,23 @@ FormatItem* Config::getFormatItem( const QString &format )
// NOTE speed up the following 3 functions (cache the data) (use the extensions variable in FormatItem)
// NOTE seems to be called too often ???
-QStringList Config::allFormats()
+TQStringList Config::allFormats()
{
- QStringList list;
+ TQStringList list;
//kdDebug() << "entering: `" << "Config::allFormats()" << "'" << endl;
logger->log( 1000, "entering: `Config::allFormats()'" );
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
//kdDebug() << " mime type: `" << (*it).mime_types.first() << "'" << endl;
logger->log( 1000, " mime type: `" + (*it).mime_types.first() + "'" );
if( (*it).mime_types.first() != "application/octet-stream" ) {
-// QString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
+// TQString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
// extension.remove( 0, 2 );
- QString extension = (*it).extensions.first().lower();
+ TQString extension = (*it).extensions.first().lower();
//kdDebug() << " extension: `" << extension << "'" << endl;
logger->log( 1000, " extension: `" + extension + "'" );
- if( !extension.isEmpty() && !list.contains(extension) ) {
+ if( !extension.isEmpty() && !list.tqcontains(extension) ) {
list.append( extension );
//kdDebug() << " (added)" << endl;
logger->log( 1000, " (added)" );
@@ -1069,24 +1069,24 @@ QStringList Config::allFormats()
return list;
}
-QStringList Config::allEncodableFormats()
+TQStringList Config::allEncodableFormats()
{
- QStringList list;
+ TQStringList list;
//kdDebug() << "entering: `" << "Config::allEncodableFormats()" << "'" << endl;
logger->log( 1000, "entering: `Config::allEncodableFormats()'" );
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
//kdDebug() << " mime type: `" << (*it).mime_types.first() << "'" << endl;
logger->log( 1000, " mime type: `" + (*it).mime_types.first() + "'" );
if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).mime_types.first() != "application/octet-stream" ) {
if( !(*it).encoder->enc.lossy.enabled && !(*it).encoder->enc.lossless.enabled && !(*it).encoder->enc.hybrid.enabled ) continue;
-// QString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
+// TQString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
// extension.remove( 0, 2 );
- QString extension = (*it).extensions.first().lower();
+ TQString extension = (*it).extensions.first().lower();
//kdDebug() << " extension: `" << extension << "'" << endl;
logger->log( 1000, " extension: `" + extension + "'" );
- if( !extension.isEmpty() && !list.contains(extension) ) {
+ if( !extension.isEmpty() && !list.tqcontains(extension) ) {
list.append( extension );
//kdDebug() << " (added)" << endl;
logger->log( 1000, " (added)" );
@@ -1097,23 +1097,23 @@ QStringList Config::allEncodableFormats()
return list;
}
-QStringList Config::allLossyEncodableFormats()
+TQStringList Config::allLossyEncodableFormats()
{
- QStringList list;
+ TQStringList list;
//kdDebug() << "entering: `" << "Config::allLossyEncodableFormats()" << "'" << endl;
// logger->log( 1000, "entering: `Config::allLossyEncodableFormats()'" );
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
//kdDebug() << " mime type: `" << (*it).mime_types.first() << "'" << endl;
// logger->log( 1000, " mime type: `" + (*it).mime_types.first() + "'" );
if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).encoder->enc.lossy.enabled && (*it).compressionType & FormatInfo::lossy && (*it).mime_types.first() != "application/octet-stream" ) {
-// QString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
+// TQString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
// extension.remove( 0, 2 );
- QString extension = (*it).extensions.first().lower();
+ TQString extension = (*it).extensions.first().lower();
//kdDebug() << " extension: `" << extension << "'" << endl;
// logger->log( 1000, " extension: `" + extension + "'" );
- if( !extension.isEmpty() && !list.contains(extension) ) {
+ if( !extension.isEmpty() && !list.tqcontains(extension) ) {
list.append( extension );
//kdDebug() << " (added)" << endl;
// logger->log( 1000, " (added)" );
@@ -1124,23 +1124,23 @@ QStringList Config::allLossyEncodableFormats()
return list;
}
-QStringList Config::allLosslessEncodableFormats()
+TQStringList Config::allLosslessEncodableFormats()
{
- QStringList list;
+ TQStringList list;
//kdDebug() << "entering: `" << "Config::allLosslessEncodableFormats()" << "'" << endl;
logger->log( 1000, "entering: `Config::allLosslessEncodableFormats()'" );
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
//kdDebug() << " mime type: `" << (*it).mime_types.first() << "'" << endl;
logger->log( 1000, " mime type: `" + (*it).mime_types.first() + "'" );
if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).encoder->enc.lossless.enabled && (*it).compressionType & FormatInfo::lossless && (*it).mime_types.first() != "application/octet-stream" ) {
-// QString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
+// TQString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
// extension.remove( 0, 2 );
- QString extension = (*it).extensions.first().lower();
+ TQString extension = (*it).extensions.first().lower();
//kdDebug() << " extension: `" << extension << "'" << endl;
logger->log( 1000, " extension: `" + extension + "'" );
- if( !extension.isEmpty() && !list.contains(extension) ) {
+ if( !extension.isEmpty() && !list.tqcontains(extension) ) {
list.append( extension );
//kdDebug() << " (added)" << endl;
logger->log( 1000, " (added)" );
@@ -1151,23 +1151,23 @@ QStringList Config::allLosslessEncodableFormats()
return list;
}
-QStringList Config::allHybridEncodableFormats()
+TQStringList Config::allHybridEncodableFormats()
{
- QStringList list;
+ TQStringList list;
//kdDebug() << "entering: `" << "Config::allHybridEncodableFormats()" << "'" << endl;
logger->log( 1000, "entering: `Config::allHybridEncodableFormats()'" );
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
//kdDebug() << " mime type: `" << (*it).mime_types.first() << "'" << endl;
logger->log( 1000, " mime type: `" + (*it).mime_types.first() + "'" );
if( (*it).encoder != 0 && binaries[(*it).encoder->enc.bin] != "" && (*it).encoder->enc.hybrid.enabled && (*it).compressionType & FormatInfo::hybrid && (*it).mime_types.first() != "application/octet-stream" ) {
-// QString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
+// TQString extension = KMimeType::mimeType( (*it).mime_types.first() )->patterns().first().lower();
// extension.remove( 0, 2 );
- QString extension = (*it).extensions.first().lower();
+ TQString extension = (*it).extensions.first().lower();
//kdDebug() << " extension: `" << extension << "'" << endl;
logger->log( 1000, " extension: `" + extension + "'" );
- if( !extension.isEmpty() && !list.contains(extension) ) {
+ if( !extension.isEmpty() && !list.tqcontains(extension) ) {
list.append( extension );
//kdDebug() << " (added)" << endl;
logger->log( 1000, " (added)" );
@@ -1178,11 +1178,11 @@ QStringList Config::allHybridEncodableFormats()
return list;
}
-QString Config::getCorrectionExtension( const QString &format )
+TQString Config::getCorrectionExtension( const TQString &format )
{
// iterate through all file formats and search for our format
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
return (*it).correction_file_extensions.first();
}
}
@@ -1190,11 +1190,11 @@ QString Config::getCorrectionExtension( const QString &format )
return "";
}
-QString Config::getFormatDescription( const QString &format ) // NOTE could be removed
+TQString Config::getFormatDescription( const TQString &format ) // NOTE could be removed
{
// iterate through all file formats and search for our format
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
return (*it).description;
}
}
@@ -1202,7 +1202,7 @@ QString Config::getFormatDescription( const QString &format ) // NOTE could be r
return "";
}
-void Config::addProfile( const QString &name, const ConversionOptions& profile )
+void Config::addProfile( const TQString &name, const ConversionOptions& profile )
{
ProfileData profileData;
profileData.name = name;
@@ -1212,9 +1212,9 @@ void Config::addProfile( const QString &name, const ConversionOptions& profile )
emit configChanged();
}
-void Config::removeProfile( const QString &name )
+void Config::removeProfile( const TQString &name )
{
- for( QValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
+ for( TQValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
if( (*it).name == name ) {
profiles.remove( it );
if( name != i18n("Last used") && name != "Last used" ) writeProfiles(); // will only be saved at app exit, when saving everything anyway
@@ -1224,9 +1224,9 @@ void Config::removeProfile( const QString &name )
emit configChanged();
}
-ConversionOptions Config::getProfile( const QString &name )
+ConversionOptions Config::getProfile( const TQString &name )
{
- for( QValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
+ for( TQValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
if( /*(*it).name != i18n("Last used") &&*/ (*it).name == name ) {
return (*it).options;
}
@@ -1237,7 +1237,7 @@ ConversionOptions Config::getProfile( const QString &name )
return options;
}
-QString Config::getProfileName( const ConversionOptions& options )
+TQString Config::getProfileName( const ConversionOptions& options )
{
if( options.encodingOptions.sQualityMode == i18n("Lossless") ) {
return i18n("Lossless");
@@ -1247,7 +1247,7 @@ QString Config::getProfileName( const ConversionOptions& options )
return i18n("Hybrid");
}
- for( QValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
+ for( TQValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
if( (*it).name != i18n("Last used") && (*it).options.nearlyEqual( options ) ) {
return (*it).name;
}
@@ -1365,23 +1365,23 @@ QString Config::getProfileName( const ConversionOptions& options )
return i18n("User defined");
}
-QStringList Config::getAllProfiles()
+TQStringList Config::getAllProfiles()
{
- QStringList list;
+ TQStringList list;
- for( QValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
+ for( TQValueList<ProfileData>::Iterator it = profiles.begin(); it != profiles.end(); ++it ) {
/*if( (*it).name != i18n("Last used") )*/ list += (*it).name;
}
return list;
}
-bool Config::acceptFile( const QString& format )
+bool Config::acceptFile( const TQString& format )
{
if( format == "audio/x-wav" || format == "wav" ) return true;
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
if( (*it).decoder != 0 ) return true;
}
}
@@ -1389,10 +1389,10 @@ bool Config::acceptFile( const QString& format )
return false;
}
-bool Config::acceptReplayGainFile( const QString& format )
+bool Config::acceptReplayGainFile( const TQString& format )
{
- for( QValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
- if( (*it).mime_types.findIndex(format) != -1 || (*it).extensions.findIndex(format) != -1 ) { // we found it
+ for( TQValueList<FormatItem>::Iterator it = formats.begin(); it != formats.end(); ++it ) {
+ if( (*it).mime_types.tqfindIndex(format) != -1 || (*it).extensions.tqfindIndex(format) != -1 ) { // we found it
if( (*it).replaygain != 0 ) return true;
}
}
@@ -1400,33 +1400,33 @@ bool Config::acceptReplayGainFile( const QString& format )
return false;
}
-QString Config::fileFilter( bool wav )
+TQString Config::fileFilter( bool wav )
{
- QString filter1;
+ TQString filter1;
if( wav ) filter1 += "*.wav *.WAV *.Wav";
- QString filter2;
+ TQString filter2;
if( wav ) filter2 += "\n*.wav *.WAV *.Wav|wav " + i18n("files") + " (*.wav)";
- QString temp;
+ TQString temp;
- for( QValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
+ for( TQValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
if( (*a).decoder != 0 ) {
temp = "";
- for( QStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
+ for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
filter1 += " *." + (*b);
- if( !temp.contains(*b,false) ) temp += " *." + (*b).lower();
+ if( !temp.tqcontains(*b,false) ) temp += " *." + (*b).lower();
}
//temp.stripWhiteSpace(); // NOTE doesn't work
if( temp != "" && temp.length() < 80 ) {
temp.remove( 0, 1 );
temp = "\n" + temp + "|" + (*a).extensions.first() + " " + i18n("files") + " (" + temp + ")";
- if( !filter2.contains(temp) ) { // HACK when unsing multiple mime types, there were too much entries
+ if( !filter2.tqcontains(temp) ) { // HACK when unsing multiple mime types, there were too much entries
filter2 += temp;
}
}
else if( temp != "" ) {
temp.remove( 0, 1 );
temp = "\n" + temp + "|" + (*a).extensions.first() + " " + i18n("files");
- if( !filter2.contains(temp) ) { // HACK when unsing multiple mime types, there were too much entries
+ if( !filter2.tqcontains(temp) ) { // HACK when unsing multiple mime types, there were too much entries
filter2 += temp;
}
}
@@ -1439,21 +1439,21 @@ QString Config::fileFilter( bool wav )
return filter1 + "|" + i18n("all supported formats") + "\n*.*|" + i18n("all formats") + filter2;
}
-QStringList Config::fileTypes( bool wav )
+TQStringList Config::fileTypes( bool wav )
{
- QStringList types;
+ TQStringList types;
if( wav ) types.append( "wav" );
- QString temp;
+ TQString temp;
- for( QValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
+ for( TQValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
if( (*a).decoder != 0 ) {
temp = "";
- for( QStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
- if( !temp.contains(*b,false) ) temp.append( (*b).lower() + ", " );
+ for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
+ if( !temp.tqcontains(*b,false) ) temp.append( (*b).lower() + ", " );
}
if( temp != "" ) {
temp = temp.left( temp.length() - 2 );
- if( types.findIndex(temp) == -1 ) types.append( temp );
+ if( types.tqfindIndex(temp) == -1 ) types.append( temp );
}
}
}
@@ -1461,18 +1461,18 @@ QStringList Config::fileTypes( bool wav )
return types;
}
-QString Config::replayGainFilter()
+TQString Config::replayGainFilter()
{
- QString filter1;
- QString filter2;
- QString temp;
+ TQString filter1;
+ TQString filter2;
+ TQString temp;
- for( QValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
+ for( TQValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
if( (*a).replaygain != 0 ) {
temp = "";
- for( QStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
+ for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
filter1 += " *." + (*b);
- if( !temp.contains(*b,false) ) temp += " *." + (*b).lower();
+ if( !temp.tqcontains(*b,false) ) temp += " *." + (*b).lower();
}
//temp.stripWhiteSpace(); // NOTE doesn't work
if( temp != "" && temp.length() < 80 ) {
@@ -1492,20 +1492,20 @@ QString Config::replayGainFilter()
return filter1 + "|" + i18n("all supported formats") + "\n*.*|" + i18n("all formats") + filter2;
}
-QStringList Config::replayGainFileTypes()
+TQStringList Config::replayGainFileTypes()
{
- QStringList types;
- QString temp;
+ TQStringList types;
+ TQString temp;
- for( QValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
+ for( TQValueList<FormatItem>::Iterator a = formats.begin(); a != formats.end(); ++a ) {
if( (*a).replaygain != 0 ) {
temp = "";
- for( QStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
- if( !temp.contains(*b,false) ) temp.append( (*b).lower() + ", " );
+ for( TQStringList::Iterator b = (*a).extensions.begin(); b != (*a).extensions.end(); ++b ) {
+ if( !temp.tqcontains(*b,false) ) temp.append( (*b).lower() + ", " );
}
if( temp != "" ) {
temp = temp.left( temp.length() - 2 );
- if( types.findIndex(temp) == -1 ) types.append( temp );
+ if( types.tqfindIndex(temp) == -1 ) types.append( temp );
}
}
}
diff --git a/src/config.h b/src/config.h
index 130ddf9..673150d 100755
--- a/src/config.h
+++ b/src/config.h
@@ -6,10 +6,10 @@
#include "formatinfoloader.h"
#include "conversionoptions.h"
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class Logger;
class ConvertPlugin;
@@ -38,19 +38,19 @@ public:
*/
virtual ~FormatItem();
- QStringList mime_types;
- QStringList extensions; // for easy use
- QStringList correction_file_mime_types;
- QStringList correction_file_extensions; // for easy use
- QString description;
+ TQStringList mime_types;
+ TQStringList extensions; // for easy use
+ TQStringList correction_file_mime_types;
+ TQStringList correction_file_extensions; // for easy use
+ TQString description;
FormatInfo::CompressionType compressionType;
int compressionLevel; // the value from the config dialog
bool internalReplayGain;
int size;
- QValueList<ConvertPlugin*> encoders;
- QValueList<ConvertPlugin*> decoders;
- QValueList<ReplayGainPlugin*> replaygains;
- //QValueList<RepairerPlugin*> repairers;
+ TQValueList<ConvertPlugin*> encoders;
+ TQValueList<ConvertPlugin*> decoders;
+ TQValueList<ReplayGainPlugin*> replaygains;
+ //TQValueList<RepairerPlugin*> repairers;
ConvertPlugin* encoder;
ConvertPlugin* decoder;
ReplayGainPlugin* replaygain;
@@ -63,9 +63,10 @@ public:
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class Config : public QObject
+class Config : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -100,22 +101,22 @@ public:
/**
* Get the encoder for a given file format (mime type or extension)
*/
- ConvertPlugin* encoderForFormat( const QString &format );
+ ConvertPlugin* encoderForFormat( const TQString &format );
/**
* Get the decoder for a given file format (mime type or extension)
*/
- ConvertPlugin* decoderForFormat( const QString &format );
+ ConvertPlugin* decoderForFormat( const TQString &format );
/**
* Get the decoder for a given file format (mime type or extension)
*/
- ReplayGainPlugin* replaygainForFormat( const QString &format );
+ ReplayGainPlugin* replaygainForFormat( const TQString &format );
/**
* Get the format information for a given file format (mime type or extension)
*/
- FormatItem* getFormatItem( const QString &format );
+ FormatItem* getFormatItem( const TQString &format );
/**
* Get the current ripper
@@ -130,119 +131,119 @@ public:
/**
* Returns a list of all loaded rippers
*/
- QValueList<RipperPlugin*> allRippers() { return rippers; }
+ TQValueList<RipperPlugin*> allRippers() { return rippers; }
/**
* Returns a list of all loaded converters
*/
- QValueList<ConvertPlugin*> allConverters() { return converters; }
+ TQValueList<ConvertPlugin*> allConverters() { return converters; }
/**
* Returns a list of all loaded replaygains
*/
- QValueList<ReplayGainPlugin*> allReplayGains() { return replaygains; }
+ TQValueList<ReplayGainPlugin*> allReplayGains() { return replaygains; }
/**
* Returns a list of all known file formats
*/
- QStringList allFormats();
+ TQStringList allFormats();
/**
* Returns a list of all known encodeable file formats
*/
- QStringList allEncodableFormats();
+ TQStringList allEncodableFormats();
/**
* Returns a list of all known lossy encodeable file formats
*/
- QStringList allLossyEncodableFormats();
+ TQStringList allLossyEncodableFormats();
/**
* Returns a list of all known lossless encodeable file formats
*/
- QStringList allLosslessEncodableFormats();
+ TQStringList allLosslessEncodableFormats();
/**
* Returns a list of all known hybrid encodeable file formats
*/
- QStringList allHybridEncodableFormats();
+ TQStringList allHybridEncodableFormats();
/**
* Returns the extension of the correction file format for the given format
* If there is nor correction file format, the returned string is empty
*/
- QString getCorrectionExtension( const QString &format );
+ TQString getCorrectionExtension( const TQString &format );
/**
* Returns a localized description for the given format
*/
- QString getFormatDescription( const QString &format );
+ TQString getFormatDescription( const TQString &format );
/**
* Add a new profile
*/
- void addProfile( const QString &name, const ConversionOptions& profile );
+ void addProfile( const TQString &name, const ConversionOptions& profile );
/**
* Remove a new profile
*/
- void removeProfile( const QString &name );
+ void removeProfile( const TQString &name );
/**
* Returns the conversion options for a profile
*/
- ConversionOptions getProfile( const QString &name );
+ ConversionOptions getProfile( const TQString &name );
/**
* Returns the name of the profile with conversion options @p options
*/
- QString getProfileName( const ConversionOptions& options );
+ TQString getProfileName( const ConversionOptions& options );
/**
* Returns a list of all user defined profiles
*/
- QStringList getAllProfiles();
+ TQStringList getAllProfiles();
/**
* Returns true if the @p file can be added to the conversion list (can be decoded)
*/
- bool acceptFile( const QString& format );
+ bool acceptFile( const TQString& format );
/**
* Returns true if the @p file can be added to the replay gain tool
*/
- bool acceptReplayGainFile( const QString& format );
+ bool acceptReplayGainFile( const TQString& format );
/**
* Returns a file filter suitable for the file open dialog
*/
- QString fileFilter( bool wav = true );
+ TQString fileFilter( bool wav = true );
/**
* Returns a string list of supported file formats
*/
- QStringList fileTypes( bool wav = true );
+ TQStringList fileTypes( bool wav = true );
/**
* Returns a file filter suitable for the file open dialog for the replay gain scanner
*/
- QString replayGainFilter();
+ TQString replayGainFilter();
/**
* Returns a string list of Replay Gain supported file formats
*/
- QStringList replayGainFileTypes();
+ TQStringList replayGainFileTypes();
struct Data {
struct General {
int startTab;
int lastTab;
- QString defaultProfile;
- QString defaultFormat;
-// QString defaultOutputDirectory;
- QString specifyOutputDirectory;
- QString metaDataOutputDirectory;
- QString copyStructureOutputDirectory;
+ TQString defaultProfile;
+ TQString defaultFormat;
+// TQString defaultOutputDirectory;
+ TQString specifyOutputDirectory;
+ TQString metaDataOutputDirectory;
+ TQString copyStructureOutputDirectory;
int priority;
bool useVFATNames;
int conflictHandling;
@@ -256,8 +257,8 @@ public:
bool checkForUpdates;
} plugins;
struct Environment {
- QStringList directories;
- QStringList foundPrograms;
+ TQStringList directories;
+ TQStringList foundPrograms;
} environment;
struct App {
int configVersion;
@@ -267,36 +268,36 @@ public:
bool onlinePluginsChanged;
bool backendsChanged;
- QMap<QString, QString> binaries;
+ TQMap<TQString, TQString> binaries;
private:
struct PluginMapData {
int version;
- QString filename;
- QString type;
+ TQString filename;
+ TQString type;
};
Logger* logger;
/** holds all known formats */
- QValueList<FormatItem> formats;
+ TQValueList<FormatItem> formats;
/** holds all known rippers */
- QValueList<RipperPlugin*> rippers;
+ TQValueList<RipperPlugin*> rippers;
RipperPlugin* currentRipper;
/** holds all known converters */
- QValueList<ConvertPlugin*> converters;
+ TQValueList<ConvertPlugin*> converters;
/** holds all known replaygain apps */
- QValueList<ReplayGainPlugin*> replaygains;
+ TQValueList<ReplayGainPlugin*> replaygains;
/* holds all known file repairing apps */
-// QValueList<RepairerItem> repairer;
+// TQValueList<RepairerItem> repairer;
//ConvertPluginLoader* convertPluginLoader;
//ReplayGainPluginLoader* replaygainPluginLoader;
/** holds all user defined profiles */
- QValueList<ProfileData> profiles;
+ TQValueList<ProfileData> profiles;
/**
* Load the files with the file infos (format descriptions, file size, etc.)
@@ -314,10 +315,10 @@ private:
* @p extension The file name extension for that is wants to register
* @p features The features of the app for that extension
*/
- void registerFormatFeatures( const QString &mime_type,
+ void registerFormatFeatures( const TQString &mime_type,
ConvertPlugin* encoder = 0, ConvertPlugin* decoder = 0,
ReplayGainPlugin* replaygain = 0/*, RepairPlugin* repairer = 0*/,
- const QString &correction_file_mime_type = QString::null );
+ const TQString &correction_file_mime_type = TQString() );
/**
* Generate the service menu
@@ -337,11 +338,11 @@ private:
* @p newDescription Register a new description for this file format?
* @p newSize Register a new size for this file format for calculating the progress?
*/
- /*void registerFileFormat( const QString &extension, const QString &newSynonym = QString::null,
- const QString &newMimeType = QString::null,
- const QString &newDescription = QString::null,
+ /*void registerFileFormat( const TQString &extension, const TQString &newSynonym = TQString(),
+ const TQString &newMimeType = TQString(),
+ const TQString &newDescription = TQString(),
int newSize = 0, FormatInfo::CompressionType newCompressionType = FormatInfo::lossy );*/
- //void registerFileFormat( const QString &mime_type, const QString &option, const QString &value );
+ //void registerFileFormat( const TQString &mime_type, const TQString &option, const TQString &value );
// NOTE this function is obsolete.
// after loading all plugins and creating all neccessary file format items,
// sk will search for format info files and update the items.
diff --git a/src/configbackendspage.cpp b/src/configbackendspage.cpp
index d7b1589..5d61cb3 100755
--- a/src/configbackendspage.cpp
+++ b/src/configbackendspage.cpp
@@ -5,13 +5,13 @@
#include "ripperpluginloader.h"
#include "config.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qslider.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqslider.h>
+#include <tqcheckbox.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -20,44 +20,44 @@
#include <kstandarddirs.h>
-ConfigBackendsPage::ConfigBackendsPage( Config* _config, QMap<QString, QString>* _binaries, QWidget* parent, const char *name )
- : ConfigPageBase( parent, name )
+ConfigBackendsPage::ConfigBackendsPage( Config* _config, TQMap<TQString, TQString>* _binaries, TQWidget* tqparent, const char *name )
+ : ConfigPageBase( tqparent, name )
{
config = _config;
binaries = _binaries;
- grid = new QGridLayout( parent );
- scrollView = new KScrollView( parent, "scrollView" );
- scrollView->setResizePolicy( QScrollView::AutoOneFit );
+ grid = new TQGridLayout( tqparent );
+ scrollView = new KScrollView( tqparent, "scrollView" );
+ scrollView->setResizePolicy( TQScrollView::AutoOneFit );
grid->addWidget( scrollView, 0, 0 );
- box = new QVBox( scrollView->viewport() );
+ box = new TQVBox( scrollView->viewport() );
box->setMargin( 11 );
box->setSpacing( 6 );
scrollView->addChild( box );
- QHBox* legendBox = new QHBox( box );
+ TQHBox* legendBox = new TQHBox( box );
legendBox->setMargin( 0 );
legendBox->setSpacing( 6 );
KStandardDirs* stdDirs = new KStandardDirs();
- QLabel* lLegendLabel = new QLabel( i18n("Legend")+":", legendBox, "lLegendLabel" );
- QLabel* lLegendGreen = new QLabel( "", legendBox, "lLegendGreen" );
- lLegendGreen->setPixmap( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen_legend.png")) );
- QLabel* lLegendFull = new QLabel( i18n("Full support"), legendBox, "lLegendFull" );
- QLabel* lLegendYellow = new QLabel("",legendBox,"lLegendYellow");
- lLegendYellow->setPixmap( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow_legend.png")) );
- QLabel* lLegendMost = new QLabel( i18n("Most supported"), legendBox, "lLegendMost" );
- QLabel* lLegendRed = new QLabel( "", legendBox, "lLegendRed" );
- lLegendRed->setPixmap( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred_legend.png")) );
- QLabel* lLegendBasic = new QLabel( i18n("Basic support"), legendBox, "lLegendBasic" );
+ TQLabel* lLegendLabel = new TQLabel( i18n("Legend")+":", legendBox, "lLegendLabel" );
+ TQLabel* lLegendGreen = new TQLabel( "", legendBox, "lLegendGreen" );
+ lLegendGreen->setPixmap( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen_legend.png")) );
+ TQLabel* lLegendFull = new TQLabel( i18n("Full support"), legendBox, "lLegendFull" );
+ TQLabel* lLegendYellow = new TQLabel("",legendBox,"lLegendYellow");
+ lLegendYellow->setPixmap( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow_legend.png")) );
+ TQLabel* lLegendMost = new TQLabel( i18n("Most supported"), legendBox, "lLegendMost" );
+ TQLabel* lLegendRed = new TQLabel( "", legendBox, "lLegendRed" );
+ lLegendRed->setPixmap( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred_legend.png")) );
+ TQLabel* lLegendBasic = new TQLabel( i18n("Basic support"), legendBox, "lLegendBasic" );
legendBox->setStretchFactor( lLegendLabel, 1 );
- QGroupBox* ripperGroup = new QGroupBox( 1, Qt::Vertical, box, "ripperGroup" );
- ripperGroup->layout()->setSpacing( 6 );
- ripperGroup->layout()->setMargin( 6 );
- QLabel* lRipper = new QLabel( i18n("CD Ripper")+":", ripperGroup, "lRipper" );
+ TQGroupBox* ripperGroup = new TQGroupBox( 1, Qt::Vertical, box, "ripperGroup" );
+ ripperGroup->tqlayout()->setSpacing( 6 );
+ ripperGroup->tqlayout()->setMargin( 6 );
+ TQLabel* lRipper = new TQLabel( i18n("CD Ripper")+":", ripperGroup, "lRipper" );
cRipper = new KComboBox( ripperGroup, "cRipper" );
- connect( cRipper, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cRipper, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
delete stdDirs;
@@ -77,8 +77,8 @@ void ConfigBackendsPage::resetDefaults()
i = 1;
rank = 60;
item = 0;
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it )
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it )
{
if( (*it)->rip.rank > rank ) {
rank = (*it)->rip.rank;
@@ -88,13 +88,13 @@ void ConfigBackendsPage::resetDefaults()
}
cRipper->setCurrentItem( item );
- for( QValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
+ for( TQValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
{
FormatItem* formatItem = config->getFormatItem( (*a).format );
if( formatItem == 0 ) continue;
i = item = rank = 0;
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
if( (*b)->enc.rank > rank ) {
rank = (*b)->enc.rank;
item = i;
@@ -104,7 +104,7 @@ void ConfigBackendsPage::resetDefaults()
(*a).cEncoder->setCurrentItem( item );
i = item = rank = 0;
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
if( (*b)->dec.rank > rank ) {
rank = (*b)->dec.rank;
item = i;
@@ -114,7 +114,7 @@ void ConfigBackendsPage::resetDefaults()
(*a).cDecoder->setCurrentItem( item );
i = item = rank = 0;
- for( QValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
+ for( TQValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
if( (*b)->replaygain.rank > rank ) {
rank = (*b)->replaygain.rank;
item = i;
@@ -126,16 +126,16 @@ void ConfigBackendsPage::resetDefaults()
encoderChanged();
- for( QValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
+ for( TQValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
{
FormatItem* formatItem = config->getFormatItem( (*a).format );
if( formatItem == 0 ) continue;
- QString encoder = (*a).cEncoder->currentText();
+ TQString encoder = (*a).cEncoder->currentText();
(*a).cInternalReplayGain->setChecked( false );
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
if( (*b)->enc.bin == encoder && (*b)->enc.strength.enabled ) {
if( (*b)->enc.strength.range_max >= (*b)->enc.strength.range_min )
(*a).sStrength->setValue( (*b)->enc.strength.default_value / (*b)->enc.strength.step );
@@ -160,20 +160,20 @@ void ConfigBackendsPage::resetDefaults()
void ConfigBackendsPage::saveSettings()
{
config->setCurrentRipper( 0 );
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it )
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it )
{
if( (*it)->rip.bin == cRipper->currentText() ) {
config->setCurrentRipper( *it );
}
}
- for( QValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
+ for( TQValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
{
FormatItem* formatItem = config->getFormatItem( (*a).format );
if( formatItem == 0 ) continue;
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
if( (*b)->enc.bin == (*a).cEncoder->currentText() ) {
formatItem->encoder = (*b);
if( (*b)->enc.strength.enabled ) {
@@ -185,13 +185,13 @@ void ConfigBackendsPage::saveSettings()
}
}
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
if( (*b)->dec.bin == (*a).cDecoder->currentText() ) {
formatItem->decoder = (*b);
}
}
- for( QValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
+ for( TQValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
if( (*b)->replaygain.bin == (*a).cReplayGain->currentText() ) {
formatItem->replaygain = (*b);
}
@@ -201,22 +201,22 @@ void ConfigBackendsPage::saveSettings()
void ConfigBackendsPage::rebuild()
{
- for( QValueList<FormatOptions>::Iterator it = formatOptions.begin(); it != formatOptions.end(); ++it )
+ for( TQValueList<FormatOptions>::Iterator it = formatOptions.begin(); it != formatOptions.end(); ++it )
{
delete (*it).lEncoder;
- disconnect( (*it).cEncoder, SIGNAL(activated(int)), 0, 0 );
+ disconnect( (*it).cEncoder, TQT_SIGNAL(activated(int)), 0, 0 );
delete (*it).cEncoder;
delete (*it).lStrength;
- disconnect( (*it).sStrength,SIGNAL(valueChanged(int)), 0, 0 );
+ disconnect( (*it).sStrength,TQT_SIGNAL(valueChanged(int)), 0, 0 );
delete (*it).sStrength;
delete (*it).lStrengthDisplay;
delete (*it).lDecoder;
- disconnect( (*it).cDecoder, SIGNAL(activated(int)), 0, 0 );
+ disconnect( (*it).cDecoder, TQT_SIGNAL(activated(int)), 0, 0 );
delete (*it).cDecoder;
delete (*it).lReplayGain;
- disconnect( (*it).cReplayGain, SIGNAL(activated(int)), 0, 0 );
+ disconnect( (*it).cReplayGain, TQT_SIGNAL(activated(int)), 0, 0 );
delete (*it).cReplayGain;
- disconnect( (*it).cInternalReplayGain, SIGNAL(toggled(bool)), 0, 0 );
+ disconnect( (*it).cInternalReplayGain, TQT_SIGNAL(toggled(bool)), 0, 0 );
delete (*it).cInternalReplayGain;
delete (*it).grid;
delete (*it).group;
@@ -226,23 +226,23 @@ void ConfigBackendsPage::rebuild()
// TODO show all extensions
- QStringList formats = config->allFormats();
+ TQStringList formats = config->allFormats();
- for( QStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
+ for( TQStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
{
FormatOptions options;
options.format = *it;
FormatItem *formatItem = config->getFormatItem( options.format );
- QString title;
+ TQString title;
if( formatItem ) {
- for( QStringList::Iterator at = formatItem->extensions.begin(); at != formatItem->extensions.end(); ++at ) {
- if( !title.contains((*at).lower()) ) title += (*at).lower() + ", ";
+ for( TQStringList::Iterator at = formatItem->extensions.begin(); at != formatItem->extensions.end(); ++at ) {
+ if( !title.tqcontains((*at).lower()) ) title += (*at).lower() + ", ";
}
title = title.left( title.length() - 2 );
/* title += " [";
- for( QStringList::Iterator bt = formatItem->mime_types.begin(); bt != formatItem->mime_types.end(); ++bt ) {
- if( !title.contains((*bt).lower()) ) title += (*bt).lower() + ", ";
+ for( TQStringList::Iterator bt = formatItem->mime_types.begin(); bt != formatItem->mime_types.end(); ++bt ) {
+ if( !title.tqcontains((*bt).lower()) ) title += (*bt).lower() + ", ";
}
title = title.left( title.length() - 2 ) + "]";*/
}
@@ -250,70 +250,70 @@ void ConfigBackendsPage::rebuild()
title = options.format;
}
- options.group = new QGroupBox( title, box, options.format );
+ options.group = new TQGroupBox( title, box, options.format );
options.group->setColumnLayout( 0, Qt::Vertical );
- options.group->layout()->setSpacing( 6 );
- options.group->layout()->setMargin( 6 );
+ options.group->tqlayout()->setSpacing( 6 );
+ options.group->tqlayout()->setMargin( 6 );
options.group->show();
- options.grid = new QGridLayout( options.group->layout() );
+ options.grid = new TQGridLayout( options.group->tqlayout() );
- options.lEncoder = new QLabel( i18n("Encoder")+":", options.group, options.format );
+ options.lEncoder = new TQLabel( i18n("Encoder")+":", options.group, options.format );
options.lEncoder->show();
options.grid->addWidget( options.lEncoder, 0, 0 );
options.cEncoder = new KComboBox( options.group, options.format );
options.cEncoder->show();
- connect( options.cEncoder, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( options.cEncoder, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
- connect( options.cEncoder, SIGNAL(activated(int)),
- this, SLOT(encoderChanged())
+ connect( options.cEncoder, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(encoderChanged())
);
options.grid->addWidget( options.cEncoder, 0, 1 );
- options.lStrength = new QLabel( i18n("Strength")+":", options.group, options.format );
- options.lStrength->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ options.lStrength = new TQLabel( i18n("Strength")+":", options.group, options.format );
+ options.lStrength->tqsetAlignment( TQt::AlignRight | TQt::AlignVCenter );
options.lStrength->show();
options.grid->addWidget( options.lStrength, 0, 2 );
- options.sStrength = new QSlider( Qt::Horizontal, options.group, options.format );
- options.sStrength->setTickmarks( QSlider::Below );
+ options.sStrength = new TQSlider( Qt::Horizontal, options.group, options.format );
+ options.sStrength->setTickmarks( TQSlider::Below );
options.sStrength->show();
- QToolTip::add( options.sStrength, i18n("Set the compression strength:\n\nLeft = fast conversion\nRight = good resultant file") );
+ TQToolTip::add( options.sStrength, i18n("Set the compression strength:\n\nLeft = fast conversion\nRight = good resultant file") );
options.grid->addWidget( options.sStrength, 0, 3 );
- connect( options.sStrength, SIGNAL(valueChanged(int)),
- this, SLOT(cfgChanged())
+ connect( options.sStrength, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(cfgChanged())
);
- connect( options.sStrength, SIGNAL(valueChanged(int)),
- this, SLOT(strengthChanged())
+ connect( options.sStrength, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(strengthChanged())
);
- options.lDecoder = new QLabel( i18n("Decoder")+":", options.group, options.format );
+ options.lDecoder = new TQLabel( i18n("Decoder")+":", options.group, options.format );
options.lDecoder->show();
options.grid->addWidget( options.lDecoder, 1, 0 );
options.cDecoder = new KComboBox( options.group, options.format );
options.cDecoder->show();
options.grid->addWidget( options.cDecoder, 1, 1 );
- connect( options.cDecoder, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( options.cDecoder, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
- options.lStrengthDisplay = new QLabel( "", options.group, options.format );
- options.lStrengthDisplay->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ options.lStrengthDisplay = new TQLabel( "", options.group, options.format );
+ options.lStrengthDisplay->tqsetAlignment( TQt::AlignRight | TQt::AlignVCenter );
options.lStrengthDisplay->setEnabled( false );
options.grid->addWidget( options.lStrengthDisplay, 1, 3 );
- options.lReplayGain = new QLabel( i18n("Replay Gain")+":", options.group, options.format );
+ options.lReplayGain = new TQLabel( i18n("Replay Gain")+":", options.group, options.format );
options.lReplayGain->show();
options.grid->addWidget( options.lReplayGain, 2, 0 );
options.cReplayGain = new KComboBox( options.group, options.format );
options.cReplayGain->show();
options.grid->addWidget( options.cReplayGain, 2, 1 );
- connect( options.cReplayGain, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( options.cReplayGain, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
- options.cInternalReplayGain = new QCheckBox( i18n("Use internal Replay Gain"), options.group, options.format );
- QToolTip::add( options.cInternalReplayGain, i18n("Use the internal Replay Gain calculator of the encoder") );
+ options.cInternalReplayGain = new TQCheckBox( i18n("Use internal Replay Gain"), options.group, options.format );
+ TQToolTip::add( options.cInternalReplayGain, i18n("Use the internal Replay Gain calculator of the encoder") );
options.grid->addWidget( options.cInternalReplayGain, 2, 3 );
- connect( options.cInternalReplayGain, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( options.cInternalReplayGain, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
options.grid->setColStretch( 0, 0 );
@@ -334,22 +334,22 @@ void ConfigBackendsPage::refill()
cRipper->clear();
i = item = 0;
- cRipper->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), i18n("KDE audio CD protocol") );
+ cRipper->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), i18n("KDE audio CD protocol") );
i++;
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it )
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it )
{
if( (*binaries)[(*it)->rip.bin] == "" ) continue;
- if( (*it)->rip.rank >= 70 ) cRipper->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*it)->rip.bin );
- else if( (*it)->rip.rank >= 40 ) cRipper->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*it)->rip.bin );
- else cRipper->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*it)->rip.bin );
+ if( (*it)->rip.rank >= 70 ) cRipper->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*it)->rip.bin );
+ else if( (*it)->rip.rank >= 40 ) cRipper->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*it)->rip.bin );
+ else cRipper->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*it)->rip.bin );
if( (*it) == config->getCurrentRipper() ) item = i;
i++;
}
cRipper->setCurrentItem( item );
- for( QValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
+ for( TQValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
{
FormatItem* formatItem = config->getFormatItem( (*a).format );
(*a).cEncoder->clear();
@@ -358,36 +358,36 @@ void ConfigBackendsPage::refill()
if( formatItem == 0 ) continue;
i = item = 0;
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
if( (*binaries)[(*b)->enc.bin] == "" ) continue;
- if( (*b)->enc.rank >= 70 ) (*a).cEncoder->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*b)->enc.bin );
- else if( (*b)->enc.rank >= 40 ) (*a).cEncoder->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*b)->enc.bin );
- else (*a).cEncoder->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*b)->enc.bin );
+ if( (*b)->enc.rank >= 70 ) (*a).cEncoder->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*b)->enc.bin );
+ else if( (*b)->enc.rank >= 40 ) (*a).cEncoder->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*b)->enc.bin );
+ else (*a).cEncoder->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*b)->enc.bin );
if( (*b) == formatItem->encoder ) item = i;
i++;
}
(*a).cEncoder->setCurrentItem( item );
i = item = 0;
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
if( (*binaries)[(*b)->dec.bin] == "" ) continue;
- if( (*b)->dec.rank >= 70 ) (*a).cDecoder->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*b)->dec.bin );
- else if( (*b)->dec.rank >= 40 ) (*a).cDecoder->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*b)->dec.bin );
- else (*a).cDecoder->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*b)->dec.bin );
+ if( (*b)->dec.rank >= 70 ) (*a).cDecoder->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*b)->dec.bin );
+ else if( (*b)->dec.rank >= 40 ) (*a).cDecoder->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*b)->dec.bin );
+ else (*a).cDecoder->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*b)->dec.bin );
if( (*b) == formatItem->decoder ) item = i;
i++;
}
(*a).cDecoder->setCurrentItem( item );
i = item = 0;
- for( QValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
+ for( TQValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
if( (*binaries)[(*b)->replaygain.bin] == "" ) continue;
- if( (*b)->replaygain.rank >= 70 ) (*a).cReplayGain->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*b)->replaygain.bin );
- else if( (*b)->replaygain.rank >= 40 ) (*a).cReplayGain->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*b)->replaygain.bin );
- else (*a).cReplayGain->insertItem( QPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*b)->replaygain.bin );
+ if( (*b)->replaygain.rank >= 70 ) (*a).cReplayGain->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledgreen.png")), (*b)->replaygain.bin );
+ else if( (*b)->replaygain.rank >= 40 ) (*a).cReplayGain->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledyellow.png")), (*b)->replaygain.bin );
+ else (*a).cReplayGain->insertItem( TQPixmap(stdDirs->findResource("data","soundkonverter/pics/ledred.png")), (*b)->replaygain.bin );
if( (*b) == formatItem->replaygain ) item = i;
i++;
}
@@ -403,7 +403,7 @@ void ConfigBackendsPage::encoderChanged()
{
bool recalc;
- for( QValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
+ for( TQValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
{
FormatItem* formatItem = config->getFormatItem( (*a).format );
(*a).lStrength->hide();
@@ -412,11 +412,11 @@ void ConfigBackendsPage::encoderChanged()
(*a).cInternalReplayGain->hide();
if( formatItem == 0 ) continue;
- QString encoder = (*a).cEncoder->currentText();
+ TQString encoder = (*a).cEncoder->currentText();
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
- if( QObject::sender() && (*a).format == QObject::sender()->name() ) recalc = true;
- else if( !QObject::sender() ) recalc = true;
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
+ if( TQT_BASE_OBJECT_NAME::sender() && (*a).format == TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>((TQT_BASE_OBJECT_NAME::sender())))->name() ) recalc = true;
+ else if( !TQT_BASE_OBJECT_NAME::sender() ) recalc = true;
else recalc = false;
if( (*b)->enc.bin == encoder && (*b)->enc.strength.enabled ) {
(*a).lStrength->show();
@@ -429,13 +429,13 @@ void ConfigBackendsPage::encoderChanged()
(*a).sStrength->setMaxValue( (int)((*b)->enc.strength.range_min/(*b)->enc.strength.step) );
}
(*a).sStrength->setPageStep( 1 );
- if( QObject::sender() && (*a).format == QObject::sender()->name() ) {
+ if( TQT_BASE_OBJECT_NAME::sender() && (*a).format == TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(TQT_BASE_OBJECT_NAME::sender()))->name() ) {
if( (*b)->enc.strength.range_max >= (*b)->enc.strength.range_min )
(*a).sStrength->setValue( (*b)->enc.strength.default_value / (*b)->enc.strength.step );
else
(*a).sStrength->setValue( ( (*b)->enc.strength.range_min - (*b)->enc.strength.default_value ) / (*b)->enc.strength.step );
}
- else if( !QObject::sender() ) {
+ else if( !TQT_BASE_OBJECT_NAME::sender() ) {
(*a).sStrength->setValue( formatItem->compressionLevel );
}
(*a).sStrength->show();
@@ -453,35 +453,35 @@ void ConfigBackendsPage::encoderChanged()
void ConfigBackendsPage::strengthChanged()
{
- for( QValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
+ for( TQValueList<FormatOptions>::Iterator a = formatOptions.begin(); a != formatOptions.end(); ++a )
{
FormatItem* formatItem = config->getFormatItem( (*a).format );
if( formatItem == 0 ) continue;
- QString encoder = (*a).cEncoder->currentText();
+ TQString encoder = (*a).cEncoder->currentText();
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
if( (*b)->enc.bin == encoder && (*b)->enc.strength.enabled ) {
- QString strength = (*b)->enc.strength.param;
+ TQString strength = (*b)->enc.strength.param;
int compressionLevel = (*a).sStrength->value();
if( (*b)->enc.strength.profiles.empty() ) {
if( (*b)->enc.strength.step < 1 ) {
if( (*b)->enc.strength.range_max >= (*b)->enc.strength.range_min )
- strength.replace( "%c", QString::number( compressionLevel * (*b)->enc.strength.step ) );
+ strength.tqreplace( "%c", TQString::number( compressionLevel * (*b)->enc.strength.step ) );
else
- strength.replace( "%c", QString::number( (*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step ) );
+ strength.tqreplace( "%c", TQString::number( (*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step ) );
}
else {
if( (*b)->enc.strength.range_max >= (*b)->enc.strength.range_min )
- strength.replace( "%c", QString::number( (int)(compressionLevel * (*b)->enc.strength.step) ) );
+ strength.tqreplace( "%c", TQString::number( (int)(compressionLevel * (*b)->enc.strength.step) ) );
else
- strength.replace( "%c", QString::number( (int)((*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step) ) );
+ strength.tqreplace( "%c", TQString::number( (int)((*b)->enc.strength.range_min - compressionLevel * (*b)->enc.strength.step) ) );
}
- if( (*b)->enc.strength.separator != '.' ) strength.replace( QChar('.'), (*b)->enc.strength.separator );
+ if( (*b)->enc.strength.separator != '.' ) strength.tqreplace( TQChar('.'), (*b)->enc.strength.separator );
}
else {
- QStringList::Iterator it = (*b)->enc.strength.profiles.at( (int)compressionLevel );
- strength.replace( "%c", *it );
+ TQStringList::Iterator it = (*b)->enc.strength.profiles.at( (int)compressionLevel );
+ strength.tqreplace( "%c", *it );
}
(*a).lStrengthDisplay->setText( "( \"" + strength + "\" )" );
}
diff --git a/src/configbackendspage.h b/src/configbackendspage.h
index 27071f2..a8cef3c 100755
--- a/src/configbackendspage.h
+++ b/src/configbackendspage.h
@@ -5,17 +5,17 @@
#include <configpagebase.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class Config;
class KComboBox;
class KScrollView;
-class QGroupBox;
-class QGridLayout;
-class QLabel;
-class QSlider;
-class QCheckBox;
-class QVBox;
+class TQGroupBox;
+class TQGridLayout;
+class TQLabel;
+class TQSlider;
+class TQCheckBox;
+class TQVBox;
/**
* @short The page for configuring the environment
@@ -25,11 +25,12 @@ class QVBox;
class ConfigBackendsPage : public ConfigPageBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- ConfigBackendsPage( Config*, QMap<QString, QString>*, QWidget *parent=0, const char *name=0 );
+ ConfigBackendsPage( Config*, TQMap<TQString, TQString>*, TQWidget *tqparent=0, const char *name=0 );
/**
* Default Destructor
@@ -40,32 +41,32 @@ private:
struct FormatOptions
{
// TODO remove the string lists
- QString format;
- QGroupBox* group;
- QGridLayout* grid;
- QLabel* lEncoder;
+ TQString format;
+ TQGroupBox* group;
+ TQGridLayout* grid;
+ TQLabel* lEncoder;
KComboBox* cEncoder;
- QLabel* lStrength;
- QSlider* sStrength;
- QLabel* lStrengthDisplay;
- QLabel* lDecoder;
+ TQLabel* lStrength;
+ TQSlider* sStrength;
+ TQLabel* lStrengthDisplay;
+ TQLabel* lDecoder;
KComboBox* cDecoder;
- QLabel* lReplayGain;
+ TQLabel* lReplayGain;
KComboBox* cReplayGain;
- QCheckBox* cInternalReplayGain;
+ TQCheckBox* cInternalReplayGain;
};
- QValueList<FormatOptions> formatOptions;
+ TQValueList<FormatOptions> formatOptions;
- QGridLayout* grid;
+ TQGridLayout* grid;
KScrollView* scrollView;
- QVBox* box;
+ TQVBox* box;
KComboBox* cRipper;
Config* config;
- QMap<QString, QString>* binaries;
+ TQMap<TQString, TQString>* binaries;
public slots:
void resetDefaults();
diff --git a/src/configdialog.cpp b/src/configdialog.cpp
index 3e58007..789d59c 100755
--- a/src/configdialog.cpp
+++ b/src/configdialog.cpp
@@ -18,20 +18,20 @@
#include "backend_plugins.h"
#include "replaygain_plugins.h"
-#include <qlayout.h>
+#include <tqlayout.h>
*/
//#include <kconfig.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kpushbutton.h>
-ConfigDialog::ConfigDialog( Config* _config, QWidget *parent, const char *name, Page startPage )
+ConfigDialog::ConfigDialog( Config* _config, TQWidget *tqparent, const char *name, Page startPage )
: KDialogBase(
IconList,
i18n("Settings"),
Apply | Cancel | Default | Help | Ok,
Ok, // default button
- parent,
+ tqparent,
name,
true, // modal
true // separator
@@ -43,65 +43,65 @@ ConfigDialog::ConfigDialog( Config* _config, QWidget *parent, const char *name,
binaries = config->binaries;
- connect( this, SIGNAL(applyClicked()),
- this,SLOT(applyClickedSlot())
+ connect( this, TQT_SIGNAL(applyClicked()),
+ this,TQT_SLOT(applyClickedSlot())
);
- connect( this, SIGNAL(okClicked()),
- this,SLOT(okClickedSlot())
+ connect( this, TQT_SIGNAL(okClicked()),
+ this,TQT_SLOT(okClickedSlot())
);
- connect( this, SIGNAL(defaultClicked()),
- this,SLOT(defaultClickedSlot())
+ connect( this, TQT_SIGNAL(defaultClicked()),
+ this,TQT_SLOT(defaultClickedSlot())
);
generalPage = addPage( i18n("General"), "misc" );
configGeneralPage = new ConfigGeneralPage( config, generalPage, "configGeneralPage" );
- connect( configGeneralPage, SIGNAL(configChanged()),
- this, SLOT(configChanged())
+ connect( configGeneralPage, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(configChanged())
);
- connect( this, SIGNAL(saveGeneral()),
- configGeneralPage, SLOT(saveSettings())
+ connect( this, TQT_SIGNAL(saveGeneral()),
+ configGeneralPage, TQT_SLOT(saveSettings())
);
- connect( this, SIGNAL(resetGeneral()),
- configGeneralPage, SLOT(resetDefaults())
+ connect( this, TQT_SIGNAL(resetGeneral()),
+ configGeneralPage, TQT_SLOT(resetDefaults())
);
pluginsPage = addPage( i18n("Plugins"), "connect_creating" );
configPluginsPage = new ConfigPluginsPage( config, pluginsPage, "configPluginsPage" );
- connect( configPluginsPage, SIGNAL(configChanged()),
- this, SLOT(configChanged())
+ connect( configPluginsPage, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(configChanged())
);
- connect( this, SIGNAL(savePlugins()),
- configPluginsPage, SLOT(saveSettings())
+ connect( this, TQT_SIGNAL(savePlugins()),
+ configPluginsPage, TQT_SLOT(saveSettings())
);
- connect( this, SIGNAL(resetPlugins()),
- configPluginsPage, SLOT(resetDefaults())
+ connect( this, TQT_SIGNAL(resetPlugins()),
+ configPluginsPage, TQT_SLOT(resetDefaults())
);
- environmentPage = addPage( i18n("Environment"), "filefind" );
+ environmentPage = addPage( i18n("Environment"), "filetqfind" );
configEnvironmentPage = new ConfigEnvironmentPage( config, &binaries, environmentPage, "configEnvironmentPage" );
- connect( configEnvironmentPage, SIGNAL(configChanged()),
- this, SLOT(configChanged())
+ connect( configEnvironmentPage, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(configChanged())
);
- connect( this, SIGNAL(saveEnvironment()),
- configEnvironmentPage, SLOT(saveSettings())
+ connect( this, TQT_SIGNAL(saveEnvironment()),
+ configEnvironmentPage, TQT_SLOT(saveSettings())
);
- connect( this, SIGNAL(resetEnvironment()),
- configEnvironmentPage, SLOT(resetDefaults())
+ connect( this, TQT_SIGNAL(resetEnvironment()),
+ configEnvironmentPage, TQT_SLOT(resetDefaults())
);
backendsPage = addPage( i18n("Backends"), "kcmsystem" );
configBackendsPage = new ConfigBackendsPage( config, &binaries, backendsPage, "configBackendsPage" );
- connect( configBackendsPage, SIGNAL(configChanged()),
- this, SLOT(configChanged())
+ connect( configBackendsPage, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(configChanged())
);
- connect( this, SIGNAL(saveBackends()),
- configBackendsPage, SLOT(saveSettings())
+ connect( this, TQT_SIGNAL(saveBackends()),
+ configBackendsPage, TQT_SLOT(saveSettings())
);
- connect( this, SIGNAL(resetBackends()),
- configBackendsPage, SLOT(resetDefaults())
+ connect( this, TQT_SIGNAL(resetBackends()),
+ configBackendsPage, TQT_SLOT(resetDefaults())
);
- connect( configEnvironmentPage, SIGNAL(rebuildBackendsPage()),
- configBackendsPage, SLOT(rebuild())
+ connect( configEnvironmentPage, TQT_SIGNAL(rebuildBackendsPage()),
+ configBackendsPage, TQT_SLOT(rebuild())
);
setConfigChanged( false );
@@ -113,9 +113,9 @@ ConfigDialog::~ConfigDialog()
{
}
-QFrame *ConfigDialog::addPage(const QString &itemName, const QString &iconName)
+TQFrame *ConfigDialog::addPage(const TQString &itemName, const TQString &iconName)
{
- return KDialogBase::addPage( itemName, QString::null, MainBarIcon(iconName,32) );
+ return KDialogBase::addPage( itemName, TQString(), MainBarIcon(iconName,32) );
}
void ConfigDialog::setConfigChanged( const bool value )
@@ -146,7 +146,7 @@ void ConfigDialog::okClickedSlot()
void ConfigDialog::defaultClickedSlot()
{
int index = activePageIndex();
- QStringList listDefaults;
+ TQStringList listDefaults;
if( index == -1 )
return;
diff --git a/src/configdialog.h b/src/configdialog.h
index 19d3d12..594567c 100755
--- a/src/configdialog.h
+++ b/src/configdialog.h
@@ -5,7 +5,7 @@
#include <kdialogbase.h>
-#include <qmap.h>
+#include <tqmap.h>
class Config;
@@ -22,6 +22,7 @@ class ConfigBackendsPage;
class ConfigDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Page {
GeneralPage,
@@ -33,7 +34,7 @@ public:
/**
* Constructor
*/
- ConfigDialog( Config*, QWidget *parent = 0, const char *name = 0, Page startPage = GeneralPage );
+ ConfigDialog( Config*, TQWidget *tqparent = 0, const char *name = 0, Page startPage = GeneralPage );
/**
* Destructor
@@ -41,22 +42,22 @@ public:
virtual ~ConfigDialog();
private:
- QFrame* addPage( const QString &itemName, const QString &iconName );
+ TQFrame* addPage( const TQString &itemName, const TQString &iconName );
- QFrame* generalPage;
+ TQFrame* generalPage;
ConfigGeneralPage* configGeneralPage;
- QFrame* pluginsPage;
+ TQFrame* pluginsPage;
ConfigPluginsPage* configPluginsPage;
- QFrame* environmentPage;
+ TQFrame* environmentPage;
ConfigEnvironmentPage* configEnvironmentPage;
- QFrame* backendsPage;
+ TQFrame* backendsPage;
ConfigBackendsPage* configBackendsPage;
void setConfigChanged( const bool );
Config* config;
- QMap<QString, QString> binaries;
+ TQMap<TQString, TQString> binaries;
private slots:
void configChanged();
diff --git a/src/configenvironmentpage.cpp b/src/configenvironmentpage.cpp
index 26dbd5b..ebe7487 100755
--- a/src/configenvironmentpage.cpp
+++ b/src/configenvironmentpage.cpp
@@ -12,14 +12,14 @@
#include <kfiledialog.h>
#include <kstandarddirs.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qmap.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqmap.h>
-ConfigEnvironmentPage::ConfigEnvironmentPage( Config* _config, QMap<QString, QString>* _binaries, QWidget *parent, const char *name )
- : ConfigPageBase( parent, name )
+ConfigEnvironmentPage::ConfigEnvironmentPage( Config* _config, TQMap<TQString, TQString>* _binaries, TQWidget *tqparent, const char *name )
+ : ConfigPageBase( tqparent, name )
{
config = _config;
binaries = _binaries;
@@ -27,81 +27,81 @@ ConfigEnvironmentPage::ConfigEnvironmentPage( Config* _config, QMap<QString, QSt
// create an icon loader object for loading icons
KIconLoader* iconLoader = new KIconLoader();
- QVBoxLayout* box = new QVBoxLayout( parent, 0, 6 );
+ TQVBoxLayout* box = new TQVBoxLayout( tqparent, 0, 6 );
- QLabel* lDirectoriesLabel = new QLabel( i18n("Directories to be scanned")+":", parent, "lDirectoriesLabel" );
+ TQLabel* lDirectoriesLabel = new TQLabel( i18n("Directories to be scanned")+":", tqparent, "lDirectoriesLabel" );
box->addWidget( lDirectoriesLabel );
-// KEditListBox* eDirectories = new KEditListBox( parent, "eDirectories" );
+// KEditListBox* eDirectories = new KEditListBox( tqparent, "eDirectories" );
// box->addWidget( eDirectories );
- QHBoxLayout* directoriesBox = new QHBoxLayout( box );
- lDirectories = new KListBox( parent, "lDirectories" );
+ TQHBoxLayout* directoriesBox = new TQHBoxLayout( box );
+ lDirectories = new KListBox( tqparent, "lDirectories" );
lDirectories->insertStringList( config->data.environment.directories );
directoriesBox->addWidget( lDirectories );
- connect( lDirectories, SIGNAL(highlighted(int)),
- this, SLOT(directoriesSelectionChanged(int))
+ connect( lDirectories, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(directoriesSelectionChanged(int))
);
- QVBoxLayout* directoriesMiddleBox = new QVBoxLayout( directoriesBox );
- pDirUp = new KPushButton( "", parent, "pDirUp" );
+ TQVBoxLayout* directoriesMiddleBox = new TQVBoxLayout( directoriesBox );
+ pDirUp = new KPushButton( "", tqparent, "pDirUp" );
pDirUp->setPixmap( iconLoader->loadIcon("up",KIcon::Toolbar) );
pDirUp->setEnabled( false );
- QToolTip::add( pDirUp, i18n("Move selected directory one position up.\nThis effects which backend will be chosen, if there are several versions.") );
+ TQToolTip::add( pDirUp, i18n("Move selected directory one position up.\nThis effects which backend will be chosen, if there are several versions.") );
directoriesMiddleBox->addWidget( pDirUp );
- connect( pDirUp, SIGNAL(clicked()),
- this, SLOT(dirUp())
+ connect( pDirUp, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirUp())
);
directoriesMiddleBox->addStretch();
- pDirDown = new KPushButton( "", parent, "pDirDown" );
+ pDirDown = new KPushButton( "", tqparent, "pDirDown" );
pDirDown->setPixmap( iconLoader->loadIcon("down",KIcon::Toolbar) );
pDirDown->setEnabled( false );
- QToolTip::add( pDirDown, i18n("Move selected directory one position down.\nThis effects which backend will be chosen, if there are several versions.") );
+ TQToolTip::add( pDirDown, i18n("Move selected directory one position down.\nThis effects which backend will be chosen, if there are several versions.") );
directoriesMiddleBox->addWidget( pDirDown );
- connect( pDirDown, SIGNAL(clicked()),
- this, SLOT(dirDown())
+ connect( pDirDown, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirDown())
);
- QVBoxLayout* directoriesRightBox = new QVBoxLayout( directoriesBox );
- pAddDirectory = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), parent, "pAddDirectory" );
+ TQVBoxLayout* directoriesRightBox = new TQVBoxLayout( directoriesBox );
+ pAddDirectory = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), tqparent, "pAddDirectory" );
directoriesRightBox->addWidget( pAddDirectory );
- connect( pAddDirectory, SIGNAL(clicked()),
- this, SLOT(addDirectory())
+ connect( pAddDirectory, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addDirectory())
);
- pRemoveDirectory = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), parent, "pRemoveDirectory" );
+ pRemoveDirectory = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), tqparent, "pRemoveDirectory" );
directoriesRightBox->addWidget( pRemoveDirectory );
pRemoveDirectory->setEnabled( false );
- connect( pRemoveDirectory, SIGNAL(clicked()),
- this, SLOT(removeDirectory())
+ connect( pRemoveDirectory, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removeDirectory())
);
directoriesRightBox->addStretch();
box->addSpacing( 5 );
- QHBoxLayout* programsBox = new QHBoxLayout( box );
+ TQHBoxLayout* programsBox = new TQHBoxLayout( box );
- QVBoxLayout* foundProgramsBox = new QVBoxLayout( programsBox );
- QLabel* lFoundProgramsLabel = new QLabel( i18n("Programs found")+":", parent, "lFoundProgramsLabel" );
+ TQVBoxLayout* foundProgramsBox = new TQVBoxLayout( programsBox );
+ TQLabel* lFoundProgramsLabel = new TQLabel( i18n("Programs found")+":", tqparent, "lFoundProgramsLabel" );
foundProgramsBox->addWidget( lFoundProgramsLabel );
- lFoundPrograms = new KListBox( parent, "lFoundPrograms" );
- lFoundPrograms->setSelectionMode( QListBox::NoSelection );
+ lFoundPrograms = new KListBox( tqparent, "lFoundPrograms" );
+ lFoundPrograms->setSelectionMode( TQListBox::NoSelection );
foundProgramsBox->addWidget( lFoundPrograms );
- //connect(lPrograms,SIGNAL(highlighted(int)),this,SLOT(programsSelectionChanged(int)));
+ //connect(lPrograms,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(programsSelectionChanged(int)));
programsBox->setStretchFactor( foundProgramsBox, 3 );
- QVBoxLayout* notFoundProgramsBox = new QVBoxLayout( programsBox );
- QLabel* lNotFoundProgramsLabel = new QLabel( i18n("Programs not found")+":", parent, "lNotFoundProgramsLabel" );
+ TQVBoxLayout* notFoundProgramsBox = new TQVBoxLayout( programsBox );
+ TQLabel* lNotFoundProgramsLabel = new TQLabel( i18n("Programs not found")+":", tqparent, "lNotFoundProgramsLabel" );
notFoundProgramsBox->addWidget( lNotFoundProgramsLabel );
- lNotFoundPrograms = new KListBox( parent, "lNotFoundPrograms" );
- lNotFoundPrograms->setSelectionMode( QListBox::NoSelection );
+ lNotFoundPrograms = new KListBox( tqparent, "lNotFoundPrograms" );
+ lNotFoundPrograms->setSelectionMode( TQListBox::NoSelection );
notFoundProgramsBox->addWidget( lNotFoundPrograms );
- //connect(lPrograms,SIGNAL(highlighted(int)),this,SLOT(programsSelectionChanged(int)));
+ //connect(lPrograms,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(programsSelectionChanged(int)));
programsBox->setStretchFactor( notFoundProgramsBox, 2 );
- for( QMap<QString, QString>::Iterator it = config->binaries.begin(); it != config->binaries.end(); ++it ) {
+ for( TQMap<TQString, TQString>::Iterator it = config->binaries.begin(); it != config->binaries.end(); ++it ) {
if( it.data() != "" ) {
lFoundPrograms->insertItem( it.data() );
}
@@ -122,10 +122,10 @@ ConfigEnvironmentPage::~ConfigEnvironmentPage()
void ConfigEnvironmentPage::resetDefaults()
{
lDirectories->clear();
- QString datadir = locateLocal( "data", "soundkonverter/bin/" );
+ TQString datadir = locateLocal( "data", "soundkonverter/bin/" );
datadir.remove( datadir.length() - 1, 1 );
lDirectories->insertItem( datadir );
- lDirectories->insertItem( QDir::homeDirPath() + "/bin" );
+ lDirectories->insertItem( TQDir::homeDirPath() + "/bin" );
lDirectories->insertItem( "/usr/local/bin" );
lDirectories->insertItem( "/usr/bin" );
@@ -156,7 +156,7 @@ void ConfigEnvironmentPage::dirUp()
{
int index = lDirectories->currentItem();
if( index > 0 ) {
- QString text = lDirectories->currentText();
+ TQString text = lDirectories->currentText();
lDirectories->removeItem( index );
lDirectories->insertItem( text, index - 1 );
lDirectories->setSelected( index - 1, true );
@@ -169,7 +169,7 @@ void ConfigEnvironmentPage::dirDown()
{
int index = lDirectories->currentItem();
if( (uint)index < lDirectories->count() - 1 ) {
- QString text = lDirectories->currentText();
+ TQString text = lDirectories->currentText();
lDirectories->removeItem( index );
lDirectories->insertItem( text, index + 1 );
lDirectories->setSelected( index + 1, true );
@@ -180,7 +180,7 @@ void ConfigEnvironmentPage::dirDown()
void ConfigEnvironmentPage::addDirectory()
{
- QString dirname = KFileDialog::getExistingDirectory( "/", 0 );
+ TQString dirname = KFileDialog::getExistingDirectory( "/", 0 );
if( dirname != NULL ) {
lDirectories->insertItem( dirname );
refill();
@@ -197,10 +197,10 @@ void ConfigEnvironmentPage::removeDirectory()
void ConfigEnvironmentPage::refill()
{
- for( QMap<QString, QString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) {
+ for( TQMap<TQString, TQString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) {
it.data() = "";
for( uint i = 0; i < lDirectories->count(); i++ ) {
- if( it.data() == "" && QFile::exists(lDirectories->text(i) + "/" + it.key()) ) {
+ if( it.data() == "" && TQFile::exists(lDirectories->text(i) + "/" + it.key()) ) {
it.data() = lDirectories->text(i) + "/" + it.key();
}
}
@@ -208,7 +208,7 @@ void ConfigEnvironmentPage::refill()
lFoundPrograms->clear();
lNotFoundPrograms->clear();
- for( QMap<QString, QString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) {
+ for( TQMap<TQString, TQString>::Iterator it = binaries->begin(); it != binaries->end(); ++it ) {
if( it.data() != "" ) {
lFoundPrograms->insertItem( it.data() );
}
diff --git a/src/configenvironmentpage.h b/src/configenvironmentpage.h
index 37b0c2e..6165799 100755
--- a/src/configenvironmentpage.h
+++ b/src/configenvironmentpage.h
@@ -17,11 +17,12 @@ class KListBox;
class ConfigEnvironmentPage : public ConfigPageBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- ConfigEnvironmentPage( Config*, QMap<QString, QString>*, QWidget *parent=0, const char *name=0 );
+ ConfigEnvironmentPage( Config*, TQMap<TQString, TQString>*, TQWidget *tqparent=0, const char *name=0 );
/**
* Default Destructor
@@ -39,7 +40,7 @@ private:
Config* config;
- QMap<QString, QString>* binaries;
+ TQMap<TQString, TQString>* binaries;
public slots:
void resetDefaults();
diff --git a/src/configgeneralpage.cpp b/src/configgeneralpage.cpp
index 9408ffd..295b700 100755
--- a/src/configgeneralpage.cpp
+++ b/src/configgeneralpage.cpp
@@ -11,44 +11,44 @@
#include <kpushbutton.h>
#include <kfiledialog.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqdir.h>
+#include <tqregexp.h>
// ### soundkonverter 0.4: add an option to use vfat save names when the output device is vfat
-ConfigGeneralPage::ConfigGeneralPage( Config* _config, QWidget *parent, const char *name )
- : ConfigPageBase( parent, name )
+ConfigGeneralPage::ConfigGeneralPage( Config* _config, TQWidget *tqparent, const char *name )
+ : ConfigPageBase( tqparent, name )
{
config = _config;
// create an icon loader object for loading icons
KIconLoader* iconLoader = new KIconLoader();
- QVBoxLayout* box = new QVBoxLayout( parent, 0, 6 );
+ TQVBoxLayout* box = new TQVBoxLayout( tqparent, 0, 6 );
- QHBoxLayout* startTabBox = new QHBoxLayout( box, 6 );
- QLabel* lStartTab = new QLabel( i18n("Start in Mode")+":", parent, "lStartTab" );
+ TQHBoxLayout* startTabBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lStartTab = new TQLabel( i18n("Start in Mode")+":", tqparent, "lStartTab" );
startTabBox->addWidget( lStartTab );
- cStartTab = new KComboBox( parent, "cStartTab" );
+ cStartTab = new KComboBox( tqparent, "cStartTab" );
cStartTab->insertItem( i18n("Last used") );
cStartTab->insertItem( i18n("Simple") );
cStartTab->insertItem( i18n("Detailed") );
cStartTab->setCurrentItem( config->data.general.startTab );
startTabBox->addWidget( cStartTab );
- connect( cStartTab, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cStartTab, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* defaultProfileBox = new QHBoxLayout( box, 6 );
- QLabel* lDefaultProfile = new QLabel( i18n("Default profile")+":", parent, "lDefaultProfile" );
+ TQHBoxLayout* defaultProfileBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lDefaultProfile = new TQLabel( i18n("Default profile")+":", tqparent, "lDefaultProfile" );
defaultProfileBox->addWidget( lDefaultProfile );
- cDefaultProfile = new KComboBox( parent, "cDefaultProfile" );
+ cDefaultProfile = new KComboBox( tqparent, "cDefaultProfile" );
sDefaultProfile += i18n("Very low");
sDefaultProfile += i18n("Low");
sDefaultProfile += i18n("Medium");
@@ -63,129 +63,129 @@ ConfigGeneralPage::ConfigGeneralPage( Config* _config, QWidget *parent, const ch
cDefaultProfile->insertStringList( sDefaultProfile );
cDefaultProfile->setCurrentItem( profileIndex(config->data.general.defaultProfile) );
defaultProfileBox->addWidget( cDefaultProfile );
- connect( cDefaultProfile, SIGNAL(activated(int)),
- this, SLOT(profileChanged())
+ connect( cDefaultProfile, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(profileChanged())
);
- connect( cDefaultProfile, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cDefaultProfile, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
- QLabel* lDefaultFormat = new QLabel( i18n("Default format")+":", parent, "lDefaultFormat" );
+ TQLabel* lDefaultFormat = new TQLabel( i18n("Default format")+":", tqparent, "lDefaultFormat" );
defaultProfileBox->addWidget( lDefaultFormat );
- cDefaultFormat = new KComboBox( parent, "cDefaultFormat" );
+ cDefaultFormat = new KComboBox( tqparent, "cDefaultFormat" );
defaultProfileBox->addWidget( cDefaultFormat );
- connect( cDefaultFormat, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cDefaultFormat, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
profileChanged();
box->addSpacing( 5 );
-/* QHBoxLayout* defaultDirBox = new QHBoxLayout( box, 6 );
- QLabel* lDefaultDir = new QLabel( i18n("Default output directory")+":", parent, "lDefaultDir" );
+/* TQHBoxLayout* defaultDirBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lDefaultDir = new TQLabel( i18n("Default output directory")+":", tqparent, "lDefaultDir" );
defaultDirBox->addWidget( lDefaultDir );
- lDir = new KLineEdit( parent, "lDir" );
+ lDir = new KLineEdit( tqparent, "lDir" );
lDir->setText( config->data.general.defaultOutputDirectory );
- QToolTip::add( lDir, i18n("<p>The following strings are space holders, that will be replaced by the information in the meta data:</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>") );
+ TQToolTip::add( lDir, i18n("<p>The following strings are space holders, that will be replaced by the information in the meta data:</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>") );
defaultDirBox->addWidget( lDir );
- connect( lDir, SIGNAL(textChanged(const QString&)),
- this, SLOT(cfgChanged())
+ connect( lDir, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(cfgChanged())
);*/
- /*pDirInfo = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), "", parent, "pDirInfo" );
- QToolTip::add( pDirInfo, i18n("Information about the wildcards.") );
+ /*pDirInfo = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), "", tqparent, "pDirInfo" );
+ TQToolTip::add( pDirInfo, i18n("Information about the wildcards.") );
defaultDirBox->addWidget( pDirInfo );
- connect( pDirInfo, SIGNAL(clicked()),
- this, SLOT(dirInfo())
+ connect( pDirInfo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirInfo())
);*/
-// pDirSelect = new KPushButton( iconLoader->loadIcon("folder",KIcon::Small), "", parent, "pDirSelect" );
-// QToolTip::add( pDirSelect, i18n("Choose an output directory") );
+// pDirSelect = new KPushButton( iconLoader->loadIcon("folder",KIcon::Small), "", tqparent, "pDirSelect" );
+// TQToolTip::add( pDirSelect, i18n("Choose an output directory") );
// defaultDirBox->addWidget( pDirSelect );
-// connect( pDirSelect, SIGNAL(clicked()),
-// this, SLOT(selectDir())
+// connect( pDirSelect, TQT_SIGNAL(clicked()),
+// this, TQT_SLOT(selectDir())
// );
- QHBoxLayout* priorityBox = new QHBoxLayout( box, 6 );
- QLabel* lPriority = new QLabel( i18n("Process priority of the backends")+":", parent, "lPriority" );
+ TQHBoxLayout* priorityBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lPriority = new TQLabel( i18n("Process priority of the backends")+":", tqparent, "lPriority" );
priorityBox->addWidget( lPriority );
- cPriority = new KComboBox( parent, "cPriority" );
+ cPriority = new KComboBox( tqparent, "cPriority" );
sPriority += i18n("Normal");
sPriority += i18n("Low");
cPriority->insertStringList( sPriority );
cPriority->setCurrentItem( config->data.general.priority / 10 ); // NOTE that just works for 'normal' and 'low'
priorityBox->addWidget( cPriority );
- connect( cPriority, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cPriority, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* useVFATNamesBox = new QHBoxLayout( box, 6 );
- cUseVFATNames = new QCheckBox( i18n("Use FAT compatible output file names"), parent, "cUseVFATNames" );
- QToolTip::add( cUseVFATNames, i18n("Replaces some special characters like \'?\' by \'_\'.") );
+ TQHBoxLayout* useVFATNamesBox = new TQHBoxLayout( box, 6 );
+ cUseVFATNames = new TQCheckBox( i18n("Use FAT compatible output file names"), tqparent, "cUseVFATNames" );
+ TQToolTip::add( cUseVFATNames, i18n("Replaces some special characters like \'?\' by \'_\'.") );
cUseVFATNames->setChecked( config->data.general.useVFATNames );
useVFATNamesBox->addWidget( cUseVFATNames );
- connect( cUseVFATNames, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cUseVFATNames, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* conflictHandlingBox = new QHBoxLayout( box, 6 );
- QLabel* lConflictHandling = new QLabel( i18n("Conflict handling")+":", parent, "lConflictHandling" );
+ TQHBoxLayout* conflictHandlingBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lConflictHandling = new TQLabel( i18n("Conflict handling")+":", tqparent, "lConflictHandling" );
conflictHandlingBox->addWidget( lConflictHandling );
- cConflictHandling = new KComboBox( parent, "cConflictHandling" );
- QToolTip::add( cConflictHandling, i18n("Do that if the output file already exists") );
+ cConflictHandling = new KComboBox( tqparent, "cConflictHandling" );
+ TQToolTip::add( cConflictHandling, i18n("Do that if the output file already exists") );
sConflictHandling += i18n("Generate new file name");
sConflictHandling += i18n("Skip file");
cConflictHandling->insertStringList( sConflictHandling );
cConflictHandling->setCurrentItem( config->data.general.conflictHandling );
conflictHandlingBox->addWidget( cConflictHandling );
- connect( cConflictHandling, SIGNAL(activated(int)),
- this, SLOT(cfgChanged())
+ connect( cConflictHandling, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* numFilesBox = new QHBoxLayout( box, 6 );
- QLabel* lNumFiles = new QLabel( i18n("Number of files to convert at once")+":", parent, "lNumFiles" );
+ TQHBoxLayout* numFilesBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lNumFiles = new TQLabel( i18n("Number of files to convert at once")+":", tqparent, "lNumFiles" );
numFilesBox->addWidget( lNumFiles );
- iNumFiles = new KIntSpinBox( 1, 100, 1, config->data.general.numFiles, 10, parent, "iNumFiles" );
+ iNumFiles = new KIntSpinBox( 1, 100, 1, config->data.general.numFiles, 10, tqparent, "iNumFiles" );
numFilesBox->addWidget( iNumFiles );
- connect( iNumFiles, SIGNAL(valueChanged(int)),
- this, SLOT(cfgChanged())
+ connect( iNumFiles, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* updateDelayBox = new QHBoxLayout( box, 6 );
- QLabel* lUpdateDelay = new QLabel( i18n("Status update delay (time in msec.)")+":", parent, "lUpdateDelay" );
+ TQHBoxLayout* updateDelayBox = new TQHBoxLayout( box, 6 );
+ TQLabel* lUpdateDelay = new TQLabel( i18n("tqStatus update delay (time in msec.)")+":", tqparent, "lUpdateDelay" );
updateDelayBox->addWidget( lUpdateDelay );
- iUpdateDelay = new KIntSpinBox( 100, 5000, 100, config->data.general.updateDelay, 10, parent, "iUpdateDelay" );
- QToolTip::add( iUpdateDelay, i18n("Update the progress bar in this interval (time in milliseconds)") );
+ iUpdateDelay = new KIntSpinBox( 100, 5000, 100, config->data.general.updateDelay, 10, tqparent, "iUpdateDelay" );
+ TQToolTip::add( iUpdateDelay, i18n("Update the progress bar in this interval (time in milliseconds)") );
updateDelayBox->addWidget( iUpdateDelay );
- connect( iUpdateDelay, SIGNAL(valueChanged(int)),
- this, SLOT(cfgChanged())
+ connect( iUpdateDelay, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* askForNewOptionsBox = new QHBoxLayout( box, 6 );
- cAskForNewOptions = new QCheckBox( i18n("Ask for new options, when adding files from external program"), parent, "cAskForNewOptions" );
- QToolTip::add( cAskForNewOptions, i18n("If you open a file with soundKonverter and soundKonverter is already running,\nyou can either be asked to define new converting options\nor the current settings from the soundKonverter main window are used.") );
+ TQHBoxLayout* askForNewOptionsBox = new TQHBoxLayout( box, 6 );
+ cAskForNewOptions = new TQCheckBox( i18n("Ask for new options, when adding files from external program"), tqparent, "cAskForNewOptions" );
+ TQToolTip::add( cAskForNewOptions, i18n("If you open a file with soundKonverter and soundKonverter is already running,\nyou can either be asked to define new converting options\nor the current settings from the soundKonverter main window are used.") );
cAskForNewOptions->setChecked( config->data.general.askForNewOptions );
askForNewOptionsBox->addWidget( cAskForNewOptions );
- connect( cAskForNewOptions, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cAskForNewOptions, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
box->addSpacing( 5 );
- QHBoxLayout* executeUserScriptBox = new QHBoxLayout( box, 6 );
- cExecuteUserScript = new QCheckBox( i18n("Execute user script (for advanced users)"), parent, "cAskForNewOptions" );
- QToolTip::add( cExecuteUserScript, i18n("Executes a script after every finished conversion. Have a look at $KDEDIR/soundkonverter/userscript.sh") );
+ TQHBoxLayout* executeUserScriptBox = new TQHBoxLayout( box, 6 );
+ cExecuteUserScript = new TQCheckBox( i18n("Execute user script (for advanced users)"), tqparent, "cAskForNewOptions" );
+ TQToolTip::add( cExecuteUserScript, i18n("Executes a script after every finished conversion. Have a look at $KDEDIR/soundkonverter/userscript.sh") );
cExecuteUserScript->setChecked( config->data.general.executeUserScript );
executeUserScriptBox->addWidget( cExecuteUserScript );
- connect( cExecuteUserScript, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cExecuteUserScript, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
box->addStretch();
@@ -202,7 +202,7 @@ void ConfigGeneralPage::resetDefaults()
cStartTab->setCurrentItem( 0 );
cDefaultProfile->setCurrentItem( 0 );
cDefaultFormat->setCurrentItem( 0 );
-// lDir->setText( QDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
+// lDir->setText( TQDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t" );
cPriority->setCurrentItem( 1 );
cUseVFATNames->setChecked( true );
cConflictHandling->setCurrentItem( 0 );
@@ -229,31 +229,31 @@ void ConfigGeneralPage::saveSettings()
config->data.general.executeUserScript = cExecuteUserScript->isChecked();
}
-int ConfigGeneralPage::profileIndex( const QString &string )
+int ConfigGeneralPage::profileIndex( const TQString &string )
{
- return sDefaultProfile.findIndex( string );
+ return sDefaultProfile.tqfindIndex( string );
}
-int ConfigGeneralPage::formatIndex( const QString &string )
+int ConfigGeneralPage::formatIndex( const TQString &string )
{
- return sDefaultFormat.findIndex( string );
+ return sDefaultFormat.tqfindIndex( string );
}
// void ConfigGeneralPage::selectDir()
// {
-// QString startDir = lDir->text();
-// int i = startDir.find( QRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
+// TQString startDir = lDir->text();
+// int i = startDir.tqfind( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
// if( i != -1 ) {
-// i = startDir.findRev( "/", i );
+// i = startDir.tqfindRev( "/", i );
// startDir = startDir.left( i );
// }
//
-// QString directory = KFileDialog::getExistingDirectory( startDir, 0, i18n("Choose an output directory") );
+// TQString directory = KFileDialog::getExistingDirectory( startDir, 0, i18n("Choose an output directory") );
// if( !directory.isEmpty() ) {
-// QString dir = lDir->text();
-// i = dir.find( QRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
+// TQString dir = lDir->text();
+// i = dir.tqfind( TQRegExp("%[aAbBcCdDgGnNpPtTyY]{1,1}") );
// if( i != -1 ) {
-// i = dir.findRev( "/", i );
+// i = dir.tqfindRev( "/", i );
// lDir->setText( directory + dir.mid(i) );
// }
// else {
@@ -264,7 +264,7 @@ int ConfigGeneralPage::formatIndex( const QString &string )
void ConfigGeneralPage::profileChanged()
{
- QString last;
+ TQString last;
if( cDefaultProfile->currentText() == i18n("Last used") ) {
last = cDefaultFormat->currentText();
diff --git a/src/configgeneralpage.h b/src/configgeneralpage.h
index 270cb47..f8d912e 100755
--- a/src/configgeneralpage.h
+++ b/src/configgeneralpage.h
@@ -6,7 +6,7 @@
#include <configpagebase.h>
class Config;
-class QCheckBox;
+class TQCheckBox;
class KComboBox;
class KIntSpinBox;
class KLineEdit;
@@ -20,11 +20,12 @@ class KPushButton;
class ConfigGeneralPage : public ConfigPageBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- ConfigGeneralPage( Config*, QWidget *parent=0, const char *name=0 );
+ ConfigGeneralPage( Config*, TQWidget *tqparent=0, const char *name=0 );
/**
* Default Destructor
@@ -34,26 +35,26 @@ public:
private:
KComboBox* cStartTab;
KComboBox* cDefaultProfile;
- QStringList sDefaultProfile;
+ TQStringList sDefaultProfile;
KComboBox* cDefaultFormat;
- QStringList sDefaultFormat;
+ TQStringList sDefaultFormat;
// KLineEdit* lDir;
//KPushButton* pDirInfo;
// KPushButton* pDirSelect;
KComboBox* cPriority;
- QStringList sPriority;
- QCheckBox* cUseVFATNames;
- QStringList sConflictHandling;
+ TQStringList sPriority;
+ TQCheckBox* cUseVFATNames;
+ TQStringList sConflictHandling;
KComboBox* cConflictHandling;
KIntSpinBox* iNumFiles;
KIntSpinBox* iUpdateDelay;
- QCheckBox* cAskForNewOptions;
- QCheckBox* cExecuteUserScript;
+ TQCheckBox* cAskForNewOptions;
+ TQCheckBox* cExecuteUserScript;
Config* config;
- int profileIndex( const QString& string );
- int formatIndex( const QString& string );
+ int profileIndex( const TQString& string );
+ int formatIndex( const TQString& string );
public slots:
void resetDefaults();
diff --git a/src/configpagebase.cpp b/src/configpagebase.cpp
index 1aedea5..f904de3 100755
--- a/src/configpagebase.cpp
+++ b/src/configpagebase.cpp
@@ -1,8 +1,8 @@
#include "configpagebase.h"
-ConfigPageBase::ConfigPageBase( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ConfigPageBase::ConfigPageBase( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{}
ConfigPageBase::~ConfigPageBase()
diff --git a/src/configpagebase.h b/src/configpagebase.h
index 802bb2d..23aad2b 100755
--- a/src/configpagebase.h
+++ b/src/configpagebase.h
@@ -3,21 +3,22 @@
#ifndef CONFIGPAGEBASE_H
#define CONFIGPAGEBASE_H
-#include <qwidget.h>
+#include <tqwidget.h>
/**
* @short The base for all pages of the config dialog
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class ConfigPageBase : public QWidget
+class ConfigPageBase : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- ConfigPageBase( QWidget *parent=0, const char *name=0 );
+ ConfigPageBase( TQWidget *tqparent=0, const char *name=0 );
/**
* Destructor
diff --git a/src/configpluginspage.cpp b/src/configpluginspage.cpp
index a6bc560..a79f852 100755
--- a/src/configpluginspage.cpp
+++ b/src/configpluginspage.cpp
@@ -5,16 +5,16 @@
#include "replaygainpluginloader.h"
#include "ripperpluginloader.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qcheckbox.h>
-// #include <qevent.h>
-// #include <qdragobject.h>
-#include <qtooltip.h>
-#include <qlocale.h>
-// #include <qurl.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqcheckbox.h>
+// #include <tqevent.h>
+// #include <tqdragobject.h>
+#include <tqtooltip.h>
+#include <tqlocale.h>
+// #include <tqurl.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -26,88 +26,88 @@
#include <klistbox.h>
//#include <kurl.h>
-ConfigPluginsPage::ConfigPluginsPage( Config* _config, QWidget* parent, const char* name )
- : ConfigPageBase( parent, name )
+ConfigPluginsPage::ConfigPluginsPage( Config* _config, TQWidget* tqparent, const char* name )
+ : ConfigPageBase( tqparent, name )
{
config = _config;
// create an icon loader object for loading icons
KIconLoader* iconLoader = new KIconLoader();
- QVBoxLayout* box = new QVBoxLayout( parent, 0, 6 );
+ TQVBoxLayout* box = new TQVBoxLayout( tqparent, 0, 6 );
- QLabel* lPluginsLabel = new QLabel( i18n("Installed plugins")+":", parent, "lPluginsLabel" );
+ TQLabel* lPluginsLabel = new TQLabel( i18n("Installed plugins")+":", tqparent, "lPluginsLabel" );
box->addWidget( lPluginsLabel );
- QHBoxLayout* pluginsBox = new QHBoxLayout( box );
- lPlugins = new KListBox( parent, "lPlugins" );
+ TQHBoxLayout* pluginsBox = new TQHBoxLayout( box );
+ lPlugins = new KListBox( tqparent, "lPlugins" );
pluginsBox->addWidget(lPlugins);
- connect( lPlugins, SIGNAL(highlighted(int)),
- this, SLOT(pluginsSelectionChanged(int))
+ connect( lPlugins, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(pluginsSelectionChanged(int))
);
refreshPlugins();
- QVBoxLayout* pluginsRightBox = new QVBoxLayout( pluginsBox );
- pAddPlugin = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), parent, "pAddPlugin" );
+ TQVBoxLayout* pluginsRightBox = new TQVBoxLayout( pluginsBox );
+ pAddPlugin = new KPushButton( iconLoader->loadIcon("add",KIcon::Small), i18n("Add ..."), tqparent, "pAddPlugin" );
pluginsRightBox->addWidget( pAddPlugin );
- connect( pAddPlugin, SIGNAL(clicked()),
- this, SLOT(getPlugin())
+ connect( pAddPlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(getPlugin())
);
- pRemovePlugin = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), parent, "pRemovePlugin" );
+ pRemovePlugin = new KPushButton( iconLoader->loadIcon("remove",KIcon::Small), i18n("Remove"), tqparent, "pRemovePlugin" );
pRemovePlugin->setEnabled( false );
pluginsRightBox->addWidget( pRemovePlugin );
- connect( pRemovePlugin, SIGNAL(clicked()),
- this, SLOT(removePlugin())
+ connect( pRemovePlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removePlugin())
);
pluginsRightBox->addStretch();
- pAboutPlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), parent, "pAboutPlugin" );
+ pAboutPlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), tqparent, "pAboutPlugin" );
pAboutPlugin->setEnabled( false );
pluginsRightBox->addWidget( pAboutPlugin );
- connect( pAboutPlugin, SIGNAL(clicked()),
- this, SLOT(aboutPlugin())
+ connect( pAboutPlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(aboutPlugin())
);
/* NOTE kaligames.de is down
box->addSpacing( 5 );
- QLabel* lOnlinePluginsLabel = new QLabel( i18n("Available plugins")+":", parent, "lOnlinePluginsLabel" );
+ TQLabel* lOnlinePluginsLabel = new TQLabel( i18n("Available plugins")+":", tqparent, "lOnlinePluginsLabel" );
box->addWidget( lOnlinePluginsLabel );
- QHBoxLayout* onlinePluginsBox = new QHBoxLayout( box );
- lOnlinePlugins = new KListBox( parent, "lOnlinePlugins" );
+ TQHBoxLayout* onlinePluginsBox = new TQHBoxLayout( box );
+ lOnlinePlugins = new KListBox( tqparent, "lOnlinePlugins" );
onlinePluginsBox->addWidget( lOnlinePlugins );
- connect( lOnlinePlugins, SIGNAL(highlighted(int)),
- this, SLOT(onlinePluginsSelectionChanged(int))
+ connect( lOnlinePlugins, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(onlinePluginsSelectionChanged(int))
);
- QVBoxLayout* onlinePluginsRightBox = new QVBoxLayout( onlinePluginsBox );
- pRefreshOnlinePlugins = new KPushButton( iconLoader->loadIcon("reload",KIcon::Small), i18n("Refresh"), parent, "pRefreshOnlinePlugins" );
- QToolTip::add( pRefreshOnlinePlugins, i18n("Download the latest list of available plugins.") );
+ TQVBoxLayout* onlinePluginsRightBox = new TQVBoxLayout( onlinePluginsBox );
+ pRefreshOnlinePlugins = new KPushButton( iconLoader->loadIcon("reload",KIcon::Small), i18n("Refresh"), tqparent, "pRefreshOnlinePlugins" );
+ TQToolTip::add( pRefreshOnlinePlugins, i18n("Download the latest list of available plugins.") );
onlinePluginsRightBox->addWidget( pRefreshOnlinePlugins );
- connect( pRefreshOnlinePlugins, SIGNAL(clicked()),
- this, SLOT(refreshOnlinePlugins())
+ connect( pRefreshOnlinePlugins, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(refreshOnlinePlugins())
);
// TODO upgrade button
-// pUpgradeOnlinePlugins = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Upgrade"), parent, "pUpgradeOnlinePlugins" );
+// pUpgradeOnlinePlugins = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Upgrade"), tqparent, "pUpgradeOnlinePlugins" );
// pUpgradeOnlinePlugins->setEnabled( false );
-// QToolTip::add( pUpgradeOnlinePlugins, i18n("Download all plugins and install them into the soundKonverter directory.") );
+// TQToolTip::add( pUpgradeOnlinePlugins, i18n("Download all plugins and install them into the soundKonverter directory.") );
// onlinePluginsRightBox->addWidget( pUpgradeOnlinePlugins );
-// connect(pInstallAllOnlinePlugins,SIGNAL(clicked()),this,SLOT(upgradeOnlinePlugins()));
+// connect(pInstallAllOnlinePlugins,TQT_SIGNAL(clicked()),this,TQT_SLOT(upgradeOnlinePlugins()));
onlinePluginsRightBox->addStretch();
- pInstallOnlinePlugin = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Install"), parent, "pInstallOnlinePlugin" );
+ pInstallOnlinePlugin = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Install"), tqparent, "pInstallOnlinePlugin" );
pInstallOnlinePlugin->setEnabled( false );
- QToolTip::add( pInstallOnlinePlugin, i18n("Download the selected plugin and install it into the soundKonverter directory.") );
+ TQToolTip::add( pInstallOnlinePlugin, i18n("Download the selected plugin and install it into the soundKonverter directory.") );
onlinePluginsRightBox->addWidget( pInstallOnlinePlugin );
- connect( pInstallOnlinePlugin, SIGNAL(clicked()),
- this, SLOT(getOnlinePlugin())
+ connect( pInstallOnlinePlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(getOnlinePlugin())
);
- pAboutOnlinePlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), parent, "pAboutOnlinePlugin" );
+ pAboutOnlinePlugin = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("About"), tqparent, "pAboutOnlinePlugin" );
pAboutOnlinePlugin->setEnabled( false );
onlinePluginsRightBox->addWidget( pAboutOnlinePlugin );
- connect( pAboutOnlinePlugin, SIGNAL(clicked()),
- this, SLOT(aboutOnlinePlugin())
+ connect( pAboutOnlinePlugin, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(aboutOnlinePlugin())
);
- cCheckOnlinePlugins = new QCheckBox( i18n("Check for new plugins on every startup"), parent, "cCheckOnlinePlugins" );
+ cCheckOnlinePlugins = new TQCheckBox( i18n("Check for new plugins on every startup"), tqparent, "cCheckOnlinePlugins" );
cCheckOnlinePlugins->setChecked( config->data.plugins.checkForUpdates );
box->addWidget( cCheckOnlinePlugins );
- connect( cCheckOnlinePlugins, SIGNAL(toggled(bool)),
- this, SLOT(cfgChanged())
+ connect( cCheckOnlinePlugins, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(cfgChanged())
);
// box->addStretch();
@@ -117,21 +117,21 @@ ConfigPluginsPage::ConfigPluginsPage( Config* _config, QWidget* parent, const ch
if( config->data.plugins.checkForUpdates && config->onlinePluginsChanged ) {
// NOTE copied from below
- QString line;
+ TQString line;
bool add;
- QFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
+ TQFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
while( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
- line.replace( "&amp;", "&" );
- line.replace( "&auml;", "ä" );
- line.replace( "&Auml;", "Ä" );
- line.replace( "&ouml;", "ö" );
- line.replace( "&Ouml;", "Ö" );
- line.replace( "&uuml;", "ü" );
- line.replace( "&Uuml;", "Ü" );
- line.replace( "&szlig;", "ß" );
+ line.tqreplace( "&amp;", "&" );
+ line.tqreplace( "&auml;", "ä" );
+ line.tqreplace( "&Auml;", "Ä" );
+ line.tqreplace( "&ouml;", "ö" );
+ line.tqreplace( "&Ouml;", "Ö" );
+ line.tqreplace( "&uuml;", "ü" );
+ line.tqreplace( "&Uuml;", "Ü" );
+ line.tqreplace( "&szlig;", "ß" );
add = true;
for( uint i=0; i<lPlugins->count(); i++ ) {
@@ -165,32 +165,32 @@ void ConfigPluginsPage::saveSettings()
void ConfigPluginsPage::pluginsSelectionChanged( int index )
{
- QString name = lPlugins->text( index );
+ TQString name = lPlugins->text( index );
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFileInfo file( (*it)->filePathName );
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFileInfo file( (*it)->filePathName );
if( file.isWritable() ) pRemovePlugin->setEnabled( true );
else pRemovePlugin->setEnabled( false );
break;
}
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFileInfo file( (*it)->filePathName );
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFileInfo file( (*it)->filePathName );
if( file.isWritable() ) pRemovePlugin->setEnabled( true );
else pRemovePlugin->setEnabled( false );
break;
}
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFileInfo file( (*it)->filePathName );
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFileInfo file( (*it)->filePathName );
if( file.isWritable() ) pRemovePlugin->setEnabled( true );
else pRemovePlugin->setEnabled( false );
break;
@@ -204,35 +204,35 @@ void ConfigPluginsPage::refreshPlugins()
{
lPlugins->clear();
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- lPlugins->insertItem( (*it)->info.name + " v. " + QString::number((*it)->info.version) );
- //lPlugins->insertItem( i18n("%1, Version: %2").arg((*it)->info.name).arg((*it)->info.version) );
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ lPlugins->insertItem( (*it)->info.name + " v. " + TQString::number((*it)->info.version) );
+ //lPlugins->insertItem( i18n("%1, Version: %2").tqarg((*it)->info.name).tqarg((*it)->info.version) );
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- lPlugins->insertItem( (*it)->info.name + " v. " + QString::number((*it)->info.version) );
- //lPlugins->insertItem( i18n("%1, Version: %2").arg((*it)->info.name).arg((*it)->info.version) );
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ lPlugins->insertItem( (*it)->info.name + " v. " + TQString::number((*it)->info.version) );
+ //lPlugins->insertItem( i18n("%1, Version: %2").tqarg((*it)->info.name).tqarg((*it)->info.version) );
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- lPlugins->insertItem( (*it)->info.name + " v. " + QString::number((*it)->info.version) );
- //lPlugins->insertItem( i18n("%1, Version: %2").arg((*it)->info.name).arg((*it)->info.version) );
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ lPlugins->insertItem( (*it)->info.name + " v. " + TQString::number((*it)->info.version) );
+ //lPlugins->insertItem( i18n("%1, Version: %2").tqarg((*it)->info.name).tqarg((*it)->info.version) );
}
}
void ConfigPluginsPage::getPlugin()
{
- QString url = KFileDialog::getOpenFileName( QDir::homeDirPath(), i18n("*.soundkonverter.xml|Plugins (*.soundkonverter.xml)"), this, i18n("Choose a plugin to add!") );
+ TQString url = KFileDialog::getOpenFileName( TQDir::homeDirPath(), i18n("*.soundkonverter.xml|Plugins (*.soundkonverter.xml)"), this, i18n("Choose a plugin to add!") );
if( !url.isEmpty() ) {
- QString filePathName = KURL::decode_string( url );
- QString fileName = filePathName.right( filePathName.length() - filePathName.findRev("/") );
+ TQString filePathName = KURL::decode_string( url );
+ TQString fileName = filePathName.right( filePathName.length() - filePathName.tqfindRev("/") );
getPluginFilePathName = locateLocal("data","soundkonverter/plugins/") + fileName;
getPluginJob = KIO::file_copy( url, getPluginFilePathName, -1, true, false, false );
- connect( getPluginJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(getPluginFinished(KIO::Job*))
+ connect( getPluginJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(getPluginFinished(KIO::Job*))
);
}
}
@@ -258,19 +258,19 @@ void ConfigPluginsPage::getPluginFinished( KIO::Job* job )
// TODO reload plugins without restart
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// }
// }
@@ -299,12 +299,12 @@ void ConfigPluginsPage::removePlugin()
{
// TODO reload plugins without restart
- QString name = lPlugins->currentText();
+ TQString name = lPlugins->currentText();
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFile file( (*it)->filePathName );
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFile file( (*it)->filePathName );
if( file.remove() ) {
lPlugins->removeItem( lPlugins->currentItem() );
KMessageBox::information( this,
@@ -320,10 +320,10 @@ void ConfigPluginsPage::removePlugin()
}
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFile file( (*it)->filePathName );
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFile file( (*it)->filePathName );
if( file.remove() ) {
lPlugins->removeItem( lPlugins->currentItem() );
KMessageBox::information( this,
@@ -339,10 +339,10 @@ void ConfigPluginsPage::removePlugin()
}
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
- QFile file( (*it)->filePathName );
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
+ TQFile file( (*it)->filePathName );
if( file.remove() ) {
lPlugins->removeItem( lPlugins->currentItem() );
KMessageBox::information( this,
@@ -373,38 +373,38 @@ void ConfigPluginsPage::aboutPlugin()
{
// TODO add link support
- QString name = lPlugins->currentText();
+ TQString name = lPlugins->currentText();
- QValueList<ConvertPlugin*> converters = config->allConverters();
- for( QValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
+ TQValueList<ConvertPlugin*> converters = config->allConverters();
+ for( TQValueList<ConvertPlugin*>::Iterator it = converters.begin(); it != converters.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
KMessageBox::information( this,
i18n((*it)->info.about) + "\n" +
- i18n("Version") + ": " + QString::number((*it)->info.version) + "\n" +
+ i18n("Version") + ": " + TQString::number((*it)->info.version) + "\n" +
i18n("Author") + ": " + (*it)->info.author,
i18n("About") + ": " + (*it)->info.name );
break;
}
}
- QValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
- for( QValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
+ TQValueList<ReplayGainPlugin*> replaygains = config->allReplayGains();
+ for( TQValueList<ReplayGainPlugin*>::Iterator it = replaygains.begin(); it != replaygains.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
KMessageBox::information( this,
i18n((*it)->info.about) + "\n" +
- i18n("Version") + ": " + QString::number((*it)->info.version) + "\n" +
+ i18n("Version") + ": " + TQString::number((*it)->info.version) + "\n" +
i18n("Author") + ": " + (*it)->info.author,
i18n("About") + ": " + (*it)->info.name );
break;
}
}
- QValueList<RipperPlugin*> rippers = config->allRippers();
- for( QValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
- if( name == (*it)->info.name + " v. " + QString::number((*it)->info.version) ) {
+ TQValueList<RipperPlugin*> rippers = config->allRippers();
+ for( TQValueList<RipperPlugin*>::Iterator it = rippers.begin(); it != rippers.end(); ++it ) {
+ if( name == (*it)->info.name + " v. " + TQString::number((*it)->info.version) ) {
KMessageBox::information( this,
i18n((*it)->info.about) + "\n" +
- i18n("Version") + ": " + QString::number((*it)->info.version) + "\n" +
+ i18n("Version") + ": " + TQString::number((*it)->info.version) + "\n" +
i18n("Author") + ": " + (*it)->info.author,
i18n("About") + ": " + (*it)->info.name );
break;
@@ -428,10 +428,10 @@ void ConfigPluginsPage::refreshOnlinePlugins()
{
pRefreshOnlinePlugins->setEnabled( false );
- refreshOnlinePluginsJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + QString::number(config->data.app.configVersion),
+ refreshOnlinePluginsJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + TQString::number(config->data.app.configVersion),
locateLocal("data","soundkonverter/pluginlist.txt"), -1, true, false, false );
- connect( refreshOnlinePluginsJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(refreshOnlinePluginsFinished(KIO::Job*))
+ connect( refreshOnlinePluginsJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(refreshOnlinePluginsFinished(KIO::Job*))
);
}
@@ -440,21 +440,21 @@ void ConfigPluginsPage::refreshOnlinePluginsFinished( KIO::Job* job )
if( job->error() == 0 ) {
lOnlinePlugins->clear();
- QString line;
+ TQString line;
bool add;
- QFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
+ TQFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
while( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
- line.replace( "&amp;", "&" );
- line.replace( "&auml;", "ä" );
- line.replace( "&Auml;", "Ä" );
- line.replace( "&ouml;", "ö" );
- line.replace( "&Ouml;", "Ö" );
- line.replace( "&uuml;", "ü" );
- line.replace( "&Uuml;", "Ü" );
- line.replace( "&szlig;", "ß" );
+ line.tqreplace( "&amp;", "&" );
+ line.tqreplace( "&auml;", "ä" );
+ line.tqreplace( "&Auml;", "Ä" );
+ line.tqreplace( "&ouml;", "ö" );
+ line.tqreplace( "&Ouml;", "Ö" );
+ line.tqreplace( "&uuml;", "ü" );
+ line.tqreplace( "&Uuml;", "Ü" );
+ line.tqreplace( "&szlig;", "ß" );
add = true;
for( uint i=0; i<lPlugins->count(); i++ ) {
@@ -484,7 +484,7 @@ void ConfigPluginsPage::refreshOnlinePluginsFinished( KIO::Job* job )
void ConfigPluginsPage::getOnlinePlugin()
{
pInstallOnlinePlugin->setEnabled( false );
- QString name;
+ TQString name;
for( uint i=0; i<lOnlinePlugins->count(); i++ ) {
if( lOnlinePlugins->isSelected(i) ) {
@@ -494,35 +494,35 @@ void ConfigPluginsPage::getOnlinePlugin()
}
}
- name.replace( "&", "&amp;" );
- name.replace( "ä", "&auml;" );
- name.replace( "Ä", "&Auml;" );
- name.replace( "ö", "&ouml;" );
- name.replace( "Ö", "&Ouml;" );
- name.replace( "ü", "&uuml;" );
- name.replace( "Ü", "&Uuml;" );
- name.replace( "ß", "&szlig;" );
+ name.tqreplace( "&", "&amp;" );
+ name.tqreplace( "ä", "&auml;" );
+ name.tqreplace( "Ä", "&Auml;" );
+ name.tqreplace( "ö", "&ouml;" );
+ name.tqreplace( "Ö", "&Ouml;" );
+ name.tqreplace( "ü", "&uuml;" );
+ name.tqreplace( "Ü", "&Uuml;" );
+ name.tqreplace( "ß", "&szlig;" );
KURL::encode_string( name );
- getOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/getfile.php?version=" + QString::number(config->data.app.configVersion) + "&file=" + name,
+ getOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/getfile.php?version=" + TQString::number(config->data.app.configVersion) + "&file=" + name,
locateLocal("data","soundkonverter/plugins/newplugin.xml"), -1, true, false, false );
- connect( getOnlinePluginJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(getOnlinePluginFinished(KIO::Job*))
+ connect( getOnlinePluginJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(getOnlinePluginFinished(KIO::Job*))
);
}
void ConfigPluginsPage::getOnlinePluginFinished( KIO::Job* job )
{
if( job->error() == 0 ) {
- QString name;
- QString line;
- QFile file( locateLocal("data","soundkonverter/plugins/newplugin.xml") );
+ TQString name;
+ TQString line;
+ TQFile file( locateLocal("data","soundkonverter/plugins/newplugin.xml") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
name = stream.readLine(); // read the file name from the top of the file
getPluginFilePathName = locateLocal("data","soundkonverter/plugins/") + name;
- QFile newFile( getPluginFilePathName );
+ TQFile newFile( getPluginFilePathName );
if( newFile.open(IO_WriteOnly) ) {
- QTextStream newStream( &newFile );
+ TQTextStream newStream( &newFile );
while( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
newStream << line << "\n";
@@ -551,19 +551,19 @@ void ConfigPluginsPage::getOnlinePluginFinished( KIO::Job* job )
// TODO reload plugins without restart
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// else {
// delete plugin;
// ConvertPlugin* plugin = convertPluginLoader->loadFile( getPluginFilePathName );
// if( plugin->info.version != -1 ) {
-// lPlugins->insertItem( plugin->info.name + " v. " + QString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
+// lPlugins->insertItem( plugin->info.name + " v. " + TQString::number(plugin->info.version) + " (" + i18n("restart necessary") + ")" );
// }
// }
// }
@@ -592,34 +592,34 @@ void ConfigPluginsPage::aboutOnlinePlugin()
{
pAboutOnlinePlugin->setEnabled( false );
- QString name = lOnlinePlugins->currentText();
- name.replace( "&", "&amp;" );
- name.replace( "ä", "&auml;" );
- name.replace( "Ä", "&Auml;" );
- name.replace( "ö", "&ouml;" );
- name.replace( "Ö", "&Ouml;" );
- name.replace( "ü", "&uuml;" );
- name.replace( "Ü", "&Uuml;" );
- name.replace( "ß", "&szlig;" );
+ TQString name = lOnlinePlugins->currentText();
+ name.tqreplace( "&", "&amp;" );
+ name.tqreplace( "ä", "&auml;" );
+ name.tqreplace( "Ä", "&Auml;" );
+ name.tqreplace( "ö", "&ouml;" );
+ name.tqreplace( "Ö", "&Ouml;" );
+ name.tqreplace( "ü", "&uuml;" );
+ name.tqreplace( "Ü", "&Uuml;" );
+ name.tqreplace( "ß", "&szlig;" );
KURL::encode_string( name );
- aboutOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/info.php?file=" + name + "&lang=" + QLocale::languageToString(QLocale::system().language()),
+ aboutOnlinePluginJob = KIO::file_copy( "http://kaligames.de/downloads/soundkonverter/plugins/info.php?file=" + name + "&lang=" + TQLocale::languageToString(TQLocale::system().language()),
locateLocal("data","soundkonverter/plugin_info.txt"), -1, true, false, false );
- connect( aboutOnlinePluginJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(aboutOnlinePluginFinished(KIO::Job*))
+ connect( aboutOnlinePluginJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(aboutOnlinePluginFinished(KIO::Job*))
);
}
void ConfigPluginsPage::aboutOnlinePluginFinished( KIO::Job* job )
{
if( job->error() == 0 ) {
- QString name = lOnlinePlugins->currentText();
+ TQString name = lOnlinePlugins->currentText();
- QFile file( locateLocal("data","soundkonverter/plugin_info.txt") );
+ TQFile file( locateLocal("data","soundkonverter/plugin_info.txt") );
if( file.open(IO_ReadOnly) ) {
- QTextStream stream( &file );
- QString data = stream.readLine();
+ TQTextStream stream( &file );
+ TQString data = stream.readLine();
KMessageBox::information( this, i18n(data), i18n("About") + ": " + name,
- QString::null, KMessageBox::Notify | KMessageBox::AllowLink );
+ TQString(), KMessageBox::Notify | KMessageBox::AllowLink );
}
else {
KMessageBox::error( this,
diff --git a/src/configpluginspage.h b/src/configpluginspage.h
index 2cca5ed..245f69c 100755
--- a/src/configpluginspage.h
+++ b/src/configpluginspage.h
@@ -9,7 +9,7 @@
class Config;
class KPushButton;
class KListBox;
-class QCheckBox;
+class TQCheckBox;
/**
* @short The page for configuring the plugins
@@ -19,11 +19,12 @@ class QCheckBox;
class ConfigPluginsPage : public ConfigPageBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- ConfigPluginsPage( Config*, QWidget *parent=0, const char *name=0 );
+ ConfigPluginsPage( Config*, TQWidget *tqparent=0, const char *name=0 );
/**
* Default Destructor
@@ -44,9 +45,9 @@ private:
KPushButton* pUpgradeOnlinePlugins;
KPushButton* pAboutOnlinePlugin;
KIO::FileCopyJob* aboutOnlinePluginJob;
- QCheckBox* cCheckOnlinePlugins;
+ TQCheckBox* cCheckOnlinePlugins;
- QString getPluginFilePathName;
+ TQString getPluginFilePathName;
Config* config;
diff --git a/src/conversionoptions.h b/src/conversionoptions.h
index b1e9d9a..1f46b54 100755
--- a/src/conversionoptions.h
+++ b/src/conversionoptions.h
@@ -5,7 +5,7 @@
#include "outputdirectory.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
* @short Here the options for the conversion process can be stored
@@ -16,10 +16,10 @@ class ConversionOptions
{
public:
struct EncodingOptions {
- QString sFormat; // output format
- QString sQualityMode; // which mode are we using? quality, bitrate, lossless? i18n()!!!
+ TQString sFormat; // output format
+ TQString sQualityMode; // which mode are we using? quality, bitrate, lossless? i18n()!!!
int iQuality; // the encoding quality / bitrate
- QString sBitrateMode; // when using bitrate mode, which? abr, cbr?
+ TQString sBitrateMode; // when using bitrate mode, which? abr, cbr?
bool bBitrateRange; // enable bitrate range?
int iMinBitrate, iMaxBitrate; // when using bitrate range
struct SamplingRateOptions { // special options, when sampling rate is enabled
@@ -28,17 +28,17 @@ public:
} samplingRate;
struct ChannelsOptions { // special options, when channels is enabled
bool bEnabled;
- QString sChannels;
+ TQString sChannels;
} channels;
struct ReplaygainOptions { // special options, when replaygain is enabled
bool bEnabled;
} replaygain;
- QString sInOutFiles; // could be called 'user defined parameter'
+ TQString sInOutFiles; // could be called 'user defined parameter'
// but it is analog to the in_out_files option in the plugins
};
struct OutputOptions {
OutputDirectory::Mode mode;
- QString directory;
+ TQString directory;
};
/**
@@ -56,8 +56,8 @@ public:
*/
bool nearlyEqual( const ConversionOptions& other );
- QString filePathName; // the path and name of the file
- QString outputFilePathName; // if the user wants to change the output directory/file name per file!
+ TQString filePathName; // the path and name of the file
+ TQString outputFilePathName; // if the user wants to change the output directory/file name per file!
EncodingOptions encodingOptions; // what shall we do with the file?
OutputOptions outputOptions; // where to save the file?
};
diff --git a/src/convert.cpp b/src/convert.cpp
index ce435ab..6b274e3 100755
--- a/src/convert.cpp
+++ b/src/convert.cpp
@@ -22,8 +22,8 @@
//#include <kprocess.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
ConvertItem::ConvertItem()
{
@@ -47,26 +47,26 @@ Convert::Convert( Config* _config, TagEngine* _tagEngine, CDManager* _cdManager,
tagEngine = _tagEngine;
cdManager = _cdManager;
fileList = _fileList;
- connect( fileList, SIGNAL(convertItem(FileListItem*)),
- this, SLOT(add(FileListItem*))
+ connect( fileList, TQT_SIGNAL(convertItem(FileListItem*)),
+ this, TQT_SLOT(add(FileListItem*))
);
- connect( fileList, SIGNAL(stopItem(FileListItem*)),
- this, SLOT(stop(FileListItem*))
+ connect( fileList, TQT_SIGNAL(stopItem(FileListItem*)),
+ this, TQT_SLOT(stop(FileListItem*))
);
- connect( this, SIGNAL(finished(FileListItem*,int)),
- fileList, SLOT(itemFinished(FileListItem*,int))
+ connect( this, TQT_SIGNAL(finished(FileListItem*,int)),
+ fileList, TQT_SLOT(itemFinished(FileListItem*,int))
);
- connect( this, SIGNAL(rippingFinished(const QString&)),
- fileList, SLOT(rippingFinished(const QString&))
+ connect( this, TQT_SIGNAL(rippingFinished(const TQString&)),
+ fileList, TQT_SLOT(rippingFinished(const TQString&))
);
logger = _logger;
- connect( this, SIGNAL(finishedProcess(int,int)),
- logger, SLOT(processCompleted(int,int))
+ connect( this, TQT_SIGNAL(finishedProcess(int,int)),
+ logger, TQT_SLOT(processCompleted(int,int))
);
- tUpdateProgressIndicator = new QTimer( this, "tUpdateProgressIndicator" );
- connect( tUpdateProgressIndicator, SIGNAL(timeout()),
- this, SLOT(updateProgressIndicator())
+ tUpdateProgressIndicator = new TQTimer( this, "tUpdateProgressIndicator" );
+ connect( tUpdateProgressIndicator, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(updateProgressIndicator())
);
}
@@ -85,7 +85,7 @@ void Convert::get( ConvertItem* item )
item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting file")+"... 00 %" );
- KURL source( item->fileListItem->options.filePathName.replace("?","%3f") );
+ KURL source( item->fileListItem->options.filePathName.tqreplace("?","%3f") );
KURL destination( item->tempInFile->name() );
if( source.isLocalFile() && destination.isLocalFile() ) {
@@ -102,11 +102,11 @@ void Convert::get( ConvertItem* item )
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, true, false, false );
- connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)),
- this, SLOT(moveProgress(KIO::Job*,unsigned long))
+ connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)),
+ this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long))
);
- connect( item->moveJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(moveFinished(KIO::Job*))
+ connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(moveFinished(KIO::Job*))
);
}
}
@@ -117,7 +117,7 @@ void Convert::getCorrection( ConvertItem* item )
item->state = ConvertItem::get_correction;
// calculate the name of the correction input file
- QFile file( OutputDirectory::changeExtension(item->fileListItem->options.filePathName,item->correctionInputExtension) );
+ TQFile file( OutputDirectory::changeExtension(item->fileListItem->options.filePathName,item->correctionInputExtension) );
if( !file.exists() ) {
logger->log( item->logID, " " + i18n("Aborting, file does not exist") + " (" + file.name() + ")" );
executeNextStep( item );
@@ -143,11 +143,11 @@ void Convert::getCorrection( ConvertItem* item )
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, true, false, false );
- connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)),
- this, SLOT(moveProgress(KIO::Job*,unsigned long))
+ connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)),
+ this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long))
);
- connect( item->moveJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(moveFinished(KIO::Job*))
+ connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(moveFinished(KIO::Job*))
);
}
}
@@ -158,15 +158,15 @@ void Convert::rip( ConvertItem* item )
item->state = ConvertItem::rip;
/** kaudiocreator
- QString wavFile;
- QString args = job->device;
+ TQString wavFile;
+ TQString args = job->device;
if(!args.isEmpty())
- args = QString("?device=%1").arg(args);
+ args = TQString("?device=%1").tqarg(args);
args = args+"&fileNameTemplate=Track %{number}";
if(job->track < 10)
- wavFile = QString("audiocd:/Wav/Track 0%1.wav%2").arg(job->track).arg(args);
+ wavFile = TQString("audiocd:/Wav/Track 0%1.wav%2").tqarg(job->track).tqarg(args);
else
- wavFile = QString("audiocd:/Wav/Track %1.wav%2").arg(job->track).arg(args);
+ wavFile = TQString("audiocd:/Wav/Track %1.wav%2").tqarg(job->track).tqarg(args);
*/
RipperPlugin* plugin = config->getCurrentRipper();
@@ -174,7 +174,7 @@ void Convert::rip( ConvertItem* item )
if( plugin == 0 ) {
// NOTE process devices like '/dev/cdrom' - seems to be done
// TODO implement process priority (nice level)
- QString src;
+ TQString src;
if( item->fileListItem->track != 0 ) {
// TODO does it work with cds with less than 10 tracks?
src.sprintf( "audiocd:/Wav/Track %02i.wav?device=" + item->fileListItem->device + "&fileNameTemplate=Track %%{number}", item->fileListItem->track );
@@ -191,21 +191,21 @@ void Convert::rip( ConvertItem* item )
item->fileListItem->ripping = true;
item->moveJob = new KIO::FileCopyJob( source, dest, -1, false, true, false, false );
- connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)),
- this, SLOT(moveProgress(KIO::Job*,unsigned long))
+ connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)),
+ this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long))
);
- connect( item->moveJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(moveFinished(KIO::Job*))
+ connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(moveFinished(KIO::Job*))
);
}
else {
- QStringList params;
- QString param, paramSplinter;
+ TQStringList params;
+ TQString param, paramSplinter;
item->convertProcess->clearArguments();
- param = QString::null;
+ param = TQString();
if( plugin->rip.param ) param.append( " " + plugin->rip.param );
if( plugin->rip.device ) param.append( " " + plugin->rip.device );
if( plugin->rip.overwrite ) param.append( " " + plugin->rip.overwrite );
@@ -219,37 +219,37 @@ void Convert::rip( ConvertItem* item )
item->track = 0;
}
-// if( plugin->rip.out_file.find("%p") != -1 ) {
-// QString t_str = plugin->rip.out_file;
-// t_str.replace( "%p", param );
+// if( plugin->rip.out_file.tqfind("%p") != -1 ) {
+// TQString t_str = plugin->rip.out_file;
+// t_str.tqreplace( "%p", param );
// param = plugin->rip.bin + " " + t_str;
// }
// else {
// param = plugin->rip.bin + param + " " + plugin->rip.out_file;
// }
- QString t_str = plugin->rip.out_file;
- t_str.replace( "%p", param );
+ TQString t_str = plugin->rip.out_file;
+ t_str.tqreplace( "%p", param );
param = config->binaries[plugin->rip.bin] + " " + t_str;
param.simplifyWhiteSpace();
- params = QStringList::split( ' ', param );
+ params = TQStringList::split( ' ', param );
- for( QStringList::Iterator it = params.begin(); it != params.end(); ++it )
+ for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it )
{
paramSplinter = *it;
- paramSplinter.replace( "%d", item->fileListItem->device );
- paramSplinter.replace( "%t", QString().sprintf("%i",item->fileListItem->track) );
- paramSplinter.replace( "%n", QString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) );
- paramSplinter.replace( "%o", item->tempWavFile->name() );
+ paramSplinter.tqreplace( "%d", item->fileListItem->device );
+ paramSplinter.tqreplace( "%t", TQString().sprintf("%i",item->fileListItem->track) );
+ paramSplinter.tqreplace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) );
+ paramSplinter.tqreplace( "%o", item->tempWavFile->name() );
*(item->convertProcess) << paramSplinter;
}
- param.replace( "%d", item->fileListItem->device );
- param.replace( "%t", QString().sprintf("%i",item->fileListItem->track) );
- param.replace( "%n", QString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) );
- param.replace( "%o", "\""+item->tempWavFile->name()+"\"" );
+ param.tqreplace( "%d", item->fileListItem->device );
+ param.tqreplace( "%t", TQString().sprintf("%i",item->fileListItem->track) );
+ param.tqreplace( "%n", TQString().sprintf("%i",cdManager->getTrackCount(item->fileListItem->device)) );
+ param.tqreplace( "%o", "\""+item->tempWavFile->name()+"\"" );
logger->log( item->logID, param );
//kdDebug() << " Executing: `" << param << "'" << endl;
@@ -270,8 +270,8 @@ void Convert::decode( ConvertItem* item )
logger->log( item->logID, i18n("Decoding") );
item->state = ConvertItem::decode;
- QStringList params;
- QString param, paramSplinter;
+ TQStringList params;
+ TQString param, paramSplinter;
item->convertProcess->clearArguments();
@@ -285,24 +285,24 @@ void Convert::decode( ConvertItem* item )
if( !plugin->dec.param.isEmpty() ) param.append( " " + plugin->dec.param );
if( !plugin->dec.overwrite.isEmpty() ) param.append( " " + plugin->dec.overwrite );
- QString t_str = plugin->dec.in_out_files;
- t_str.replace( "%p", param );
+ TQString t_str = plugin->dec.in_out_files;
+ t_str.tqreplace( "%p", param );
param = config->binaries[plugin->dec.bin] + " " + t_str;
param = param.simplifyWhiteSpace();
- params = QStringList::split( ' ', param );
+ params = TQStringList::split( ' ', param );
- for( QStringList::Iterator it = params.begin(); it != params.end(); ++it )
+ for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it )
{
paramSplinter = *it;
- paramSplinter.replace( "%i", item->tempInFile->name() );
- paramSplinter.replace( "%o", item->tempWavFile->name() );
+ paramSplinter.tqreplace( "%i", item->tempInFile->name() );
+ paramSplinter.tqreplace( "%o", item->tempWavFile->name() );
*(item->convertProcess) << paramSplinter;
}
- param.replace( "%i", "\""+item->tempInFile->name()+"\"" );
- param.replace( "%o", "\""+item->tempWavFile->name()+"\"" );
+ param.tqreplace( "%i", "\""+item->tempInFile->name()+"\"" );
+ param.tqreplace( "%o", "\""+item->tempWavFile->name()+"\"" );
//item->log = param;
logger->log( item->logID, param );
@@ -321,12 +321,12 @@ void Convert::encode( ConvertItem* item )
{
// TODO test quality profiles (never done)
- QString sStrength;
- QString sBitrate;
- QString sQuality;
- QString sMinBitrate;
- QString sMaxBitrate;
- QString sSamplingRate;
+ TQString sStrength;
+ TQString sBitrate;
+ TQString sQuality;
+ TQString sMinBitrate;
+ TQString sMaxBitrate;
+ TQString sSamplingRate;
int t_int;
float t_float;
@@ -334,8 +334,8 @@ void Convert::encode( ConvertItem* item )
logger->log( item->logID, i18n("Encoding") );
item->state = ConvertItem::encode;
- QStringList params;
- QString param, paramSplinter;
+ TQStringList params;
+ TQString param, paramSplinter;
item->convertProcess->clearArguments();
@@ -366,20 +366,20 @@ void Convert::encode( ConvertItem* item )
if( plugin->enc.strength.profiles.empty() ) {
if( plugin->enc.strength.step < 1 ) {
if( plugin->enc.strength.range_max >= plugin->enc.strength.range_min )
- sStrength = QString::number( compressionLevel * plugin->enc.strength.step );
+ sStrength = TQString::number( compressionLevel * plugin->enc.strength.step );
else
- sStrength = QString::number( plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step );
+ sStrength = TQString::number( plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step );
}
else {
if( plugin->enc.strength.range_max >= plugin->enc.strength.range_min )
- sStrength = QString::number( int(compressionLevel * plugin->enc.strength.step) );
+ sStrength = TQString::number( int(compressionLevel * plugin->enc.strength.step) );
else
- sStrength = QString::number( int(plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step) );
+ sStrength = TQString::number( int(plugin->enc.strength.range_min - compressionLevel * plugin->enc.strength.step) );
}
- if( plugin->enc.strength.separator != '.' ) sStrength.replace( QChar('.'), plugin->enc.strength.separator );
+ if( plugin->enc.strength.separator != '.' ) sStrength.tqreplace( TQChar('.'), plugin->enc.strength.separator );
}
else {
- QStringList::Iterator it = plugin->enc.strength.profiles.at( compressionLevel );
+ TQStringList::Iterator it = plugin->enc.strength.profiles.at( compressionLevel );
sStrength = *it;
}
}
@@ -387,16 +387,16 @@ void Convert::encode( ConvertItem* item )
if( item->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") ) {
if( item->fileListItem->options.encodingOptions.sBitrateMode == "cbr" && plugin->enc.lossy.bitrate.cbr.enabled ) {
param.append( " " + plugin->enc.lossy.bitrate.cbr.param );
- sBitrate = QString::number( item->fileListItem->options.encodingOptions.iQuality );
+ sBitrate = TQString::number( item->fileListItem->options.encodingOptions.iQuality );
}
else if( item->fileListItem->options.encodingOptions.sBitrateMode == "abr" && plugin->enc.lossy.bitrate.abr.enabled ) {
param.append( " " + plugin->enc.lossy.bitrate.abr.param );
- sBitrate = QString::number( item->fileListItem->options.encodingOptions.iQuality );
+ sBitrate = TQString::number( item->fileListItem->options.encodingOptions.iQuality );
if( item->fileListItem->options.encodingOptions.bBitrateRange && plugin->enc.lossy.bitrate.abr.bitrate_range.enabled ) {
param.append( " " + plugin->enc.lossy.bitrate.abr.bitrate_range.param_min );
- sMinBitrate = QString::number( item->fileListItem->options.encodingOptions.iMinBitrate );
+ sMinBitrate = TQString::number( item->fileListItem->options.encodingOptions.iMinBitrate );
param.append( " " + plugin->enc.lossy.bitrate.abr.bitrate_range.param_max );
- sMaxBitrate = QString::number( item->fileListItem->options.encodingOptions.iMaxBitrate );
+ sMaxBitrate = TQString::number( item->fileListItem->options.encodingOptions.iMaxBitrate );
}
}
}
@@ -409,8 +409,8 @@ void Convert::encode( ConvertItem* item )
else
t_float = ( (100.0f - (float)item->fileListItem->options.encodingOptions.iQuality) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max;
//t_float -= t_float%plugin->enc.quality.step;
- //sQuality = QString().sprintf( "%.2f", t_float );
- sQuality = QString::number( t_float );
+ //sQuality = TQString().sprintf( "%.2f", t_float );
+ sQuality = TQString::number( t_float );
}
else {
if( plugin->enc.lossy.quality.range_max >= plugin->enc.lossy.quality.range_min)
@@ -418,13 +418,13 @@ void Convert::encode( ConvertItem* item )
else
t_int = ( (100 - item->fileListItem->options.encodingOptions.iQuality) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max;
//t_int -= t_int%plugin->enc.quality.step;
- sQuality = QString::number( t_int );
+ sQuality = TQString::number( t_int );
}
- if( plugin->enc.bin == "oggenc" ) sQuality.replace(QChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
- else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.replace(QChar('.'),plugin->enc.lossy.quality.separator);
+ if( plugin->enc.bin == "oggenc" ) sQuality.tqreplace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
+ else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.tqreplace(TQChar('.'),plugin->enc.lossy.quality.separator);
}
else {
- QStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( rint(item->fileListItem->options.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) );
+ TQStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( rint(item->fileListItem->options.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) );
sQuality = *it;
}
}
@@ -433,16 +433,16 @@ void Convert::encode( ConvertItem* item )
}
else if( item->fileListItem->options.encodingOptions.sQualityMode == i18n("Hybrid") && plugin->enc.hybrid.enabled ) {
param.append( " " + plugin->enc.hybrid.param );
- sBitrate = QString::number( item->fileListItem->options.encodingOptions.iQuality );
+ sBitrate = TQString::number( item->fileListItem->options.encodingOptions.iQuality );
}
if( item->fileListItem->options.encodingOptions.samplingRate.bEnabled && plugin->enc.lossy.samplingrate.enabled ) {
param.append( " " + plugin->enc.lossy.samplingrate.param );
if( plugin->enc.lossy.samplingrate.unit == PluginLoaderBase::Hz ) {
- sSamplingRate = QString::number( item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate );
+ sSamplingRate = TQString::number( item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate );
}
else {
- sSamplingRate = QString::number( (float)item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate/1000 );
+ sSamplingRate = TQString::number( (float)item->fileListItem->options.encodingOptions.samplingRate.iSamplingRate/1000 );
}
}
@@ -485,64 +485,64 @@ void Convert::encode( ConvertItem* item )
if( !plugin->enc.tag.year.isEmpty() && item->fileListItem->tags->year != 0 ) param.append( " " + plugin->enc.tag.year );
}
- QString sInOutFiles = item->fileListItem->options.encodingOptions.sInOutFiles;
- param = sInOutFiles.replace( "%p", param );
+ TQString sInOutFiles = item->fileListItem->options.encodingOptions.sInOutFiles;
+ param = sInOutFiles.tqreplace( "%p", param );
// cosmetic surgery
param = param.simplifyWhiteSpace();
- params = QStringList::split( ' ', param );
+ params = TQStringList::split( ' ', param );
- QString inputFile;
+ TQString inputFile;
if( item->mode & ConvertItem::decode || item->mode & ConvertItem::rip ) inputFile = item->tempWavFile->name();
else inputFile = item->tempInFile->name();
- for( QStringList::Iterator it = params.begin(); it != params.end(); ++it )
+ for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it )
{
paramSplinter = *it;
- paramSplinter.replace( "%i", inputFile );
- paramSplinter.replace( "%o", item->tempOutFile->name() );
- paramSplinter.replace( "%c", sStrength );
- paramSplinter.replace( "%b", sBitrate );
- paramSplinter.replace( "%q", sQuality );
- paramSplinter.replace( "%m", sMinBitrate );
- paramSplinter.replace( "%M", sMaxBitrate );
- paramSplinter.replace( "%s", sSamplingRate );
+ paramSplinter.tqreplace( "%i", inputFile );
+ paramSplinter.tqreplace( "%o", item->tempOutFile->name() );
+ paramSplinter.tqreplace( "%c", sStrength );
+ paramSplinter.tqreplace( "%b", sBitrate );
+ paramSplinter.tqreplace( "%q", sQuality );
+ paramSplinter.tqreplace( "%m", sMinBitrate );
+ paramSplinter.tqreplace( "%M", sMaxBitrate );
+ paramSplinter.tqreplace( "%s", sSamplingRate );
if( item->fileListItem->tags ) {
- paramSplinter.replace( "%ta", ( item->fileListItem->tags->artist != "" ) ? item->fileListItem->tags->artist : i18n("Unknown") );
- paramSplinter.replace( "%tb", ( item->fileListItem->tags->album != "" ) ? item->fileListItem->tags->album : i18n("Unknown") );
- paramSplinter.replace( "%tc", ( item->fileListItem->tags->comment != "" ) ? item->fileListItem->tags->comment : i18n("Unknown") );
- paramSplinter.replace( "%td", ( QString::number(item->fileListItem->tags->disc) != "" ) ? QString::number(item->fileListItem->tags->disc) : "0" );
- paramSplinter.replace( "%tg", ( item->fileListItem->tags->genre != "" ) ? item->fileListItem->tags->genre : i18n("Unknown") );
- paramSplinter.replace( "%tn", ( QString::number(item->fileListItem->tags->track) != "" ) ? QString::number(item->fileListItem->tags->track) : "0" );
- paramSplinter.replace( "%tp", ( item->fileListItem->tags->composer != "" ) ? item->fileListItem->tags->composer : i18n("Unknown") );
- paramSplinter.replace( "%tt", ( item->fileListItem->tags->title != "" ) ? item->fileListItem->tags->title : i18n("Unknown") );
- paramSplinter.replace( "%ty", ( QString::number(item->fileListItem->tags->year) != "" ) ? QString::number(item->fileListItem->tags->year) : "0" );
+ paramSplinter.tqreplace( "%ta", ( item->fileListItem->tags->artist != "" ) ? item->fileListItem->tags->artist : i18n("Unknown") );
+ paramSplinter.tqreplace( "%tb", ( item->fileListItem->tags->album != "" ) ? item->fileListItem->tags->album : i18n("Unknown") );
+ paramSplinter.tqreplace( "%tc", ( item->fileListItem->tags->comment != "" ) ? item->fileListItem->tags->comment : i18n("Unknown") );
+ paramSplinter.tqreplace( "%td", ( TQString::number(item->fileListItem->tags->disc) != "" ) ? TQString::number(item->fileListItem->tags->disc) : "0" );
+ paramSplinter.tqreplace( "%tg", ( item->fileListItem->tags->genre != "" ) ? item->fileListItem->tags->genre : i18n("Unknown") );
+ paramSplinter.tqreplace( "%tn", ( TQString::number(item->fileListItem->tags->track) != "" ) ? TQString::number(item->fileListItem->tags->track) : "0" );
+ paramSplinter.tqreplace( "%tp", ( item->fileListItem->tags->composer != "" ) ? item->fileListItem->tags->composer : i18n("Unknown") );
+ paramSplinter.tqreplace( "%tt", ( item->fileListItem->tags->title != "" ) ? item->fileListItem->tags->title : i18n("Unknown") );
+ paramSplinter.tqreplace( "%ty", ( TQString::number(item->fileListItem->tags->year) != "" ) ? TQString::number(item->fileListItem->tags->year) : "0" );
}
if( paramSplinter != "" && paramSplinter != " " ) *(item->convertProcess) << paramSplinter; // NOTE fixes wavpack encoding
}
- param.replace( "%i", "\""+inputFile+"\"" );
- param.replace( "%o", "\""+item->tempOutFile->name()+"\"" );
- param.replace( "%c", sStrength );
- param.replace( "%b", sBitrate );
- param.replace( "%q", sQuality );
- param.replace( "%m", sMinBitrate );
- param.replace( "%M", sMaxBitrate );
- param.replace( "%s", sSamplingRate );
+ param.tqreplace( "%i", "\""+inputFile+"\"" );
+ param.tqreplace( "%o", "\""+item->tempOutFile->name()+"\"" );
+ param.tqreplace( "%c", sStrength );
+ param.tqreplace( "%b", sBitrate );
+ param.tqreplace( "%q", sQuality );
+ param.tqreplace( "%m", sMinBitrate );
+ param.tqreplace( "%M", sMaxBitrate );
+ param.tqreplace( "%s", sSamplingRate );
if( item->fileListItem->tags ) {
- param.replace( "%ta", "\""+item->fileListItem->tags->artist+"\"" );
- param.replace( "%tb", "\""+item->fileListItem->tags->album+"\"" );
- param.replace( "%tc", "\""+item->fileListItem->tags->comment+"\"" );
- param.replace( "%td", QString::number(item->fileListItem->tags->disc) );
- param.replace( "%tg", "\""+item->fileListItem->tags->genre+"\"" );
- param.replace( "%tn", QString::number(item->fileListItem->tags->track) );
- param.replace( "%tp", "\""+item->fileListItem->tags->composer+"\"" );
- param.replace( "%tt", "\""+item->fileListItem->tags->title+"\"" );
- param.replace( "%ty", QString::number(item->fileListItem->tags->year) );
+ param.tqreplace( "%ta", "\""+item->fileListItem->tags->artist+"\"" );
+ param.tqreplace( "%tb", "\""+item->fileListItem->tags->album+"\"" );
+ param.tqreplace( "%tc", "\""+item->fileListItem->tags->comment+"\"" );
+ param.tqreplace( "%td", TQString::number(item->fileListItem->tags->disc) );
+ param.tqreplace( "%tg", "\""+item->fileListItem->tags->genre+"\"" );
+ param.tqreplace( "%tn", TQString::number(item->fileListItem->tags->track) );
+ param.tqreplace( "%tp", "\""+item->fileListItem->tags->composer+"\"" );
+ param.tqreplace( "%tt", "\""+item->fileListItem->tags->title+"\"" );
+ param.tqreplace( "%ty", TQString::number(item->fileListItem->tags->year) );
}
logger->log( item->logID, param );
@@ -611,12 +611,12 @@ void Convert::put( ConvertItem* item )
logger->log( item->logID, i18n("Moving file") );
item->state = ConvertItem::put;
- QString src;
+ TQString src;
if( item->mode & ConvertItem::encode ) src = item->tempOutFile->name();
else src = item->tempWavFile->name();
item->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving file")+"... 00 %" );
- item->outputFilePathName = OutputDirectory::makePath( OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item->fileListItem,config)) ).replace("%2f","%252f");
+ item->outputFilePathName = OutputDirectory::makePath( OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item->fileListItem,config)) ).tqreplace("%2f","%252f");
KURL source( src );
KURL destination( item->outputFilePathName );
@@ -635,11 +635,11 @@ void Convert::put( ConvertItem* item )
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, false, false, false );
- connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)),
- this, SLOT(moveProgress(KIO::Job*,unsigned long))
+ connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)),
+ this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long))
);
- connect( item->moveJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(moveFinished(KIO::Job*))
+ connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(moveFinished(KIO::Job*))
);
}
}
@@ -649,9 +649,9 @@ void Convert::putCorrection( ConvertItem* item )
logger->log( item->logID, i18n("Moving correction file") );
item->state = ConvertItem::put_correction;
- QString src = item->correctionOutFile;
+ TQString src = item->correctionOutFile;
- QString dest = OutputDirectory::makePath( OutputDirectory::calcPath(item->fileListItem,config,item->correctionOutputExtension) ).replace("%2f","%252f");
+ TQString dest = OutputDirectory::makePath( OutputDirectory::calcPath(item->fileListItem,config,item->correctionOutputExtension) ).tqreplace("%2f","%252f");
KURL source( src );
// KURL destination( dest );
@@ -674,11 +674,11 @@ void Convert::putCorrection( ConvertItem* item )
}
else {
item->moveJob = new KIO::FileCopyJob( source, destination, -1, false, false, false, false );
- connect( item->moveJob, SIGNAL(percent(KIO::Job*,unsigned long)),
- this, SLOT(moveProgress(KIO::Job*,unsigned long))
+ connect( item->moveJob, TQT_SIGNAL(percent(KIO::Job*,unsigned long)),
+ this, TQT_SLOT(moveProgress(KIO::Job*,unsigned long))
);
- connect( item->moveJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(moveFinished(KIO::Job*))
+ connect( item->moveJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(moveFinished(KIO::Job*))
);
}
}
@@ -695,7 +695,7 @@ void Convert::executeUserScript( ConvertItem* item )
item->convertProcess->clearArguments();
- QString userscript = locate( "data", "soundkonverter/userscript.sh" );
+ TQString userscript = locate( "data", "soundkonverter/userscript.sh" );
if( userscript == "" ) executeNextStep( item );
*(item->convertProcess) << userscript;
@@ -833,7 +833,7 @@ void Convert::executeNextStep( ConvertItem* item )
void Convert::moveProgress( KIO::Job* job, unsigned long percent )
{
// search the item list for our item
- for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) {
+ for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) {
if( (*item)->moveJob == job ) {
(*item)->percent = percent;
}
@@ -843,7 +843,7 @@ void Convert::moveProgress( KIO::Job* job, unsigned long percent )
void Convert::moveFinished( KIO::Job* job )
{
// search the item list for our item
- for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) {
+ for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) {
if( (*item)->moveJob == job ) {
(*item)->percent = 0;
@@ -888,7 +888,7 @@ void Convert::moveFinished( KIO::Job* job )
}
else if( (*item)->state == ConvertItem::put ) {
if( job->error() != 0 ) {
- logger->log( (*item)->logID, i18n("Could not write to file: `%1'").arg(OutputDirectory::calcPath((*item)->fileListItem,config)) );
+ logger->log( (*item)->logID, i18n("Could not write to file: `%1'").tqarg(OutputDirectory::calcPath((*item)->fileListItem,config)) );
emit uncountTime( (*item)->getTime );
emit uncountTime( (*item)->getCorrectionTime );
emit uncountTime( (*item)->ripTime );
@@ -929,15 +929,15 @@ void Convert::processOutput( KProcess* proc, char* data, int )
int iPercent = 0, iTime = 0, iPos = 0, iNum = 0;
// search the item list for our item
- for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ )
+ for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ )
{
if( (*item)->convertProcess == proc )
{
- QString log_data = data;
-/* log_data.replace("\n","\\n");
- log_data.replace("\t","\\t");
- log_data.replace("\r","\\r");
- log_data.replace("\b","\\b");*/
+ TQString log_data = data;
+/* log_data.tqreplace("\n","\\n");
+ log_data.tqreplace("\t","\\t");
+ log_data.tqreplace("\r","\\r");
+ log_data.tqreplace("\b","\\b");*/
logger->log( (*item)->logID, " " + i18n("Output") + ": " + log_data );
//if( (*item)->readOutputTimer.elapsed() < /*config->pauseTime*/ 100 ) return; // TODO use config value
@@ -950,27 +950,27 @@ void Convert::processOutput( KProcess* proc, char* data, int )
ConvertPlugin* plugin = config->decoderForFormat( (*item)->fileListItem->mimeType );
// TODO null pointer check
- QString outputPattern = plugin->dec.output;
- //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins
+ TQString outputPattern = plugin->dec.output;
+ //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins
- if( outputPattern.find("%p") != -1 ) {
- outputPattern.replace( "%p", "%i" );
+ if( outputPattern.tqfind("%p") != -1 ) {
+ outputPattern.tqreplace( "%p", "%i" );
sscanf( data, outputPattern, &iPercent );
}
- else if( outputPattern.find("%t") != -1 ) {
- outputPattern.replace( "%t", "%i" );
+ else if( outputPattern.tqfind("%t") != -1 ) {
+ outputPattern.tqreplace( "%t", "%i" );
sscanf( data, outputPattern, &iTime );
iPercent = iTime * 100 / (*item)->fileListItem->time;
}
- else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) {
- if( outputPattern.find("%0") < outputPattern.find("%1") ) {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) {
+ if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) {
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iPos, &iNum );
}
else {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iNum, &iPos );
}
if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum;
@@ -991,31 +991,31 @@ void Convert::processOutput( KProcess* proc, char* data, int )
ConvertPlugin* plugin = config->encoderForFormat( (*item)->fileListItem->options.encodingOptions.sFormat );
// TODO null pointer check
- QString outputPattern;
+ TQString outputPattern;
if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Quality") ) outputPattern = plugin->enc.lossy.quality.output;
else if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*item)->fileListItem->options.encodingOptions.sBitrateMode == "cbr" ) outputPattern = plugin->enc.lossy.bitrate.cbr.output;
else if( (*item)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*item)->fileListItem->options.encodingOptions.sBitrateMode == "abr" ) outputPattern = plugin->enc.lossy.bitrate.abr.output;
- //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins
+ //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins
- if( outputPattern.find("%p") != -1 ) {
- outputPattern.replace( "%p", "%i" );
+ if( outputPattern.tqfind("%p") != -1 ) {
+ outputPattern.tqreplace( "%p", "%i" );
sscanf( data, outputPattern, &iPercent );
}
- else if( outputPattern.find("%t") != -1 ) {
- outputPattern.replace( "%t", "%i" );
+ else if( outputPattern.tqfind("%t") != -1 ) {
+ outputPattern.tqreplace( "%t", "%i" );
sscanf( data, outputPattern, &iTime );
iPercent = iTime * 100 / (*item)->fileListItem->time;
}
- else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) {
- if( outputPattern.find("%0") < outputPattern.find("%1") ) {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) {
+ if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) {
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iPos, &iNum );
}
else {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iNum, &iPos );
}
if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum;
@@ -1035,30 +1035,30 @@ void Convert::processOutput( KProcess* proc, char* data, int )
RipperPlugin* plugin = config->getCurrentRipper();
// TODO null pointer check
- QString outputPattern;
+ TQString outputPattern;
if( (*item)->fileListItem->track != 0 ) outputPattern = plugin->rip.output;
else outputPattern = plugin->rip.full_disc.output;
- //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins
+ //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins
- if( outputPattern.find("%p") != -1 || outputPattern.find("%a") != -1 ) {
- outputPattern.replace( "%p", "%i" );
- outputPattern.replace( "%a", "%i" );
+ if( outputPattern.tqfind("%p") != -1 || outputPattern.tqfind("%a") != -1 ) {
+ outputPattern.tqreplace( "%p", "%i" );
+ outputPattern.tqreplace( "%a", "%i" );
sscanf( data, outputPattern, &iPercent );
}
- else if( outputPattern.find("%t") != -1 ) {
- outputPattern.replace( "%t", "%i" );
+ else if( outputPattern.tqfind("%t") != -1 ) {
+ outputPattern.tqreplace( "%t", "%i" );
sscanf( data, outputPattern, &iTime );
iPercent = iTime * 100 / (*item)->fileListItem->time;
}
- else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) {
- if( outputPattern.find("%0") < outputPattern.find("%1") ) {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) {
+ if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) {
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iPos, &iNum );
}
else {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iNum, &iPos );
}
if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum;
@@ -1068,7 +1068,7 @@ void Convert::processOutput( KProcess* proc, char* data, int )
{
// TODO guess progress, when no signal is received
(*item)->lastOutputTimer.start();
- if( (*item)->fileListItem->track == 0 && plugin->rip.full_disc.output.find("%a") != -1 ) {
+ if( (*item)->fileListItem->track == 0 && plugin->rip.full_disc.output.tqfind("%a") != -1 ) {
if( iPercent < (*item)->lastPercent ) (*item)->track++;
(*item)->lastPercent = iPercent;
(*item)->percent = (*item)->track * 100 / (*item)->tracks + iPercent / (*item)->tracks;
@@ -1086,7 +1086,7 @@ void Convert::processOutput( KProcess* proc, char* data, int )
void Convert::processExit( KProcess* proc )
{
// search the item list for our item
- for( QValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) {
+ for( TQValueList<ConvertItem*>::Iterator item = items.begin(); item != items.end(); item++ ) {
// if( (*item)->convertProcess == proc && (*item)->fileListItem != 0 ) {
if( (*item)->convertProcess == proc ) {
@@ -1201,7 +1201,7 @@ void Convert::processExit( KProcess* proc )
}
if( (*item)->state == ConvertItem::put ) {
if( proc->signalled() ) {
- logger->log( (*item)->logID, i18n("Could not write to file: `%1'").arg(OutputDirectory::calcPath((*item)->fileListItem,config)) );
+ logger->log( (*item)->logID, i18n("Could not write to file: `%1'").tqarg(OutputDirectory::calcPath((*item)->fileListItem,config)) );
emit uncountTime( (*item)->getTime );
emit uncountTime( (*item)->getCorrectionTime );
emit uncountTime( (*item)->ripTime );
@@ -1213,7 +1213,7 @@ void Convert::processExit( KProcess* proc )
return;
}
if( !proc->normalExit() ) {
- logger->log( (*item)->logID, i18n("Could not write to file: `%1'").arg(OutputDirectory::calcPath((*item)->fileListItem,config)) );
+ logger->log( (*item)->logID, i18n("Could not write to file: `%1'").tqarg(OutputDirectory::calcPath((*item)->fileListItem,config)) );
emit uncountTime( (*item)->getTime );
emit uncountTime( (*item)->getCorrectionTime );
emit uncountTime( (*item)->ripTime );
@@ -1289,14 +1289,14 @@ void Convert::processExit( KProcess* proc )
void Convert::add( FileListItem* item )
{
- logger->log( 1000, i18n("Adding new item to conversion list: `%1'").arg(item->options.filePathName) );
+ logger->log( 1000, i18n("Adding new item to conversion list: `%1'").tqarg(item->options.filePathName) );
// append the item to the item list and store the iterator
- QValueList<ConvertItem*>::Iterator newItem = items.append( new ConvertItem( item ) );
+ TQValueList<ConvertItem*>::Iterator newItem = items.append( new ConvertItem( item ) );
// register at the logger
(*newItem)->logID = logger->registerProcess( item->options.filePathName );
- logger->log( 1000, " " + i18n("Got log ID: %1").arg((*newItem)->logID) );
+ logger->log( 1000, " " + i18n("Got log ID: %1").tqarg((*newItem)->logID) );
logger->log( (*newItem)->logID, "Mime Type: " + (*newItem)->fileListItem->mimeType );
if( (*newItem)->fileListItem->tags ) logger->log( (*newItem)->logID, i18n("Tags successfully read") );
@@ -1310,35 +1310,35 @@ void Convert::add( FileListItem* item )
(*newItem)->replayGain = 0;
/* seems to be unnecessary
- (*newItem)->correctionInFile = QString::null();
- (*newItem)->correctionOutFile = QString::null();
- (*newItem)->correctionInputExtension = QString::null();
- (*newItem)->correctionOutputExtension = QString::null();*/
+ (*newItem)->correctionInFile = TQString()();
+ (*newItem)->correctionOutFile = TQString()();
+ (*newItem)->correctionInputExtension = TQString()();
+ (*newItem)->correctionOutputExtension = TQString()();*/
// connect convertProcess of our new item with the slots of Convert
(*newItem)->convertProcess = new KProcess();
- connect( (*newItem)->convertProcess, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(processOutput(KProcess*,char*,int))
+ connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(processOutput(KProcess*,char*,int))
);
- connect( (*newItem)->convertProcess, SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, SLOT(processOutput(KProcess*,char*,int))
+ connect( (*newItem)->convertProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this, TQT_SLOT(processOutput(KProcess*,char*,int))
);
- connect( (*newItem)->convertProcess, SIGNAL(processExited(KProcess*)),
- this, SLOT(processExit(KProcess*))
+ connect( (*newItem)->convertProcess, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(processExit(KProcess*))
);
// NOTE the tempInFile is also created if the file is a audio cd track
// set up the names of our temp files
- (*newItem)->tempInFile = new KTempFile( QString::null, "." + item->fileFormat );
+ (*newItem)->tempInFile = new KTempFile( TQString(), "." + item->fileFormat );
(*newItem)->tempInFile->setAutoDelete( true );
(*newItem)->tempInFile->close();
- (*newItem)->tempWavFile = new KTempFile( QString::null, ".wav" );
+ (*newItem)->tempWavFile = new KTempFile( TQString(), ".wav" );
(*newItem)->tempWavFile->setAutoDelete( true );
(*newItem)->tempWavFile->close();
- (*newItem)->tempOutFile = new KTempFile( QString::null, "." + item->options.encodingOptions.sFormat );
+ (*newItem)->tempOutFile = new KTempFile( TQString(), "." + item->options.encodingOptions.sFormat );
(*newItem)->tempOutFile->setAutoDelete( true );
(*newItem)->tempOutFile->close();
@@ -1364,7 +1364,7 @@ void Convert::add( FileListItem* item )
(*newItem)->mode = ConvertItem::Mode( (*newItem)->mode | ConvertItem::replaygain );
}
- QString extension;
+ TQString extension;
extension = config->getCorrectionExtension( item->mimeType );
if( !extension.isEmpty() ) {
@@ -1432,7 +1432,7 @@ void Convert::add( FileListItem* item )
void Convert::stop( FileListItem* item )
{
// search the item list for our item to stop
- for( QValueList<ConvertItem*>::Iterator stopItem = items.begin(); stopItem != items.end(); stopItem++ ) {
+ for( TQValueList<ConvertItem*>::Iterator stopItem = items.begin(); stopItem != items.end(); stopItem++ ) {
// is fileListItem pointing at the same address, as item
if( (*stopItem)->fileListItem == item ) {
@@ -1465,25 +1465,25 @@ void Convert::remove( ConvertItem* item, int state )
//emit uncountTime( item->getTime + item->getCorrectionTime + item->ripTime +
// item->decodeTime + item->encodeTime + item->replaygainTime );
- logger->log( item->logID, i18n("Removing file from conversion list. Exit code %1").arg(state) );
+ logger->log( item->logID, i18n("Removing file from conversion list. Exit code %1").tqarg(state) );
if( item->fileListItem->notify != "" ) {
- QString command = item->fileListItem->notify;
- command.replace( "%u", item->fileListItem->url );
- command.replace( "%i", item->fileListItem->options.filePathName.replace(" ","%20") );
- command.replace( "%o", item->outputFilePathName.replace(" ","%20") );
- logger->log( item->logID, " "+i18n("Executing command: \"%1\"").arg(command) );
+ TQString command = item->fileListItem->notify;
+ command.tqreplace( "%u", item->fileListItem->url );
+ command.tqreplace( "%i", item->fileListItem->options.filePathName.tqreplace(" ","%20") );
+ command.tqreplace( "%o", item->outputFilePathName.tqreplace(" ","%20") );
+ logger->log( item->logID, " "+i18n("Executing command: \"%1\"").tqarg(command) );
notify.clearArguments();
- QString paramSplinter;
+ TQString paramSplinter;
// FIXME split correct (strings with spaces are splited by mistake)
// FIXME only one command can be executed at once!?
- QStringList params = QStringList::split( ' ', item->fileListItem->notify );
- for( QStringList::Iterator it = params.begin(); it != params.end(); ++it )
+ TQStringList params = TQStringList::split( ' ', item->fileListItem->notify );
+ for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it )
{
paramSplinter = *it;
- paramSplinter.replace( "%u", item->fileListItem->url );
- paramSplinter.replace( "%i", item->fileListItem->options.filePathName );
- paramSplinter.replace( "%o", item->outputFilePathName );
+ paramSplinter.tqreplace( "%u", item->fileListItem->url );
+ paramSplinter.tqreplace( "%i", item->fileListItem->options.filePathName );
+ paramSplinter.tqreplace( "%o", item->outputFilePathName );
notify << paramSplinter;
}
notify.start( KProcess::DontCare );
@@ -1507,13 +1507,13 @@ void Convert::remove( ConvertItem* item, int state )
item->tempWavFile = 0;
if( item->tempOutFile != 0 ) delete item->tempOutFile;
item->tempOutFile = 0;
- QFile file;
+ TQFile file;
file.setName( item->correctionInFile );
if( file.exists() ) file.remove();
file.setName( item->correctionOutFile );
if( file.exists() ) file.remove();
- for( QValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) {
+ for( TQValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) {
if( (*it) == item ) {
items.remove( it );
break;
@@ -1532,14 +1532,14 @@ void Convert::updateProgressIndicator()
{
float time = 0;
- for( QValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) {
+ for( TQValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) {
if( (*it)->state == ConvertItem::get ) {
time += (*it)->getTime * (*it)->percent / 100;
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting file")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
else if( (*it)->state == ConvertItem::get_correction ) {
time += (*it)->getCorrectionTime * (*it)->percent / 100;
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting correction file")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Getting correction file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
else if( (*it)->state == ConvertItem::rip ) {
RipperPlugin* plugin = config->getCurrentRipper();
@@ -1548,7 +1548,7 @@ void Convert::updateProgressIndicator()
}
else {
time += (*it)->ripTime * (*it)->percent / 100;
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Ripping")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Ripping")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
}
else if( (*it)->state == ConvertItem::decode ) {
@@ -1558,12 +1558,12 @@ void Convert::updateProgressIndicator()
}
else {
time += (*it)->decodeTime * (*it)->percent / 100;
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Decoding")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Decoding")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
}
else if( (*it)->state == ConvertItem::encode ) {
ConvertPlugin* plugin = config->encoderForFormat( (*it)->fileListItem->options.encodingOptions.sFormat );
- QString outputPattern;
+ TQString outputPattern;
if( plugin != 0 && (*it)->fileListItem->options.encodingOptions.sQualityMode == i18n("Quality") ) outputPattern = plugin->enc.lossy.quality.output;
else if( plugin != 0 && (*it)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*it)->fileListItem->options.encodingOptions.sBitrateMode == "cbr" ) outputPattern = plugin->enc.lossy.bitrate.cbr.output;
else if( plugin != 0 && (*it)->fileListItem->options.encodingOptions.sQualityMode == i18n("Bitrate") && (*it)->fileListItem->options.encodingOptions.sBitrateMode == "abr" ) outputPattern = plugin->enc.lossy.bitrate.abr.output;
@@ -1572,19 +1572,19 @@ void Convert::updateProgressIndicator()
}
else {
time += (*it)->encodeTime * (*it)->percent / 100;
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Encoding")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Encoding")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
}
else if( (*it)->state == ConvertItem::replaygain ) {
time += (*it)->replaygainTime * (*it)->percent / 100;
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Replay Gain")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Replay Gain")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
else if( (*it)->state == ConvertItem::put ) {
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving file")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
else if( (*it)->state == ConvertItem::put_correction ) {
time += (*it)->getCorrectionTime * (*it)->percent / 100;
- (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving correction file")+"... "+QString().sprintf("%02i %%",(*it)->percent) );
+ (*it)->fileListItem->setText( fileList->columnByName(i18n("State")), i18n("Moving correction file")+"... "+TQString().sprintf("%02i %%",(*it)->percent) );
}
}
emit update( time );
@@ -1594,18 +1594,18 @@ void Convert::updateProgressIndicator()
// { // FIXME setting a higher priority does not work
// KProcess pChangePriority;
//
-// for( QValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) {
+// for( TQValueList<ConvertItem*>::Iterator it = items.begin(); it != items.end(); it++ ) {
// if( (*it)->convertProcess->isRunning() ) {
// //(*it)->convertProcess->setPriority( priority );
// pChangePriority.clearArguments();
// pChangePriority << "renice";
-// QString prio;
+// TQString prio;
// prio.sprintf( "%i", priority );
// pChangePriority << prio;
-// QString pid;
+// TQString pid;
// pid.sprintf( "%i", (*it)->convertProcess->pid() );
// pChangePriority << pid;
-// //QString cmd;
+// //TQString cmd;
// //cmd.sprintf( "renice %i %i", );
// pChangePriority.start( KProcess::Block );
// }
diff --git a/src/convert.h b/src/convert.h
index d69fec4..1bde423 100755
--- a/src/convert.h
+++ b/src/convert.h
@@ -5,8 +5,8 @@
#include <kio/jobclasses.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include <kprocess.h>
@@ -75,13 +75,13 @@ public:
KTempFile* tempWavFile;
KTempFile* tempOutFile;
- QString correctionInFile;
- QString correctionOutFile;
- QString correctionInputExtension;
- QString correctionOutputExtension;
+ TQString correctionInFile;
+ TQString correctionOutFile;
+ TQString correctionInputExtension;
+ TQString correctionOutputExtension;
- //QTime readOutputTimer;
- QTime lastOutputTimer;
+ //TQTime readOutputTimer;
+ TQTime lastOutputTimer;
/** what shall we do with the file? */
Mode mode;
@@ -91,10 +91,10 @@ public:
/** the id with that the item is registered at the logger */
int logID;
/** the binary for special treatment */
-// QString binary;
+// TQString binary;
/** the path and the name of the output file (needed for executing a command after conversion) */
- QString outputFilePathName;
+ TQString outputFilePathName;
/** if it is an audio cd and it should be ripped to one file: the number of tracks on the cd */
int tracks;
@@ -119,9 +119,10 @@ public:
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class Convert : public QObject
+class Convert : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -197,14 +198,14 @@ private:
void remove( ConvertItem* item, int state = 0 );
/** holds all active files */
- QValueList<ConvertItem*> items;
+ TQValueList<ConvertItem*> items;
Config* config;
TagEngine* tagEngine;
CDManager* cdManager;
FileList* fileList;
Logger* logger;
- QTimer* tUpdateProgressIndicator;
+ TQTimer* tUpdateProgressIndicator;
KProcess notify;
private slots:
@@ -271,7 +272,7 @@ signals:
/**
* The next track from @p device can be ripped while the track is being encoded
*/
- void rippingFinished( const QString& device );
+ void rippingFinished( const TQString& device );
void countTime( float );
void uncountTime( float );
diff --git a/src/cuesheeteditor.cpp b/src/cuesheeteditor.cpp
index 206611b..56d88cf 100755
--- a/src/cuesheeteditor.cpp
+++ b/src/cuesheeteditor.cpp
@@ -1,8 +1,8 @@
#include "cuesheeteditor.h"
-#include <qlayout.h>
-#include <qstring.h>
+#include <tqlayout.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -18,8 +18,8 @@
// ### soundkonverter 0.4: import/export flac cuesheet
-CuesheetEditor::CuesheetEditor( QWidget *parent, const char *name, bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+CuesheetEditor::CuesheetEditor( TQWidget *tqparent, const char *name, bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
// TODO can the cuesheet editor be extendet by more tags (composer), etc.
@@ -30,7 +30,7 @@ CuesheetEditor::CuesheetEditor( QWidget *parent, const char *name, bool modal, W
resize( 600, 400 );
setIcon( iconLoader->loadIcon("kwrite",KIcon::Small) );
- QGridLayout *grid = new QGridLayout( this, 4, 1, 11, 6 );
+ TQGridLayout *grid = new TQGridLayout( this, 4, 1, 11, 6 );
tTextEdit = new KTextEdit( this, "tTextEdit" );
tTextEdit->setFocus();
@@ -64,31 +64,31 @@ CuesheetEditor::CuesheetEditor( QWidget *parent, const char *name, bool modal, W
}
*/
- QHBoxLayout *buttonBox = new QHBoxLayout();
+ TQHBoxLayout *buttonBox = new TQHBoxLayout();
grid->addLayout( buttonBox, 3, 0 );
pHelp = new KPushButton( iconLoader->loadIcon("help",KIcon::Small), "", this, "pHelp" );
buttonBox->addWidget( pHelp );
- connect( pHelp, SIGNAL(clicked()),
- this, SLOT(help())
+ connect( pHelp, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(help())
);
pGenerate = new KPushButton( iconLoader->loadIcon("filenew",KIcon::Small), i18n("Generate"), this, "pGenerate" );
buttonBox->addWidget( pGenerate );
- connect( pGenerate, SIGNAL(clicked()),
- this, SLOT(generate())
+ connect( pGenerate, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(generate())
);
pConvert = new KPushButton( iconLoader->loadIcon("run",KIcon::Small), i18n("Format"), this, "pConvert" );
buttonBox->addWidget( pConvert );
- connect( pConvert, SIGNAL(clicked()),
- this, SLOT(convert())
+ connect( pConvert, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(convert())
);
pShift = new KPushButton( iconLoader->loadIcon("reload",KIcon::Small), i18n("Shift Title/Performer"), this, "pShift" );
buttonBox->addWidget( pShift );
- connect( pShift, SIGNAL(clicked()),
- this, SLOT(shift())
+ connect( pShift, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(shift())
);
buttonBox->addStretch();
@@ -96,8 +96,8 @@ CuesheetEditor::CuesheetEditor( QWidget *parent, const char *name, bool modal, W
pOk = new KPushButton(iconLoader->loadIcon("exit",KIcon::Small), i18n("Close"), this, "pOk" );
pOk->setFocus();
buttonBox->addWidget( pOk );
- connect( pOk, SIGNAL(clicked()),
- this, SLOT(accept())
+ connect( pOk, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(accept())
);
// delete the icon loader object
@@ -116,27 +116,27 @@ void CuesheetEditor::help()
void CuesheetEditor::generate()
{
- QString text = tTextEdit->text();
- QString newText;
- QStringList titleList, performerList;
- QValueList<int> timeList;
- QString time;
+ TQString text = tTextEdit->text();
+ TQString newText;
+ TQStringList titleList, performerList;
+ TQValueList<int> timeList;
+ TQString time;
int min, sec;
int index;
while( index != -1 )
{
- index = text.find( " - " );
+ index = text.tqfind( " - " );
if( index == -1 )
break;
titleList.append( text.left(index) );
text.remove( 0, index + 3 );
- index=text.find( " [" );
+ index=text.tqfind( " [" );
if( index == -1 )
break;
performerList.append( text.left(index) );
text.remove( 0, index + 2 );
- index = text.find( "]" );
+ index = text.tqfind( "]" );
if( index == -1 )
break;
time = text.left( index );
@@ -152,20 +152,20 @@ void CuesheetEditor::generate()
int TRACK = 1;
int INDEX = 0;
bool addFrames = false;
- QStringList::Iterator performerIt = performerList.begin();
- QValueList<int>::Iterator timeIt = timeList.begin();
- for( QStringList::Iterator titleIt = titleList.begin(); titleIt != titleList.end(); ++titleIt )
+ TQStringList::Iterator performerIt = performerList.begin();
+ TQValueList<int>::Iterator timeIt = timeList.begin();
+ for( TQStringList::Iterator titleIt = titleList.begin(); titleIt != titleList.end(); ++titleIt )
{
- newText.append( QString().sprintf(" TRACK %02i AUDIO\n",TRACK ) );
+ newText.append( TQString().sprintf(" TRACK %02i AUDIO\n",TRACK ) );
newText.append( " TITLE \"" + (*titleIt) + "\"\n" );
newText.append( " PERFORMER \"" + (*performerIt) + "\"\n" );
if( addFrames ) {
- newText.append( QString().sprintf(" INDEX 01 %02i:%02i:37\n",INDEX/60,INDEX%60) );
+ newText.append( TQString().sprintf(" INDEX 01 %02i:%02i:37\n",INDEX/60,INDEX%60) );
INDEX++;
addFrames = false;
}
else {
- newText.append( QString().sprintf(" INDEX 01 %02i:%02i:00\n",INDEX/60,INDEX%60) );
+ newText.append( TQString().sprintf(" INDEX 01 %02i:%02i:00\n",INDEX/60,INDEX%60) );
addFrames = true;
}
@@ -180,21 +180,21 @@ void CuesheetEditor::generate()
void CuesheetEditor::convert()
{
- QString text=tTextEdit->text();
- QString newText;
- QString tmpText;
- QString first, rest;
- QStringList splinters;
+ TQString text=tTextEdit->text();
+ TQString newText;
+ TQString tmpText;
+ TQString first, rest;
+ TQStringList splinters;
int index;
while( index!=-1 )
{
- index=text.find("\"");
+ index=text.tqfind("\"");
if( index==-1 )
break;
newText+=text.left(index+1);
text.remove(0,index+1);
- index=text.find("\"");
+ index=text.tqfind("\"");
tmpText=text.left(index+1);
text.remove(0,index+1);
if( newText.right(6) == "FILE \"" )
@@ -202,8 +202,8 @@ void CuesheetEditor::convert()
newText+=tmpText;
continue;
}
- splinters=QStringList::split(' ',tmpText);
- for( QStringList::Iterator it=splinters.begin(); it!=splinters.end(); ++it )
+ splinters=TQStringList::split(' ',tmpText);
+ for( TQStringList::Iterator it=splinters.begin(); it!=splinters.end(); ++it )
{
for( uint i=0; i<(*it).length(); i++ )
{
@@ -249,26 +249,26 @@ void CuesheetEditor::convert()
void CuesheetEditor::shift() //move the title to "PERFORMER" and performer to "TITLE"
{
- QString text = tTextEdit->text();
- QString newText;
- QString line, title="", performer="";
+ TQString text = tTextEdit->text();
+ TQString newText;
+ TQString line, title="", performer="";
int index;
while( index !=- 1 )
{
- index = text.find("\n");
+ index = text.tqfind("\n");
if( index == -1 )
break;
line = text.left(index+1);
text.remove(0,index+1);
// TODO clean up
- if( line.find( "TITLE" ) != -1 ) {
- line.replace( "TITLE", "PERFORMER" );
+ if( line.tqfind( "TITLE" ) != -1 ) {
+ line.tqreplace( "TITLE", "PERFORMER" );
if( performer != "" ) newText += performer;
performer=line;
}
- else if( line.find( "PERFORMER" ) != -1 ) {
- line.replace( "PERFORMER", "TITLE" );
+ else if( line.tqfind( "PERFORMER" ) != -1 ) {
+ line.tqreplace( "PERFORMER", "TITLE" );
if( title != "" ) newText += title;
title = line;
}
@@ -295,24 +295,24 @@ void CuesheetEditor::shift() //move the title to "PERFORMER" and performer to "T
/*
void CuesheetEditor::shift() //replace title by performer and reverse
{
- QString text=tTextEdit->text();
- QString newText;
- QString line, title, performer;
+ TQString text=tTextEdit->text();
+ TQString newText;
+ TQString line, title, performer;
int index;
while( index!=-1 )
{
- index=text.find("\n");
+ index=text.tqfind("\n");
if( index==-1 )
break;
line=text.left(index+1);
text.remove(0,index+1);
- if( line.find(" TITLE \"") != -1 ) {
- line.replace(" TITLE \""," PERFORMER \"");
+ if( line.tqfind(" TITLE \"") != -1 ) {
+ line.tqreplace(" TITLE \""," PERFORMER \"");
newText+=line;
}
- else if( line.find(" PERFORMER \"") != -1 ) {
- line.replace(" PERFORMER \""," TITLE \"");
+ else if( line.tqfind(" PERFORMER \"") != -1 ) {
+ line.tqreplace(" PERFORMER \""," TITLE \"");
newText+=line;
}
else {
diff --git a/src/cuesheeteditor.h b/src/cuesheeteditor.h
index db5d986..7d1e663 100755
--- a/src/cuesheeteditor.h
+++ b/src/cuesheeteditor.h
@@ -18,18 +18,19 @@ class KPushButton;
class CuesheetEditor : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- CuesheetEditor( QWidget* parent=0, const char* name=0, bool modal=true, WFlags f=0 );
+ CuesheetEditor( TQWidget* tqparent=0, const char* name=0, bool modal=true, WFlags f=0 );
/**
* Default Destructor
*/
virtual ~CuesheetEditor();
- void setContent( const QString& text ) { tTextEdit->setText( text ); }
+ void setContent( const TQString& text ) { tTextEdit->setText( text ); }
private slots:
void help();
diff --git a/src/dcopinterface.h b/src/dcopinterface.h
index 18a097c..b056c54 100755
--- a/src/dcopinterface.h
+++ b/src/dcopinterface.h
@@ -5,7 +5,7 @@
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* @short The soundKonverter DCOP interface
@@ -20,25 +20,25 @@ k_dcop:
* When a new instance of soundKonverter should be created,
* this function is called and all @p files are passed, that should be opened (for conversion).
*/
- virtual void openArgFiles( const QStringList &files ) = 0;
+ virtual void openArgFiles( const TQStringList &files ) = 0;
/**
* When a new instance of soundKonverter should be created,
* this function is called and all @p files are passed, that should be opened for editing the replaygain tag.
*/
- virtual void openArgReplayGainFiles( const QStringList &files ) = 0;
+ virtual void openArgReplayGainFiles( const TQStringList &files ) = 0;
/*
* When a new instance of soundKonverter should be created,
* this function is called and all @p files are passed, that should be opened for repair.
*/
-// virtual void openArgRepairFiles( const QStringList &files ) = 0;
+// virtual void openArgRepairFiles( const TQStringList &files ) = 0;
// TODO code cleanups
/*
- virtual void openFiles(const QStringList &files) = 0;
- virtual void openReplayGainFiles(const QStringList &files) = 0;
+ virtual void openFiles(const TQStringList &files) = 0;
+ virtual void openReplayGainFiles(const TQStringList &files) = 0;
virtual void showFileDialog() = 0;
virtual void showDirDialog() = 0;
virtual void showCDDialog() = 0;
@@ -50,7 +50,7 @@ k_dcop:
virtual void startConversion() = 0;
virtual void stopConversion() = 0;
virtual void killConversion() = 0;
- virtual void removeFiles(const QStringList &files) = 0;
+ virtual void removeFiles(const TQStringList &files) = 0;
*/
};
diff --git a/src/dirdialog.cpp b/src/dirdialog.cpp
index 924036d..a585296 100755
--- a/src/dirdialog.cpp
+++ b/src/dirdialog.cpp
@@ -2,10 +2,10 @@
#include "dirdialog.h"
#include "config.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -15,8 +15,8 @@
#include <klistbox.h>
#include <kfiledialog.h>
-DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *name, bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+DirDialog::DirDialog( Config* config, Mode mode, TQWidget *tqparent, const char *name, bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
// create an icon loader object for loading icons
KIconLoader* iconLoader = new KIconLoader();
@@ -25,17 +25,17 @@ DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *na
resize( 400, 235 );
setIcon( iconLoader->loadIcon("folder_open",KIcon::Small) );
- QGridLayout* grid = new QGridLayout( this, 4, 1, 11, 6 );
+ TQGridLayout* grid = new TQGridLayout( this, 4, 1, 11, 6 );
- QHBoxLayout* directoryBox = new QHBoxLayout();
+ TQHBoxLayout* directoryBox = new TQHBoxLayout();
grid->addLayout( directoryBox, 0, 0 );
- QLabel* labelDirectory = new QLabel( i18n("Directory:"), this, "labelDirectory" );
+ TQLabel* labelDirectory = new TQLabel( i18n("Directory:"), this, "labelDirectory" );
directoryBox->addWidget( labelDirectory );
// uDirectory = new KURLRequester( this, "uDirectory" );
// uDirectory->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
-// uDirectory->setURL( QDir::homeDirPath() );
+// uDirectory->setURL( TQDir::homeDirPath() );
// directoryBox->addWidget( uDirectory );
lDirectory = new KLineEdit( this, "lDirectory" );
@@ -43,52 +43,52 @@ DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *na
pDirectory = new KPushButton( iconLoader->loadIcon("folder_open",KIcon::Small), "", this, "pDirectory" );
directoryBox->addWidget( pDirectory );
- connect( pDirectory, SIGNAL(clicked()),
- this, SLOT(selectDirectoryClicked())
+ connect( pDirectory, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(selectDirectoryClicked())
);
- QHBoxLayout* fileTypesBox = new QHBoxLayout();
+ TQHBoxLayout* fileTypesBox = new TQHBoxLayout();
grid->addLayout( fileTypesBox, 1, 0 );
fileTypes = new KListBox( this, "fileTypes" );
if( mode == Convert ) fileTypes->insertStringList( config->fileTypes() );
else if( mode == ReplayGain ) fileTypes->insertStringList( config->replayGainFileTypes() );
- fileTypes->setSelectionMode( QListBox::Multi );
+ fileTypes->setSelectionMode( TQListBox::Multi );
for( int i = 0; i < fileTypes->count(); i++ ) fileTypes->setSelected( i, true );
fileTypesBox->addWidget( fileTypes );
- QVBoxLayout* fileTypesButtonsBox = new QVBoxLayout();
+ TQVBoxLayout* fileTypesButtonsBox = new TQVBoxLayout();
fileTypesBox->addLayout( fileTypesButtonsBox );
pSelectAll = new KPushButton( iconLoader->loadIcon("font",KIcon::Small), i18n("Select all"), this, "pSelectAll" );
fileTypesButtonsBox->addWidget( pSelectAll );
- connect( pSelectAll, SIGNAL(clicked()),
- this, SLOT(selectAllClicked())
+ connect( pSelectAll, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(selectAllClicked())
);
pSelectNone = new KPushButton( iconLoader->loadIcon("empty",KIcon::Small), i18n("Select none"), this, "pSelectNone" );
fileTypesButtonsBox->addWidget( pSelectNone );
- connect( pSelectNone, SIGNAL(clicked()),
- this, SLOT(selectNoneClicked())
+ connect( pSelectNone, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(selectNoneClicked())
);
- cRecursive = new QCheckBox( i18n("Recursive"), this, "cRecursive" );
+ cRecursive = new TQCheckBox( i18n("Recursive"), this, "cRecursive" );
cRecursive->setChecked( true );
recursive = true;
fileTypesButtonsBox->addWidget( cRecursive );
- connect( cRecursive, SIGNAL(toggled(bool)),
- this, SLOT(recursiveToggled(bool))
+ connect( cRecursive, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(recursiveToggled(bool))
);
fileTypesButtonsBox->addStretch();
- QHBoxLayout* buttonBox = new QHBoxLayout();
+ TQHBoxLayout* buttonBox = new TQHBoxLayout();
grid->addLayout( buttonBox, 2, 0 );
pOk = new KPushButton( iconLoader->loadIcon("folder_open",KIcon::Small), i18n("Open"), this, "pOk" );
buttonBox->addWidget( pOk );
- connect( pOk, SIGNAL(clicked()),
- this, SLOT(okClicked())
+ connect( pOk, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(okClicked())
);
buttonBox->addStretch();
@@ -96,21 +96,21 @@ DirDialog::DirDialog( Config* config, Mode mode, QWidget *parent, const char *na
pCancel = new KPushButton( iconLoader->loadIcon("cancel",KIcon::Small),i18n("Cancel"), this, "pCancel" );
pOk->setFocus();
buttonBox->addWidget( pCancel );
- connect( pCancel, SIGNAL(clicked()),
- this, SLOT(reject())
+ connect( pCancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject())
);
// delete the icon loader object
delete iconLoader;
- QString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory") );
+ TQString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory") );
if( !directory.isEmpty() )
{
lDirectory->setText( directory );
}
else
{
- lDirectory->setText( QDir::homeDirPath() );
+ lDirectory->setText( TQDir::homeDirPath() );
}
}
@@ -121,7 +121,7 @@ void DirDialog::okClicked()
{
selectedFileTypes.clear();
for( int i = 0; i < fileTypes->count(); i++ ) {
- if( fileTypes->isSelected(i) ) selectedFileTypes += QStringList::split(", ",fileTypes->text(i));
+ if( fileTypes->isSelected(i) ) selectedFileTypes += TQStringList::split(", ",fileTypes->text(i));
}
directory = lDirectory->text();
@@ -130,7 +130,7 @@ void DirDialog::okClicked()
void DirDialog::selectDirectoryClicked()
{
- QString directory = KFileDialog::getExistingDirectory( lDirectory->text(), this, i18n("Choose a directory") );
+ TQString directory = KFileDialog::getExistingDirectory( lDirectory->text(), this, i18n("Choose a directory") );
if( !directory.isEmpty() )
{
lDirectory->setText( directory );
diff --git a/src/dirdialog.h b/src/dirdialog.h
index 4227a9e..4272fed 100755
--- a/src/dirdialog.h
+++ b/src/dirdialog.h
@@ -6,7 +6,7 @@
class Config;
-class QCheckBox;
+class TQCheckBox;
class KLineEdit;
class KPushButton;
@@ -21,6 +21,7 @@ class KListBox;
class DirDialog : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode {
Convert = 0x0001,
@@ -30,15 +31,15 @@ public:
/**
* Constructor
*/
- DirDialog( Config*, Mode, QWidget* parent=0, const char* name=0, bool modal=true, WFlags f=0 );
+ DirDialog( Config*, Mode, TQWidget* tqparent=0, const char* name=0, bool modal=true, WFlags f=0 );
/**
* Destructor
*/
virtual ~DirDialog();
- QString directory;
- QStringList selectedFileTypes;
+ TQString directory;
+ TQStringList selectedFileTypes;
bool recursive;
private slots:
@@ -55,7 +56,7 @@ private:
KListBox* fileTypes;
KPushButton* pSelectAll;
KPushButton* pSelectNone;
- QCheckBox* cRecursive;
+ TQCheckBox* cRecursive;
KPushButton* pCancel;
KPushButton* pOk;
diff --git a/src/filelist.cpp b/src/filelist.cpp
index c4e6b5d..72cb8b0 100755
--- a/src/filelist.cpp
+++ b/src/filelist.cpp
@@ -21,14 +21,14 @@
#include <kurldrag.h>
#include <kapplication.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qheader.h>
-#include <qdir.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
+#include <tqdir.h>
#include <kprogress.h>
#include <kuser.h>
@@ -38,8 +38,8 @@
// ### soundkonverter 0.4: draw tooltip like bubble info box
-FileListItem::FileListItem( KListView* parent, FileListItem* after )
- : KListViewItem( parent, after )
+FileListItem::FileListItem( KListView* tqparent, FileListItem* after )
+ : KListViewItem( tqparent, after )
{
tags = 0;
converting = false;
@@ -47,8 +47,8 @@ FileListItem::FileListItem( KListView* parent, FileListItem* after )
ripping = false;
}
-FileListItem::FileListItem( KListView* parent )
- : KListViewItem( parent )
+FileListItem::FileListItem( KListView* tqparent )
+ : KListViewItem( tqparent )
{
tags = 0;
converting = false;
@@ -59,52 +59,52 @@ FileListItem::FileListItem( KListView* parent )
FileListItem::~FileListItem()
{}
-void FileListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+void FileListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment )
{
// NOTE speed up this function
// NOTE calculate the red color
- QColorGroup _cg( cg );
- QColor c;
+ TQColorGroup _cg( cg );
+ TQColor c;
if( column == ((FileList*)listView())->columnByName(i18n("Input")) || column == ((FileList*)listView())->columnByName(i18n("Output")) )
{
int margin = listView()->itemMargin();
int w = width - 2*margin;
int h = height();
- QRect textRect = p->boundingRect( margin, 0, w, h, alignment, text(column) );
+ TQRect textRect = p->boundingRect( margin, 0, w, h, tqalignment, text(column) );
if( textRect.width() > w ) {
- alignment = Qt::AlignRight | Qt::SingleLine;
+ tqalignment = TQt::AlignRight | TQt::SingleLine;
}
/*if ( textRect.width() <= w ) {
- p->drawText( margin, 0, w, h, alignment | Qt::SingleLine | Qt::ExpandTabs, text(column), -1 );
+ p->drawText( margin, 0, w, h, tqalignment | TQt::SingleLine | TQt::ExpandTabs, text(column), -1 );
}
else {
- textRect = p->boundingRect( margin, 0, w, h, Qt::AlignLeft, "... " );
- p->drawText( margin, 0, textRect.width(), h, Qt::AlignLeft | Qt::SingleLine | Qt::ExpandTabs, "...", -1 );
- p->drawText( margin+textRect.width(), 0, w-textRect.width(), h, Qt::AlignRight | Qt::SingleLine | Qt::ExpandTabs, text(column), -1 );
+ textRect = p->boundingRect( margin, 0, w, h, TQt::AlignLeft, "... " );
+ p->drawText( margin, 0, textRect.width(), h, TQt::AlignLeft | TQt::SingleLine | TQt::ExpandTabs, "...", -1 );
+ p->drawText( margin+textRect.width(), 0, w-textRect.width(), h, TQt::AlignRight | TQt::SingleLine | TQt::ExpandTabs, text(column), -1 );
}*/
}
if( isSelected() && converting ) {
- _cg.setColor( QColorGroup::Highlight, QColor( 215, 62, 62 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Highlight, TQColor( 215, 62, 62 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( converting && column != listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 255, 234, 234 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 255, 234, 234 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( converting && column == listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 247, 227, 227 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 247, 227, 227 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
- KListViewItem::paintCell( p, _cg, column, width, alignment );
+ KListViewItem::paintCell( p, _cg, column, width, tqalignment );
}
/*void FileListItem::updateOutputCell()
@@ -117,8 +117,8 @@ void FileListItem::updateOptionsCell()
setText( ((FileList*)listView())->columnByName(i18n("Quality")), ((FileList*)listView())->config->getProfileName(options) );
}*/
-FileList::FileList( CDManager* _cdManager, TagEngine* _tagEngine, Config* _config, Options* _options, Logger* _logger, QWidget* parent, const char* name )
- : KListView( parent, name )
+FileList::FileList( CDManager* _cdManager, TagEngine* _tagEngine, Config* _config, Options* _options, Logger* _logger, TQWidget* tqparent, const char* name )
+ : KListView( tqparent, name )
{
cdManager = _cdManager;
tagEngine = _tagEngine;
@@ -140,62 +140,62 @@ FileList::FileList( CDManager* _cdManager, TagEngine* _tagEngine, Config* _confi
header()->setClickEnabled( false );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
setAllColumnsShowFocus( true );
setResizeMode( LastColumn );
setSorting( -1 ); // NOTE if commented out, items aren't moveable anymore
setMinimumHeight( 200 );
- QGridLayout* grid = new QGridLayout( this, 2, 1, 11, 6 );
+ TQGridLayout* grid = new TQGridLayout( this, 2, 1, 11, 6 );
grid->setRowStretch( 0, 1 );
grid->setRowStretch( 2, 1 );
grid->setColStretch( 0, 1 );
grid->setColStretch( 2, 1 );
- pScanStatus = new KProgress( this, "pScanStatus" );
- pScanStatus->setMinimumHeight( pScanStatus->height() );
- pScanStatus->setFormat( "%v / %m" );
- pScanStatus->hide();
- grid->addWidget( pScanStatus, 1, 1 );
+ pScantqStatus = new KProgress( this, "pScantqStatus" );
+ pScantqStatus->setMinimumHeight( pScantqStatus->height() );
+ pScantqStatus->setFormat( "%v / %m" );
+ pScantqStatus->hide();
+ grid->addWidget( pScantqStatus, 1, 1 );
grid->setColStretch( 1, 2 );
contextMenu = new KPopupMenu( this );
- connect( this, SIGNAL(contextMenuRequested( QListViewItem*, const QPoint&, int )),
- this, SLOT(showContextMenu( QListViewItem*, const QPoint&, int ))
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(contextMenuRequested( TQListViewItem*, const TQPoint&, int )),
+ TQT_TQOBJECT(this), TQT_SLOT(showContextMenu( TQListViewItem*, const TQPoint&, int ))
);
// we haven't got access to the action collection of soundKonverter, so let's create a new one
actionCollection = new KActionCollection( this );
- edit = new KAction( i18n("Edit options ..."), "view_text", 0, this, SLOT(showOptionsEditorDialog()), actionCollection, "edit_options" );
- start = new KAction( i18n("Start conversion"), "run", 0, this, SLOT(convertSelectedItems()), actionCollection, "start_conversion" );
- stop = new KAction( i18n("Stop conversion"), "stop", 0, this, SLOT(stopSelectedItems()), actionCollection, "stop_conversion" );
- remove = new KAction( i18n("Remove"), "edittrash", Key_Delete, this, SLOT(removeSelectedItems()), actionCollection, "remove" );
- paste = new KAction( i18n("Paste"), "editpaste", 0, this, 0, actionCollection, "paste" ); // TODO paste
+ edit = new KAction( i18n("Edit options ..."), "view_text", 0, TQT_TQOBJECT(this), TQT_SLOT(showOptionsEditorDialog()), actionCollection, "edit_options" );
+ start = new KAction( i18n("Start conversion"), "run", 0, TQT_TQOBJECT(this), TQT_SLOT(convertSelectedItems()), actionCollection, "start_conversion" );
+ stop = new KAction( i18n("Stop conversion"), "stop", 0, TQT_TQOBJECT(this), TQT_SLOT(stopSelectedItems()), actionCollection, "stop_conversion" );
+ remove = new KAction( i18n("Remove"), "edittrash", Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(removeSelectedItems()), actionCollection, "remove" );
+ paste = new KAction( i18n("Paste"), "editpaste", 0, TQT_TQOBJECT(this), 0, actionCollection, "paste" ); // TODO paste
- connect( this, SIGNAL(selectionChanged()),
- this, SLOT(itemsSelected())
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(selectionChanged()),
+ TQT_TQOBJECT(this), TQT_SLOT(itemsSelected())
);
-// connect( this, SIGNAL(clicked(QListViewItem*,const QPoint&,int)),
-// this, SLOT(clickedSomewhere(QListViewItem*,const QPoint&,int))
+// connect( TQT_TQOBJECT(this), TQT_SIGNAL(clicked(TQListViewItem*,const TQPoint&,int)),
+// TQT_TQOBJECT(this), TQT_SLOT(clickedSomewhere(TQListViewItem*,const TQPoint&,int))
// );
- bubble = new QSimpleRichText( i18n( "<div align=center>"
+ bubble = new TQSimpleRichText( i18n( "<div align=center>"
"<h3>File List</h3>"
"Select your desired output options in the form above and add some files.<br/>"
"You can add files by clicking on \"Add files ...\" or dropping them here."
// "<br/><a href=\"documenation:about_compression\">Learn more about audio compression ...</a>"
- "</div>" ), QApplication::font() );
+ "</div>" ), TQApplication::font() );
- connect( header(), SIGNAL(sizeChange( int, int, int )),
- SLOT(columnResizeEvent( int, int, int ))
+ connect( header(), TQT_SIGNAL(sizeChange( int, int, int )),
+ TQT_SLOT(columnResizeEvent( int, int, int ))
);
- connect( this, SIGNAL( dropped(QDropEvent*, QListViewItem*, QListViewItem*) ),
- SLOT( slotDropped(QDropEvent*, QListViewItem*, QListViewItem*) )
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*) ),
+ TQT_SLOT( slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*) )
);
-// if( QFile::exists(locateLocal("data","soundkonverter/filelist.autosave.xml")) ) load( true );
+// if( TQFile::exists(locateLocal("data","soundkonverter/filelist.autosave.xml")) ) load( true );
// debug(); // NOTE DEBUG
}
@@ -205,7 +205,7 @@ FileList::~FileList()
delete optionsEditor;
}
-int FileList::columnByName( const QString& name )
+int FileList::columnByName( const TQString& name )
{
for( int i = 0; i < columns(); ++i ) {
if( columnText( i ) == name ) return i;
@@ -213,26 +213,26 @@ int FileList::columnByName( const QString& name )
return -1;
}
-void FileList::viewportPaintEvent( QPaintEvent* e )
+void FileList::viewportPaintEvent( TQPaintEvent* e )
{
KListView::viewportPaintEvent( e );
// the bubble help
if( childCount() == 0 ) {
- QPainter p( viewport() );
+ TQPainter p( viewport() );
bubble->setWidth( width() - 50 );
const uint w = bubble->width() + 20;
const uint h = bubble->height() + 20;
- p.setBrush( colorGroup().background() );
+ p.setBrush( tqcolorGroup().background() );
p.drawRoundRect( 15, 15, w, h, (8*200)/w, (8*200)/h );
- bubble->draw( &p, 20, 20, QRect(), colorGroup() );
+ bubble->draw( &p, 20, 20, TQRect(), tqcolorGroup() );
}
}
-void FileList::viewportResizeEvent( QResizeEvent* )
+void FileList::viewportResizeEvent( TQResizeEvent* )
{
// needed for correct redraw of bubble help
triggerUpdate();
@@ -244,23 +244,23 @@ void FileList::columnResizeEvent( int, int, int )
triggerUpdate();
}
-// void FileList::clickedSomewhere( QListViewItem*, const QPoint& pos, int )
+// void FileList::clickedSomewhere( TQListViewItem*, const TQPoint& pos, int )
// {
// /* if( childCount() == 0 ) {
-// kdDebug() << "clicked: `" << bubble->anchorAt(mapFromGlobal(pos)-QPoint(24,0)) << " (" << pos.x() << " | " << pos.y() << ")'" << endl;
+// kdDebug() << "clicked: `" << bubble->anchorAt(mapFromGlobal(pos)-TQPoint(24,0)) << " (" << pos.x() << " | " << pos.y() << ")'" << endl;
// }*/
// }
-bool FileList::acceptDrag( QDropEvent* e ) const
+bool FileList::acceptDrag( TQDropEvent* e ) const
{
return ( e->source() == viewport() || KURLDrag::canDecode(e) ); // TODO verify the files
}
-void FileList::slotDropped( QDropEvent* e, QListViewItem*, QListViewItem* itemAfter )
+void FileList::slotDropped( TQDropEvent* e, TQListViewItem*, TQListViewItem* itemAfter )
{
- QString file;
+ TQString file;
KURL::List list;
- QStringList files;
+ TQStringList files;
if( KURLDrag::decode( e, list ) ) // TODO local?
{
save( true );
@@ -268,8 +268,8 @@ void FileList::slotDropped( QDropEvent* e, QListViewItem*, QListViewItem* itemAf
{
// TODO verify the files (necessary when multiple files are being dropped)
// TODO implement cdda:/
- file = QDir::convertSeparators( (*it).pathOrURL() ); // TODO implement that in the url/file dialog, too?
- QFileInfo fileInfo( file );
+ file = TQDir::convertSeparators( (*it).pathOrURL() ); // TODO implement that in the url/file dialog, too?
+ TQFileInfo fileInfo( file );
if( fileInfo.isDir() )
{
addDir( file );
@@ -284,7 +284,7 @@ void FileList::slotDropped( QDropEvent* e, QListViewItem*, QListViewItem* itemAf
}
}
-void FileList::showContextMenu( QListViewItem* item, const QPoint& point, int )
+void FileList::showContextMenu( TQListViewItem* item, const TQPoint& point, int )
{
// if item is null, we can abort here
if( !item ) return;
@@ -362,32 +362,32 @@ void FileList::stopSelectedItems()
}
}
-int FileList::listDir( const QString& directory, QStringList filter, bool recursive, bool fast, int count )
+int FileList::listDir( const TQString& directory, TQStringList filter, bool recursive, bool fast, int count )
{ // NOTE speed up?
- QDir dir( directory );
- dir.setFilter( QDir::Files | QDir::Dirs | QDir::NoSymLinks | QDir::Readable );
+ TQDir dir( directory );
+ dir.setFilter( TQDir::Files | TQDir::Dirs | TQDir::NoSymLinks | TQDir::Readable );
- QStringList list = dir.entryList();
+ TQStringList list = dir.entryList();
- for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
if( *it == "." || *it == ".." ) continue;
- QFileInfo fileInfo( directory + "/" + *it );
+ TQFileInfo fileInfo( directory + "/" + *it );
if( fast ) {
if( fileInfo.isDir() && recursive ) {
count = listDir( fileInfo.filePath(), filter, recursive, fast, count );
}
else if( !fileInfo.isDir() || !recursive ) { // NOTE checking for isFile may not work with all file names
// NOTE filter feature
- for( QStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
- if( (*it).endsWith("."+(*jt),false) ) {
+ for( TQStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
+ if( (*it).tqendsWith("."+(*jt),false) ) {
count++;
- pScanStatus->setTotalSteps( count );
+ pScantqStatus->setTotalSteps( count );
break;
}
}
if( filter.first() == "" ) {
count++;
- pScanStatus->setTotalSteps( count );
+ pScantqStatus->setTotalSteps( count );
}
}
}
@@ -397,18 +397,18 @@ int FileList::listDir( const QString& directory, QStringList filter, bool recurs
}
else if( !fileInfo.isDir() || !recursive ) { // NOTE checking for isFile may not work with all file names
// NOTE filter feature
- for( QStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
- if( (*it).endsWith("."+(*jt),false) ) {
+ for( TQStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
+ if( (*it).tqendsWith("."+(*jt),false) ) {
addFiles( KURL::encode_string(directory + "/" + *it) );
count++;
- pScanStatus->setProgress( count );
+ pScantqStatus->setProgress( count );
break;
}
}
if( filter.first() == "" ) {
addFiles( KURL::encode_string(directory + "/" + *it) );
count++;
- pScanStatus->setProgress( count );
+ pScantqStatus->setProgress( count );
}
}
}
@@ -418,16 +418,16 @@ int FileList::listDir( const QString& directory, QStringList filter, bool recurs
}
// NOTE progressbar when adding files?
-void FileList::addFiles( QStringList fileList, FileListItem* after, bool enabled )
+void FileList::addFiles( TQStringList fileList, FileListItem* after, bool enabled )
{
// TODO test if everything works with remote files (http://) and local files (media://)
FileListItem* lastListItem;
if( !after && !enabled ) lastListItem = lastItem();
else lastListItem = after;
- QString filePathName;
- QString device;
+ TQString filePathName;
+ TQString device;
- for( QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it ) {
+ for( TQStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it ) {
FileListItem* newItem = new FileListItem( this, lastListItem );
lastListItem = newItem;
newItem->options = options->getCurrentOptions(); // FIXME speed up
@@ -448,14 +448,14 @@ void FileList::addFiles( QStringList fileList, FileListItem* after, bool enabled
else if( (*it).left( 13 ) == "system:/home/" ) {
filePathName = *it;
filePathName.remove( 0, 13 );
- filePathName = QDir::homeDirPath() + "/" + filePathName;
+ filePathName = TQDir::homeDirPath() + "/" + filePathName;
newItem->local = true;
}
else if( (*it).left( 14 ) == "system:/users/" || (*it).left( 6 ) == "home:/" ) {
int length = ( (*it).left(6) == "home:/" ) ? 6 : 14;
- QString username = *it;
+ TQString username = *it;
username.remove( 0, length );
- username = username.left( username.find("/") );
+ username = username.left( username.tqfind("/") );
filePathName = *it;
filePathName.remove( 0, length + username.length() );
KUser user( username );
@@ -466,7 +466,7 @@ void FileList::addFiles( QStringList fileList, FileListItem* after, bool enabled
int length = ( (*it).left(7) == "media:/" ) ? 7 : 14;
device = *it;
device.remove( 0, length );
- device = "/dev/" + device.left( device.find( "/" ) );
+ device = "/dev/" + device.left( device.tqfind( "/" ) );
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
@@ -501,7 +501,7 @@ void FileList::addFiles( QStringList fileList, FileListItem* after, bool enabled
// newItem->mimeType="";
// HACK last choise is to use the extension without KDE's help
if( newItem->mimeType.isEmpty() || newItem->mimeType == "application/octet-stream" || newItem->mimeType == "text/plain" ) {
- newItem->fileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 );
+ newItem->fileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 );
FormatItem *formatItem = config->getFormatItem( newItem->fileFormat );
if( formatItem ) newItem->mimeType = formatItem->mime_types.first();
// logger->log( 1000, " " + i18n("Mime type") + ": " + newItem->mimeType + " (" + i18n("Format") + ": " + newItem->fileFormat + ")" );
@@ -514,7 +514,7 @@ void FileList::addFiles( QStringList fileList, FileListItem* after, bool enabled
continue;
}
newItem->options.filePathName = filePathName;
- QFileInfo fileInfo( filePathName );
+ TQFileInfo fileInfo( filePathName );
newItem->fileName = fileInfo.fileName();
newItem->tags = tagEngine->readTags( KURL::decode_string(filePathName) );
if( newItem->tags == 0 ) {
@@ -536,8 +536,8 @@ void FileList::addFiles( QStringList fileList, FileListItem* after, bool enabled
else {
// logger->log( 1000, " File is remote (not yet implemented) (" + *it + ")" );
filePathName = *it;
- newItem->fileName = filePathName.right( filePathName.length() - filePathName.findRev("/") - 1 );
- newItem->fileFormat = newItem->fileName.right( newItem->fileName.length() - newItem->fileName.findRev(".") - 1 ).lower();
+ newItem->fileName = filePathName.right( filePathName.length() - filePathName.tqfindRev("/") - 1 );
+ newItem->fileFormat = newItem->fileName.right( newItem->fileName.length() - newItem->fileName.tqfindRev(".") - 1 ).lower();
// NOTE http will not work with KMimeType - this just works
if( filePathName.startsWith("http://") ) {
newItem->mimeType = KMimeType::findByURL( "file:///" + newItem->fileName.lower() )->name();
@@ -565,29 +565,29 @@ void FileList::addFiles( QStringList fileList, FileListItem* after, bool enabled
emit fileCountChanged( childCount() );
}
-void FileList::addDir( const QString& directory, const QStringList& filter, bool recursive )
+void FileList::addDir( const TQString& directory, const TQStringList& filter, bool recursive )
{
- pScanStatus->setProgress( 0 );
- pScanStatus->setTotalSteps( 0 );
- pScanStatus->show(); // show the status while scanning the directories
+ pScantqStatus->setProgress( 0 );
+ pScantqStatus->setTotalSteps( 0 );
+ pScantqStatus->show(); // show the status while scanning the directories
kapp->processEvents();
int count = listDir( directory, filter, recursive, true );
listDir( directory, filter, recursive );
- pScanStatus->hide(); // hide the status bar, when the scan is done
+ pScantqStatus->hide(); // hide the status bar, when the scan is done
}
-void FileList::addTracks( const QString& device, QValueList<int> trackList )
+void FileList::addTracks( const TQString& device, TQValueList<int> trackList )
{
- for( QValueList<int>::Iterator it = trackList.begin(); it != trackList.end(); ++it ) {
-// logger->log( 1000, i18n("Adding track") + QString().sprintf(" %02i",*it) );
+ for( TQValueList<int>::Iterator it = trackList.begin(); it != trackList.end(); ++it ) {
+// logger->log( 1000, i18n("Adding track") + TQString().sprintf(" %02i",*it) );
FileListItem* newItem = new FileListItem( this, lastItem() );
newItem->options = options->getCurrentOptions(); // FIXME speed up
// if( newItem->options.outputOptions.mode != OutputDirectory::Specify ) newItem->options.outputOptions.mode = OutputDirectory::MetaData;
newItem->notify = notify;
newItem->track = (*it);
- newItem->fileName = i18n("Audio CD (%1)").arg(device) + ": " + i18n("Track") + QString().sprintf(" %02i",newItem->track);
+ newItem->fileName = i18n("Audio CD (%1)").tqarg(device) + ": " + i18n("Track") + TQString().sprintf(" %02i",newItem->track);
newItem->mimeType = "application/x-cda";
newItem->fileFormat = "cda";
newItem->local = true;
@@ -596,13 +596,13 @@ void FileList::addTracks( const QString& device, QValueList<int> trackList )
if( newItem->tags == 0 ) { // NOTE shouldn't happen
// logger->log( 1000, " " + i18n("Reading tags failed") );
newItem->time = 210;
- newItem->options.filePathName = QDir::homeDirPath() + "/" + i18n("Track") + QString().sprintf(" %02i",newItem->track) + "." + newItem->fileFormat;
+ newItem->options.filePathName = TQDir::homeDirPath() + "/" + i18n("Track") + TQString().sprintf(" %02i",newItem->track) + "." + newItem->fileFormat;
}
else {
// logger->log( 1000, " " + i18n("Tags successfully read") );
newItem->time = newItem->tags->length;
- newItem->options.filePathName = QDir::homeDirPath() + "/" + QString().sprintf("%02i - ",newItem->track) + newItem->tags->title + "." + newItem->fileFormat;
- newItem->fileName = i18n("Audio CD (%1)").arg(device) + ": " + QString().sprintf("%02i - ",newItem->track) + newItem->tags->title;
+ newItem->options.filePathName = TQDir::homeDirPath() + "/" + TQString().sprintf("%02i - ",newItem->track) + newItem->tags->title + "." + newItem->fileFormat;
+ newItem->fileName = i18n("Audio CD (%1)").tqarg(device) + ": " + TQString().sprintf("%02i - ",newItem->track) + newItem->tags->title;
}
updateItem( newItem );
emit increaseTime( newItem->time );
@@ -610,15 +610,15 @@ void FileList::addTracks( const QString& device, QValueList<int> trackList )
emit fileCountChanged( childCount() );
}
-void FileList::addDisc( const QString& device )
+void FileList::addDisc( const TQString& device )
{
-// logger->log( 1000, i18n("Adding full audio CD (%1)").arg(device) );
+// logger->log( 1000, i18n("Adding full audio CD (%1)").tqarg(device) );
FileListItem* newItem = new FileListItem( this, lastItem() );
newItem->options = options->getCurrentOptions();
// if( newItem->options.outputOptions.mode != OutputDirectory::Specify ) newItem->options.outputOptions.mode = OutputDirectory::MetaData;
newItem->notify = notify;
newItem->track = 0;
- newItem->fileName = i18n("Full audio CD (%1)").arg(device);
+ newItem->fileName = i18n("Full audio CD (%1)").tqarg(device);
newItem->mimeType = "application/x-cda";
newItem->fileFormat = "cda";
newItem->local = true;
@@ -627,13 +627,13 @@ void FileList::addDisc( const QString& device )
if( newItem->tags == 0 ) { // NOTE shouldn't happen
// logger->log( 1000, " " + i18n("Reading tags failed") );
newItem->time = 3600;
- newItem->options.filePathName = QDir::homeDirPath() + "/" + i18n("Audio CD") + "." + newItem->fileFormat;
+ newItem->options.filePathName = TQDir::homeDirPath() + "/" + i18n("Audio CD") + "." + newItem->fileFormat;
}
else {
// logger->log( 1000, " " + i18n("Tags successfully read") );
newItem->time = newItem->tags->length;
- newItem->options.filePathName = QDir::homeDirPath() + newItem->tags->title + "." + newItem->fileFormat;
- newItem->fileName = i18n("Full audio CD (%1)").arg(device) + ": " + newItem->tags->title;
+ newItem->options.filePathName = TQDir::homeDirPath() + newItem->tags->title + "." + newItem->fileFormat;
+ newItem->fileName = i18n("Full audio CD (%1)").tqarg(device) + ": " + newItem->tags->title;
}
updateItem( newItem );
emit increaseTime( newItem->time );
@@ -689,7 +689,7 @@ void FileList::itemFinished( FileListItem* item, int state )
}
}
-void FileList::rippingFinished( const QString& device )
+void FileList::rippingFinished( const TQString& device )
{
if( !queue ) return;
@@ -734,7 +734,7 @@ void FileList::updateItem( FileListItem* item )
if( !item ) return;
if( !item->converting ) {
- if( config->data.general.conflictHandling == 1 && QFile::exists(KURL::decode_string(OutputDirectory::calcPath(item,config))) ) { // was: .replace("%2f","%252f")
+ if( config->data.general.conflictHandling == 1 && TQFile::exists(KURL::decode_string(OutputDirectory::calcPath(item,config))) ) { // was: .tqreplace("%2f","%252f")
item->setText( columnByName(i18n("State")), i18n("Will be skipped") );
}
else {
@@ -745,10 +745,10 @@ void FileList::updateItem( FileListItem* item )
item->setText( columnByName(i18n("State")), i18n("Converting") );
}
- if( item->track >= 0 ) item->setText( columnByName(i18n("Input")), KURL::decode_string(item->fileName).replace("%2f","/").replace("%%","%") );
- else item->setText( columnByName(i18n("Input")), KURL::decode_string(item->options.filePathName).replace("%2f","/").replace("%%","%") );
+ if( item->track >= 0 ) item->setText( columnByName(i18n("Input")), KURL::decode_string(item->fileName).tqreplace("%2f","/").tqreplace("%%","%") );
+ else item->setText( columnByName(i18n("Input")), KURL::decode_string(item->options.filePathName).tqreplace("%2f","/").tqreplace("%%","%") );
- item->setText( columnByName(i18n("Output")), KURL::decode_string(OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item,config))).replace("%2f","/").replace("%%","%") );
+ item->setText( columnByName(i18n("Output")), KURL::decode_string(OutputDirectory::uniqueFileName(OutputDirectory::calcPath(item,config))).tqreplace("%2f","/").tqreplace("%%","%") );
item->setText( columnByName(i18n("Quality")), config->getProfileName(item->options) );
}
@@ -764,23 +764,23 @@ void FileList::showOptionsEditorDialog()
return;
}
// }
- connect( this, SIGNAL(editItems(QValueList<FileListItem*>)),
- optionsEditor, SLOT(itemsSelected(QValueList<FileListItem*>))
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(editItems(TQValueList<FileListItem*>)),
+ optionsEditor, TQT_SLOT(itemsSelected(TQValueList<FileListItem*>))
);
- connect( this, SIGNAL(setPreviousItemEnabled(bool)),
- optionsEditor, SLOT(setPreviousEnabled(bool))
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(setPreviousItemEnabled(bool)),
+ optionsEditor, TQT_SLOT(setPreviousEnabled(bool))
);
- connect( this, SIGNAL(setNextItemEnabled(bool)),
- optionsEditor, SLOT(setNextEnabled(bool))
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(setNextItemEnabled(bool)),
+ optionsEditor, TQT_SLOT(setNextEnabled(bool))
);
- connect( optionsEditor, SIGNAL(user2Clicked()),
- this, SLOT(selectPreviousItem())
+ connect( optionsEditor, TQT_SIGNAL(user2Clicked()),
+ TQT_TQOBJECT(this), TQT_SLOT(selectPreviousItem())
);
- connect( optionsEditor, SIGNAL(user1Clicked()),
- this, SLOT(selectNextItem())
+ connect( optionsEditor, TQT_SIGNAL(user1Clicked()),
+ TQT_TQOBJECT(this), TQT_SLOT(selectNextItem())
);
- /*connect( this, SIGNAL(moveEditor(int,int)),
- optionsEditor, SLOT(moveWindow(int,int))
+ /*connect( TQT_TQOBJECT(this), TQT_SIGNAL(moveEditor(int,int)),
+ optionsEditor, TQT_SLOT(moveWindow(int,int))
);*/
}
itemsSelected();
@@ -794,13 +794,13 @@ void FileList::selectPreviousItem()
FileListItem* item = selectedFiles.first()->itemAbove();
if( item != 0 ) {
item->setSelected( true );
- repaintItem( item );
+ tqrepaintItem( item );
ensureItemVisible( item );
}
- for( QValueList<FileListItem*>::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ) {
(*it)->setSelected( false );
- repaintItem( *it );
+ tqrepaintItem( *it );
}
itemsSelected();
@@ -812,13 +812,13 @@ void FileList::selectNextItem()
FileListItem* item = selectedFiles.last()->itemBelow();
if( item != 0 ) {
item->setSelected( true );
- repaintItem( item );
+ tqrepaintItem( item );
ensureItemVisible( item );
}
- for( QValueList<FileListItem*>::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ) {
(*it)->setSelected( false );
- repaintItem( *it );
+ tqrepaintItem( *it );
}
itemsSelected();
@@ -898,7 +898,7 @@ void FileList::convertNextItem()
{
if( !queue ) return;
- QStringList devices;
+ TQStringList devices;
// look for tracks that are being ripped
int count = 0;
@@ -917,7 +917,7 @@ void FileList::convertNextItem()
item = firstChild();
while( item != 0 && count < config->data.general.numFiles ) {
if( !item->converting && item->text(columnByName(i18n("State"))) == i18n("Waiting") ) {
- if( item->track >= 0 && devices.findIndex(item->device) == -1 ) {
+ if( item->track >= 0 && devices.tqfindIndex(item->device) == -1 ) {
convertItem( item );
count++;
devices += item->device;
@@ -972,21 +972,21 @@ void FileList::load( bool autosave )
// NOTE clear the file list befor adding the saved items?
int version;
- QString name;
+ TQString name;
FileListItem* lastListItem = lastItem();
- QString filename;
+ TQString filename;
if( autosave ) filename = locateLocal("data","soundkonverter/filelist.autosave.xml");
else filename = locateLocal("data","soundkonverter/filelist.xml");
- QDomDocument domTree;
- QFile opmlFile( filename );
+ TQDomDocument domTree;
+ TQFile opmlFile( filename );
if( !opmlFile.open( IO_ReadOnly ) ) return;
if( !domTree.setContent( &opmlFile ) ) return;
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "filelist" ) return;
- QDomNode node, sub1Node, sub2Node;
+ TQDomNode node, sub1Node, sub2Node;
node = root.firstChild();
while( !node.isNull() ) {
@@ -1087,20 +1087,20 @@ void FileList::save( bool autosave )
{
// NOTE filenames should be encoded before saving - but it works fine without it (hm...)
- QTime time;
+ TQTime time;
time.start();
- QDomDocument domTree;
- QDomElement root = domTree.createElement( "soundkonverter" );
+ TQDomDocument domTree;
+ TQDomElement root = domTree.createElement( "soundkonverter" );
root.setAttribute( "type", "filelist" );
domTree.appendChild( root );
- QDomElement info = domTree.createElement( "info" );
+ TQDomElement info = domTree.createElement( "info" );
info.setAttribute( "version", "300" );
root.appendChild( info );
for( FileListItem* item = firstChild(); item != 0; item = item->nextSibling() ) {
- QDomElement file = domTree.createElement( "file" );
+ TQDomElement file = domTree.createElement( "file" );
file.setAttribute( "fileName", item->fileName );
file.setAttribute( "mimeType", item->mimeType );
file.setAttribute( "fileFormat", item->fileFormat );
@@ -1112,7 +1112,7 @@ void FileList::save( bool autosave )
file.setAttribute( "filePathName", item->options.filePathName );
file.setAttribute( "outputFilePathName", item->options.outputFilePathName );
- QDomElement encodingOptions = domTree.createElement( "encodingOptions" );
+ TQDomElement encodingOptions = domTree.createElement( "encodingOptions" );
encodingOptions.setAttribute( "sFormat", item->options.encodingOptions.sFormat );
encodingOptions.setAttribute( "sQualityMode", item->options.encodingOptions.sQualityMode );
@@ -1122,21 +1122,21 @@ void FileList::save( bool autosave )
encodingOptions.setAttribute( "iMinBitrate", item->options.encodingOptions.iMinBitrate );
encodingOptions.setAttribute( "iMaxBitrate", item->options.encodingOptions.iMaxBitrate );
- QDomElement samplingRate = domTree.createElement( "samplingRate" );
+ TQDomElement samplingRate = domTree.createElement( "samplingRate" );
samplingRate.setAttribute( "bEnabled", item->options.encodingOptions.samplingRate.bEnabled );
samplingRate.setAttribute( "iSamplingRate", item->options.encodingOptions.samplingRate.iSamplingRate );
encodingOptions.appendChild( samplingRate );
- QDomElement channels = domTree.createElement( "channels" );
+ TQDomElement channels = domTree.createElement( "channels" );
channels.setAttribute( "bEnabled", item->options.encodingOptions.channels.bEnabled );
channels.setAttribute( "sChannels", item->options.encodingOptions.channels.sChannels );
encodingOptions.appendChild( channels );
- QDomElement replaygain = domTree.createElement( "replaygain" );
+ TQDomElement replaygain = domTree.createElement( "replaygain" );
replaygain.setAttribute( "bEnabled", item->options.encodingOptions.replaygain.bEnabled );
@@ -1146,7 +1146,7 @@ void FileList::save( bool autosave )
file.appendChild( encodingOptions );
- QDomElement outputOptions = domTree.createElement( "outputOptions" );
+ TQDomElement outputOptions = domTree.createElement( "outputOptions" );
outputOptions.setAttribute( "mode", int(item->options.outputOptions.mode) );
outputOptions.setAttribute( "directory", item->options.outputOptions.directory );
@@ -1155,7 +1155,7 @@ void FileList::save( bool autosave )
if( item->tags )
{
- QDomElement tags = domTree.createElement( "tags" );
+ TQDomElement tags = domTree.createElement( "tags" );
tags.setAttribute( "artist", item->tags->artist );
tags.setAttribute( "composer", item->tags->composer );
@@ -1179,19 +1179,19 @@ void FileList::save( bool autosave )
root.appendChild( file );
}
- QString filename;
+ TQString filename;
if( autosave ) filename = locateLocal("data","soundkonverter/filelist.autosave.xml");
else filename = locateLocal("data","soundkonverter/filelist.xml");
- QFile opmlFile( filename );
+ TQFile opmlFile( filename );
if( !opmlFile.open( IO_WriteOnly ) ) return;
- QTextStream ts( &opmlFile );
+ TQTextStream ts( &opmlFile );
ts << domTree.toString();
opmlFile.close();
- logger->log( 1000, "save file list: " + QString::number(time.elapsed()) );
+ logger->log( 1000, "save file list: " + TQString::number(time.elapsed()) );
}
void FileList::debug() // NOTE DEBUG
@@ -1200,15 +1200,15 @@ void FileList::debug() // NOTE DEBUG
ConversionOptions conversionOptions;
- QStringList formats = config->allEncodableFormats();
+ TQStringList formats = config->allEncodableFormats();
- for( QStringList::Iterator a = formats.begin(); a != formats.end(); ++a )
+ for( TQStringList::Iterator a = formats.begin(); a != formats.end(); ++a )
{
logger->log( 1000, "format: " + (*a) );
FormatItem* formatItem = config->getFormatItem( *a );
if( formatItem == 0 ) continue;
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->encoders.begin(); b != formatItem->encoders.end(); ++b ) {
logger->log( 1000, " encoder: " + (*b)->enc.bin );
formatItem->encoder = (*b);
if( (*b)->enc.strength.enabled ) {
@@ -1278,11 +1278,11 @@ void FileList::debug() // NOTE DEBUG
}
}
- for( QValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
+ for( TQValueList<ConvertPlugin*>::Iterator b = formatItem->decoders.begin(); b != formatItem->decoders.end(); ++b ) {
formatItem->decoder = (*b);
}
- for( QValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
+ for( TQValueList<ReplayGainPlugin*>::Iterator b = formatItem->replaygains.begin(); b != formatItem->replaygains.end(); ++b ) {
formatItem->replaygain = (*b);
}
}
@@ -1290,21 +1290,21 @@ void FileList::debug() // NOTE DEBUG
logger->log( 1000, "DEBUG end" );
}
-QString FileList::debug_params( ConversionOptions conversionOptions, FormatItem* formatItem ) // NOTE DEBUG
+TQString FileList::debug_params( ConversionOptions conversionOptions, FormatItem* formatItem ) // NOTE DEBUG
{
ConvertPlugin* plugin = formatItem->encoder;
- QString sStrength;
- QString sBitrate;
- QString sQuality;
- QString sMinBitrate;
- QString sMaxBitrate;
- QString sSamplingRate;
+ TQString sStrength;
+ TQString sBitrate;
+ TQString sQuality;
+ TQString sMinBitrate;
+ TQString sMaxBitrate;
+ TQString sSamplingRate;
int t_int;
float t_float;
- QString param = "";
+ TQString param = "";
if( !plugin->enc.param.isEmpty() ) param.append( " " + plugin->enc.param );
if( !plugin->enc.overwrite.isEmpty() ) param.append( " " + plugin->enc.overwrite );
@@ -1315,20 +1315,20 @@ QString FileList::debug_params( ConversionOptions conversionOptions, FormatItem*
if( plugin->enc.strength.profiles.empty() ) {
if( plugin->enc.strength.step < 1 ) {
if( plugin->enc.strength.range_max >= plugin->enc.strength.range_min )
- sStrength = QString::number( compressionLevel );
+ sStrength = TQString::number( compressionLevel );
else
- sStrength = QString::number( plugin->enc.strength.range_min - compressionLevel );
+ sStrength = TQString::number( plugin->enc.strength.range_min - compressionLevel );
}
else {
if( plugin->enc.strength.range_max >= plugin->enc.strength.range_min )
- sStrength = QString::number( int(compressionLevel) );
+ sStrength = TQString::number( int(compressionLevel) );
else
- sStrength = QString::number( int(plugin->enc.strength.range_min - compressionLevel) );
+ sStrength = TQString::number( int(plugin->enc.strength.range_min - compressionLevel) );
}
- if( plugin->enc.strength.separator != '.' ) sStrength.replace( QChar('.'), plugin->enc.strength.separator );
+ if( plugin->enc.strength.separator != '.' ) sStrength.tqreplace( TQChar('.'), plugin->enc.strength.separator );
}
else {
- QStringList::Iterator it = plugin->enc.strength.profiles.at( compressionLevel );
+ TQStringList::Iterator it = plugin->enc.strength.profiles.at( compressionLevel );
sStrength = *it;
}
}
@@ -1336,16 +1336,16 @@ QString FileList::debug_params( ConversionOptions conversionOptions, FormatItem*
if( conversionOptions.encodingOptions.sQualityMode == i18n("Bitrate") ) {
if( conversionOptions.encodingOptions.sBitrateMode == "cbr" && plugin->enc.lossy.bitrate.cbr.enabled ) {
param.append( " " + plugin->enc.lossy.bitrate.cbr.param );
- sBitrate = QString::number( conversionOptions.encodingOptions.iQuality );
+ sBitrate = TQString::number( conversionOptions.encodingOptions.iQuality );
}
else if( conversionOptions.encodingOptions.sBitrateMode == "abr" && plugin->enc.lossy.bitrate.abr.enabled ) {
param.append( " " + plugin->enc.lossy.bitrate.abr.param );
- sBitrate = QString::number( conversionOptions.encodingOptions.iQuality );
+ sBitrate = TQString::number( conversionOptions.encodingOptions.iQuality );
if( conversionOptions.encodingOptions.bBitrateRange && plugin->enc.lossy.bitrate.abr.bitrate_range.enabled ) {
param.append( " " + plugin->enc.lossy.bitrate.abr.bitrate_range.param_min );
- sMinBitrate = QString::number( conversionOptions.encodingOptions.iMinBitrate );
+ sMinBitrate = TQString::number( conversionOptions.encodingOptions.iMinBitrate );
param.append( " " + plugin->enc.lossy.bitrate.abr.bitrate_range.param_max );
- sMaxBitrate = QString::number( conversionOptions.encodingOptions.iMaxBitrate );
+ sMaxBitrate = TQString::number( conversionOptions.encodingOptions.iMaxBitrate );
}
}
}
@@ -1358,8 +1358,8 @@ QString FileList::debug_params( ConversionOptions conversionOptions, FormatItem*
else
t_float = ( (100.0f - (float)conversionOptions.encodingOptions.iQuality) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max;
//t_float -= t_float%plugin->enc.quality.step;
- //sQuality = QString().sprintf( "%.2f", t_float );
- sQuality = QString::number( t_float );
+ //sQuality = TQString().sprintf( "%.2f", t_float );
+ sQuality = TQString::number( t_float );
}
else {
if( plugin->enc.lossy.quality.range_max >= plugin->enc.lossy.quality.range_min)
@@ -1367,13 +1367,13 @@ QString FileList::debug_params( ConversionOptions conversionOptions, FormatItem*
else
t_int = ( (100 - conversionOptions.encodingOptions.iQuality) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max;
//t_int -= t_int%plugin->enc.quality.step;
- sQuality = QString::number( t_int );
+ sQuality = TQString::number( t_int );
}
- if( plugin->enc.bin == "oggenc" ) sQuality.replace(QChar('.'),KGlobal::locale()->decimalSymbol());
- else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.replace(QChar('.'),plugin->enc.lossy.quality.separator);
+ if( plugin->enc.bin == "oggenc" ) sQuality.tqreplace(TQChar('.'),KGlobal::locale()->decimalSymbol());
+ else if( plugin->enc.lossy.quality.separator != '.' ) sQuality.tqreplace(TQChar('.'),plugin->enc.lossy.quality.separator);
}
else {
- QStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( int(conversionOptions.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) );
+ TQStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( int(conversionOptions.encodingOptions.iQuality*plugin->enc.lossy.quality.range_max/100) );
sQuality = *it;
}
}
@@ -1382,16 +1382,16 @@ QString FileList::debug_params( ConversionOptions conversionOptions, FormatItem*
}
else if( conversionOptions.encodingOptions.sQualityMode == i18n("Hybrid") && plugin->enc.hybrid.enabled ) {
param.append( " " + plugin->enc.hybrid.param );
- sBitrate = QString::number( conversionOptions.encodingOptions.iQuality );
+ sBitrate = TQString::number( conversionOptions.encodingOptions.iQuality );
}
if( conversionOptions.encodingOptions.samplingRate.bEnabled && plugin->enc.lossy.samplingrate.enabled ) {
param.append( " " + plugin->enc.lossy.samplingrate.param );
if( plugin->enc.lossy.samplingrate.unit == PluginLoaderBase::Hz ) {
- sSamplingRate = QString::number( conversionOptions.encodingOptions.samplingRate.iSamplingRate );
+ sSamplingRate = TQString::number( conversionOptions.encodingOptions.samplingRate.iSamplingRate );
}
else {
- sSamplingRate = QString::number( (float)conversionOptions.encodingOptions.samplingRate.iSamplingRate/1000 );
+ sSamplingRate = TQString::number( (float)conversionOptions.encodingOptions.samplingRate.iSamplingRate/1000 );
}
}
@@ -1434,12 +1434,12 @@ QString FileList::debug_params( ConversionOptions conversionOptions, FormatItem*
if( !plugin->enc.tag.year.isEmpty() ) param.append( " " + plugin->enc.tag.year );
}
- param.replace( "%c", sStrength );
- param.replace( "%b", sBitrate );
- param.replace( "%q", sQuality );
- param.replace( "%m", sMinBitrate );
- param.replace( "%M", sMaxBitrate );
- param.replace( "%s", sSamplingRate );
+ param.tqreplace( "%c", sStrength );
+ param.tqreplace( "%b", sBitrate );
+ param.tqreplace( "%q", sQuality );
+ param.tqreplace( "%m", sMinBitrate );
+ param.tqreplace( "%M", sMaxBitrate );
+ param.tqreplace( "%s", sSamplingRate );
- return conversionOptions.encodingOptions.sInOutFiles.replace( "%p", param );
+ return conversionOptions.encodingOptions.sInOutFiles.tqreplace( "%p", param );
}
diff --git a/src/filelist.h b/src/filelist.h
index 484eedc..c2e39a6 100755
--- a/src/filelist.h
+++ b/src/filelist.h
@@ -16,9 +16,9 @@ class Config;
class Logger;
class FormatItem; // NOTE DEBUG
-class QPainter;
-class QColorGroup;
-class QSimpleRichText;
+class TQPainter;
+class TQColorGroup;
+class TQSimpleRichText;
class KProgress;
class KPopupMenu;
class KAction;
@@ -34,23 +34,23 @@ class FileListItem : public KListViewItem
public:
/**
* Constructor
- * @param parent The parent list view
+ * @param tqparent The tqparent list view
*/
- FileListItem( KListView* parent );
+ FileListItem( KListView* tqparent );
/**
* Constructor
- * @param parent The parent list view
+ * @param tqparent The tqparent list view
* @param after The item, the new item should be placed after
*/
- FileListItem( KListView* parent, FileListItem* after );
+ FileListItem( KListView* tqparent, FileListItem* after );
/**
* Destructor
*/
virtual ~FileListItem();
- virtual void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int alignment );
+ virtual void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int tqalignment );
//void updateOutputCell();
//void updateOptionsCell();
@@ -63,19 +63,19 @@ public:
ConversionOptions options; // the information we get from the options class for creating the item
TagData* tags; // we need to instruct the tagengine to read the tags from the file!
// and the user can change them!
- QString fileName; // just the _name_ of the file
- QString mimeType; // the mime type of the file
- QString fileFormat; // just the _format_ of the file (for easier use)
- QString url; // the original input file name string
+ TQString fileName; // just the _name_ of the file
+ TQString mimeType; // the mime type of the file
+ TQString fileFormat; // just the _format_ of the file (for easier use)
+ TQString url; // the original input file name string
bool converting; // is this item being converted at the moment?
bool local; // is this file a local one?
int track; // the number of the track, if it is on an audio cd
// if it is lower than 0, it isn't an audio cd track at all
- QString device; // the device of the audio cd
+ TQString device; // the device of the audio cd
bool ripping; // is this track currently being ripped?
float time; // the duration of the track, used for the calculation of the progress bar
- QString notify; // execute this command, when the file is converted
+ TQString notify; // execute this command, when the file is converted
};
/**
@@ -86,13 +86,14 @@ public:
class FileList : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
- * @param parent The parent widget
+ * @param tqparent The tqparent widget
* @param name The name of the file list
*/
- FileList( CDManager*, TagEngine*, Config*, Options*, Logger*, QWidget *parent = 0, const char* name = 0 );
+ FileList( CDManager*, TagEngine*, Config*, Options*, Logger*, TQWidget *tqparent = 0, const char* name = 0 );
/**
* Destructor
@@ -102,32 +103,32 @@ public:
FileListItem* firstChild() const { return static_cast<FileListItem*>( KListView::firstChild() ); }
FileListItem* lastItem() const { return static_cast<FileListItem*>( KListView::lastItem() ); }
- int columnByName( const QString& name );
+ int columnByName( const TQString& name );
void updateItem( FileListItem* item );
bool queueEnabled() { return queue; }
- void setNotify( const QString& cmd ) { notify = cmd; }
+ void setNotify( const TQString& cmd ) { notify = cmd; }
protected:
- virtual bool acceptDrag( QDropEvent *e ) const;
+ virtual bool acceptDrag( TQDropEvent *e ) const;
private:
/** Lists all file in a directory and adds them to the file list, if @p fast is false. The number of listed files is returned */
- int listDir( const QString& directory, QStringList filter, bool recursive = true, bool fast = false, int count = 0 );
+ int listDir( const TQString& directory, TQStringList filter, bool recursive = true, bool fast = false, int count = 0 );
/** A progressbar, that is shown, when a directory is added recursive */
- KProgress* pScanStatus;
+ KProgress* pScantqStatus;
void convertNextItem();
- void viewportPaintEvent( QPaintEvent* );
- void viewportResizeEvent( QResizeEvent* );
+ void viewportPaintEvent( TQPaintEvent* );
+ void viewportResizeEvent( TQResizeEvent* );
void debug(); // NOTE DEBUG
- QString debug_params( ConversionOptions conversionOptions, FormatItem* formatItem ); // NOTE DEBUG
+ TQString debug_params( ConversionOptions conversionOptions, FormatItem* formatItem ); // NOTE DEBUG
- QSimpleRichText* bubble;
+ TQSimpleRichText* bubble;
/** The context menu for editing or starting the files */
KPopupMenu* contextMenu;
@@ -147,7 +148,7 @@ private:
Config* config;
Logger* logger;
- QValueList<FileListItem*> selectedFiles;
+ TQValueList<FileListItem*> selectedFiles;
bool queue;
@@ -156,20 +157,20 @@ private:
* %i will be replaced by the input file path
* %o " " " " " output " "
*/
- QString notify;
+ TQString notify;
private slots:
/*
* The user clicked somewhere into the list view (e.g. the link in the bubble)
*/
-// void clickedSomewhere( QListViewItem*, const QPoint&, int );
+// void clickedSomewhere( TQListViewItem*, const TQPoint&, int );
/**
* We'll recive a signal, when we should show the context menu
* @p item The item, that's context menu should be shown
* @p point The position of the click (start position of the context menu)
*/
- void showContextMenu( QListViewItem* item, const QPoint& point, int );
+ void showContextMenu( TQListViewItem* item, const TQPoint& point, int );
/**
* Remove selected items from the file list
@@ -187,18 +188,18 @@ private slots:
void stopSelectedItems();
void columnResizeEvent( int, int, int );
- void slotDropped( QDropEvent*, QListViewItem*, QListViewItem* ); // NOTE rename?
+ void slotDropped( TQDropEvent*, TQListViewItem*, TQListViewItem* ); // NOTE rename?
public slots:
- void addFiles( QStringList, FileListItem* after = 0, bool enabled = false ); // NOTE const QStringList& ?
- void addDir( const QString&, const QStringList& filter = "", bool recursive = true );
- void addTracks( const QString& device, QValueList<int> );
- void addDisc( const QString& device );
+ void addFiles( TQStringList, FileListItem* after = 0, bool enabled = false ); // NOTE const TQStringList& ?
+ void addDir( const TQString&, const TQStringList& filter = "", bool recursive = true );
+ void addTracks( const TQString& device, TQValueList<int> );
+ void addDisc( const TQString& device );
/**
* The conversion of an item has finished and the state is reported ( 0 = ok, -1 = error, 1 = aborted )
*/
void itemFinished( FileListItem*, int );
- void rippingFinished( const QString& device );
+ void rippingFinished( const TQString& device );
void showOptionsEditorDialog();
void selectPreviousItem();
void selectNextItem();
@@ -215,7 +216,7 @@ public slots:
signals:
void convertItem( FileListItem* );
void stopItem( FileListItem* );
- void editItems( QValueList<FileListItem*> );
+ void editItems( TQValueList<FileListItem*> );
void setPreviousItemEnabled( bool );
void setNextItemEnabled( bool );
//void moveEditor( int x, int y );
diff --git a/src/logger.cpp b/src/logger.cpp
index 7b19fff..27438b7 100755
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -17,15 +17,15 @@ LoggerItem::~LoggerItem()
Logger::Logger()
{
- QValueList<LoggerItem*>::Iterator item = processes.append( new LoggerItem() );
+ TQValueList<LoggerItem*>::Iterator item = processes.append( new LoggerItem() );
(*item)->filename = "soundKonverter";
(*item)->id = 1000;
(*item)->completed = true;
(*item)->state = 1;
- (*item)->file.setName( locateLocal("data",QString("soundkonverter/log/%1.log").arg((*item)->id)) );
+ (*item)->file.setName( locateLocal("data",TQString("soundkonverter/log/%1.log").tqarg((*item)->id)) );
// TODO error handling
(*item)->file.open( IO_WriteOnly );
- (*item)->textStream.setDevice( &((*item)->file) );
+ (*item)->textStream.setDevice( TQT_TQIODEVICE(&((*item)->file)) );
srand( (unsigned)time(NULL) );
}
@@ -34,7 +34,7 @@ Logger::~Logger()
void Logger::cleanUp()
{
- for( QValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
+ for( TQValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
if( (*it)->id != 1000 ) {
emit removedProcess( (*it)->id );
(*it)->file.close();
@@ -45,26 +45,26 @@ void Logger::cleanUp()
processes.clear();
}
-int Logger::registerProcess( const QString& filename )
+int Logger::registerProcess( const TQString& filename )
{
// NOTE ok, it works now, but why prepend() and not append()?
- QValueList<LoggerItem*>::Iterator item = processes.append( new LoggerItem() );
+ TQValueList<LoggerItem*>::Iterator item = processes.append( new LoggerItem() );
(*item)->filename = filename;
(*item)->id = getNewID();
(*item)->completed = false;
- (*item)->file.setName( locateLocal("data",QString("soundkonverter/log/%1.log").arg((*item)->id)) );
+ (*item)->file.setName( locateLocal("data",TQString("soundkonverter/log/%1.log").tqarg((*item)->id)) );
// TODO error handling
(*item)->file.open( IO_WriteOnly );
- (*item)->textStream.setDevice( &((*item)->file) );
+ (*item)->textStream.setDevice( TQT_TQIODEVICE(&((*item)->file)) );
emit updateProcess( (*item)->id );
return (*item)->id;
}
-void Logger::log( int id, const QString& data )
+void Logger::log( int id, const TQString& data )
{
- for( QValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
+ for( TQValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
if( (*it)->id == id ) {
(*it)->data.append( data );
if( (*it)->data.count() > 100000 ) (*it)->data.erase( (*it)->data.at(0) );
@@ -86,7 +86,7 @@ int Logger::getNewID()
id = rand();
ok = true;
- for( QValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
+ for( TQValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
if( (*it)->id == id ) ok = false;
}
@@ -97,18 +97,18 @@ int Logger::getNewID()
LoggerItem* Logger::getLog( int id )
{
- for( QValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
+ for( TQValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
if( (*it)->id == id ) return *it;
}
return 0;
}
-QValueList<LoggerItem*> Logger::getLogs()
+TQValueList<LoggerItem*> Logger::getLogs()
{
-/* QValueList<LoggerItem*> items;
+/* TQValueList<LoggerItem*> items;
- for( QValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
+ for( TQValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
if( (*it)->completed ) items.append( *it );
}
@@ -119,10 +119,10 @@ QValueList<LoggerItem*> Logger::getLogs()
void Logger::processCompleted( int id, int state )
{
LoggerItem* item = 0;
- QTime time = QTime::currentTime();
+ TQTime time = TQTime::currentTime();
bool remove = false;
- for( QValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
+ for( TQValueList<LoggerItem*>::Iterator it = processes.begin(); it != processes.end(); ++it ) {
// TODO test
if( time >= (*it)->time && (*it)->completed && (*it)->state == 0 ) {
time = (*it)->time;
diff --git a/src/logger.h b/src/logger.h
index c8d0076..53fbbc2 100755
--- a/src/logger.h
+++ b/src/logger.h
@@ -3,11 +3,11 @@
#ifndef LOGGER_H
#define LOGGER_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
/**
@@ -28,14 +28,14 @@ public:
*/
virtual ~LoggerItem();
- QString filename;
+ TQString filename;
int id;
- QStringList data;
+ TQStringList data;
bool completed;
int state; // 0 = ok, -1 = failed, 1 = other (soundKonverter)
- QTime time;
- QFile file;
- QTextStream textStream;
+ TQTime time;
+ TQFile file;
+ TQTextStream textStream;
};
@@ -45,9 +45,10 @@ public:
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class Logger : public QObject
+class Logger : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -64,12 +65,12 @@ public:
/**
* Creates a new logger item and returns the id of it, @p filename is added to the new logger item
*/
- int registerProcess( const QString& filename );
+ int registerProcess( const TQString& filename );
/**
* Adds the string @p data to the data of the logger item with id @p id
*/
- void log( int id, const QString& data );
+ void log( int id, const TQString& data );
/**
* Returns the logger item with id @p id
@@ -79,11 +80,11 @@ public:
/**
* Returns a list of all logger items
*/
- QValueList<LoggerItem*> getLogs();
+ TQValueList<LoggerItem*> getLogs();
private:
/** the list of all logger items */
- QValueList<LoggerItem*> processes;
+ TQValueList<LoggerItem*> processes;
/** returns an unused random id */
int getNewID();
diff --git a/src/logviewer.cpp b/src/logviewer.cpp
index c76f7e6..0cd0d73 100755
--- a/src/logviewer.cpp
+++ b/src/logviewer.cpp
@@ -2,10 +2,10 @@
#include "logviewer.h"
#include "logger.h"
-#include <qlayout.h>
-#include <qstring.h>
-#include <qheader.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqheader.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -16,14 +16,14 @@
// ### soundkonverter 0.4: make sub items for the output
-LogViewerItem::LogViewerItem( KListView* parent, LogViewerItem* after, QString label1 )
- : KListViewItem( parent, after, label1 )
+LogViewerItem::LogViewerItem( KListView* tqparent, LogViewerItem* after, TQString label1 )
+ : KListViewItem( tqparent, after, label1 )
{
converting = false;
}
-LogViewerItem::LogViewerItem( LogViewerItem* parent, LogViewerItem* after, QString label1 )
- : KListViewItem( parent, after, label1 )
+LogViewerItem::LogViewerItem( LogViewerItem* tqparent, LogViewerItem* after, TQString label1 )
+ : KListViewItem( tqparent, after, label1 )
{
converting = false;
}
@@ -31,50 +31,50 @@ LogViewerItem::LogViewerItem( LogViewerItem* parent, LogViewerItem* after, QStri
LogViewerItem::~LogViewerItem()
{}
-void LogViewerItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+void LogViewerItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment )
{
// NOTE calculate the red color
- QColorGroup _cg( cg );
- QColor c;
+ TQColorGroup _cg( cg );
+ TQColor c;
if( isSelected() && converting ) {
- _cg.setColor( QColorGroup::Highlight, QColor( 215, 62, 62 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Highlight, TQColor( 215, 62, 62 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( converting && column != listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 255, 234, 234 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 255, 234, 234 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( converting && column == listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 247, 227, 227 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 247, 227, 227 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
- KListViewItem::paintCell( p, _cg, column, width, alignment );
+ KListViewItem::paintCell( p, _cg, column, width, tqalignment );
}
-LogViewerList::LogViewerList( QWidget* parent, const char* name )
- : KListView( parent, name )
+LogViewerList::LogViewerList( TQWidget* tqparent, const char* name )
+ : KListView( tqparent, name )
{}
LogViewerList::~LogViewerList()
{}
-LogViewer::LogViewer( Logger* _logger, QWidget *parent, const char *name, bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+LogViewer::LogViewer( Logger* _logger, TQWidget *tqparent, const char *name, bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
logger = _logger;
- connect( logger, SIGNAL(removedProcess(int)),
- this, SLOT(processRemoved(int))
+ connect( logger, TQT_SIGNAL(removedProcess(int)),
+ this, TQT_SLOT(processRemoved(int))
);
- connect( logger, SIGNAL(updateProcess(int)),
- this, SLOT(updateProcess(int))
+ connect( logger, TQT_SIGNAL(updateProcess(int)),
+ this, TQT_SLOT(updateProcess(int))
);
// create an icon loader object for loading icons
@@ -84,25 +84,25 @@ LogViewer::LogViewer( Logger* _logger, QWidget *parent, const char *name, bool m
resize( 600, 400 );
setIcon( iconLoader->loadIcon("view_text",KIcon::Small) );
- QGridLayout *grid = new QGridLayout( this, 4, 1, 11, 6 );
+ TQGridLayout *grid = new TQGridLayout( this, 4, 1, 11, 6 );
lLogs = new LogViewerList( this, "lLogs" );
lLogs->addColumn( i18n("Job/File") );
- //lLogs->setSelectionMode( QListView::Extended );
+ //lLogs->setSelectionMode( TQListView::Extended );
//lLogs->setAllColumnsShowFocus( true );
- lLogs->setResizeMode( QListView::LastColumn );
+ lLogs->setResizeMode( TQListView::LastColumn );
lLogs->setSorting( -1 );
lLogs->setRootIsDecorated( true );
lLogs->header()->setClickEnabled( false );
grid->addWidget( lLogs, 0, 0 );
- QHBoxLayout *buttonBox = new QHBoxLayout();
+ TQHBoxLayout *buttonBox = new TQHBoxLayout();
grid->addLayout( buttonBox, 3, 0 );
pReload = new KPushButton(iconLoader->loadIcon("reload",KIcon::Small), i18n("Reload"), this, "pReload" );
buttonBox->addWidget( pReload );
- connect( pReload, SIGNAL(clicked()),
- this, SLOT(refillLogs())
+ connect( pReload, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(refillLogs())
);
buttonBox->addStretch();
@@ -110,8 +110,8 @@ LogViewer::LogViewer( Logger* _logger, QWidget *parent, const char *name, bool m
pOk = new KPushButton(iconLoader->loadIcon("exit",KIcon::Small), i18n("Close"), this, "pOk" );
pOk->setFocus();
buttonBox->addWidget( pOk );
- connect( pOk, SIGNAL(clicked()),
- this, SLOT(accept())
+ connect( pOk, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(accept())
);
// delete the icon loader object
@@ -125,17 +125,17 @@ LogViewer::~LogViewer()
void LogViewer::refillLogs()
{
- LogViewerItem *parent = 0, *last = 0;
+ LogViewerItem *tqparent = 0, *last = 0;
lLogs->clear();
- QValueList<LoggerItem*> logs = logger->getLogs();
- for( QValueList<LoggerItem*>::Iterator a = logs.begin(); a != logs.end(); ++a ) {
- parent = new LogViewerItem( lLogs, parent, KURL::decode_string((*a)->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number((*a)->id) );
- parent->converting = !(*a)->completed;
- //parent->setOpen( true );
+ TQValueList<LoggerItem*> logs = logger->getLogs();
+ for( TQValueList<LoggerItem*>::Iterator a = logs.begin(); a != logs.end(); ++a ) {
+ tqparent = new LogViewerItem( lLogs, tqparent, KURL::decode_string((*a)->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number((*a)->id) );
+ tqparent->converting = !(*a)->completed;
+ //tqparent->setOpen( true );
last = 0;
- for( QStringList::Iterator b = (*a)->data.begin(); b != (*a)->data.end(); ++b ) {
- last = new LogViewerItem( parent, last, *b );
+ for( TQStringList::Iterator b = (*a)->data.begin(); b != (*a)->data.end(); ++b ) {
+ last = new LogViewerItem( tqparent, last, *b );
last->setMultiLinesEnabled( true );
last->converting = !(*a)->completed;
}
@@ -147,10 +147,10 @@ void LogViewer::processRemoved( int id )
LoggerItem* item = logger->getLog( id ); // this is ok, because the item still exists.
// it will be deleted after is function is completed
- QListViewItem* it = lLogs->firstChild();
+ TQListViewItem* it = lLogs->firstChild();
while( it != 0 ) {
- if( it->text(0) == KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number(item->id) ) {
+ if( it->text(0) == KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) ) {
delete it;
return;
}
@@ -167,7 +167,7 @@ void LogViewer::updateProcess( int id )
LogViewerItem *lastItem = 0, *oldItem = 0;
while( it != 0 ) {
- if( it->text(0) == KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number(item->id) ) {
+ if( it->text(0) == KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) ) {
LogViewerItem *a = it->firstChild(), *b;
while( a != 0 ) {
b = a->nextSibling();
@@ -176,7 +176,7 @@ void LogViewer::updateProcess( int id )
}
it->converting = !item->completed;
LogViewerItem* last = 0;
- for( QStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
+ for( TQStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
last = new LogViewerItem( (LogViewerItem*)it, last, *b );
last->setMultiLinesEnabled( true );
}
@@ -185,18 +185,18 @@ void LogViewer::updateProcess( int id )
it = it->nextSibling();
}
- LogViewerItem *parent = 0;
+ LogViewerItem *tqparent = 0;
// get the last list view item
- for( QListViewItem* it = lLogs->firstChild(); it != 0; it = it->nextSibling() ) {
+ for( TQListViewItem* it = lLogs->firstChild(); it != 0; it = it->nextSibling() ) {
lastItem = (LogViewerItem*)it;
}
- parent = new LogViewerItem( lLogs, lastItem, KURL::decode_string(item->filename).replace("%2f","/").replace("%%","%") + " - " + QString::number(item->id) );
- parent->converting = !item->completed;
+ tqparent = new LogViewerItem( lLogs, lastItem, KURL::decode_string(item->filename).tqreplace("%2f","/").tqreplace("%%","%") + " - " + TQString::number(item->id) );
+ tqparent->converting = !item->completed;
LogViewerItem* last = 0;
- for( QStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
- last = new LogViewerItem( parent, last, *b );
+ for( TQStringList::Iterator b = item->data.begin(); b != item->data.end(); ++b ) {
+ last = new LogViewerItem( tqparent, last, *b );
last->setMultiLinesEnabled( true );
}
}
diff --git a/src/logviewer.h b/src/logviewer.h
index be3a8a3..094a1ff 100755
--- a/src/logviewer.h
+++ b/src/logviewer.h
@@ -20,26 +20,26 @@ class LogViewerItem : public KListViewItem
public:
/**
* Constructor
- * @param parent The parent list view
+ * @param tqparent The tqparent list view
* @param after The item, the new item should be placed after
* @param label1 The text for the first column
*/
- LogViewerItem( KListView* parent, LogViewerItem* after, QString label1 );
+ LogViewerItem( KListView* tqparent, LogViewerItem* after, TQString label1 );
/**
* Constructor
- * @param parent The parent list view item
+ * @param tqparent The tqparent list view item
* @param after The item, the new item should be placed after
* @param label1 The text for the first column
*/
- LogViewerItem( LogViewerItem* parent, LogViewerItem* after, QString label1 );
+ LogViewerItem( LogViewerItem* tqparent, LogViewerItem* after, TQString label1 );
/**
* Destructor
*/
virtual ~LogViewerItem();
- virtual void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int alignment );
+ virtual void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int tqalignment );
LogViewerItem* nextSibling() const { return static_cast<LogViewerItem*>( KListViewItem::nextSibling() ); }
LogViewerItem* firstChild() const { return static_cast<LogViewerItem*>( KListViewItem::firstChild() ); }
@@ -56,13 +56,14 @@ public:
class LogViewerList : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
- * @param parent The parent widget
+ * @param tqparent The tqparent widget
* @param name The name of the file list
*/
- LogViewerList( QWidget * parent = 0, const char* name = 0 );
+ LogViewerList( TQWidget * tqparent = 0, const char* name = 0 );
/**
* Destructor
@@ -81,11 +82,12 @@ public:
class LogViewer : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- LogViewer( Logger* _logger, QWidget* parent=0, const char* name = 0, bool modal = true, WFlags f = 0 );
+ LogViewer( Logger* _logger, TQWidget* tqparent=0, const char* name = 0, bool modal = true, WFlags f = 0 );
/**
* Default Destructor
diff --git a/src/main.cpp b/src/main.cpp
index 7b42a3c..3d6e3b7 100755
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
/*
methods and files to update:
-outputdirectory.cpp: vfatPath( const QString& path )
+outputdirectory.cpp: vfatPath( const TQString& path )
metadata/
cddb.cpp, cddb.h
cdmanager.cpp, cdmanager.h
diff --git a/src/metadata/asf/asfattribute.cpp b/src/metadata/asf/asfattribute.cpp
index bfe81c5..5c83243 100644
--- a/src/metadata/asf/asfattribute.cpp
+++ b/src/metadata/asf/asfattribute.cpp
@@ -100,7 +100,7 @@ ASF::Attribute::Attribute(unsigned int value)
ASF::Attribute::Attribute(unsigned long long value)
{
d = new AttributePrivate;
- d->type = QWordType;
+ d->type = TQWordType;
d->longLongValue = value;
}
@@ -205,8 +205,8 @@ ASF::Attribute::parse(ASF::File &f, int kind)
d->intValue = f.readDWORD();
break;
- case QWordType:
- d->longLongValue = f.readQWORD();
+ case TQWordType:
+ d->longLongValue = f.readTQWORD();
break;
case UnicodeType:
@@ -245,7 +245,7 @@ ASF::Attribute::render(const String &name, int kind) const
data.append(ByteVector::fromUInt(d->intValue, false));
break;
- case QWordType:
+ case TQWordType:
data.append(ByteVector::fromLongLong(d->longLongValue, false));
break;
diff --git a/src/metadata/asf/asfattribute.h b/src/metadata/asf/asfattribute.h
index 9a8e3c9..9624f33 100644
--- a/src/metadata/asf/asfattribute.h
+++ b/src/metadata/asf/asfattribute.h
@@ -45,7 +45,7 @@ namespace TagLib
BytesType = 1,
BoolType = 2,
DWordType = 3,
- QWordType = 4,
+ TQWordType = 4,
WordType = 5,
GuidType = 6
};
@@ -71,7 +71,7 @@ namespace TagLib
Attribute(unsigned int value);
/*!
- * Constructs an attribute with \a key and a QWordType \a value.
+ * Constructs an attribute with \a key and a TQWordType \a value.
*/
Attribute(unsigned long long value);
@@ -121,7 +121,7 @@ namespace TagLib
unsigned int toUInt() const;
/*!
- * Returns the QWordType \a value.
+ * Returns the TQWordType \a value.
*/
unsigned long long toULongLong() const;
diff --git a/src/metadata/asf/asffile.cpp b/src/metadata/asf/asffile.cpp
index 55a12cc..bbe5ee5 100644
--- a/src/metadata/asf/asffile.cpp
+++ b/src/metadata/asf/asffile.cpp
@@ -325,7 +325,7 @@ ASF::File::HeaderExtensionObject::parse(ASF::File *file, uint /*size*/)
long long dataPos = 0;
while(dataPos < dataSize) {
ByteVector guid = file->readBlock(16);
- long long size = file->readQWORD();
+ long long size = file->readTQWORD();
BaseObject *obj;
if(guid == metadataGuid) {
obj = new MetadataObject();
@@ -401,13 +401,13 @@ void ASF::File::read(bool /*readProperties*/, Properties::ReadStyle /*properties
d->tag = new ASF::Tag();
d->properties = new ASF::Properties();
- d->size = readQWORD();
+ d->size = readTQWORD();
int numObjects = readDWORD();
seek(2, Current);
for(int i = 0; i < numObjects; i++) {
ByteVector guid = readBlock(16);
- long size = (long)readQWORD();
+ long size = (long)readTQWORD();
BaseObject *obj;
if(guid == filePropertiesGuid) {
obj = new FilePropertiesObject();
@@ -513,7 +513,7 @@ unsigned int ASF::File::readDWORD()
return v.toUInt(false);
}
-long long ASF::File::readQWORD()
+long long ASF::File::readTQWORD()
{
ByteVector v = readBlock(8);
return v.toLongLong(false);
diff --git a/src/metadata/asf/asffile.h b/src/metadata/asf/asffile.h
index db97331..618a3a9 100644
--- a/src/metadata/asf/asffile.h
+++ b/src/metadata/asf/asffile.h
@@ -86,7 +86,7 @@ namespace TagLib {
int readBYTE();
int readWORD();
unsigned int readDWORD();
- long long readQWORD();
+ long long readTQWORD();
static ByteVector renderString(const String &str, bool includeLength = false);
String readString(int len);
void read(bool readProperties, Properties::ReadStyle propertiesStyle);
diff --git a/src/metadata/m4a/mp4file.h b/src/metadata/m4a/mp4file.h
index 9e40dbc..c1da43d 100644
--- a/src/metadata/m4a/mp4file.h
+++ b/src/metadata/m4a/mp4file.h
@@ -104,7 +104,7 @@ namespace TagLib {
/*!
* This will remove all tags.
*
- * \note This will also invalidate pointers to the tags
+ * \note This will also tqinvalidate pointers to the tags
* as their memory will be freed.
* \note In order to make the removal permanent save() still needs to be called
*/
diff --git a/src/metadata/m4a/mp4mvhdbox.cpp b/src/metadata/m4a/mp4mvhdbox.cpp
index 36053e4..894f7f8 100644
--- a/src/metadata/m4a/mp4mvhdbox.cpp
+++ b/src/metadata/m4a/mp4mvhdbox.cpp
@@ -39,7 +39,7 @@ public:
TagLib::uint timescale;
//! duration of presentation
TagLib::ulonglong duration;
- //! playout speed
+ //! ptqlayout speed
TagLib::uint rate;
//! volume for entire presentation
TagLib::uint volume;
diff --git a/src/metadata/m4a/mp4mvhdbox.h b/src/metadata/m4a/mp4mvhdbox.h
index b133485..31e3d74 100644
--- a/src/metadata/m4a/mp4mvhdbox.h
+++ b/src/metadata/m4a/mp4mvhdbox.h
@@ -44,7 +44,7 @@ namespace TagLib
uint timescale() const;
//! function to get the presentation duration in the mp4 file
ulonglong duration() const;
- //! function to get the rate (playout speed) - typically 1.0;
+ //! function to get the rate (ptqlayout speed) - typically 1.0;
uint rate() const;
//! function to get volume level for presentation - typically 1.0;
uint volume() const;
diff --git a/src/metadata/m4a/mp4propsproxy.h b/src/metadata/m4a/mp4propsproxy.h
index 0ea29e2..c6b6f9d 100644
--- a/src/metadata/m4a/mp4propsproxy.h
+++ b/src/metadata/m4a/mp4propsproxy.h
@@ -29,7 +29,7 @@ namespace TagLib
namespace MP4
{
//! Mp4PropsProxy is used to access the stsd box and mvhd box directly
- /*! this class works as a shortcut to avoid stepping through all parent boxes
+ /*! this class works as a shortcut to avoid stepping through all tqparent boxes
* to access the boxes in question
*/
class Mp4PropsProxy
diff --git a/src/metadata/tagengine.cpp b/src/metadata/tagengine.cpp
index 34abd23..6043e99 100755
--- a/src/metadata/tagengine.cpp
+++ b/src/metadata/tagengine.cpp
@@ -1,7 +1,7 @@
#include "tagengine.h"
-#include <qfile.h>
+#include <tqfile.h>
// #include <taglib/attachedpictureframe.h>
#include <taglib/fileref.h>
@@ -38,9 +38,9 @@
// TODO COMPILATION tag
// FIXME BPM tag
-TagData::TagData( const QString& _artist, const QString& _composer,
- const QString& _album, const QString& _title,
- const QString& _genre, const QString& _comment,
+TagData::TagData( const TQString& _artist, const TQString& _composer,
+ const TQString& _album, const TQString& _title,
+ const TQString& _genre, const TQString& _comment,
int _track, int _disc, int _year,
int _length, int _fileSize, int _bitrate, int _samplingRate )
{
@@ -75,9 +75,9 @@ TagEngine::TagEngine()
TagEngine::~TagEngine()
{}
-TagData* TagEngine::readTags( const QString& file )
+TagData* TagEngine::readTags( const TQString& file )
{
- TagLib::FileRef fileref( QFile::encodeName(file) );
+ TagLib::FileRef fileref( TQFile::encodeName(file) );
TagData* tagData = new TagData();
if( !fileref.isNull() )
@@ -92,11 +92,11 @@ TagData* TagEngine::readTags( const QString& file )
if( tag )
{
- tagData->title = TStringToQString( tag->title() ).stripWhiteSpace();
- tagData->artist = TStringToQString( tag->artist() ).stripWhiteSpace();
- tagData->album = TStringToQString( tag->album() ).stripWhiteSpace();
- tagData->genre = TStringToQString( tag->genre() ).stripWhiteSpace();
- tagData->comment = TStringToQString( tag->comment() ).stripWhiteSpace();
+ tagData->title = TQString(TStringToQString( tag->title() )).stripWhiteSpace();
+ tagData->artist = TQString(TStringToQString( tag->artist() )).stripWhiteSpace();
+ tagData->album = TQString(TStringToQString( tag->album() )).stripWhiteSpace();
+ tagData->genre = TQString(TStringToQString( tag->genre() )).stripWhiteSpace();
+ tagData->comment = TQString(TStringToQString( tag->comment() )).stripWhiteSpace();
tagData->track = tag->track();
tagData->year = tag->year();
}
@@ -113,26 +113,26 @@ TagData* TagEngine::readTags( const QString& file )
tagData->samplingRate = audioProperties->sampleRate();
}
- QString disc;
- QString track_gain;
- QString album_gain;
+ TQString disc;
+ TQString track_gain;
+ TQString album_gain;
if ( TagLib::MPEG::File *file = dynamic_cast<TagLib::MPEG::File *>( fileref.file() ) )
{
if ( file->ID3v2Tag() )
{
if ( !file->ID3v2Tag()->frameListMap()[ "TPOS" ].isEmpty() )
- disc = TStringToQString( file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString() ).stripWhiteSpace();
+ disc = TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString() )).stripWhiteSpace();
if ( !file->ID3v2Tag()->frameListMap()[ "TCOM" ].isEmpty() )
- tagData->composer = TStringToQString( file->ID3v2Tag()->frameListMap()["TCOM"].front()->toString() ).stripWhiteSpace();
+ tagData->composer = TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TCOM"].front()->toString() )).stripWhiteSpace();
}
if ( file->APETag() )
{
if ( !file->APETag()->itemListMap()[ "REPLAYGAIN_TRACK_GAIN" ].isEmpty() )
- track_gain = TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_TRACK_GAIN"].toString() ).stripWhiteSpace();
+ track_gain = TQString(TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_TRACK_GAIN"].toString() )).stripWhiteSpace();
if ( !file->APETag()->itemListMap()[ "REPLAYGAIN_ALBUM_GAIN" ].isEmpty() )
- album_gain = TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_ALBUM_GAIN"].toString() ).stripWhiteSpace();
+ album_gain = TQString(TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_ALBUM_GAIN"].toString() )).stripWhiteSpace();
}
}
else if ( TagLib::Ogg::Vorbis::File *file = dynamic_cast<TagLib::Ogg::Vorbis::File *>( fileref.file() ) )
@@ -140,16 +140,16 @@ TagData* TagEngine::readTags( const QString& file )
if ( file->tag() )
{
if ( !file->tag()->fieldListMap()[ "COMPOSER" ].isEmpty() )
- tagData->composer = TStringToQString( file->tag()->fieldListMap()["COMPOSER"].front() ).stripWhiteSpace();
+ tagData->composer = TQString(TStringToQString( file->tag()->fieldListMap()["COMPOSER"].front() )).stripWhiteSpace();
if ( !file->tag()->fieldListMap()[ "DISCNUMBER" ].isEmpty() )
- disc = TStringToQString( file->tag()->fieldListMap()["DISCNUMBER"].front() ).stripWhiteSpace();
+ disc = TQString(TStringToQString( file->tag()->fieldListMap()["DISCNUMBER"].front() )).stripWhiteSpace();
if ( !file->tag()->fieldListMap()[ "REPLAYGAIN_TRACK_GAIN" ].isEmpty() )
- track_gain = TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_TRACK_GAIN"].front() ).stripWhiteSpace();
+ track_gain = TQString(TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_TRACK_GAIN"].front() )).stripWhiteSpace();
if ( !file->tag()->fieldListMap()[ "REPLAYGAIN_ALBUM_GAIN" ].isEmpty() )
- album_gain = TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_ALBUM_GAIN"].front() ).stripWhiteSpace();
+ album_gain = TQString(TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_ALBUM_GAIN"].front() )).stripWhiteSpace();
}
}
else if ( TagLib::FLAC::File *file = dynamic_cast<TagLib::FLAC::File *>( fileref.file() ) )
@@ -157,25 +157,25 @@ TagData* TagEngine::readTags( const QString& file )
if ( file->xiphComment() )
{
if ( !file->xiphComment()->fieldListMap()[ "COMPOSER" ].isEmpty() )
- tagData->composer = TStringToQString( file->xiphComment()->fieldListMap()["COMPOSER"].front() ).stripWhiteSpace();
+ tagData->composer = TQString(TStringToQString( file->xiphComment()->fieldListMap()["COMPOSER"].front() )).stripWhiteSpace();
if ( !file->xiphComment()->fieldListMap()[ "DISCNUMBER" ].isEmpty() )
- disc = TStringToQString( file->xiphComment()->fieldListMap()["DISCNUMBER"].front() ).stripWhiteSpace();
+ disc = TQString(TStringToQString( file->xiphComment()->fieldListMap()["DISCNUMBER"].front() )).stripWhiteSpace();
if ( !file->xiphComment()->fieldListMap()[ "REPLAYGAIN_TRACK_GAIN" ].isEmpty() )
- track_gain = TStringToQString( file->xiphComment()->fieldListMap()["REPLAYGAIN_TRACK_GAIN"].front() ).stripWhiteSpace();
+ track_gain = TQString(TStringToQString( file->xiphComment()->fieldListMap()["REPLAYGAIN_TRACK_GAIN"].front() )).stripWhiteSpace();
if ( !file->xiphComment()->fieldListMap()[ "REPLAYGAIN_ALBUM_GAIN" ].isEmpty() )
- album_gain = TStringToQString( file->xiphComment()->fieldListMap()["REPLAYGAIN_ALBUM_GAIN"].front() ).stripWhiteSpace();
+ album_gain = TQString(TStringToQString( file->xiphComment()->fieldListMap()["REPLAYGAIN_ALBUM_GAIN"].front() )).stripWhiteSpace();
}
/*if ( file->tag() )
{
if ( !file->tag()->fieldListMap()[ "REPLAYGAIN_TRACK_GAIN" ].isEmpty() )
- track_gain = TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_TRACK_GAIN"].front() ).stripWhiteSpace();
+ track_gain = TQString(TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_TRACK_GAIN"].front() )).stripWhiteSpace();
if ( !file->tag()->fieldListMap()[ "REPLAYGAIN_ALBUM_GAIN" ].isEmpty() )
- album_gain = TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_ALBUM_GAIN"].front() ).stripWhiteSpace();
+ album_gain = TQString(TStringToQString( file->tag()->fieldListMap()["REPLAYGAIN_ALBUM_GAIN"].front() )).stripWhiteSpace();
}*/
}
else if ( TagLib::MP4::File *file = dynamic_cast<TagLib::MP4::File *>( fileref.file() ) )
@@ -185,7 +185,7 @@ TagData* TagEngine::readTags( const QString& file )
{
tagData->composer = TStringToQString( mp4tag->composer() );
- disc = QString::number( mp4tag->disk() );
+ disc = TQString::number( mp4tag->disk() );
}
}
/* else if ( TagLib::MPC::File *file = dynamic_cast<TagLib::MPC::File *>( fileref.file() ) )
@@ -193,10 +193,10 @@ TagData* TagEngine::readTags( const QString& file )
if ( file->APETag() )
{
if ( !file->APETag()->itemListMap()[ "REPLAYGAIN_TRACK_GAIN" ].isEmpty() )
- track_gain = TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_TRACK_GAIN"].toString() ).stripWhiteSpace();
+ track_gain = TQString(TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_TRACK_GAIN"].toString() )).stripWhiteSpace();
if ( !file->APETag()->itemListMap()[ "REPLAYGAIN_ALBUM_GAIN" ].isEmpty() )
- album_gain = TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_ALBUM_GAIN"].toString() ).stripWhiteSpace();
+ album_gain = TQString(TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_ALBUM_GAIN"].toString() )).stripWhiteSpace();
}
}*/
else if ( TagLib::WavPack::File *file = dynamic_cast<TagLib::WavPack::File *>( fileref.file() ) )
@@ -204,10 +204,10 @@ TagData* TagEngine::readTags( const QString& file )
if ( file->APETag() )
{
if ( !file->APETag()->itemListMap()[ "REPLAYGAIN_TRACK_GAIN" ].isEmpty() )
- track_gain = TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_TRACK_GAIN"].toString() ).stripWhiteSpace();
+ track_gain = TQString(TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_TRACK_GAIN"].toString() )).stripWhiteSpace();
if ( !file->APETag()->itemListMap()[ "REPLAYGAIN_ALBUM_GAIN" ].isEmpty() )
- album_gain = TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_ALBUM_GAIN"].toString() ).stripWhiteSpace();
+ album_gain = TQString(TStringToQString( file->APETag()->itemListMap()["REPLAYGAIN_ALBUM_GAIN"].toString() )).stripWhiteSpace();
}
}
else if ( TagLib::TTA::File *file = dynamic_cast<TagLib::TTA::File *>( fileref.file() ) )
@@ -215,16 +215,16 @@ TagData* TagEngine::readTags( const QString& file )
if ( file->ID3v2Tag() )
{
if ( !file->ID3v2Tag()->frameListMap()[ "TPOS" ].isEmpty() )
- disc = TStringToQString( file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString() ).stripWhiteSpace();
+ disc = TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TPOS"].front()->toString() )).stripWhiteSpace();
if ( !file->ID3v2Tag()->frameListMap()[ "TCOM" ].isEmpty() )
- tagData->composer = TStringToQString( file->ID3v2Tag()->frameListMap()["TCOM"].front()->toString() ).stripWhiteSpace();
+ tagData->composer = TQString(TStringToQString( file->ID3v2Tag()->frameListMap()["TCOM"].front()->toString() )).stripWhiteSpace();
}
}
if( !disc.isEmpty() )
{
- int i = disc.find('/');
+ int i = disc.tqfind('/');
if( i != -1 )
// disc.right( i ).toInt() is total number of discs, we don't use this at the moment
tagData->disc = disc.left( i ).toInt();
@@ -234,7 +234,7 @@ TagData* TagEngine::readTags( const QString& file )
if( !track_gain.isEmpty() )
{
- int i = track_gain.find(' ');
+ int i = track_gain.tqfind(' ');
if( i != -1 )
tagData->track_gain = track_gain.left( i ).toFloat();
else
@@ -243,7 +243,7 @@ TagData* TagEngine::readTags( const QString& file )
if( !album_gain.isEmpty() )
{
- int i = album_gain.find(' ');
+ int i = album_gain.tqfind(' ');
if( i != -1 )
tagData->album_gain = album_gain.left( i ).toFloat();
else
@@ -256,14 +256,14 @@ TagData* TagEngine::readTags( const QString& file )
return 0;
}
-bool TagEngine::writeTags( const QString& file, TagData* tagData )
+bool TagEngine::writeTags( const TQString& file, TagData* tagData )
{
if( !tagData ) tagData = new TagData();
//Set default codec to UTF-8 (see bugs 111246 and 111232)
TagLib::ID3v2::FrameFactory::instance()->setDefaultTextEncoding( TagLib::String::UTF8 );
- TagLib::FileRef fileref( QFile::encodeName(file), false );
+ TagLib::FileRef fileref( TQFile::encodeName(file), false );
if ( !fileref.isNull() )
{
@@ -289,12 +289,12 @@ bool TagEngine::writeTags( const QString& file, TagData* tagData )
{
if ( !file->ID3v2Tag()->frameListMap()[ "TPOS" ].isEmpty() )
{
- file->ID3v2Tag()->frameListMap()[ "TPOS" ].front()->setText( QStringToTString( QString::number(tagData->disc) ) );
+ file->ID3v2Tag()->frameListMap()[ "TPOS" ].front()->setText( QStringToTString( TQString::number(tagData->disc) ) );
}
else
{
TagLib::ID3v2::TextIdentificationFrame *frame = new TagLib::ID3v2::TextIdentificationFrame( "TPOS", TagLib::ID3v2::FrameFactory::instance()->defaultTextEncoding() );
- frame->setText( QStringToTString( QString::number(tagData->disc) ) );
+ frame->setText( QStringToTString( TQString::number(tagData->disc) ) );
file->ID3v2Tag()->addFrame( frame );
}
@@ -324,12 +324,12 @@ bool TagEngine::writeTags( const QString& file, TagData* tagData )
// HACK sets the id3v2 year tag
if ( !file->ID3v2Tag()->frameListMap()[ "TYER" ].isEmpty() )
{
- file->ID3v2Tag()->frameListMap()[ "TYER" ].front()->setText( QStringToTString( QString::number(tagData->year) ) );
+ file->ID3v2Tag()->frameListMap()[ "TYER" ].front()->setText( QStringToTString( TQString::number(tagData->year) ) );
}
else
{
TagLib::ID3v2::TextIdentificationFrame *frame = new TagLib::ID3v2::TextIdentificationFrame( "TYER", TagLib::ID3v2::FrameFactory::instance()->defaultTextEncoding() );
- frame->setText( QStringToTString( QString::number(tagData->year) ) );
+ frame->setText( QStringToTString( TQString::number(tagData->year) ) );
file->ID3v2Tag()->addFrame( frame );
}
}
@@ -340,7 +340,7 @@ bool TagEngine::writeTags( const QString& file, TagData* tagData )
{
file->tag()->addField( "COMPOSER", QStringToTString( tagData->composer ), true );
- file->tag()->addField( "DISCNUMBER", QStringToTString( QString::number(tagData->disc) ), true );
+ file->tag()->addField( "DISCNUMBER", QStringToTString( TQString::number(tagData->disc) ), true );
}
}
else if ( TagLib::FLAC::File *file = dynamic_cast<TagLib::FLAC::File *>( fileref.file() ) )
@@ -349,7 +349,7 @@ bool TagEngine::writeTags( const QString& file, TagData* tagData )
{
file->xiphComment()->addField( "COMPOSER", QStringToTString( tagData->composer ), true );
- file->xiphComment()->addField( "DISCNUMBER", QStringToTString( QString::number(tagData->disc) ), true );
+ file->xiphComment()->addField( "DISCNUMBER", QStringToTString( TQString::number(tagData->disc) ), true );
}
}
else if ( TagLib::MP4::File *file = dynamic_cast<TagLib::MP4::File *>( fileref.file() ) )
@@ -368,12 +368,12 @@ bool TagEngine::writeTags( const QString& file, TagData* tagData )
{
if ( !file->ID3v2Tag()->frameListMap()[ "TPOS" ].isEmpty() )
{
- file->ID3v2Tag()->frameListMap()[ "TPOS" ].front()->setText( QStringToTString( QString::number(tagData->disc) ) );
+ file->ID3v2Tag()->frameListMap()[ "TPOS" ].front()->setText( QStringToTString( TQString::number(tagData->disc) ) );
}
else
{
TagLib::ID3v2::TextIdentificationFrame *frame = new TagLib::ID3v2::TextIdentificationFrame( "TPOS", TagLib::ID3v2::FrameFactory::instance()->defaultTextEncoding() );
- frame->setText( QStringToTString( QString::number(tagData->disc) ) );
+ frame->setText( QStringToTString( TQString::number(tagData->disc) ) );
file->ID3v2Tag()->addFrame( frame );
}
@@ -395,7 +395,7 @@ bool TagEngine::writeTags( const QString& file, TagData* tagData )
return false;
}
-// bool TagEngine::canWrite( QString format )
+// bool TagEngine::canWrite( TQString format )
// {
// format = format.lower();
//
diff --git a/src/metadata/tagengine.h b/src/metadata/tagengine.h
index e21a48c..8b0e6f0 100755
--- a/src/metadata/tagengine.h
+++ b/src/metadata/tagengine.h
@@ -3,8 +3,8 @@
#ifndef TAGENGINE_H
#define TAGENGINE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
/**
* @short All metainformation can be stored in this class
@@ -17,9 +17,9 @@ public:
/**
* Constructor
*/
- TagData( const QString& _artist = QString::null, const QString& _composer = QString::null,
- const QString& _album = QString::null, const QString& _title = QString::null,
- const QString& _genre = QString::null, const QString& _comment = QString::null,
+ TagData( const TQString& _artist = TQString(), const TQString& _composer = TQString(),
+ const TQString& _album = TQString(), const TQString& _title = TQString(),
+ const TQString& _genre = TQString(), const TQString& _comment = TQString(),
int _track = 0, int _disc = 0, int _year = 0,
int _length = 0, int _fileSize = 0, int _bitrate = 0, int _samplingRate = 0 );
@@ -29,12 +29,12 @@ public:
virtual ~TagData();
/** The tags */
- QString artist;
- QString composer;
- QString album;
- QString title;
- QString genre;
- QString comment;
+ TQString artist;
+ TQString composer;
+ TQString album;
+ TQString title;
+ TQString genre;
+ TQString comment;
int track;
int disc;
int year;
@@ -68,12 +68,12 @@ public:
virtual ~TagEngine();
/** A list of all genre */
- QStringList genreList;
+ TQStringList genreList;
- TagData* readTags( const QString& file );
- bool writeTags( const QString& file, TagData* tagData );
+ TagData* readTags( const TQString& file );
+ bool writeTags( const TQString& file, TagData* tagData );
-// bool canWrite( QString format ); // NOTE no const because this string is being modyfied
+// bool canWrite( TQString format ); // NOTE no const because this string is being modyfied
};
#endif // TAGENGINE_H
diff --git a/src/metadata/tplugins.cpp b/src/metadata/tplugins.cpp
index b84d601..10d7107 100755
--- a/src/metadata/tplugins.cpp
+++ b/src/metadata/tplugins.cpp
@@ -22,7 +22,7 @@
#include <config.h>
// #include <debug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kmimetype.h>
#include <taglib/fileref.h>
@@ -73,7 +73,7 @@ TagLib::File *MimeTypeFileTypeResolver::createFile(const char *fileName,
bool readProperties,
TagLib::AudioProperties::ReadStyle propertiesStyle) const
{
- QString fn = QFile::decodeName( fileName );
+ TQString fn = TQFile::decodeName( fileName );
int accuracy = 0;
KMimeType::Ptr mimetype = KMimeType::findByFileContent( fn, &accuracy );
diff --git a/src/metadata/trueaudio/ttafile.h b/src/metadata/trueaudio/ttafile.h
index 2cb0785..3a97a9e 100644
--- a/src/metadata/trueaudio/ttafile.h
+++ b/src/metadata/trueaudio/ttafile.h
@@ -154,7 +154,7 @@ namespace TagLib {
* This will remove the tags that match the OR-ed together TagTypes from the
* file. By default it removes all tags.
*
- * \note This will also invalidate pointers to the tags
+ * \note This will also tqinvalidate pointers to the tags
* as their memory will be freed.
* \note In order to make the removal permanent save() still needs to be called
*/
diff --git a/src/metadata/wavpack/wvfile.h b/src/metadata/wavpack/wvfile.h
index 6c57f6d..18f2316 100644
--- a/src/metadata/wavpack/wvfile.h
+++ b/src/metadata/wavpack/wvfile.h
@@ -136,7 +136,7 @@ namespace TagLib {
* This will remove the tags that match the OR-ed together TagTypes from the
* file. By default it removes all tags.
*
- * \note This will also invalidate pointers to the tags
+ * \note This will also tqinvalidate pointers to the tags
* as their memory will be freed.
* \note In order to make the removal permanent save() still needs to be called
*/
diff --git a/src/options.cpp b/src/options.cpp
index fc1a5a8..cbecd6f 100755
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -4,10 +4,10 @@
#include "optionsdetailed.h"
#include "config.h"
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <ktabwidget.h>
@@ -18,15 +18,15 @@
// FIXME prevent converting wav files to wav
-Options::Options( Config* _config, const QString &text, QWidget *parent, const char *name )
- : QWidget( parent, name )
+Options::Options( Config* _config, const TQString &text, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
config = _config;
- connect( config, SIGNAL(configChanged()),
- this, SLOT(configChanged())
+ connect( config, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(configChanged())
);
- QGridLayout *gridLayout = new QGridLayout( this, 1, 1 );
+ TQGridLayout *gridLayout = new TQGridLayout( this, 1, 1 );
tab = new KTabWidget( this, "tab" );
@@ -34,79 +34,79 @@ Options::Options( Config* _config, const QString &text, QWidget *parent, const c
optionsSimple = new OptionsSimple( config, optionsDetailed, text, this, "optionsSimple" );
tab->addTab( optionsSimple, i18n("Simple") );
- connect( optionsSimple, SIGNAL(optionsChanged()),
- this, SLOT(somethingChanged())
+ connect( optionsSimple, TQT_SIGNAL(optionsChanged()),
+ this, TQT_SLOT(somethingChanged())
);
tab->addTab( optionsDetailed, i18n("Detailed") );
- connect( optionsDetailed, SIGNAL(optionsChanged()),
- this, SLOT(somethingChanged())
+ connect( optionsDetailed, TQT_SIGNAL(optionsChanged()),
+ this, TQT_SLOT(somethingChanged())
);
-// connect( optionsSimple, SIGNAL(setFormat(const QString&)),
-// optionsDetailed, SLOT(setFormat(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setFormat(const TQString&)),
+// optionsDetailed, TQT_SLOT(setFormat(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setQualityMode(const QString&)),
-// optionsDetailed, SLOT(setQualityMode(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setQualityMode(const TQString&)),
+// optionsDetailed, TQT_SLOT(setQualityMode(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setQuality(int)),
-// optionsDetailed, SLOT(setQuality(int))
+// connect( optionsSimple, TQT_SIGNAL(setQuality(int)),
+// optionsDetailed, TQT_SLOT(setQuality(int))
// );
-// connect( optionsSimple, SIGNAL(setBitrateMode(const QString&)),
-// optionsDetailed, SLOT(setBitrateMode(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setBitrateMode(const TQString&)),
+// optionsDetailed, TQT_SLOT(setBitrateMode(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setBitrateRangeEnabled(bool)),
-// optionsDetailed, SLOT(setBitrateRangeEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setBitrateRangeEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setBitrateRangeEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setMinBitrate(int)),
-// optionsDetailed, SLOT(setMinBitrate(int))
+// connect( optionsSimple, TQT_SIGNAL(setMinBitrate(int)),
+// optionsDetailed, TQT_SLOT(setMinBitrate(int))
// );
-// connect( optionsSimple, SIGNAL(setMaxBitrate(int)),
-// optionsDetailed, SLOT(setMaxBitrate(int))
+// connect( optionsSimple, TQT_SIGNAL(setMaxBitrate(int)),
+// optionsDetailed, TQT_SLOT(setMaxBitrate(int))
// );
-// connect( optionsSimple, SIGNAL(setSamplingrateEnabled(bool)),
-// optionsDetailed, SLOT(setSamplingrateEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setSamplingrateEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setSamplingrateEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setSamplingrate(int)),
-// optionsDetailed, SLOT(setSamplingrate(int))
+// connect( optionsSimple, TQT_SIGNAL(setSamplingrate(int)),
+// optionsDetailed, TQT_SLOT(setSamplingrate(int))
// );
-// connect( optionsSimple, SIGNAL(setSamplingrate(const QString&)),
-// optionsDetailed, SLOT(setSamplingrate(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setSamplingrate(const TQString&)),
+// optionsDetailed, TQT_SLOT(setSamplingrate(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setChannelsEnabled(bool)),
-// optionsDetailed, SLOT(setChannelsEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setChannelsEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setChannelsEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setChannels(const QString&)),
-// optionsDetailed, SLOT(setChannels(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setChannels(const TQString&)),
+// optionsDetailed, TQT_SLOT(setChannels(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setReplayGainEnabled(bool)),
-// optionsDetailed, SLOT(setReplayGainEnabled(bool))
+// connect( optionsSimple, TQT_SIGNAL(setReplayGainEnabled(bool)),
+// optionsDetailed, TQT_SLOT(setReplayGainEnabled(bool))
// );
-// connect( optionsSimple, SIGNAL(setOutputDirectoryMode(OutputDirectory::Mode)),
-// optionsDetailed, SLOT(setOutputDirectoryMode(OutputDirectory::Mode))
+// connect( optionsSimple, TQT_SIGNAL(setOutputDirectoryMode(OutputDirectory::Mode)),
+// optionsDetailed, TQT_SLOT(setOutputDirectoryMode(OutputDirectory::Mode))
// );
-// connect( optionsSimple, SIGNAL(setOutputDirectoryPath(const QString&)),
-// optionsDetailed, SLOT(setOutputDirectoryPath(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setOutputDirectoryPath(const TQString&)),
+// optionsDetailed, TQT_SLOT(setOutputDirectoryPath(const TQString&))
// );
-// connect( optionsSimple, SIGNAL(setOptions(const ConversionOptions&)),
-// optionsDetailed, SLOT(setCurrentOptions(const ConversionOptions&))
+// connect( optionsSimple, TQT_SIGNAL(setOptions(const ConversionOptions&)),
+// optionsDetailed, TQT_SLOT(setCurrentOptions(const ConversionOptions&))
// );
-// connect( optionsSimple, SIGNAL(setUserOptions(const QString&)),
-// optionsDetailed, SLOT(setUserOptions(const QString&))
+// connect( optionsSimple, TQT_SIGNAL(setUserOptions(const TQString&)),
+// optionsDetailed, TQT_SLOT(setUserOptions(const TQString&))
// );
if( config->data.general.startTab == 0 ) tab->setCurrentPage( config->data.general.lastTab );
else tab->setCurrentPage( config->data.general.startTab - 1 );
gridLayout->addWidget( tab, 0, 0 );
- connect( tab, SIGNAL( currentChanged(QWidget*) ),
- this, SLOT( tabChanged(QWidget*) )
+ connect( tab, TQT_SIGNAL( currentChanged(TQWidget*) ),
+ this, TQT_SLOT( tabChanged(TQWidget*) )
);
// draw the toggle button
- QVBoxLayout *optionsTopBox = new QVBoxLayout( -1, "optionsTopBox" );
+ TQVBoxLayout *optionsTopBox = new TQVBoxLayout( -1, "optionsTopBox" );
gridLayout->addLayout( optionsTopBox, 0, 0 );
- QHBoxLayout *optionsBox = new QHBoxLayout( 6, "optionsBox" );
+ TQHBoxLayout *optionsBox = new TQHBoxLayout( 6, "optionsBox" );
optionsTopBox->addLayout( optionsBox );
optionsTopBox->addStretch();
@@ -114,43 +114,43 @@ Options::Options( Config* _config, const QString &text, QWidget *parent, const c
// pPluginsNotify = new KPushButton( "", this, "pPluginsNotify");
// pPluginsNotify->setPixmap( KGlobal::iconLoader()->loadIcon("connect_creating",KIcon::Toolbar) );
-// QToolTip::add( pPluginsNotify, i18n("There are new plugin updates available.\nClick on this button in order to open the configuration dialog.") );
+// TQToolTip::add( pPluginsNotify, i18n("There are new plugin updates available.\nClick on this button in order to open the configuration dialog.") );
// pPluginsNotify->hide();
-// pPluginsNotify->setPaletteBackgroundColor( QColor(255,220,247) );
+// pPluginsNotify->setPaletteBackgroundColor( TQColor(255,220,247) );
// optionsBox->addWidget( pPluginsNotify );
-// connect( pPluginsNotify, SIGNAL(clicked()),
-// this, SLOT(showConfigDialogPlugins())
+// connect( pPluginsNotify, TQT_SIGNAL(clicked()),
+// this, TQT_SLOT(showConfigDialogPlugins())
// );
pBackendsNotify = new KPushButton( "", this, "pBackendsNotify");
pBackendsNotify->setPixmap( KGlobal::iconLoader()->loadIcon("kcmsystem",KIcon::Toolbar) );
- QToolTip::add( pBackendsNotify, i18n("soundKonverter either found new backends or misses some.\nClick on this button in order to open the configuration dialog.") );
+ TQToolTip::add( pBackendsNotify, i18n("soundKonverter either found new backends or misses some.\nClick on this button in order to open the configuration dialog.") );
pBackendsNotify->setShown( config->backendsChanged );
config->backendsChanged = false;
- pBackendsNotify->setPaletteBackgroundColor( QColor(255,220,247) );
+ pBackendsNotify->setPaletteBackgroundColor( TQColor(255,220,247) );
optionsBox->addWidget( pBackendsNotify );
- connect( pBackendsNotify, SIGNAL(clicked()),
- this, SLOT(showConfigDialogBackends())
+ connect( pBackendsNotify, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(showConfigDialogBackends())
);
pAdvancedOptionsToggle = new KPushButton( i18n("Advanced Options"), this, "pAdvancedOptionsToggle");
pAdvancedOptionsToggle->setToggleButton( true );
pAdvancedOptionsToggle->hide();
optionsBox->addWidget( pAdvancedOptionsToggle );
- connect( pAdvancedOptionsToggle, SIGNAL(clicked()),
- optionsDetailed, SLOT(toggleAdvancedOptions())
+ connect( pAdvancedOptionsToggle, TQT_SIGNAL(clicked()),
+ optionsDetailed, TQT_SLOT(toggleAdvancedOptions())
);
/* NOTE kaligames.de is down
if( config->data.plugins.checkForUpdates ) {
config->onlinePluginsChanged = false;
- getPluginListJob = KIO::file_copy("http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + QString::number(config->data.app.configVersion),
+ getPluginListJob = KIO::file_copy("http://kaligames.de/downloads/soundkonverter/plugins/download.php?version=" + TQString::number(config->data.app.configVersion),
locateLocal("data","soundkonverter/pluginlist_new.txt"), -1, true, false, false );
- connect( getPluginListJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(getPluginListFinished(KIO::Job*))
+ connect( getPluginListJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(getPluginListFinished(KIO::Job*))
);
}
*/
- if( config->data.general.defaultProfile == i18n("Last used") || config->getAllProfiles().findIndex(config->data.general.defaultProfile) != -1 ) {
+ if( config->data.general.defaultProfile == i18n("Last used") || config->getAllProfiles().tqfindIndex(config->data.general.defaultProfile) != -1 ) {
setCurrentOptions( config->getProfile(config->data.general.defaultProfile) );
}
else {
@@ -165,8 +165,8 @@ Options::~Options()
// void Options::getPluginListFinished( KIO::Job* job )
// {
// if( job->error() == 0 ) {
-// QFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
-// QFile newFile( locateLocal("data","soundkonverter/pluginlist_new.txt") );
+// TQFile file( locateLocal("data","soundkonverter/pluginlist.txt") );
+// TQFile newFile( locateLocal("data","soundkonverter/pluginlist_new.txt") );
//
// if( !file.exists() ) { // TODO check against the installed plugins
// pPluginsNotify->show();
@@ -176,8 +176,8 @@ Options::~Options()
// }
//
// if( file.open(IO_ReadOnly) && newFile.open(IO_ReadOnly) ) {
-// QTextStream stream( &file );
-// QTextStream newStream( &newFile );
+// TQTextStream stream( &file );
+// TQTextStream newStream( &newFile );
// while( !stream.atEnd() && !newStream.atEnd() ) {
// if( stream.readLine() != newStream.readLine() ) {
// file.close();
@@ -229,7 +229,7 @@ void Options::setCurrentOptions( const ConversionOptions& options )
optionsSimple->refill();
}
-void Options::tabChanged( QWidget* widget )
+void Options::tabChanged( TQWidget* widget )
{
if( widget == optionsSimple ) {
pAdvancedOptionsToggle->hide();
@@ -241,17 +241,17 @@ void Options::tabChanged( QWidget* widget )
config->data.general.lastTab = tab->currentPageIndex();
}
-void Options::setProfile( const QString& profile )
+void Options::setProfile( const TQString& profile )
{
optionsSimple->setCurrentProfile( profile );
}
-void Options::setFormat( const QString& format )
+void Options::setFormat( const TQString& format )
{
optionsSimple->setCurrentFormat( format );
}
-void Options::setOutputDirectory( const QString& directory )
+void Options::setOutputDirectory( const TQString& directory )
{
optionsSimple->setCurrentOutputDirectory( directory );
}
diff --git a/src/options.h b/src/options.h
index f675aa1..65c566b 100755
--- a/src/options.h
+++ b/src/options.h
@@ -3,7 +3,7 @@
#ifndef OPTIONS_H
#define OPTIONS_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "conversionoptions.h"
@@ -13,7 +13,7 @@ class OptionsSimple;
class OptionsDetailed;
class Config;
-class QStringList;
+class TQStringList;
class KTabWidget;
class KPushButton;
@@ -23,7 +23,7 @@ class KPushButton;
*/
struct ProfileData
{
- QString name;
+ TQString name;
ConversionOptions options;
};
@@ -33,7 +33,7 @@ struct ProfileData
*/
// struct OptionsData
// {
-// QString name;
+// TQString name;
// ConversionOptions options;
// };
@@ -43,14 +43,15 @@ struct ProfileData
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class Options : public QWidget
+class Options : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- Options( Config*, const QString &text, QWidget* parent = 0, const char* name = 0 );
+ Options( Config*, const TQString &text, TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destructor
@@ -71,17 +72,17 @@ public slots:
/**
* Set the current profile
*/
- void setProfile( const QString& );
+ void setProfile( const TQString& );
/**
* Set the current format
*/
- void setFormat( const QString& );
+ void setFormat( const TQString& );
/**
* Set the current output directory
*/
- void setOutputDirectory( const QString& );
+ void setOutputDirectory( const TQString& );
private:
/** Toggle between normal and advanced options in the detailed tab */
@@ -107,7 +108,7 @@ private:
//void updateSimpleTab();
private slots:
- void tabChanged( QWidget* );
+ void tabChanged( TQWidget* );
void somethingChanged();
void configChanged();
// void getPluginListFinished( KIO::Job* job );
diff --git a/src/optionsdetailed.cpp b/src/optionsdetailed.cpp
index 320f3bb..cd8163a 100755
--- a/src/optionsdetailed.cpp
+++ b/src/optionsdetailed.cpp
@@ -3,11 +3,11 @@
#include "convertpluginloader.h"
#include "config.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <knuminput.h>
#include <klocale.h>
@@ -26,103 +26,103 @@
// FIXME refill the formats box, when the configuration changed
-OptionsDetailed::OptionsDetailed( Config* _config, QWidget *parent, const char *name )
- : QWidget( parent, name )
+OptionsDetailed::OptionsDetailed( Config* _config, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
config = _config;
- QGridLayout *gridLayout = new QGridLayout( this );
+ TQGridLayout *gridLayout = new TQGridLayout( this );
// normal options
- normalOptions = new QWidget( this, "normalOptions" );
+ normalOptions = new TQWidget( this, "normalOptions" );
gridLayout->addWidget( normalOptions, 0, 0 );
- QGridLayout *normalGrid = new QGridLayout( normalOptions, 2, 1, 6, 3 );
+ TQGridLayout *normalGrid = new TQGridLayout( normalOptions, 2, 1, 6, 3 );
- QHBoxLayout *normalTopBox = new QHBoxLayout();
+ TQHBoxLayout *normalTopBox = new TQHBoxLayout();
normalGrid->addLayout( normalTopBox, 0, 0 );
- QLabel* lConvert = new QLabel( i18n("Convert")+":", normalOptions, "lConvert" );
- normalTopBox->addWidget( lConvert, 0, Qt::AlignVCenter );
+ TQLabel* lConvert = new TQLabel( i18n("Convert")+":", normalOptions, "lConvert" );
+ normalTopBox->addWidget( lConvert, 0, TQt::AlignVCenter );
cFormat = new KComboBox( normalOptions, "cFormat" );
- normalTopBox->addWidget( cFormat, 0, Qt::AlignVCenter );
- connect( cFormat, SIGNAL(activated(int)),
- this, SLOT(formatChanged())
+ normalTopBox->addWidget( cFormat, 0, TQt::AlignVCenter );
+ connect( cFormat, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(formatChanged())
);
- connect( cFormat, SIGNAL(activated(int)),
- this, SLOT(somethingChanged())
+ connect( cFormat, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(somethingChanged())
);
cQualityMode = new KComboBox( normalOptions, "cQualityMode" );
- cQualityMode->setFixedSize( cQualityMode->sizeHint() );
- normalTopBox->addWidget( cQualityMode, 0, Qt::AlignVCenter );
- connect( cQualityMode, SIGNAL(activated(int)),
- this, SLOT(qualityModeChanged())
+ cQualityMode->setFixedSize( cQualityMode->tqsizeHint() );
+ normalTopBox->addWidget( cQualityMode, 0, TQt::AlignVCenter );
+ connect( cQualityMode, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(qualityModeChanged())
);
- connect( cQualityMode, SIGNAL(activated(int)),
- this, SLOT(somethingChanged())
+ connect( cQualityMode, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(somethingChanged())
);
iQuality = new KIntSpinBox( normalOptions, "iQuality" );
- normalTopBox->addWidget( iQuality, 0, Qt::AlignVCenter );
- connect( iQuality, SIGNAL(valueChanged(int)),
- this, SLOT(qualityChanged())
+ normalTopBox->addWidget( iQuality, 0, TQt::AlignVCenter );
+ connect( iQuality, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(qualityChanged())
);
- connect( iQuality, SIGNAL(valueChanged(int)),
- this, SLOT(somethingChanged())
+ connect( iQuality, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(somethingChanged())
);
cBitrateMode = new KComboBox( normalOptions, "cBitrateMode" );
- QToolTip::add( cBitrateMode, i18n("vbr - variable bitrate\nabr - average bitrate\ncbr - constant bitrate") );
- normalTopBox->addWidget( cBitrateMode, 0, Qt::AlignVCenter );
- connect( cBitrateMode, SIGNAL(activated(int)),
- this, SLOT(bitrateModeChanged())
+ TQToolTip::add( cBitrateMode, i18n("vbr - variable bitrate\nabr - average bitrate\ncbr - constant bitrate") );
+ normalTopBox->addWidget( cBitrateMode, 0, TQt::AlignVCenter );
+ connect( cBitrateMode, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(bitrateModeChanged())
);
- connect( cBitrateMode, SIGNAL(activated(int)),
- this, SLOT(somethingChanged())
+ connect( cBitrateMode, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(somethingChanged())
);
normalTopBox->addSpacing( 18 );
- cBitrateRangeSwitch = new QCheckBox( i18n("Bitrate range")+":", normalOptions, "cBitrateRangeSwitch" );
- QToolTip::add( cBitrateRangeSwitch, i18n("Use it only if, you know what you are doing, you could reduce the quality.") );
- normalTopBox->addWidget( cBitrateRangeSwitch, 0, Qt::AlignVCenter );
- connect( cBitrateRangeSwitch, SIGNAL(toggled(bool)),
- this, SLOT(bitrateRangeToggled())
+ cBitrateRangeSwitch = new TQCheckBox( i18n("Bitrate range")+":", normalOptions, "cBitrateRangeSwitch" );
+ TQToolTip::add( cBitrateRangeSwitch, i18n("Use it only if, you know what you are doing, you could reduce the quality.") );
+ normalTopBox->addWidget( cBitrateRangeSwitch, 0, TQt::AlignVCenter );
+ connect( cBitrateRangeSwitch, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(bitrateRangeToggled())
);
- connect( cBitrateRangeSwitch, SIGNAL(toggled(bool)),
- this, SLOT(somethingChanged())
+ connect( cBitrateRangeSwitch, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(somethingChanged())
);
iMinBitrate = new KIntSpinBox( normalOptions, "iMinBitrate" );
iMinBitrate->setMinValue( 32 );
iMinBitrate->setMaxValue( 320 );
iMinBitrate->setLineStep( 8 );
iMinBitrate->setValue( 64 );
- normalTopBox->addWidget( iMinBitrate, 0, Qt::AlignVCenter );
- connect( iMinBitrate, SIGNAL(valueChanged(int)),
- this, SLOT(somethingChanged())
+ normalTopBox->addWidget( iMinBitrate, 0, TQt::AlignVCenter );
+ connect( iMinBitrate, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(somethingChanged())
);
- lBitrateRangeTo = new QLabel( "-", normalOptions, "lBitrateRangeTo" );
- normalTopBox->addWidget( lBitrateRangeTo, 0, Qt::AlignVCenter );
+ lBitrateRangeTo = new TQLabel( "-", normalOptions, "lBitrateRangeTo" );
+ normalTopBox->addWidget( lBitrateRangeTo, 0, TQt::AlignVCenter );
iMaxBitrate = new KIntSpinBox( normalOptions, "iMaxBitrate" );
iMaxBitrate->setMinValue( 32 );
iMaxBitrate->setMaxValue( 320 );
iMaxBitrate->setLineStep( 8 );
iMaxBitrate->setValue( 192 );
- normalTopBox->addWidget( iMaxBitrate, 0, Qt::AlignVCenter );
- connect( iMaxBitrate, SIGNAL(valueChanged(int)),
- this, SLOT(somethingChanged())
+ normalTopBox->addWidget( iMaxBitrate, 0, TQt::AlignVCenter );
+ connect( iMaxBitrate, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(somethingChanged())
);
- lBitrateRangeUnit = new QLabel( "kbps", normalOptions, "lBitrateRangeUnit" );
- normalTopBox->addWidget( lBitrateRangeUnit, 0, Qt::AlignVCenter );
+ lBitrateRangeUnit = new TQLabel( "kbps", normalOptions, "lBitrateRangeUnit" );
+ normalTopBox->addWidget( lBitrateRangeUnit, 0, TQt::AlignVCenter );
normalTopBox->addStretch();
- QHBoxLayout *normalMiddleBox = new QHBoxLayout();
+ TQHBoxLayout *normalMiddleBox = new TQHBoxLayout();
normalGrid->addLayout( normalMiddleBox, 1, 0 );
- cSamplingrateSwitch = new QCheckBox( i18n("Resample")+":", normalOptions, "cSamplingrateSwitch" );
- normalMiddleBox->addWidget( cSamplingrateSwitch, 0, Qt::AlignVCenter );
- connect( cSamplingrateSwitch, SIGNAL(toggled(bool)),
- this, SLOT(samplingrateToggled())
+ cSamplingrateSwitch = new TQCheckBox( i18n("Resample")+":", normalOptions, "cSamplingrateSwitch" );
+ normalMiddleBox->addWidget( cSamplingrateSwitch, 0, TQt::AlignVCenter );
+ connect( cSamplingrateSwitch, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(samplingrateToggled())
);
- connect( cSamplingrateSwitch, SIGNAL(toggled(bool)),
- this, SLOT(somethingChanged())
+ connect( cSamplingrateSwitch, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(somethingChanged())
);
cSamplingrate = new KComboBox( normalOptions, "cSamplingrate" );
cSamplingrate->setEditable(true);
@@ -136,21 +136,21 @@ OptionsDetailed::OptionsDetailed( Config* _config, QWidget *parent, const char *
cSamplingrate->insertItem("11025");
cSamplingrate->insertItem("8000");
cSamplingrate->setCurrentText("44100");
- normalMiddleBox->addWidget( cSamplingrate, 0, Qt::AlignVCenter );
- connect( cSamplingrate, SIGNAL(activated(int)),
- this, SLOT(somethingChanged())
+ normalMiddleBox->addWidget( cSamplingrate, 0, TQt::AlignVCenter );
+ connect( cSamplingrate, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(somethingChanged())
);
- lSamplingrateUnit = new QLabel( "Hz", normalOptions, "lSamplingrateUnit" );
- normalMiddleBox->addWidget( lSamplingrateUnit, 0, Qt::AlignVCenter );
+ lSamplingrateUnit = new TQLabel( "Hz", normalOptions, "lSamplingrateUnit" );
+ normalMiddleBox->addWidget( lSamplingrateUnit, 0, TQt::AlignVCenter );
normalMiddleBox->addSpacing( 18 );
- cChannelsSwitch = new QCheckBox( i18n("Channels")+":", normalOptions, "cChannelsSwitch" );
- normalMiddleBox->addWidget( cChannelsSwitch, 0, Qt::AlignVCenter );
- connect( cChannelsSwitch, SIGNAL(toggled(bool)),
- this, SLOT(channelsToggled())
+ cChannelsSwitch = new TQCheckBox( i18n("Channels")+":", normalOptions, "cChannelsSwitch" );
+ normalMiddleBox->addWidget( cChannelsSwitch, 0, TQt::AlignVCenter );
+ connect( cChannelsSwitch, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(channelsToggled())
);
- connect( cChannelsSwitch, SIGNAL(toggled(bool)),
- this, SLOT(somethingChanged())
+ connect( cChannelsSwitch, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(somethingChanged())
);
cChannels = new KComboBox( normalOptions, "cChannels" );
/* sChannels.append( i18n("Mono") );
@@ -159,71 +159,71 @@ OptionsDetailed::OptionsDetailed( Config* _config, QWidget *parent, const char *
sChannels.append( i18n("Forced Joint-Stereo") );
sChannels.append( i18n("Dual Channels") );
cChannels->insertStringList( sChannels );*/
- normalMiddleBox->addWidget( cChannels, 0, Qt::AlignVCenter );
- connect( cChannels, SIGNAL(activated(int)),
- this, SLOT(somethingChanged())
+ normalMiddleBox->addWidget( cChannels, 0, TQt::AlignVCenter );
+ connect( cChannels, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(somethingChanged())
);
normalMiddleBox->addSpacing( 18 );
- cReplayGain = new QCheckBox( i18n("Replay Gain"), normalOptions, "cReplayGain" );
+ cReplayGain = new TQCheckBox( i18n("Replay Gain"), normalOptions, "cReplayGain" );
cReplayGain->setChecked(true);
- QToolTip::add( cReplayGain, i18n("Add a Replay Gain tag to the converted file.") );
- QWhatsThis::add( cReplayGain, i18n("Replay Gain is a volume correction technique. A volume difference is calculated and stored in a tag. This way audio players can automatically adjust the volume and the original music data is not modified (like at normalization).") );
- normalMiddleBox->addWidget( cReplayGain, 0, Qt::AlignVCenter );
- connect( cReplayGain, SIGNAL(toggled(bool)),
- this, SLOT(somethingChanged())
+ TQToolTip::add( cReplayGain, i18n("Add a Replay Gain tag to the converted file.") );
+ TQWhatsThis::add( cReplayGain, i18n("Replay Gain is a volume correction technique. A volume difference is calculated and stored in a tag. This way audio players can automatically adjust the volume and the original music data is not modified (like at normalization).") );
+ normalMiddleBox->addWidget( cReplayGain, 0, TQt::AlignVCenter );
+ connect( cReplayGain, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(somethingChanged())
);
normalMiddleBox->addStretch();
- QHBoxLayout *normalBottomBox = new QHBoxLayout( );
+ TQHBoxLayout *normalBottomBox = new TQHBoxLayout( );
normalGrid->addLayout( normalBottomBox, 2, 0 );
outputDirectory = new OutputDirectory( config, normalOptions, "outputDirectory" );
- normalBottomBox->addWidget( outputDirectory, 0, Qt::AlignVCenter );
- connect( outputDirectory, SIGNAL(modeChanged(OutputDirectory::Mode)),
- this, SLOT(somethingChanged())
+ normalBottomBox->addWidget( outputDirectory, 0, TQt::AlignVCenter );
+ connect( outputDirectory, TQT_SIGNAL(modeChanged(OutputDirectory::Mode)),
+ this, TQT_SLOT(somethingChanged())
);
- connect( outputDirectory, SIGNAL(directoryChanged(const QString&)),
- this, SLOT(somethingChanged())
+ connect( outputDirectory, TQT_SIGNAL(directoryChanged(const TQString&)),
+ this, TQT_SLOT(somethingChanged())
);
normalBottomBox->addSpacing( 18 );
pProfileSave = new KToolBarButton( "filesave", 1003, normalOptions, "pProfileSave" );
- QToolTip::add( pProfileSave, i18n("Save current options as a profile") );
- normalBottomBox->addWidget( pProfileSave, 0, Qt::AlignVCenter );
- connect( pProfileSave, SIGNAL(clicked()),
- this, SLOT(saveProfile())
+ TQToolTip::add( pProfileSave, i18n("Save current options as a profile") );
+ normalBottomBox->addWidget( pProfileSave, 0, TQt::AlignVCenter );
+ connect( pProfileSave, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(saveProfile())
);
// advanced options
- advancedOptions = new QWidget( this, "advancedOptions" );
+ advancedOptions = new TQWidget( this, "advancedOptions" );
advancedOptions->hide();
gridLayout->addWidget( advancedOptions, 0, 0 );
- QGridLayout *advancedGrid = new QGridLayout( advancedOptions, 2, 1, 6, 3 );
+ TQGridLayout *advancedGrid = new TQGridLayout( advancedOptions, 2, 1, 6, 3 );
- QHBoxLayout *advancedTopBox = new QHBoxLayout();
+ TQHBoxLayout *advancedTopBox = new TQHBoxLayout();
advancedGrid->addLayout( advancedTopBox, 0, 0 );
- QLabel* lUserOptionsLabel = new QLabel( i18n("Command")+":", advancedOptions, "lUserOptionsLabel" );
- advancedTopBox->addWidget( lUserOptionsLabel, 0, Qt::AlignVCenter );
+ TQLabel* lUserOptionsLabel = new TQLabel( i18n("Command")+":", advancedOptions, "lUserOptionsLabel" );
+ advancedTopBox->addWidget( lUserOptionsLabel, 0, TQt::AlignVCenter );
lUserOptions = new KLineEdit( advancedOptions, "lUserOptions" );
- advancedTopBox->addWidget( lUserOptions, 0, Qt::AlignVCenter );
- connect( lUserOptions, SIGNAL(textChanged(const QString&)),
- this, SLOT(somethingChanged())
+ advancedTopBox->addWidget( lUserOptions, 0, TQt::AlignVCenter );
+ connect( lUserOptions, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(somethingChanged())
);
- QHBoxLayout *advancedMiddleBox = new QHBoxLayout();
+ TQHBoxLayout *advancedMiddleBox = new TQHBoxLayout();
advancedGrid->addLayout( advancedMiddleBox, 1, 0 );
- QLabel* lInfoParams = new QLabel( i18n("%p: The parameters generated by soundKonverter"), advancedOptions, "lInfoParams" );
- advancedMiddleBox->addWidget( lInfoParams, 0, Qt::AlignVCenter );
+ TQLabel* lInfoParams = new TQLabel( i18n("%p: The parameters generated by soundKonverter"), advancedOptions, "lInfoParams" );
+ advancedMiddleBox->addWidget( lInfoParams, 0, TQt::AlignVCenter );
- QHBoxLayout *advancedBottomBox = new QHBoxLayout();
+ TQHBoxLayout *advancedBottomBox = new TQHBoxLayout();
advancedGrid->addLayout( advancedBottomBox, 2, 0 );
- QLabel* lInfoFiles = new QLabel( i18n("%i: The input file ; %o: The output file"), advancedOptions, "lInfoFiles" );
- advancedBottomBox->addWidget( lInfoFiles, 0, Qt::AlignVCenter );
+ TQLabel* lInfoFiles = new TQLabel( i18n("%i: The input file ; %o: The output file"), advancedOptions, "lInfoFiles" );
+ advancedBottomBox->addWidget( lInfoFiles, 0, TQt::AlignVCenter );
refill();
}
@@ -320,7 +320,7 @@ void OptionsDetailed::setCurrentOptions( const ConversionOptions& options )
if( options.encodingOptions.samplingRate.bEnabled == true ) {
cSamplingrateSwitch->setChecked( true );
- cSamplingrate->setCurrentText( QString::number(options.encodingOptions.samplingRate.iSamplingRate) );
+ cSamplingrate->setCurrentText( TQString::number(options.encodingOptions.samplingRate.iSamplingRate) );
}
else {
cSamplingrateSwitch->setChecked( false );
@@ -350,9 +350,9 @@ void OptionsDetailed::setCurrentOptions( const ConversionOptions& options )
void OptionsDetailed::saveProfile()
{
bool ok;
- QString name = KInputDialog::getText( i18n("New profile"), i18n("Enter a name for the new profile:"), "", &ok );
+ TQString name = KInputDialog::getText( i18n("New profile"), i18n("Enter a name for the new profile:"), "", &ok );
if( ok ) {
- QStringList profiles;
+ TQStringList profiles;
profiles += i18n("Very low");
profiles += i18n("Low");
profiles += i18n("Medium");
@@ -363,14 +363,14 @@ void OptionsDetailed::saveProfile()
profiles += i18n("Last used");
profiles += "Last used";
profiles += i18n("User defined");
- if( profiles.findIndex(name) != -1 ) {
+ if( profiles.tqfindIndex(name) != -1 ) {
KMessageBox::error( this,
i18n("You cannot overwrite the built-in profiles."),
i18n("Profile already exists") );
return;
}
profiles = config->getAllProfiles();
- if( profiles.findIndex(name) == -1 ) {
+ if( profiles.tqfindIndex(name) == -1 ) {
config->addProfile( name, getCurrentOptions() );
}
else {
@@ -385,29 +385,29 @@ void OptionsDetailed::saveProfile()
}
}
-int OptionsDetailed::formatIndex( const QString &string )
+int OptionsDetailed::formatIndex( const TQString &string )
{
- return sFormat.findIndex( string );
+ return sFormat.tqfindIndex( string );
}
-int OptionsDetailed::qualityModeIndex( const QString &string )
+int OptionsDetailed::qualityModeIndex( const TQString &string )
{
- return sQualityMode.findIndex( string );
+ return sQualityMode.tqfindIndex( string );
}
-int OptionsDetailed::bitrateModeIndex( const QString &string )
+int OptionsDetailed::bitrateModeIndex( const TQString &string )
{
- return sBitrateMode.findIndex( string );
+ return sBitrateMode.tqfindIndex( string );
}
-int OptionsDetailed::channelsIndex( const QString &string )
+int OptionsDetailed::channelsIndex( const TQString &string )
{
- return sChannels.findIndex( string );
+ return sChannels.tqfindIndex( string );
}
void OptionsDetailed::refill()
{
- QString format = cFormat->currentText();
+ TQString format = cFormat->currentText();
sFormat = config->allEncodableFormats();
sFormat.append( "wav" );
@@ -446,13 +446,13 @@ void OptionsDetailed::formatChanged()
}
lUserOptions->setEnabled( true );
- QString lastString = lUserOptions->text();
- QString bin = config->binaries[plugin->enc.bin];
+ TQString lastString = lUserOptions->text();
+ TQString bin = config->binaries[plugin->enc.bin];
if( lastString.left(bin.length()) != bin ) {
lUserOptions->setText( config->binaries[plugin->enc.bin] + " " + plugin->enc.in_out_files );
}
- QString lastQualityMode = cQualityMode->currentText();
+ TQString lastQualityMode = cQualityMode->currentText();
sQualityMode.clear();
if( formatItem->replaygain || ( plugin->enc.replaygain.enabled && formatItem->internalReplayGain ) ) {
@@ -492,7 +492,7 @@ void OptionsDetailed::formatChanged()
void OptionsDetailed::qualityModeChanged()
{
- QWhatsThis::remove( iQuality );
+ TQWhatsThis::remove( iQuality );
if( cFormat->currentText() == "wav" ) {
iQuality->setEnabled( false );
@@ -510,8 +510,8 @@ void OptionsDetailed::qualityModeChanged()
return;
}
- QString qualityModeString = cQualityMode->currentText();
- QString lastString;
+ TQString qualityModeString = cQualityMode->currentText();
+ TQString lastString;
int lastValue;
ConvertPlugin* plugin = config->encoderForFormat( cFormat->currentText() );
@@ -558,7 +558,7 @@ void OptionsDetailed::qualityModeChanged()
}
if( qualityModeString == i18n("Bitrate") ) {
- QToolTip::add( iQuality, i18n("Kilobit per second") );
+ TQToolTip::add( iQuality, i18n("Kilobit per second") );
iQuality->setEnabled( true );
iQuality->setMinValue( 32 );
iQuality->setMaxValue( 320 );
@@ -580,7 +580,7 @@ void OptionsDetailed::qualityModeChanged()
bitrateModeChanged();
}
else if( qualityModeString == i18n("Quality") ) {
-// QToolTip::add( iQuality, i18n("This is a relative quality between 0 and 100.\nThe higher this number the higher is the quality.\nsoundKonverter will convert it into the file format's quality format.\nSee the \"What's this?\" for more informations.") );
+// TQToolTip::add( iQuality, i18n("This is a relative quality between 0 and 100.\nThe higher this number the higher is the quality.\nsoundKonverter will convert it into the file format's quality format.\nSee the \"What's this?\" for more informations.") );
iQuality->setEnabled( true );
iQuality->setMinValue( 0 );
iQuality->setMaxValue( 100 );
@@ -596,9 +596,9 @@ void OptionsDetailed::qualityModeChanged()
bitrateModeChanged();
if( plugin->enc.lossy.quality.help ) {
- QString str = plugin->enc.lossy.quality.help;
- str.replace("\\n","<br>");
- QWhatsThis::add( iQuality, "<p>"+str+"</p>" );
+ TQString str = plugin->enc.lossy.quality.help;
+ str.tqreplace("\\n","<br>");
+ TQWhatsThis::add( iQuality, "<p>"+str+"</p>" );
}
}
else if( qualityModeString == i18n("Lossless") || qualityModeString == i18n("Undefined") ) {
@@ -616,7 +616,7 @@ void OptionsDetailed::qualityModeChanged()
cChannels->setEnabled( false );
}
else if( qualityModeString == i18n("Hybrid") ) {
- QToolTip::add( iQuality, i18n("Kilobit per second") );
+ TQToolTip::add( iQuality, i18n("Kilobit per second") );
iQuality->setEnabled( true );
iQuality->setMinValue( 32 );
iQuality->setMaxValue( 320 );
@@ -639,7 +639,7 @@ void OptionsDetailed::qualityModeChanged()
void OptionsDetailed::qualityChanged()
{
if( cQualityMode->currentText() == i18n("Quality") ) {
- QToolTip::remove( iQuality );
+ TQToolTip::remove( iQuality );
FormatItem* formatItem = config->getFormatItem( cFormat->currentText() );
if( formatItem == 0 ) {
@@ -654,7 +654,7 @@ void OptionsDetailed::qualityChanged()
return;
}
- QString quality;
+ TQString quality;
if( plugin->enc.lossy.quality.enabled ) {
quality = plugin->enc.lossy.quality.param;
int qualityLevel = iQuality->value();
@@ -662,33 +662,33 @@ void OptionsDetailed::qualityChanged()
if( plugin->enc.lossy.quality.step < 1 ) {
if( plugin->enc.lossy.quality.range_max >= plugin->enc.lossy.quality.range_min)
// t_float = ( (float)item->fileListItem->options.encodingOptions.iQuality * ( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100 ) + plugin->enc.lossy.quality.range_min;
- quality.replace( "%q", QString::number( ( (float)qualityLevel * ( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100 ) + plugin->enc.lossy.quality.range_min ) );
+ quality.tqreplace( "%q", TQString::number( ( (float)qualityLevel * ( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100 ) + plugin->enc.lossy.quality.range_min ) );
else
// t_float = ( (100.0f - (float)item->fileListItem->options.encodingOptions.iQuality) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max;
- quality.replace( "%q", QString::number( ( (100.0f - qualityLevel) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max ) );
+ quality.tqreplace( "%q", TQString::number( ( (100.0f - qualityLevel) * ( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100 ) + plugin->enc.lossy.quality.range_max ) );
}
else {
if( plugin->enc.lossy.quality.range_max >= plugin->enc.lossy.quality.range_min)
// t_int = ( item->fileListItem->options.encodingOptions.iQuality * (int)( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100) + (int)plugin->enc.lossy.quality.range_min;
- quality.replace( "%q", QString::number( (qualityLevel * (int)( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100) + (int)plugin->enc.lossy.quality.range_min ) );
+ quality.tqreplace( "%q", TQString::number( (qualityLevel * (int)( plugin->enc.lossy.quality.range_max - plugin->enc.lossy.quality.range_min ) / 100) + (int)plugin->enc.lossy.quality.range_min ) );
else
// t_int = ( (100 - item->fileListItem->options.encodingOptions.iQuality) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max;
- quality.replace( "%q", QString::number( ( (100 - qualityLevel) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max ) );
+ quality.tqreplace( "%q", TQString::number( ( (100 - qualityLevel) * (int)( plugin->enc.lossy.quality.range_min - plugin->enc.lossy.quality.range_max ) / 100) + (int)plugin->enc.lossy.quality.range_max ) );
}
- if( plugin->enc.bin == "oggenc" ) quality.replace(QChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
+ if( plugin->enc.bin == "oggenc" ) quality.tqreplace(TQChar('.'),KGlobal::locale()->decimalSymbol()); // HACK make oggenc usable with all langauges
else if( plugin->enc.lossy.quality.separator != '.' ) {
- quality.replace( QChar('.'), plugin->enc.lossy.quality.separator );
+ quality.tqreplace( TQChar('.'), plugin->enc.lossy.quality.separator );
}
}
else {
- QStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( rint(qualityLevel*plugin->enc.lossy.quality.range_max/100) );
- quality.replace( "%q", *it );
+ TQStringList::Iterator it = plugin->enc.lossy.quality.profiles.at( rint(qualityLevel*plugin->enc.lossy.quality.range_max/100) );
+ quality.tqreplace( "%q", *it );
}
}
- QToolTip::add( iQuality, i18n("This is a relative quality between 0 and 100.\nThe higher this number the higher is the quality.\nsoundKonverter will convert it into the file format's quality format.\nSee the \"What's this?\" for more informations.\n\nCurrent parameter: \"%1\"").arg(quality) );
-// QToolTip toolTip( iQuality );
-// toolTip.tip( i18n("Current parameter: \"%1\"").arg(quality) );
+ TQToolTip::add( iQuality, i18n("This is a relative quality between 0 and 100.\nThe higher this number the higher is the quality.\nsoundKonverter will convert it into the file format's quality format.\nSee the \"What's this?\" for more informations.\n\nCurrent parameter: \"%1\"").tqarg(quality) );
+// TQToolTip toolTip( iQuality );
+// toolTip.tip( i18n("Current parameter: \"%1\"").tqarg(quality) );
}
}
@@ -754,12 +754,12 @@ void OptionsDetailed::somethingChanged()
// access the options data - BEGIN
////////////////////////////////////////////////////////////
-QString OptionsDetailed::getFormat()
+TQString OptionsDetailed::getFormat()
{
return cFormat->currentText();
}
-// QString OptionsDetailed::getQualityMode()
+// TQString OptionsDetailed::getQualityMode()
// {
// return cQualityMode->currentText();
// }
@@ -769,20 +769,20 @@ OutputDirectory::Mode OptionsDetailed::getOutputDirectoryMode()
return outputDirectory->mode();
}
-QString OptionsDetailed::getOutputDirectoryPath()
+TQString OptionsDetailed::getOutputDirectoryPath()
{
return outputDirectory->directory();
}
-void OptionsDetailed::setFormat( const QString &format )
+void OptionsDetailed::setFormat( const TQString &format )
{
cFormat->setCurrentItem( formatIndex(format) );
formatChanged();
}
-void OptionsDetailed::setQualityMode( const QString &qualityMode )
+void OptionsDetailed::setQualityMode( const TQString &qualityMode )
{
cQualityMode->setCurrentItem( qualityModeIndex(qualityMode) );
qualityModeChanged();
@@ -793,7 +793,7 @@ void OptionsDetailed::setQuality( int quality )
iQuality->setValue( quality );
}
-void OptionsDetailed::setBitrateMode( const QString &bitrateMode )
+void OptionsDetailed::setBitrateMode( const TQString &bitrateMode )
{
cBitrateMode->setCurrentItem( bitrateModeIndex(bitrateMode) );
bitrateModeChanged();
@@ -828,7 +828,7 @@ void OptionsDetailed::setSamplingrate( int samplingrate )
setSamplingrate( text );
}
-void OptionsDetailed::setSamplingrate( const QString &samplingrate )
+void OptionsDetailed::setSamplingrate( const TQString &samplingrate )
{
cSamplingrate->setCurrentText( samplingrate );
}
@@ -838,7 +838,7 @@ void OptionsDetailed::setChannelsEnabled( bool enabled )
cChannelsSwitch->setChecked( enabled );
}
-void OptionsDetailed::setChannels( const QString &channels )
+void OptionsDetailed::setChannels( const TQString &channels )
{
cChannels->setCurrentItem( channelsIndex(channels) );
}
@@ -853,12 +853,12 @@ void OptionsDetailed::setOutputDirectoryMode( OutputDirectory::Mode mode )
outputDirectory->setMode( mode );
}
-void OptionsDetailed::setOutputDirectoryPath( const QString &path )
+void OptionsDetailed::setOutputDirectoryPath( const TQString &path )
{
outputDirectory->setDirectory( path );
}
-void OptionsDetailed::setUserOptions( const QString &options )
+void OptionsDetailed::setUserOptions( const TQString &options )
{
lUserOptions->setText( options );
}
@@ -888,7 +888,7 @@ bool OptionsDetailed::getChannelsEnabled()
return cChannelsSwitch->isChecked();
}
-QString OptionsDetailed::getChannels()
+TQString OptionsDetailed::getChannels()
{
return cChannels->currentText();
}
diff --git a/src/optionsdetailed.h b/src/optionsdetailed.h
index e743907..5ab6b2e 100755
--- a/src/optionsdetailed.h
+++ b/src/optionsdetailed.h
@@ -6,15 +6,15 @@
#include "outputdirectory.h"
#include "conversionoptions.h"
-#include <qwidget.h>
+#include <tqwidget.h>
class Config;
//class OutputDirectory;
class ConversionOptions;
-class QLabel;
+class TQLabel;
class KIntSpinBox;
-class QCheckBox;
+class TQCheckBox;
class KComboBox;
class KLineEdit;
class KToolBarButton;
@@ -24,14 +24,15 @@ class KToolBarButton;
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class OptionsDetailed : public QWidget
+class OptionsDetailed : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- OptionsDetailed( Config*, QWidget* parent=0, const char* name=0 );
+ OptionsDetailed( Config*, TQWidget* tqparent=0, const char* name=0 );
/**
* Destructor
@@ -59,49 +60,49 @@ private:
KIntSpinBox* iQuality;
KComboBox* cBitrateMode;
- QCheckBox* cBitrateRangeSwitch;
+ TQCheckBox* cBitrateRangeSwitch;
KIntSpinBox* iMinBitrate;
- QLabel* lBitrateRangeTo;
+ TQLabel* lBitrateRangeTo;
KIntSpinBox* iMaxBitrate;
- QLabel* lBitrateRangeUnit;
+ TQLabel* lBitrateRangeUnit;
- QCheckBox* cSamplingrateSwitch;
+ TQCheckBox* cSamplingrateSwitch;
KComboBox* cSamplingrate;
- QLabel* lSamplingrateUnit;
- QCheckBox* cChannelsSwitch;
+ TQLabel* lSamplingrateUnit;
+ TQCheckBox* cChannelsSwitch;
KComboBox* cChannels;
- QCheckBox* cReplayGain;
+ TQCheckBox* cReplayGain;
KToolBarButton* pProfileSave;
KLineEdit* lUserOptions;
- QWidget* normalOptions;
- QWidget* advancedOptions;
+ TQWidget* normalOptions;
+ TQWidget* advancedOptions;
OutputDirectory* outputDirectory;
Config* config;
-// QString getQualityMode();
+// TQString getQualityMode();
- QString lastQualityMode;
+ TQString lastQualityMode;
/** because we can't search within combo boxes, we need a seperate string lists, that we can search */
- QStringList sFormat;
- QStringList sQualityMode;
- QStringList sBitrateMode;
- QStringList sChannels;
- int formatIndex( const QString &string );
- int qualityModeIndex( const QString &string );
- int bitrateModeIndex( const QString &string );
- int channelsIndex( const QString &string );
+ TQStringList sFormat;
+ TQStringList sQualityMode;
+ TQStringList sBitrateMode;
+ TQStringList sChannels;
+ int formatIndex( const TQString &string );
+ int qualityModeIndex( const TQString &string );
+ int bitrateModeIndex( const TQString &string );
+ int channelsIndex( const TQString &string );
int getQuality();
bool getBitrateRangeEnabled();
bool getSamplingrateEnabled();
int getSamplingrate();
bool getChannelsEnabled();
- QString getChannels();
+ TQString getChannels();
private slots:
void formatChanged();
@@ -115,25 +116,25 @@ private slots:
void somethingChanged();
public:
- QString getFormat();
+ TQString getFormat();
OutputDirectory::Mode getOutputDirectoryMode();
- QString getOutputDirectoryPath();
- void setFormat( const QString &format );
- void setQualityMode( const QString &qualityMode );
+ TQString getOutputDirectoryPath();
+ void setFormat( const TQString &format );
+ void setQualityMode( const TQString &qualityMode );
void setQuality( int quality );
- void setBitrateMode( const QString &bitrateMode );
+ void setBitrateMode( const TQString &bitrateMode );
void setBitrateRangeEnabled( bool enabled );
void setMinBitrate( int bitrate );
void setMaxBitrate( int bitrate );
void setSamplingrateEnabled( bool enabled );
void setSamplingrate( int sampleRate );
- void setSamplingrate( const QString &sampleRate );
+ void setSamplingrate( const TQString &sampleRate );
void setChannelsEnabled( bool enabled );
- void setChannels( const QString &channels );
+ void setChannels( const TQString &channels );
void setReplayGainEnabled( bool enabled );
void setOutputDirectoryMode( OutputDirectory::Mode mode );
- void setOutputDirectoryPath( const QString &path );
- void setUserOptions( const QString &options );
+ void setOutputDirectoryPath( const TQString &path );
+ void setUserOptions( const TQString &options );
public slots:
void toggleAdvancedOptions();
diff --git a/src/optionseditor.cpp b/src/optionseditor.cpp
index efd9b1e..d3c0661 100755
--- a/src/optionseditor.cpp
+++ b/src/optionseditor.cpp
@@ -6,10 +6,10 @@
#include "conversionoptions.h"
#include "outputdirectory.h"
-#include <qlayout.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qdatetime.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -22,13 +22,13 @@
// TODO add warning, when editing tags and converting to an unsupported file format
-OptionsEditor::OptionsEditor( TagEngine* _tagEngine, Config* _config, FileList* _fileList, QWidget* parent, const char* name, Page startPage )
+OptionsEditor::OptionsEditor( TagEngine* _tagEngine, Config* _config, FileList* _fileList, TQWidget* tqparent, const char* name, Page startPage )
: KDialogBase(
IconList,
i18n("Options Editor"),
/*User2 | User1 |*/ Ok,
Ok, // default button
- parent,
+ tqparent,
name,
false, // modal
true/*, // separator
@@ -54,160 +54,160 @@ OptionsEditor::OptionsEditor( TagEngine* _tagEngine, Config* _config, FileList*
//// options page ////
conversionOptions = addPage( i18n("Conversion"), i18n("Conversion options"), iconLoader->loadIcon("soundkonverter",KIcon::Desktop) );
// the grid for all widgets in the main window
- QGridLayout* conversionOptionsGridLayout = new QGridLayout( conversionOptions, 1, 1, 0, 6, "conversionOptionsGridLayout" );
+ TQGridLayout* conversionOptionsGridLayout = new TQGridLayout( conversionOptions, 1, 1, 0, 6, "conversionOptionsGridLayout" );
// generate the options input area
options = new Options( config, i18n("Choose your prefered output options and click on \"Close\"!"), conversionOptions, "options" );
conversionOptionsGridLayout->addWidget( options, 0, 0 );
- connect( options, SIGNAL(optionsChanged()),
- this, SLOT(optionsChanged())
+ connect( options, TQT_SIGNAL(optionsChanged()),
+ this, TQT_SLOT(optionsChanged())
);
conversionOptionsGridLayout->setRowStretch( 1, 1 );
- lEditOptions = new QLabel( "", conversionOptions, "lEditOptions" );
+ lEditOptions = new TQLabel( "", conversionOptions, "lEditOptions" );
conversionOptionsGridLayout->addWidget( lEditOptions, 2, 0 );
- lEditOptions->setAlignment( Qt::AlignHCenter );
+ lEditOptions->tqsetAlignment( TQt::AlignHCenter );
lEditOptions->hide();
pEditOptions = new KPushButton( i18n("Edit conversion options"), conversionOptions, "pEditOptions" );
- pEditOptions->setFixedWidth( pEditOptions->sizeHint().width() );
- conversionOptionsGridLayout->addWidget( pEditOptions, 3, 0, Qt::AlignHCenter );
+ pEditOptions->setFixedWidth( pEditOptions->tqsizeHint().width() );
+ conversionOptionsGridLayout->addWidget( pEditOptions, 3, 0, TQt::AlignHCenter );
pEditOptions->hide();
- connect( pEditOptions, SIGNAL(clicked()),
- this, SLOT(editOptionsClicked())
+ connect( pEditOptions, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editOptionsClicked())
);
//// tags page ////
tags = addPage( i18n("Tags"), i18n("Tags"), iconLoader->loadIcon("view_text",KIcon::Desktop) );
// the grid for all widgets in the main window
- QGridLayout* tagsGridLayout = new QGridLayout( tags, 1, 1, 0, 6, "tagsGridLayout" );
+ TQGridLayout* tagsGridLayout = new TQGridLayout( tags, 1, 1, 0, 6, "tagsGridLayout" );
// add the inputs
- // add a horizontal box layout for the title and track number
- QHBoxLayout *titleBox = new QHBoxLayout( -1, "titleBox" );
+ // add a horizontal box tqlayout for the title and track number
+ TQHBoxLayout *titleBox = new TQHBoxLayout( -1, "titleBox" );
tagsGridLayout->addLayout( titleBox, 0, 1 );
// and fill it up
- lTitleLabel = new QLabel( i18n("Title:"), tags, "lTitleLabel" );
+ lTitleLabel = new TQLabel( i18n("Title:"), tags, "lTitleLabel" );
tagsGridLayout->addWidget( lTitleLabel, 0, 0 );
lTitle = new KLineEdit( tags, "lTitle" );
titleBox->addWidget( lTitle );
- connect( lTitle, SIGNAL(textChanged(const QString&)),
- this, SLOT(titleChanged(const QString&))
+ connect( lTitle, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(titleChanged(const TQString&))
);
pTitleEdit = new KPushButton( " ", tags, "pTitleEdit" );
pTitleEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTitleEdit->setFixedSize( lTitle->sizeHint().height(), lTitle->sizeHint().height() );
+ pTitleEdit->setFixedSize( lTitle->tqsizeHint().height(), lTitle->tqsizeHint().height() );
pTitleEdit->hide();
titleBox->addWidget( pTitleEdit );
- connect( pTitleEdit, SIGNAL(clicked()),
- this, SLOT(editTitleClicked())
+ connect( pTitleEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTitleClicked())
);
- lNumberLabel = new QLabel( i18n("Track No.:"), tags, "lNumberLabel" );
+ lNumberLabel = new TQLabel( i18n("Track No.:"), tags, "lNumberLabel" );
titleBox->addWidget( lNumberLabel );
iNumber = new KIntSpinBox( 0, 999, 1, 1, 10, tags, "iNumber" );
titleBox->addWidget( iNumber );
- connect( iNumber, SIGNAL(valueChanged(int)),
- this, SLOT(numberChanged(int))
+ connect( iNumber, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(numberChanged(int))
);
pNumberEdit = new KPushButton( " ", tags, "pNumberEdit" );
pNumberEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pNumberEdit->setFixedSize( iNumber->sizeHint().height(), iNumber->sizeHint().height() );
+ pNumberEdit->setFixedSize( iNumber->tqsizeHint().height(), iNumber->tqsizeHint().height() );
pNumberEdit->hide();
titleBox->addWidget( pNumberEdit );
- connect( pNumberEdit, SIGNAL(clicked()),
- this, SLOT(editNumberClicked())
+ connect( pNumberEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editNumberClicked())
);
- // add a horizontal box layout for the artist and the composer
- QHBoxLayout *artistBox = new QHBoxLayout( -1, "artistBox" );
+ // add a horizontal box tqlayout for the artist and the composer
+ TQHBoxLayout *artistBox = new TQHBoxLayout( -1, "artistBox" );
tagsGridLayout->addLayout( artistBox, 1, 1 );
// and fill it up
- lArtistLabel = new QLabel( i18n("Artist:"), tags, "lArtistLabel" );
+ lArtistLabel = new TQLabel( i18n("Artist:"), tags, "lArtistLabel" );
tagsGridLayout->addWidget( lArtistLabel, 1, 0 );
lArtist = new KLineEdit( tags, "lArtist" );
artistBox->addWidget( lArtist );
- connect( lArtist, SIGNAL(textChanged(const QString&)),
- this, SLOT(artistChanged(const QString&))
+ connect( lArtist, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(artistChanged(const TQString&))
);
pArtistEdit = new KPushButton( " ", tags, "pArtistEdit" );
pArtistEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pArtistEdit->setFixedSize( lArtist->sizeHint().height(), lArtist->sizeHint().height() );
+ pArtistEdit->setFixedSize( lArtist->tqsizeHint().height(), lArtist->tqsizeHint().height() );
pArtistEdit->hide();
artistBox->addWidget( pArtistEdit );
- connect( pArtistEdit, SIGNAL(clicked()),
- this, SLOT(editArtistClicked())
+ connect( pArtistEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editArtistClicked())
);
- lComposerLabel = new QLabel( i18n("Composer:"), tags, "lComposerLabel" );
+ lComposerLabel = new TQLabel( i18n("Composer:"), tags, "lComposerLabel" );
artistBox->addWidget( lComposerLabel );
lComposer = new KLineEdit( tags, "lComposer" );
artistBox->addWidget( lComposer );
- connect( lComposer, SIGNAL(textChanged(const QString&)),
- this, SLOT(composerChanged(const QString&))
+ connect( lComposer, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(composerChanged(const TQString&))
);
pComposerEdit = new KPushButton( " ", tags, "pComposerEdit" );
pComposerEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pComposerEdit->setFixedSize( lComposer->sizeHint().height(), lComposer->sizeHint().height() );
+ pComposerEdit->setFixedSize( lComposer->tqsizeHint().height(), lComposer->tqsizeHint().height() );
pComposerEdit->hide();
artistBox->addWidget( pComposerEdit );
- connect( pComposerEdit, SIGNAL(clicked()),
- this, SLOT(editComposerClicked())
+ connect( pComposerEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editComposerClicked())
);
- // add a horizontal box layout for the album
- QHBoxLayout *albumBox = new QHBoxLayout( -1, "albumBox" );
+ // add a horizontal box tqlayout for the album
+ TQHBoxLayout *albumBox = new TQHBoxLayout( -1, "albumBox" );
tagsGridLayout->addLayout( albumBox, 2, 1 );
// and fill it up
- lAlbumLabel = new QLabel( i18n("Album:"), tags, "lAlbumLabel" );
+ lAlbumLabel = new TQLabel( i18n("Album:"), tags, "lAlbumLabel" );
tagsGridLayout->addWidget( lAlbumLabel, 2, 0 );
lAlbum = new KLineEdit( tags, "lAlbum" );
albumBox->addWidget( lAlbum );
- connect( lAlbum, SIGNAL(textChanged(const QString&)),
- this, SLOT(albumChanged(const QString&))
+ connect( lAlbum, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(albumChanged(const TQString&))
);
pAlbumEdit = new KPushButton( " ", tags, "pAlbumEdit" );
pAlbumEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pAlbumEdit->setFixedSize( lAlbum->sizeHint().height(), lAlbum->sizeHint().height() );
+ pAlbumEdit->setFixedSize( lAlbum->tqsizeHint().height(), lAlbum->tqsizeHint().height() );
pAlbumEdit->hide();
albumBox->addWidget( pAlbumEdit );
- connect( pAlbumEdit, SIGNAL(clicked()),
- this, SLOT(editAlbumClicked())
+ connect( pAlbumEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editAlbumClicked())
);
- // add a horizontal box layout for the disc number, year and genre
- QHBoxLayout *albumdataBox = new QHBoxLayout( -1, "albumdataBox" );
+ // add a horizontal box tqlayout for the disc number, year and genre
+ TQHBoxLayout *albumdataBox = new TQHBoxLayout( -1, "albumdataBox" );
tagsGridLayout->addLayout( albumdataBox, 3, 1 );
// and fill it up
- lDiscLabel = new QLabel( i18n("Disc No.:"), tags, "lDiscLabel" );
+ lDiscLabel = new TQLabel( i18n("Disc No.:"), tags, "lDiscLabel" );
tagsGridLayout->addWidget( lDiscLabel, 3, 0 );
iDisc = new KIntSpinBox( 0, 99, 1, 1, 10, tags, "iDisc" );
albumdataBox->addWidget( iDisc );
- connect( iDisc, SIGNAL(valueChanged(int)),
- this, SLOT(discChanged(int))
+ connect( iDisc, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(discChanged(int))
);
pDiscEdit = new KPushButton( " ", tags, "pDiscEdit" );
pDiscEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pDiscEdit->setFixedSize( iDisc->sizeHint().height(), iDisc->sizeHint().height() );
+ pDiscEdit->setFixedSize( iDisc->tqsizeHint().height(), iDisc->tqsizeHint().height() );
pDiscEdit->hide();
albumdataBox->addWidget( pDiscEdit );
- connect( pDiscEdit, SIGNAL(clicked()),
- this, SLOT(editDiscClicked())
+ connect( pDiscEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editDiscClicked())
);
albumdataBox->addStretch();
- lYearLabel = new QLabel( i18n("Year:"), tags, "lYearLabel" );
+ lYearLabel = new TQLabel( i18n("Year:"), tags, "lYearLabel" );
albumdataBox->addWidget( lYearLabel );
- iYear = new KIntSpinBox( 0, 99999, 1, QDate::currentDate().year(), 10, tags, "iYear" );
+ iYear = new KIntSpinBox( 0, 99999, 1, TQDate::tqcurrentDate().year(), 10, tags, "iYear" );
albumdataBox->addWidget( iYear );
- connect( iYear, SIGNAL(valueChanged(int)),
- this, SLOT(yearChanged(int))
+ connect( iYear, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(yearChanged(int))
);
pYearEdit = new KPushButton( " ", tags, "pYearEdit" );
pYearEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pYearEdit->setFixedSize( iYear->sizeHint().height(), iYear->sizeHint().height() );
+ pYearEdit->setFixedSize( iYear->tqsizeHint().height(), iYear->tqsizeHint().height() );
pYearEdit->hide();
albumdataBox->addWidget( pYearEdit );
- connect( pYearEdit, SIGNAL(clicked()),
- this, SLOT(editYearClicked())
+ connect( pYearEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editYearClicked())
);
albumdataBox->addStretch();
- lGenreLabel = new QLabel( i18n("Genre:"), tags, "lGenreLabel" );
+ lGenreLabel = new TQLabel( i18n("Genre:"), tags, "lGenreLabel" );
albumdataBox->addWidget( lGenreLabel );
cGenre = new KComboBox( true, tags, "cGenre" );
cGenre->insertStringList( tagEngine->genreList );
@@ -216,49 +216,49 @@ OptionsEditor::OptionsEditor( TagEngine* _tagEngine, Config* _config, FileList*
cGenreCompletion->insertItems( tagEngine->genreList );
cGenreCompletion->setIgnoreCase( tags );
albumdataBox->addWidget( cGenre );
- connect( cGenre, SIGNAL(textChanged(const QString&)),
- this, SLOT(genreChanged(const QString&))
+ connect( cGenre, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(genreChanged(const TQString&))
);
pGenreEdit = new KPushButton( " ", tags, "pGenreEdit" );
pGenreEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pGenreEdit->setFixedSize( cGenre->sizeHint().height(), cGenre->sizeHint().height() );
+ pGenreEdit->setFixedSize( cGenre->tqsizeHint().height(), cGenre->tqsizeHint().height() );
pGenreEdit->hide();
albumdataBox->addWidget( pGenreEdit );
- connect( pGenreEdit, SIGNAL(clicked()),
- this, SLOT(editGenreClicked())
+ connect( pGenreEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editGenreClicked())
);
- // add a horizontal box layout for the comment
- QHBoxLayout *commentBox = new QHBoxLayout( -1, "commentBox" );
+ // add a horizontal box tqlayout for the comment
+ TQHBoxLayout *commentBox = new TQHBoxLayout( -1, "commentBox" );
tagsGridLayout->addLayout( commentBox, 4, 1 );
// and fill it up
- lCommentLabel = new QLabel( i18n("Comment:"), tags, "lCommentLabel" );
+ lCommentLabel = new TQLabel( i18n("Comment:"), tags, "lCommentLabel" );
tagsGridLayout->addWidget( lCommentLabel, 4, 0 );
tComment = new KTextEdit( tags, "tComment" );
commentBox->addWidget( tComment );
- connect( tComment, SIGNAL(textChanged()),
- this, SLOT(commentChanged())
+ connect( tComment, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(commentChanged())
);
pCommentEdit = new KPushButton( " ", tags, "pCommentEdit" );
pCommentEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pCommentEdit->setFixedSize( lTitle->sizeHint().height(), lTitle->sizeHint().height() );
+ pCommentEdit->setFixedSize( lTitle->tqsizeHint().height(), lTitle->tqsizeHint().height() );
pCommentEdit->hide();
commentBox->addWidget( pCommentEdit );
- connect( pCommentEdit, SIGNAL(clicked()),
- this, SLOT(editCommentClicked())
+ connect( pCommentEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editCommentClicked())
);
tagsGridLayout->setRowStretch( 4, 1 );
- lEditTags = new QLabel( "", tags, "lEditTags" );
+ lEditTags = new TQLabel( "", tags, "lEditTags" );
tagsGridLayout->addWidget( lEditTags, 5, 1 );
- lEditTags->setAlignment( Qt::AlignHCenter );
+ lEditTags->tqsetAlignment( TQt::AlignHCenter );
lEditTags->hide();
pEditTags = new KPushButton( i18n("Edit tags"), tags, "pEditTags" );
- pEditTags->setFixedWidth( pEditTags->sizeHint().width() );
- tagsGridLayout->addWidget( pEditTags, 6, 1, Qt::AlignHCenter );
+ pEditTags->setFixedWidth( pEditTags->tqsizeHint().width() );
+ tagsGridLayout->addWidget( pEditTags, 6, 1, TQt::AlignHCenter );
pEditTags->hide();
- connect( pEditTags, SIGNAL(clicked()),
- this, SLOT(editTagsClicked())
+ connect( pEditTags, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTagsClicked())
);
// delete the icon loader object
@@ -317,9 +317,9 @@ void OptionsEditor::setTagInputEnabled( bool enabled )
}
}
-void OptionsEditor::itemsSelected( QValueList<FileListItem*> items )
+void OptionsEditor::itemsSelected( TQValueList<FileListItem*> items )
{
- for( QValueList<FileListItem*>::Iterator it = items.begin(); it != items.end(); ) {
+ for( TQValueList<FileListItem*>::Iterator it = items.begin(); it != items.end(); ) {
if( (*it)->converting || (*it) == 0 ) it = items.remove( it );
else it++;
}
@@ -345,13 +345,13 @@ void OptionsEditor::itemsSelected( QValueList<FileListItem*> items )
pEditTags->hide();
if( items.count() == 1 ) {
- setCaption( KURL::decode_string(items.first()->fileName).replace("%2f","/").replace("%%","%") );
+ setCaption( KURL::decode_string(items.first()->fileName).tqreplace("%2f","/").tqreplace("%%","%") );
// HACK ...but seems to work...
// FIXME directory does get set properly
- disconnect( options, SIGNAL(optionsChanged()), 0, 0 );
+ disconnect( options, TQT_SIGNAL(optionsChanged()), 0, 0 );
options->setCurrentOptions( items.first()->options );
- connect( options, SIGNAL(optionsChanged()),
- this, SLOT(optionsChanged())
+ connect( options, TQT_SIGNAL(optionsChanged()),
+ this, TQT_SLOT(optionsChanged())
);
if( items.first()->tags == 0 && !items.first()->local ) {
setTagInputEnabled( false );
@@ -384,18 +384,18 @@ void OptionsEditor::itemsSelected( QValueList<FileListItem*> items )
}
}
else {
- setCaption( i18n("%1 Files").arg(items.count()) );
- QValueList<FileListItem*>::Iterator it = items.begin();
+ setCaption( i18n("%1 Files").tqarg(items.count()) );
+ TQValueList<FileListItem*>::Iterator it = items.begin();
ConversionOptions cOptions = (*it)->options;
- QString title = ( (*it)->tags == 0 ) ? "" : (*it)->tags->title;
+ TQString title = ( (*it)->tags == 0 ) ? "" : (*it)->tags->title;
int number = ( (*it)->tags == 0 ) ? 0 : (*it)->tags->track;
- QString artist = ( (*it)->tags == 0 ) ? "" : (*it)->tags->artist;
- QString composer = ( (*it)->tags == 0 ) ? "" : (*it)->tags->composer;
- QString album = ( (*it)->tags == 0 ) ? "" : (*it)->tags->album;
+ TQString artist = ( (*it)->tags == 0 ) ? "" : (*it)->tags->artist;
+ TQString composer = ( (*it)->tags == 0 ) ? "" : (*it)->tags->composer;
+ TQString album = ( (*it)->tags == 0 ) ? "" : (*it)->tags->album;
int disc = ( (*it)->tags == 0 ) ? 0 : (*it)->tags->disc;
int year = ( (*it)->tags == 0 ) ? 0 : (*it)->tags->year;
- QString genre = ( (*it)->tags == 0 ) ? "" : (*it)->tags->genre;
- QString comment = ( (*it)->tags == 0 ) ? "" : (*it)->tags->comment;
+ TQString genre = ( (*it)->tags == 0 ) ? "" : (*it)->tags->genre;
+ TQString comment = ( (*it)->tags == 0 ) ? "" : (*it)->tags->comment;
while( it != items.end() ) {
if( !cOptions.nearlyEqual((*it)->options) ) {
options->setEnabled( false );
@@ -446,7 +446,7 @@ void OptionsEditor::itemsSelected( QValueList<FileListItem*> items )
}
if( year != (*it)->tags->year && iYear->isEnabled() ) {
iYear->setEnabled( false );
- iYear->setValue( QDate::currentDate().year() );
+ iYear->setValue( TQDate::tqcurrentDate().year() );
pYearEdit->show();
}
if( genre != (*it)->tags->genre && cGenre->isEnabled() ) {
@@ -465,10 +465,10 @@ void OptionsEditor::itemsSelected( QValueList<FileListItem*> items )
if( options->isEnabled() ) {
// HACK ...but seems to work...
// FIXME directory does get set properly
- disconnect( options, SIGNAL(optionsChanged()), 0, 0 );
+ disconnect( options, TQT_SIGNAL(optionsChanged()), 0, 0 );
options->setCurrentOptions( items.first()->options );
- connect( options, SIGNAL(optionsChanged()),
- this, SLOT(optionsChanged())
+ connect( options, TQT_SIGNAL(optionsChanged()),
+ this, TQT_SLOT(optionsChanged())
);
}
if( lTitle->isEnabled() ) {
@@ -516,10 +516,10 @@ void OptionsEditor::optionsChanged()
{
if( !options->isEnabled() ) return;
- QString filePathName;
-// QString outputFilePathName;
+ TQString filePathName;
+// TQString outputFilePathName;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
filePathName = (*it)->options.filePathName;
// outputFilePathName = (*it)->options.outputFilePathName;
(*it)->options = options->getCurrentOptions();
@@ -531,11 +531,11 @@ void OptionsEditor::optionsChanged()
}
}
-void OptionsEditor::titleChanged( const QString& text )
+void OptionsEditor::titleChanged( const TQString& text )
{
if( !lTitle->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->title = text;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
@@ -546,40 +546,40 @@ void OptionsEditor::numberChanged( int value )
{
if( !iNumber->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->track = value;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
}
}
-void OptionsEditor::artistChanged( const QString& text )
+void OptionsEditor::artistChanged( const TQString& text )
{
if( !lArtist->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->artist = text;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
}
}
-void OptionsEditor::composerChanged( const QString& text )
+void OptionsEditor::composerChanged( const TQString& text )
{
if( !lComposer->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->composer = text;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
}
}
-void OptionsEditor::albumChanged( const QString& text )
+void OptionsEditor::albumChanged( const TQString& text )
{
if( !lAlbum->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->album = text;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
@@ -590,7 +590,7 @@ void OptionsEditor::discChanged( int value )
{
if( !iDisc->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->disc = value;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
@@ -601,18 +601,18 @@ void OptionsEditor::yearChanged( int value )
{
if( !iYear->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->year = value;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
}
}
-void OptionsEditor::genreChanged( const QString& text )
+void OptionsEditor::genreChanged( const TQString& text )
{
if( !cGenre->isEnabled() ) return;
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->genre = text;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
@@ -623,9 +623,9 @@ void OptionsEditor::commentChanged()
{
if( !tComment->isEnabled() ) return;
- QString text = tComment->text();
+ TQString text = tComment->text();
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags->comment = text;
//(*it)->updateOutputCell();
fileList->updateItem( *it );
@@ -720,7 +720,7 @@ void OptionsEditor::editOptionsClicked()
void OptionsEditor::editTagsClicked()
{
- for( QValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<FileListItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->tags = new TagData();
}
diff --git a/src/optionseditor.h b/src/optionseditor.h
index d509774..87b5d50 100755
--- a/src/optionseditor.h
+++ b/src/optionseditor.h
@@ -17,7 +17,7 @@ class KComboBox;
class KIntSpinBox;
class KTextEdit;
class KPushButton;
-class QLabel;
+class TQLabel;
/**
* @short The options edit dialog that can be opened through the file list's context menu
@@ -27,6 +27,7 @@ class QLabel;
class OptionsEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Page {
OptionsPage,
@@ -36,7 +37,7 @@ public:
/**
* Constructor
*/
- OptionsEditor( TagEngine*, Config*, FileList* _fileList, QWidget* parent = 0, const char* name=0, Page startPage = OptionsPage );
+ OptionsEditor( TagEngine*, Config*, FileList* _fileList, TQWidget* tqparent = 0, const char* name=0, Page startPage = OptionsPage );
/**
* Destructor
@@ -50,59 +51,59 @@ private:
Config* config;
TagEngine* tagEngine;
- QFrame* conversionOptions;
- QFrame* tags;
+ TQFrame* conversionOptions;
+ TQFrame* tags;
/** The widget, where we can set our output options */
Options* options;
/** A lineedit for entering the title of track */
- QLabel* lTitleLabel;
+ TQLabel* lTitleLabel;
KLineEdit* lTitle;
KPushButton* pTitleEdit;
/** A spinbox for entering or selecting the track number */
- QLabel* lNumberLabel;
+ TQLabel* lNumberLabel;
KIntSpinBox* iNumber;
KPushButton* pNumberEdit;
/** A lineedit for entering the artist of a track */
- QLabel* lArtistLabel;
+ TQLabel* lArtistLabel;
KLineEdit* lArtist;
KPushButton* pArtistEdit;
/** A lineedit for entering the composer of a track */
- QLabel* lComposerLabel;
+ TQLabel* lComposerLabel;
KLineEdit* lComposer;
KPushButton* pComposerEdit;
/** A lineedit for entering the album name */
- QLabel* lAlbumLabel;
+ TQLabel* lAlbumLabel;
KLineEdit* lAlbum;
KPushButton* pAlbumEdit;
/** A spinbox for entering or selecting the disc number */
- QLabel* lDiscLabel;
+ TQLabel* lDiscLabel;
KIntSpinBox* iDisc;
KPushButton* pDiscEdit;
/** A spinbox for entering or selecting the year of the album */
- QLabel* lYearLabel;
+ TQLabel* lYearLabel;
KIntSpinBox* iYear;
KPushButton* pYearEdit;
/** A combobox for entering or selecting the genre of the album */
- QLabel* lGenreLabel;
+ TQLabel* lGenreLabel;
KComboBox* cGenre;
KPushButton* pGenreEdit;
/** A textedit for entering a comment for a track */
- QLabel* lCommentLabel;
+ TQLabel* lCommentLabel;
KTextEdit* tComment;
KPushButton* pCommentEdit;
/** When hitting this button, the options lock (when multiple files are selected) will be deactivated */
- QLabel* lEditOptions;
+ TQLabel* lEditOptions;
KPushButton* pEditOptions;
/** When hitting this button, the tag lock (when reading tags failed) will be deactivated */
- QLabel* lEditTags;
+ TQLabel* lEditTags;
KPushButton* pEditTags;
//FileListItem* currentItem;
- QValueList<FileListItem*> selectedItems;
+ TQValueList<FileListItem*> selectedItems;
void setTagInputEnabled( bool enabled );
@@ -119,21 +120,21 @@ private slots:
void editGenreClicked();
void editCommentClicked();
- void titleChanged( const QString& text );
+ void titleChanged( const TQString& text );
void numberChanged( int value );
- void artistChanged( const QString& text );
- void composerChanged( const QString& text );
- void albumChanged( const QString& text );
+ void artistChanged( const TQString& text );
+ void composerChanged( const TQString& text );
+ void albumChanged( const TQString& text );
void discChanged( int value );
void yearChanged( int value );
- void genreChanged( const QString& text );
+ void genreChanged( const TQString& text );
void commentChanged();
void editOptionsClicked();
void editTagsClicked();
public slots:
- void itemsSelected( QValueList<FileListItem*> );
+ void itemsSelected( TQValueList<FileListItem*> );
void setPreviousEnabled( bool );
void setNextEnabled( bool );
//void moveWindow( int x, int y );
diff --git a/src/optionsrequester.cpp b/src/optionsrequester.cpp
index 3fc90b4..4592899 100755
--- a/src/optionsrequester.cpp
+++ b/src/optionsrequester.cpp
@@ -3,17 +3,17 @@
#include "options.h"
#include "config.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
#include <klocale.h>
#include <kpushbutton.h>
#include <kiconloader.h>
-OptionsRequester::OptionsRequester( Config* config, QStringList list, QWidget *parent, const char *name, bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+OptionsRequester::OptionsRequester( Config* config, TQStringList list, TQWidget *tqparent, const char *name, bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
setCaption( i18n("Choose output options") );
@@ -23,24 +23,24 @@ OptionsRequester::OptionsRequester( Config* config, QStringList list, QWidget *p
// create an icon loader object for loading icons
KIconLoader* iconLoader = new KIconLoader();
- QGridLayout *grid = new QGridLayout( this, 2, 1, 11, 6 );
+ TQGridLayout *grid = new TQGridLayout( this, 2, 1, 11, 6 );
options = new Options( config, i18n("Click on \"Ok\" to add the files to the list in the main window!"), this, "options" );
grid->addWidget( options, 0, 0 );
- QStringList::Iterator it = files.begin();
+ TQStringList::Iterator it = files.begin();
while( it != files.end() )
{
- QString sFormat = *it;
- int i = sFormat.findRev( '.' );
+ TQString sFormat = *it;
+ int i = sFormat.tqfindRev( '.' );
sFormat.remove( 0, i + 1 );
sFormat.lower();
if( sFormat == "wav" ) // FIXME use mime types
{
- QHBoxLayout *warningBox = new QHBoxLayout();
+ TQHBoxLayout *warningBox = new TQHBoxLayout();
grid->addLayout( warningBox, 1, 0 );
- QLabel* lWarning = new QLabel( i18n("Warning: If you select \"wav\" as output format, your wav files will not be added to the list."), this, "lWarning" );
+ TQLabel* lWarning = new TQLabel( i18n("Warning: If you select \"wav\" as output format, your wav files will not be added to the list."), this, "lWarning" );
warningBox->addWidget( lWarning );
row++;
break;
@@ -48,7 +48,7 @@ OptionsRequester::OptionsRequester( Config* config, QStringList list, QWidget *p
it++;
}
- QHBoxLayout* buttonBox = new QHBoxLayout();
+ TQHBoxLayout* buttonBox = new TQHBoxLayout();
grid->addLayout( buttonBox, row, 0 );
buttonBox->addStretch();
@@ -59,11 +59,11 @@ OptionsRequester::OptionsRequester( Config* config, QStringList list, QWidget *p
pOk = new KPushButton( iconLoader->loadIcon("apply",KIcon::Small), i18n("Ok"), this, "pOk" );
buttonBox->addWidget( pOk );
- connect( pCancel, SIGNAL(clicked()),
- this, SLOT(reject())
+ connect( pCancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject())
);
- connect( pOk, SIGNAL(clicked()),
- this, SLOT(okClicked())
+ connect( pOk, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(okClicked())
);
// delete the icon loader object
@@ -80,17 +80,17 @@ void OptionsRequester::okClicked()
accept();
}
-void OptionsRequester::setProfile( const QString& profile )
+void OptionsRequester::setProfile( const TQString& profile )
{
options->setProfile( profile );
}
-void OptionsRequester::setFormat( const QString& format )
+void OptionsRequester::setFormat( const TQString& format )
{
options->setFormat( format );
}
-void OptionsRequester::setOutputDirectory( const QString& directory )
+void OptionsRequester::setOutputDirectory( const TQString& directory )
{
options->setOutputDirectory( directory );
}
diff --git a/src/optionsrequester.h b/src/optionsrequester.h
index 594e955..60bd6f1 100755
--- a/src/optionsrequester.h
+++ b/src/optionsrequester.h
@@ -9,7 +9,7 @@
class Options;
class Config;
-class QStringList;
+class TQStringList;
class KPushButton;
/**
@@ -20,32 +20,33 @@ class KPushButton;
class OptionsRequester : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- OptionsRequester( Config*, QStringList list, QWidget *parent=0, const char *name=0, bool modal=true, WFlags f=0 );
+ OptionsRequester( Config*, TQStringList list, TQWidget *tqparent=0, const char *name=0, bool modal=true, WFlags f=0 );
/**
* Default Destructor
*/
virtual ~OptionsRequester();
- void setProfile( const QString& profile );
- void setFormat( const QString& format );
- void setOutputDirectory( const QString& directory );
+ void setProfile( const TQString& profile );
+ void setFormat( const TQString& format );
+ void setOutputDirectory( const TQString& directory );
private slots:
void okClicked();
signals:
void setCurrentOptions( const ConversionOptions& );
- void addFiles( QStringList );
+ void addFiles( TQStringList );
private:
KPushButton* pOk;
KPushButton* pCancel;
- QStringList files;
+ TQStringList files;
Options* options;
};
diff --git a/src/optionssimple.cpp b/src/optionssimple.cpp
index 47b431f..48bb131 100755
--- a/src/optionssimple.cpp
+++ b/src/optionssimple.cpp
@@ -4,10 +4,10 @@
#include "convertpluginloader.h"
#include "optionsdetailed.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kcombobox.h>
@@ -21,8 +21,8 @@
// FIXME when changing the output directory, check if the profile is a user defined and set it to 'User defined', if it is
// TODO hide lossless/hybrid/etc. when not available
-OptionsSimple::OptionsSimple( Config* _config, OptionsDetailed* _optionsDetailed, const QString &text, QWidget *parent, const char *name )
- : QWidget( parent, name )
+OptionsSimple::OptionsSimple( Config* _config, OptionsDetailed* _optionsDetailed, const TQString &text, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
config = _config;
optionsDetailed = _optionsDetailed;
@@ -30,13 +30,13 @@ OptionsSimple::OptionsSimple( Config* _config, OptionsDetailed* _optionsDetailed
// create an icon loader object for loading icons
KIconLoader* iconLoader = new KIconLoader();
- QGridLayout *grid = new QGridLayout( this, 3, 1, 6, 3 );
+ TQGridLayout *grid = new TQGridLayout( this, 3, 1, 6, 3 );
- QHBoxLayout *topBox = new QHBoxLayout( );
+ TQHBoxLayout *topBox = new TQHBoxLayout( );
grid->addLayout( topBox, 0, 0 );
- QLabel *lQuality = new QLabel( i18n("Quality")+":", this, "lQuality" );
- topBox->addWidget( lQuality, 0, Qt::AlignVCenter );
+ TQLabel *lQuality = new TQLabel( i18n("Quality")+":", this, "lQuality" );
+ topBox->addWidget( lQuality, 0, TQt::AlignVCenter );
cProfile = new KComboBox( this, "cProfile" );
sProfile += i18n("Very low");
sProfile += i18n("Low");
@@ -50,75 +50,75 @@ OptionsSimple::OptionsSimple( Config* _config, OptionsDetailed* _optionsDetailed
sProfile.remove( "Last used" );
sProfile += i18n("User defined");
cProfile->insertStringList( sProfile );
- topBox->addWidget( cProfile, 0, Qt::AlignVCenter );
- connect( cProfile, SIGNAL(activated(int)),
- this, SLOT(profileChanged())
+ topBox->addWidget( cProfile, 0, TQt::AlignVCenter );
+ connect( cProfile, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(profileChanged())
);
- connect( cProfile, SIGNAL(activated(int)),
- this, SLOT(somethingChanged())
+ connect( cProfile, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(somethingChanged())
);
topBox->addSpacing( 3 );
//pProfileRemove = new KToolBarButton( "editdelete", 1002, this, "pProfileRemove" );
pProfileRemove = new KPushButton( iconLoader->loadIcon("editdelete",KIcon::Small), i18n("Remove"), this, "pProfileRemove" );
pProfileRemove->hide();
- QToolTip::add( pProfileRemove, i18n("Remove the selected profile") );
- topBox->addWidget( pProfileRemove, 0, Qt::AlignVCenter );
- connect( pProfileRemove, SIGNAL(clicked()),
- this, SLOT(profileRemove())
+ TQToolTip::add( pProfileRemove, i18n("Remove the selected profile") );
+ topBox->addWidget( pProfileRemove, 0, TQt::AlignVCenter );
+ connect( pProfileRemove, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(profileRemove())
);
//pProfileInfo = new KToolBarButton( "messagebox_info", 1110, this, "pProfileInfo" );
pProfileInfo = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("Info"), this, "pProfileInfo" );
- QToolTip::add( pProfileInfo, i18n("Information about the selected profile") );
- topBox->addWidget( pProfileInfo, 0, Qt::AlignVCenter );
- connect( pProfileInfo, SIGNAL(clicked()),
- this, SLOT(profileInfo())
+ TQToolTip::add( pProfileInfo, i18n("Information about the selected profile") );
+ topBox->addWidget( pProfileInfo, 0, TQt::AlignVCenter );
+ connect( pProfileInfo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(profileInfo())
);
topBox->addSpacing( 18 );
- QLabel *lFormat = new QLabel( i18n("Output format")+":", this, "lFormat" );
- topBox->addWidget( lFormat, 0, Qt::AlignVCenter );
+ TQLabel *lFormat = new TQLabel( i18n("Output format")+":", this, "lFormat" );
+ topBox->addWidget( lFormat, 0, TQt::AlignVCenter );
cFormat = new KComboBox( this, "cFormat" );
- topBox->addWidget( cFormat, 0, Qt::AlignVCenter );
- connect( cFormat, SIGNAL(activated(int)),
- this, SLOT(formatChanged())
+ topBox->addWidget( cFormat, 0, TQt::AlignVCenter );
+ connect( cFormat, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(formatChanged())
);
- connect( cFormat, SIGNAL(activated(int)),
- this, SLOT(somethingChanged())
+ connect( cFormat, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(somethingChanged())
);
topBox->addSpacing( 3 );
//pFormatInfo = new KToolBarButton( "messagebox_info", 1111, this, "pFormatInfo" );
pFormatInfo = new KPushButton( iconLoader->loadIcon("messagebox_info",KIcon::Small), i18n("Info"), this, "pFormatInfo" );
- QToolTip::add( pFormatInfo, i18n("Information about the selected file format") );
- topBox->addWidget( pFormatInfo, 0, Qt::AlignVCenter );
- connect( pFormatInfo, SIGNAL(clicked()),
- this, SLOT(formatInfo())
+ TQToolTip::add( pFormatInfo, i18n("Information about the selected file format") );
+ topBox->addWidget( pFormatInfo, 0, TQt::AlignVCenter );
+ connect( pFormatInfo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(formatInfo())
);
topBox->addStretch( );
- QHBoxLayout *middleBox = new QHBoxLayout( );
+ TQHBoxLayout *middleBox = new TQHBoxLayout( );
grid->addLayout( middleBox, 1, 0 );
outputDirectory = new OutputDirectory( config, this, "outputDirectory" );
- middleBox->addWidget( outputDirectory, 0, Qt::AlignVCenter );
- connect( outputDirectory, SIGNAL(modeChanged(OutputDirectory::Mode)),
- this, SLOT(outputDirectoryModeChanged(OutputDirectory::Mode))
+ middleBox->addWidget( outputDirectory, 0, TQt::AlignVCenter );
+ connect( outputDirectory, TQT_SIGNAL(modeChanged(OutputDirectory::Mode)),
+ this, TQT_SLOT(outputDirectoryModeChanged(OutputDirectory::Mode))
);
- connect( outputDirectory, SIGNAL(directoryChanged(const QString&)),
- this, SLOT(outputDirectoryPathChanged(const QString&))
+ connect( outputDirectory, TQT_SIGNAL(directoryChanged(const TQString&)),
+ this, TQT_SLOT(outputDirectoryPathChanged(const TQString&))
);
- connect( outputDirectory, SIGNAL(modeChanged(OutputDirectory::Mode)),
- this, SLOT(somethingChanged())
+ connect( outputDirectory, TQT_SIGNAL(modeChanged(OutputDirectory::Mode)),
+ this, TQT_SLOT(somethingChanged())
);
- connect( outputDirectory, SIGNAL(directoryChanged(const QString&)),
- this, SLOT(somethingChanged())
+ connect( outputDirectory, TQT_SIGNAL(directoryChanged(const TQString&)),
+ this, TQT_SLOT(somethingChanged())
);
- QHBoxLayout *bottomBox = new QHBoxLayout( );
+ TQHBoxLayout *bottomBox = new TQHBoxLayout( );
grid->addLayout( bottomBox, 2, 0 );
- QLabel *lInfo = new QLabel( text, this, "lInfo" );
+ TQLabel *lInfo = new TQLabel( text, this, "lInfo" );
lInfo->setFixedHeight( cProfile->height() );
- bottomBox->addWidget( lInfo, 0, Qt::AlignVCenter | Qt::AlignLeft );
+ bottomBox->addWidget( lInfo, 0, TQt::AlignVCenter | TQt::AlignLeft );
// delete the icon loader object
delete iconLoader;
@@ -129,9 +129,9 @@ OptionsSimple::~OptionsSimple()
{
}
-int OptionsSimple::profileIndex( const QString &string )
+int OptionsSimple::profileIndex( const TQString &string )
{
- QString profile = string;
+ TQString profile = string;
if( profile == "Very low" ) profile = i18n("Very low");
else if( profile == "Low" ) profile = i18n("Low");
else if( profile == "Medium" ) profile = i18n("Medium");
@@ -140,17 +140,17 @@ int OptionsSimple::profileIndex( const QString &string )
else if( profile == "Lossless" ) profile = i18n("Lossless");
else if( profile == "Hybrid" ) profile = i18n("Hybrid");
else if( profile == "User defined" ) profile = i18n("User defined");
- return sProfile.findIndex( profile );
+ return sProfile.tqfindIndex( profile );
}
-int OptionsSimple::formatIndex( const QString &string )
+int OptionsSimple::formatIndex( const TQString &string )
{
- return sFormat.findIndex( string );
+ return sFormat.tqfindIndex( string );
}
void OptionsSimple::profileInfo()
{
- QString sProfileString = cProfile->currentText();
+ TQString sProfileString = cProfile->currentText();
if( sProfileString == i18n("Very low") ) {
KMessageBox::information( this,
@@ -202,7 +202,7 @@ void OptionsSimple::profileInfo()
void OptionsSimple::profileRemove()
{
int ret = KMessageBox::questionYesNo( this,
- i18n("Do you really want to remove the profile: %1").arg(cProfile->currentText()),
+ i18n("Do you really want to remove the profile: %1").tqarg(cProfile->currentText()),
i18n("Remove profile?") );
if( ret != KMessageBox::Yes ) return;
@@ -227,26 +227,26 @@ void OptionsSimple::profileRemove()
void OptionsSimple::formatInfo()
{
- QString format = cFormat->currentText();
+ TQString format = cFormat->currentText();
if( format == "wav" ) {
KMessageBox::information( this,
i18n("<p>Wave is a file format, that doesn't compress it's audio data.</p>\n<p>So the quality is very high, but the file size is enormous. It is widely spread and should work with every audio player.</p>\n<a href=\"http://en.wikipedia.org/wiki/Wav\">http://en.wikipedia.org/wiki/Wav</a>"),
i18n("File format")+": " + format,
- QString::null, KMessageBox::Notify | KMessageBox::AllowLink );
+ TQString(), KMessageBox::Notify | KMessageBox::AllowLink );
return;
}
else {
KMessageBox::information( this,
config->getFormatDescription(format),
i18n("File format")+": " + format,
- QString::null, KMessageBox::Notify | KMessageBox::AllowLink );
+ TQString(), KMessageBox::Notify | KMessageBox::AllowLink );
}
}
void OptionsSimple::profileChanged()
{
- QString last;
+ TQString last;
ConversionOptions options = config->getProfile( cProfile->currentText() );
if( !options.encodingOptions.sFormat.isEmpty() ) {
@@ -451,7 +451,7 @@ void OptionsSimple::formatChanged()
void OptionsSimple::outputDirectoryModeChanged( OutputDirectory::Mode mode )
{
optionsDetailed->setOutputDirectoryMode( mode );
- if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().findIndex(cProfile->currentText()) != -1 ) {
+ if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().tqfindIndex(cProfile->currentText()) != -1 ) {
ConversionOptions options = config->getProfile( cProfile->currentText() );
// if( options.encodingOptions.sFormat.isEmpty() ) return;
if( outputDirectory->mode() != options.outputOptions.mode || outputDirectory->directory() != options.outputOptions.directory ) {
@@ -462,10 +462,10 @@ void OptionsSimple::outputDirectoryModeChanged( OutputDirectory::Mode mode )
}
}
-void OptionsSimple::outputDirectoryPathChanged( const QString& path )
+void OptionsSimple::outputDirectoryPathChanged( const TQString& path )
{
optionsDetailed->setOutputDirectoryPath( path );
- if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().findIndex(cProfile->currentText()) != -1 ) {
+ if( cProfile->currentText() != i18n("User defined") && config->getAllProfiles().tqfindIndex(cProfile->currentText()) != -1 ) {
ConversionOptions options = config->getProfile( cProfile->currentText() );
// if( options.encodingOptions.sFormat.isEmpty() ) return;
if( outputDirectory->mode() != options.outputOptions.mode || outputDirectory->directory() != options.outputOptions.directory ) {
@@ -476,21 +476,21 @@ void OptionsSimple::outputDirectoryPathChanged( const QString& path )
}
}
-void OptionsSimple::setCurrentProfile( const QString& profile )
+void OptionsSimple::setCurrentProfile( const TQString& profile )
{
// TODO check profile (and don't change, if not available)
cProfile->setCurrentItem( profileIndex(profile) );
profileChanged();
}
-void OptionsSimple::setCurrentFormat( const QString& format )
+void OptionsSimple::setCurrentFormat( const TQString& format )
{
cFormat->setCurrentItem( formatIndex(format) );
formatChanged();
}
// TODO check for errors
-void OptionsSimple::setCurrentOutputDirectory( const QString& directory )
+void OptionsSimple::setCurrentOutputDirectory( const TQString& directory )
{
outputDirectory->setMode( OutputDirectory::Specify );
outputDirectory->setDirectory( directory );
diff --git a/src/optionssimple.h b/src/optionssimple.h
index bb88d22..ff9f41b 100755
--- a/src/optionssimple.h
+++ b/src/optionssimple.h
@@ -6,7 +6,7 @@
#include "outputdirectory.h"
#include "conversionoptions.h"
-#include <qwidget.h>
+#include <tqwidget.h>
class Config;
class ConversionOptions;
@@ -21,14 +21,15 @@ class KPushButton;
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class OptionsSimple : public QWidget
+class OptionsSimple : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- OptionsSimple( Config*, OptionsDetailed*, const QString &text, QWidget* parent=0, const char* name=0 );
+ OptionsSimple( Config*, OptionsDetailed*, const TQString &text, TQWidget* tqparent=0, const char* name=0 );
/**
* Detructor
@@ -45,9 +46,9 @@ public:
*/
void refill(); // TODO syncronize with optionsDetailed
- void setCurrentProfile( const QString& profile );
- void setCurrentFormat( const QString& format );
- void setCurrentOutputDirectory( const QString& directory );
+ void setCurrentProfile( const TQString& profile );
+ void setCurrentFormat( const TQString& format );
+ void setCurrentOutputDirectory( const TQString& directory );
private:
KComboBox* cProfile;
@@ -61,15 +62,15 @@ private:
Config* config;
OptionsDetailed* optionsDetailed;
- QStringList sProfile;
- QStringList sFormat;
+ TQStringList sProfile;
+ TQStringList sFormat;
- int profileIndex( const QString& string );
- int formatIndex( const QString& string );
+ int profileIndex( const TQString& string );
+ int formatIndex( const TQString& string );
//public slots:
-// void setProfile( const QString &profile );
-// void setFormat( const QString &format );
+// void setProfile( const TQString &profile );
+// void setFormat( const TQString &format );
private slots:
void profileInfo();
@@ -78,28 +79,28 @@ private slots:
void profileChanged();
void formatChanged();
void outputDirectoryModeChanged( OutputDirectory::Mode );
- void outputDirectoryPathChanged( const QString& );
+ void outputDirectoryPathChanged( const TQString& );
void somethingChanged();
signals:
-// void setFormat( const QString& format );
-// void setQualityMode( const QString& qualityMode );
+// void setFormat( const TQString& format );
+// void setQualityMode( const TQString& qualityMode );
// void setQuality( int quality );
-// void setBitrateMode( const QString& bitrateMode );
+// void setBitrateMode( const TQString& bitrateMode );
// void setBitrateRangeEnabled( bool enabled );
// void setMinBitrate( int bitrate );
// void setMaxBitrate( int bitrate );
// void setSamplingrateEnabled( bool enabled );
// void setSamplingrate( int sampleRate );
-// void setSamplingrate( const QString& sampleRate );
+// void setSamplingrate( const TQString& sampleRate );
// void setChannelsEnabled( bool enabled );
-// void setChannels( const QString& channels );
+// void setChannels( const TQString& channels );
// void setReplayGainEnabled( bool enabled );
// void setOutputDirectoryMode( OutputDirectory::Mode );
-// void setOutputDirectoryPath( const QString& directory );
+// void setOutputDirectoryPath( const TQString& directory );
// void setOptions( const ConversionOptions& options );
-// void setUserOptions( const QString& options );
+// void setUserOptions( const TQString& options );
void optionsChanged();
};
diff --git a/src/outputdirectory.cpp b/src/outputdirectory.cpp
index 88a5466..161c1a5 100755
--- a/src/outputdirectory.cpp
+++ b/src/outputdirectory.cpp
@@ -5,14 +5,14 @@
#include "tagengine.h"
#include "config.h"
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -25,20 +25,20 @@
#include <kmountpoint.h>
-OutputDirectory::OutputDirectory( Config* _config, QWidget* parent, const char* name )
- : QWidget( parent, name )
+OutputDirectory::OutputDirectory( Config* _config, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
config = _config;
// create an icon loader object for loading icons
KIconLoader *iconLoader = new KIconLoader();
- QGridLayout *grid = new QGridLayout( this, 1, 1, 0, 3, "grid" );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1, 0, 3, "grid" );
- QHBoxLayout *box = new QHBoxLayout( );
+ TQHBoxLayout *box = new TQHBoxLayout( );
grid->addLayout( box, 0, 0 );
- QLabel *lOutput = new QLabel( i18n("Output")+":", this, "lOutput" );
+ TQLabel *lOutput = new TQLabel( i18n("Output")+":", this, "lOutput" );
box->addWidget(lOutput);
cMode = new KComboBox( this );
@@ -47,49 +47,49 @@ OutputDirectory::OutputDirectory( Config* _config, QWidget* parent, const char*
cMode->insertItem( i18n("Source directory") );
cMode->insertItem( i18n("Specify output directory") );
cMode->insertItem( i18n("Copy directory structure") );
- //QToolTip::add( cMode, i18n("Output all converted files into...") );
+ //TQToolTip::add( cMode, i18n("Output all converted files into...") );
box->addWidget( cMode );
- connect( cMode, SIGNAL(activated(int)),
- this, SLOT(modeChangedSlot(int))
+ connect( cMode, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(modeChangedSlot(int))
);
modeJustChanged = false;
/*pModeInfo = new KToolBarButton( "messagebox_info", 1010, this, "pModeInfo" );
- QToolTip::add( pModeInfo, i18n("Information about the output mode") );
+ TQToolTip::add( pModeInfo, i18n("Information about the output mode") );
box->addWidget( pModeInfo );
- connect( pModeInfo, SIGNAL(clicked()),
- this, SLOT(modeInfo())
+ connect( pModeInfo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(modeInfo())
);*/
pClear = new KToolBarButton( "locationbar_erase", 1001, this, "pClear" );
- QToolTip::add( pClear, i18n("Clear the directory input field") );
+ TQToolTip::add( pClear, i18n("Clear the directory input field") );
box->addWidget( pClear );
lDir = new KLineEdit( this, "lDir" );
box->addWidget( lDir );
- connect( lDir, SIGNAL(textChanged(const QString&)),
- this, SLOT(directoryChangedSlot(const QString&))
+ connect( lDir, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(directoryChangedSlot(const TQString&))
);
- connect( pClear, SIGNAL(clicked()),
- lDir, SLOT(setFocus())
+ connect( pClear, TQT_SIGNAL(clicked()),
+ lDir, TQT_SLOT(setFocus())
);
- connect( pClear, SIGNAL(clicked()),
- lDir, SLOT(clear())
+ connect( pClear, TQT_SIGNAL(clicked()),
+ lDir, TQT_SLOT(clear())
);
/*pDirInfo = new KToolBarButton( "messagebox_info", 1011, this, "pDirInfo" );
- QToolTip::add( pDirInfo, i18n("Information about the wildcards") );
+ TQToolTip::add( pDirInfo, i18n("Information about the wildcards") );
box->addWidget( pDirInfo );
- connect( pDirInfo, SIGNAL(clicked()),
- this, SLOT(dirInfo())
+ connect( pDirInfo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirInfo())
);*/
pDirSelect = new KToolBarButton( "folder", 1012, this, "pDirSelect" );
- QToolTip::add( pDirSelect, i18n("Choose an output directory") );
+ TQToolTip::add( pDirSelect, i18n("Choose an output directory") );
box->addWidget( pDirSelect );
- connect( pDirSelect, SIGNAL(clicked()),
- this, SLOT(selectDir())
+ connect( pDirSelect, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(selectDir())
);
pDirGoto = new KToolBarButton( "konqueror", 1013, this, "pDirGoto" );
- QToolTip::add( pDirGoto, i18n("Open Konqueror with the output directory") );
+ TQToolTip::add( pDirGoto, i18n("Open Konqueror with the output directory") );
box->addWidget( pDirGoto );
- connect( pDirGoto, SIGNAL(clicked()),
- this, SLOT(gotoDir())
+ connect( pDirGoto, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(gotoDir())
);
// delete the icon loader object
@@ -127,29 +127,29 @@ void OutputDirectory::setMode( OutputDirectory::Mode mode )
modeChangedSlot( (int)mode );
}
-QString OutputDirectory::directory()
+TQString OutputDirectory::directory()
{
if( /*(Mode)cMode->currentItem() != Default && */(Mode)cMode->currentItem() != Source ) return lDir->text();
else return "";
}
-void OutputDirectory::setDirectory( const QString& directory )
+void OutputDirectory::setDirectory( const TQString& directory )
{
if( /*(Mode)cMode->currentItem() != Default && */(Mode)cMode->currentItem() != Source ) lDir->setText( directory );
}
-QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, QString extension )
+TQString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, TQString extension )
{
- // TODO replace '//' by '/' ???
+ // TODO tqreplace '//' by '/' ???
// FIXME test fvat names
- QString path;
+ TQString path;
if( extension.isEmpty() ) extension = fileListItem->options.encodingOptions.sFormat;
// FIXME file name
- QString fileName;
+ TQString fileName;
if( fileListItem->track == -1 ) fileName = fileListItem->fileName;
- else if( fileListItem->tags != 0 ) fileName = QString().sprintf("%02i",fileListItem->tags->track) + " - " + fileListItem->tags->title + "." + extension;
- else fileName = "track" + QString::number(fileListItem->track) + "." + extension; // NOTE shouldn't be possible
+ else if( fileListItem->tags != 0 ) fileName = TQString().sprintf("%02i",fileListItem->tags->track) + " - " + fileListItem->tags->title + "." + extension;
+ else fileName = "track" + TQString::number(fileListItem->track) + "." + extension; // NOTE shouldn't be possible
// if the user wants to change the output directory/file name per file!
if( !fileListItem->options.outputFilePathName.isEmpty() ) {
@@ -170,55 +170,55 @@ QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, Q
else */path = fileListItem->options.outputOptions.directory;
if( path.right(1) == "/" ) path += "%f";
- else if( path.findRev(QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}")) < path.findRev("/") ) path += "/%f";
+ else if( path.tqfindRev(TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}")) < path.tqfindRev("/") ) path += "/%f";
- path.replace( "%a", "$replace_by_artist$" );
- path.replace( "%b", "$replace_by_album$" );
- path.replace( "%c", "$replace_by_comment$" );
- path.replace( "%d", "$replace_by_disc$" );
- path.replace( "%g", "$replace_by_genre$" );
- path.replace( "%n", "$replace_by_track$" );
- path.replace( "%p", "$replace_by_composer$" );
- path.replace( "%t", "$replace_by_title$" );
- path.replace( "%y", "$replace_by_year$" );
- path.replace( "%f", "$replace_by_filename$" );
+ path.tqreplace( "%a", "$replace_by_artist$" );
+ path.tqreplace( "%b", "$replace_by_album$" );
+ path.tqreplace( "%c", "$replace_by_comment$" );
+ path.tqreplace( "%d", "$replace_by_disc$" );
+ path.tqreplace( "%g", "$replace_by_genre$" );
+ path.tqreplace( "%n", "$replace_by_track$" );
+ path.tqreplace( "%p", "$replace_by_composer$" );
+ path.tqreplace( "%t", "$replace_by_title$" );
+ path.tqreplace( "%y", "$replace_by_year$" );
+ path.tqreplace( "%f", "$replace_by_filename$" );
- QString artist = ( fileListItem->tags == 0 || fileListItem->tags->artist.isEmpty() ) ? i18n("Unknown Artist") : fileListItem->tags->artist;
-/// artist.replace("/","\\");
- path.replace( "$replace_by_artist$", KURL::encode_string(artist).replace("/","%2f") );
+ TQString artist = ( fileListItem->tags == 0 || fileListItem->tags->artist.isEmpty() ) ? i18n("Unknown Artist") : fileListItem->tags->artist;
+/// artist.tqreplace("/","\\");
+ path.tqreplace( "$replace_by_artist$", KURL::encode_string(artist).tqreplace("/","%2f") );
- QString album = ( fileListItem->tags == 0 || fileListItem->tags->album.isEmpty() ) ? i18n("Unknown Album") : fileListItem->tags->album;
-/// album.replace("/","\\");
- path.replace( "$replace_by_album$", KURL::encode_string(album).replace("/","%2f") );
+ TQString album = ( fileListItem->tags == 0 || fileListItem->tags->album.isEmpty() ) ? i18n("Unknown Album") : fileListItem->tags->album;
+/// album.tqreplace("/","\\");
+ path.tqreplace( "$replace_by_album$", KURL::encode_string(album).tqreplace("/","%2f") );
- QString comment = ( fileListItem->tags == 0 || fileListItem->tags->comment.isEmpty() ) ? i18n("No Comment") : fileListItem->tags->comment;
-/// comment.replace("/","\\");
- path.replace( "$replace_by_comment$", KURL::encode_string(comment).replace("/","%2f") );
+ TQString comment = ( fileListItem->tags == 0 || fileListItem->tags->comment.isEmpty() ) ? i18n("No Comment") : fileListItem->tags->comment;
+/// comment.tqreplace("/","\\");
+ path.tqreplace( "$replace_by_comment$", KURL::encode_string(comment).tqreplace("/","%2f") );
- QString disc = ( fileListItem->tags == 0 ) ? "0" : QString().sprintf("%i",fileListItem->tags->disc);
- path.replace( "$replace_by_disc$", disc );
+ TQString disc = ( fileListItem->tags == 0 ) ? "0" : TQString().sprintf("%i",fileListItem->tags->disc);
+ path.tqreplace( "$replace_by_disc$", disc );
- QString genre = ( fileListItem->tags == 0 || fileListItem->tags->genre.isEmpty() ) ? i18n("Unknown Genre") : fileListItem->tags->genre;
-/// genre.replace("/","\\");
- path.replace( "$replace_by_genre$", KURL::encode_string(genre).replace("/","%2f") );
+ TQString genre = ( fileListItem->tags == 0 || fileListItem->tags->genre.isEmpty() ) ? i18n("Unknown Genre") : fileListItem->tags->genre;
+/// genre.tqreplace("/","\\");
+ path.tqreplace( "$replace_by_genre$", KURL::encode_string(genre).tqreplace("/","%2f") );
- QString track = ( fileListItem->tags == 0 ) ? "00" : QString().sprintf("%02i",fileListItem->tags->track);
- path.replace( "$replace_by_track$", track );
+ TQString track = ( fileListItem->tags == 0 ) ? "00" : TQString().sprintf("%02i",fileListItem->tags->track);
+ path.tqreplace( "$replace_by_track$", track );
- QString composer = ( fileListItem->tags == 0 || fileListItem->tags->composer.isEmpty() ) ? i18n("Unknown Composer") : fileListItem->tags->composer;
-/// composer.replace("/","\\");
- path.replace( "$replace_by_composer$", KURL::encode_string(composer).replace("/","%2f") );
+ TQString composer = ( fileListItem->tags == 0 || fileListItem->tags->composer.isEmpty() ) ? i18n("Unknown Composer") : fileListItem->tags->composer;
+/// composer.tqreplace("/","\\");
+ path.tqreplace( "$replace_by_composer$", KURL::encode_string(composer).tqreplace("/","%2f") );
- QString title = ( fileListItem->tags == 0 || fileListItem->tags->title.isEmpty() ) ? i18n("Unknown Title") : fileListItem->tags->title;
-/// title.replace("/","\\");
- path.replace( "$replace_by_title$", KURL::encode_string(title).replace("/","%2f") );
+ TQString title = ( fileListItem->tags == 0 || fileListItem->tags->title.isEmpty() ) ? i18n("Unknown Title") : fileListItem->tags->title;
+/// title.tqreplace("/","\\");
+ path.tqreplace( "$replace_by_title$", KURL::encode_string(title).tqreplace("/","%2f") );
- QString year = ( fileListItem->tags == 0 ) ? "0000" : QString().sprintf("%04i",fileListItem->tags->year);
- path.replace( "$replace_by_year$", year );
+ TQString year = ( fileListItem->tags == 0 ) ? "0000" : TQString().sprintf("%04i",fileListItem->tags->year);
+ path.tqreplace( "$replace_by_year$", year );
- QString filename = fileName.left( fileName.findRev(".") );
-/// filename.replace("/","\\");
- path.replace( "$replace_by_filename$", filename );
+ TQString filename = fileName.left( fileName.tqfindRev(".") );
+/// filename.tqreplace("/","\\");
+ path.tqreplace( "$replace_by_filename$", filename );
// path = uniqueFileName( path + "." + extension );
path = path + "." + extension;
@@ -226,17 +226,17 @@ QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, Q
return path;
}
else if( fileListItem->options.outputOptions.mode == CopyStructure ) { // TODO is that correct ???
- QString basePath = fileListItem->options.outputOptions.directory;
- QString originalPath = fileListItem->options.filePathName;
- QString cutted;
+ TQString basePath = fileListItem->options.outputOptions.directory;
+ TQString originalPath = fileListItem->options.filePathName;
+ TQString cutted;
while( basePath.length() > 0 ) {
- if( fileListItem->options.filePathName.find(basePath) == 0 ) {
- originalPath.replace( basePath, "" );
+ if( fileListItem->options.filePathName.tqfind(basePath) == 0 ) {
+ originalPath.tqreplace( basePath, "" );
return uniqueFileName( changeExtension(basePath+cutted+originalPath,extension) );
}
else {
- cutted = basePath.right( basePath.length() - basePath.findRev("/") ) + cutted;
- basePath = basePath.left( basePath.findRev("/") );
+ cutted = basePath.right( basePath.length() - basePath.tqfindRev("/") ) + cutted;
+ basePath = basePath.left( basePath.tqfindRev("/") );
}
}
// path = uniqueFileName( changeExtension(fileListItem->options.outputOptions.directory+"/"+fileListItem->options.filePathName,extension) );
@@ -252,14 +252,14 @@ QString OutputDirectory::calcPath( FileListItem* fileListItem, Config* config, Q
}
}
-QString OutputDirectory::changeExtension( const QString& filename, const QString& extension )
+TQString OutputDirectory::changeExtension( const TQString& filename, const TQString& extension )
{
- return filename.left( filename.findRev(".") + 1 ) + extension;
+ return filename.left( filename.tqfindRev(".") + 1 ) + extension;
}
-QString OutputDirectory::uniqueFileName( const QString& filename )
+TQString OutputDirectory::uniqueFileName( const TQString& filename )
{
- QString filePathName;
+ TQString filePathName;
if( filename.left( 1 ) == "/" ) {
filePathName = filename;
@@ -271,13 +271,13 @@ QString OutputDirectory::uniqueFileName( const QString& filename )
else if( filename.left( 13 ) == "system:/home/" ) {
filePathName = filename;
filePathName.remove( 0, 13 );
- filePathName = QDir::homeDirPath() + "/" + filePathName;
+ filePathName = TQDir::homeDirPath() + "/" + filePathName;
}
else if( filename.left( 14 ) == "system:/users/" || filename.left( 6 ) == "home:/" ) {
int length = ( filename.left(6) == "home:/" ) ? 6 : 14;
- QString username = filename;
+ TQString username = filename;
username.remove( 0, length );
- username = username.left( username.find("/") );
+ username = username.left( username.tqfind("/") );
filePathName = filename;
filePathName.remove( 0, length + username.length() );
KUser user( username );
@@ -285,9 +285,9 @@ QString OutputDirectory::uniqueFileName( const QString& filename )
}
else if( filename.left( 14 ) == "system:/media/" || filename.left( 7 ) == "media:/" ) {
int length = ( filename.left(7) == "media:/" ) ? 7 : 14;
- QString device = filename;
+ TQString device = filename;
device.remove( 0, length );
- device = "/dev/" + device.left( device.find( "/" ) );
+ device = "/dev/" + device.left( device.tqfind( "/" ) );
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
@@ -305,25 +305,25 @@ QString OutputDirectory::uniqueFileName( const QString& filename )
filePathName = filename;
}
- QFileInfo fileInfo( KURL::decode_string(filePathName) );
+ TQFileInfo fileInfo( KURL::decode_string(filePathName) );
// generate a unique file name
while( fileInfo.exists() ) {
- fileInfo.setFile( fileInfo.filePath().left( fileInfo.filePath().findRev(".")+1 ) + i18n("new") + fileInfo.filePath().right( fileInfo.filePath().length() - fileInfo.filePath().findRev(".") ) );
+ fileInfo.setFile( fileInfo.filePath().left( fileInfo.filePath().tqfindRev(".")+1 ) + i18n("new") + fileInfo.filePath().right( fileInfo.filePath().length() - fileInfo.filePath().tqfindRev(".") ) );
}
- return KURL::encode_string( fileInfo.filePath() ); // was: .replace( "//", "/" )
+ return KURL::encode_string( fileInfo.filePath() ); // was: .tqreplace( "//", "/" )
}
-QString OutputDirectory::makePath( const QString& path )
+TQString OutputDirectory::makePath( const TQString& path )
{
- QFileInfo fileInfo( path );
+ TQFileInfo fileInfo( path );
- QStringList dirs = QStringList::split( "/", fileInfo.dirPath() );
- QString mkDir;
- QDir dir;
- for( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
- mkDir += "/" + KURL::decode_string(*it).replace("/","%2f");
+ TQStringList dirs = TQStringList::split( "/", fileInfo.dirPath() );
+ TQString mkDir;
+ TQDir dir;
+ for( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
+ mkDir += "/" + KURL::decode_string(*it).tqreplace("/","%2f");
dir.setPath( mkDir );
if( !dir.exists() ) dir.mkdir( mkDir );
}
@@ -334,15 +334,15 @@ QString OutputDirectory::makePath( const QString& path )
// copyright : (C) 2002 by Mark Kretschmann
// email : [email protected]
// modified : 2008 Daniel Faust <[email protected]>
-QString OutputDirectory::vfatPath( const QString& path )
+TQString OutputDirectory::vfatPath( const TQString& path )
{
- QString s = KURL::decode_string(path.right( path.length() - path.findRev("/") - 1 ));
- QString p = KURL::decode_string(path.left( path.findRev("/") + 1 ));
+ TQString s = KURL::decode_string(path.right( path.length() - path.tqfindRev("/") - 1 ));
+ TQString p = KURL::decode_string(path.left( path.tqfindRev("/") + 1 ));
for( uint i = 0; i < s.length(); i++ )
{
- QChar c = s.ref( i );
- if( c < QChar(0x20)
+ TQChar c = s.ref( i );
+ if( c < TQChar(0x20)
|| c=='*' || c=='?' || c=='<' || c=='>'
|| c=='|' || c=='"' || c==':' || c=='/'
|| c=='\\' )
@@ -353,14 +353,14 @@ QString OutputDirectory::vfatPath( const QString& path )
uint len = s.length();
if( len == 3 || (len > 3 && s[3] == '.') )
{
- QString l = s.left(3).lower();
+ TQString l = s.left(3).lower();
if( l=="aux" || l=="con" || l=="nul" || l=="prn" )
s = "_" + s;
}
else if( len == 4 || (len > 4 && s[4] == '.') )
{
- QString l = s.left(3).lower();
- QString d = s.mid(3,1);
+ TQString l = s.left(3).lower();
+ TQString d = s.mid(3,1);
if( (l=="com" || l=="lpt") &&
(d=="0" || d=="1" || d=="2" || d=="3" || d=="4" ||
d=="5" || d=="6" || d=="7" || d=="8" || d=="9") )
@@ -378,25 +378,25 @@ QString OutputDirectory::vfatPath( const QString& path )
if( s[len-1] == ' ' )
s[len-1] = '_';
- return QString( p + s ).replace("%2f","_");
+ return TQString( p + s ).tqreplace("%2f","_");
// return p + s;
}
void OutputDirectory::selectDir()
{
- QString startDir = lDir->text();
- int i = startDir.find( QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") );
+ TQString startDir = lDir->text();
+ int i = startDir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") );
if( i != -1 ) {
- i = startDir.findRev( "/", i );
+ i = startDir.tqfindRev( "/", i );
startDir = startDir.left( i );
}
- QString directory = KFileDialog::getExistingDirectory( startDir, this, i18n("Choose an output directory") );
+ TQString directory = KFileDialog::getExistingDirectory( startDir, this, i18n("Choose an output directory") );
if( !directory.isEmpty() ) {
- QString dir = lDir->text();
- i = dir.find( QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") );
+ TQString dir = lDir->text();
+ i = dir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") );
if( i != -1 && (Mode)cMode->currentItem() == MetaData ) {
- i = dir.findRev( "/", i );
+ i = dir.tqfindRev( "/", i );
lDir->setText( directory + dir.mid(i) );
}
else {
@@ -408,10 +408,10 @@ void OutputDirectory::selectDir()
void OutputDirectory::gotoDir()
{
- QString startDir = lDir->originalText();
- int i = startDir.find( QRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") );
+ TQString startDir = lDir->originalText();
+ int i = startDir.tqfind( TQRegExp("%[aAbBcCdDfFgGnNpPtTyY]{1,1}") );
if( i != -1 ) {
- i = startDir.findRev( "/", i );
+ i = startDir.tqfindRev( "/", i );
startDir = startDir.left( i );
}
@@ -436,14 +436,14 @@ void OutputDirectory::modeChangedSlot( int mode )
// TODO hide pDirSelect and show pDirEdit
pDirGoto->setEnabled( true );
//pDirInfo->hide();
- QToolTip::remove( cMode );
- QToolTip::add( cMode, i18n("Output all converted files into the soundKonverter default output directory") );
- QToolTip::remove( lDir );
+ TQToolTip::remove( cMode );
+ TQToolTip::add( cMode, i18n("Output all converted files into the soundKonverter default output directory") );
+ TQToolTip::remove( lDir );
}
else */
if( (Mode)mode == MetaData ) {
pClear->setEnabled( true );
- if( config->data.general.metaDataOutputDirectory.isEmpty() ) config->data.general.metaDataOutputDirectory = QDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t";
+ if( config->data.general.metaDataOutputDirectory.isEmpty() ) config->data.general.metaDataOutputDirectory = TQDir::homeDirPath() + "/soundKonverter/%b/%d - %n - %a - %t";
lDir->setText( config->data.general.metaDataOutputDirectory );
lDir->setEnabled( true );
lDir->setReadOnly( false );
@@ -451,10 +451,10 @@ void OutputDirectory::modeChangedSlot( int mode )
pDirSelect->setEnabled( true );
pDirGoto->setEnabled( true );
//pDirInfo->show();
- QToolTip::remove( cMode );
- QToolTip::add( cMode, i18n("Name all converted files according to the specified pattern") );
- QToolTip::remove( lDir );
- QToolTip::add( lDir, i18n("<p>The following strings are wildcards, that will be replaced by the information in the meta data:</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>") );
+ TQToolTip::remove( cMode );
+ TQToolTip::add( cMode, i18n("Name all converted files according to the specified pattern") );
+ TQToolTip::remove( lDir );
+ TQToolTip::add( lDir, i18n("<p>The following strings are wildcards, that will be replaced by the information in the meta data:</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>") );
}
else if( (Mode)mode == Source ) {
pClear->setEnabled( false );
@@ -465,13 +465,13 @@ void OutputDirectory::modeChangedSlot( int mode )
pDirSelect->setEnabled( false );
pDirGoto->setEnabled( false );
//pDirInfo->hide();
- QToolTip::remove( cMode );
- QToolTip::add( cMode, i18n("Output all converted files into the same directory as the original files") );
- QToolTip::remove( lDir );
+ TQToolTip::remove( cMode );
+ TQToolTip::add( cMode, i18n("Output all converted files into the same directory as the original files") );
+ TQToolTip::remove( lDir );
}
else if( (Mode)mode == Specify ) {
pClear->setEnabled( true );
- if( config->data.general.specifyOutputDirectory.isEmpty() ) config->data.general.specifyOutputDirectory = QDir::homeDirPath() + "/soundKonverter";
+ if( config->data.general.specifyOutputDirectory.isEmpty() ) config->data.general.specifyOutputDirectory = TQDir::homeDirPath() + "/soundKonverter";
lDir->setText( config->data.general.specifyOutputDirectory );
lDir->setEnabled( true );
lDir->setReadOnly( false );
@@ -479,13 +479,13 @@ void OutputDirectory::modeChangedSlot( int mode )
pDirSelect->setEnabled( true );
pDirGoto->setEnabled( true );
//pDirInfo->hide();
- QToolTip::remove( cMode );
- QToolTip::add( cMode, i18n("Output all converted files into the specified output directory") );
- QToolTip::remove( lDir );
+ TQToolTip::remove( cMode );
+ TQToolTip::add( cMode, i18n("Output all converted files into the specified output directory") );
+ TQToolTip::remove( lDir );
}
else if( (Mode)mode == CopyStructure ) {
pClear->setEnabled( true );
- if( config->data.general.copyStructureOutputDirectory.isEmpty() ) config->data.general.copyStructureOutputDirectory = QDir::homeDirPath() + "/soundKonverter";
+ if( config->data.general.copyStructureOutputDirectory.isEmpty() ) config->data.general.copyStructureOutputDirectory = TQDir::homeDirPath() + "/soundKonverter";
lDir->setText( config->data.general.copyStructureOutputDirectory );
lDir->setEnabled( true );
lDir->setReadOnly( false );
@@ -493,9 +493,9 @@ void OutputDirectory::modeChangedSlot( int mode )
pDirSelect->setEnabled( true );
pDirGoto->setEnabled( true );
//pDirInfo->hide();
- QToolTip::remove( cMode );
- QToolTip::add( cMode, i18n("Copy the whole directory structure for all converted files") );
- QToolTip::remove( lDir );
+ TQToolTip::remove( cMode );
+ TQToolTip::add( cMode, i18n("Copy the whole directory structure for all converted files") );
+ TQToolTip::remove( lDir );
}
emit modeChanged( (Mode)mode );
@@ -503,7 +503,7 @@ void OutputDirectory::modeChangedSlot( int mode )
modeJustChanged = false;
}
-void OutputDirectory::directoryChangedSlot( const QString& directory )
+void OutputDirectory::directoryChangedSlot( const TQString& directory )
{
if( modeJustChanged ) {
modeJustChanged = false;
@@ -528,37 +528,37 @@ void OutputDirectory::directoryChangedSlot( const QString& directory )
/*void OutputDirectory::modeInfo()
{
int mode = cMode->currentItem();
- QString sModeString = cMode->currentText();
+ TQString sModeString = cMode->currentText();
if( (Mode)mode == Default ) {
KMessageBox::information( this,
i18n("This will output each file into the soundKonverter default directory."),
- QString(i18n("Mode")+": ").append(sModeString) );
+ TQString(i18n("Mode")+": ").append(sModeString) );
}
else if( (Mode)mode == Source ) {
KMessageBox::information( this,
i18n("This will output each file into the same directory as the original file."),
- QString(i18n("Mode")+": ").append(sModeString) );
+ TQString(i18n("Mode")+": ").append(sModeString) );
}
else if( (Mode)mode == Specify ) {
KMessageBox::information( this,
i18n("This will output each file into the directory specified in the editbox behind."),
- QString(i18n("Mode")+": ").append(sModeString) );
+ TQString(i18n("Mode")+": ").append(sModeString) );
}
else if( (Mode)mode == MetaData ) {
KMessageBox::information( this,
i18n("This will output each file into a directory, which is created based on the metadata in the audio files. Select a directory, where the new directories should be created."),
- QString(i18n("Mode")+": ").append(sModeString) );
+ TQString(i18n("Mode")+": ").append(sModeString) );
}
else if( (Mode)mode == CopyStructure ) {
KMessageBox::information( this,
i18n("This will output each file into a directory, which is created based on the name of the original directory. So you can copy a whole directory structure, in one you have the original files, in the other the converted."),
- QString(i18n("Mode")+": ").append(sModeString) );
+ TQString(i18n("Mode")+": ").append(sModeString) );
}
else {
KMessageBox::error( this,
i18n("This mode (%s) doesn't exist.", sModeString),
- QString(i18n("Mode")+": ").append(sModeString) );
+ TQString(i18n("Mode")+": ").append(sModeString) );
}
}*/
@@ -566,6 +566,6 @@ void OutputDirectory::directoryChangedSlot( const QString& directory )
{
KMessageBox::information( this,
i18n("<p>The following strings are space holders, that will be replaced by the information in the metatags.</p><p>%a - Artist<br>%b - Album<br>%c - Comment<br>%d - Disc number<br>%g - Genre<br>%n - Track number<br>%p - Composer<br>%t - Title<br>%y - Year<br>%f - Original file name<p>"),
- QString(i18n("Legend")) );
+ TQString(i18n("Legend")) );
}*/
diff --git a/src/outputdirectory.h b/src/outputdirectory.h
index 85b5236..329f2b8 100755
--- a/src/outputdirectory.h
+++ b/src/outputdirectory.h
@@ -3,7 +3,7 @@
#ifndef OUTPUTDIRECTORY_H
#define OUTPUTDIRECTORY_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kprocess.h>
class FileListItem;
@@ -18,9 +18,10 @@ class KToolBarButton;
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class OutputDirectory : public QWidget
+class OutputDirectory : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode {
// Default,
@@ -33,18 +34,18 @@ public:
/**
* Constructor
*/
- OutputDirectory( Config*, QWidget* parent = 0, const char* name = 0 );
+ OutputDirectory( Config*, TQWidget* tqparent = 0, const char* name = 0 );
Mode mode();
void setMode( Mode );
- QString directory();
- void setDirectory( const QString& );
+ TQString directory();
+ void setDirectory( const TQString& );
- static QString calcPath( FileListItem* fileListItem, Config* config, QString extension = "" );
- static QString changeExtension( const QString& filename, const QString& extension );
- static QString uniqueFileName( const QString& filename );
- static QString makePath( const QString& path );
- static QString vfatPath( const QString& path );
+ static TQString calcPath( FileListItem* fileListItem, Config* config, TQString extension = "" );
+ static TQString changeExtension( const TQString& filename, const TQString& extension );
+ static TQString uniqueFileName( const TQString& filename );
+ static TQString makePath( const TQString& path );
+ static TQString vfatPath( const TQString& path );
/**
* Destructor
@@ -58,7 +59,7 @@ public slots:
private slots:
void modeChangedSlot( int );
- void directoryChangedSlot( const QString& );
+ void directoryChangedSlot( const TQString& );
void selectDir();
void gotoDir();
//void modeInfo();
@@ -80,13 +81,13 @@ private:
Config* config;
-/* QString sharedDirPath;
- QString metadataPath;
- QString copyStructurePath;
+/* TQString sharedDirPath;
+ TQString metadataPath;
+ TQString copyStructurePath;
*/
signals:
void modeChanged( OutputDirectory::Mode );
- void directoryChanged( const QString& );
+ void directoryChanged( const TQString& );
};
#endif // OUTPUTDIRECTORY_H
diff --git a/src/paranoia.cpp b/src/paranoia.cpp
index ef1048c..a7d553e 100755
--- a/src/paranoia.cpp
+++ b/src/paranoia.cpp
@@ -18,16 +18,16 @@
#include <unistd.h>
#include <math.h>
-#include <qfile.h>
-#include <qslider.h>
-#include <qlcdnumber.h>
-#include <qdir.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
+#include <tqfile.h>
+#include <tqslider.h>
+#include <tqlcdnumber.h>
+#include <tqdir.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -60,10 +60,10 @@ Paranoia::Paranoia()
-bool Paranoia::init( QString dev )
+bool Paranoia::init( TQString dev )
{
- QString s;
- QFile f;
+ TQString s;
+ TQFile f;
if ( p!=0 ) paranoia_free( p );
if ( d!=0 ) cdda_close( d );
@@ -95,27 +95,27 @@ bool Paranoia::init( QString dev )
bool Paranoia::findCdrom()
{
- QFile *f;
- QString c;
- QString s="";
+ TQFile *f;
+ TQString c;
+ TQString s="";
int pos, i;
bool stop=false;
char dev[4][4]={"","","",""};
- f = new QFile( "/proc/sys/dev/cdrom/info" );
+ f = new TQFile( "/proc/sys/dev/cdrom/info" );
if ( !f->open(IO_ReadOnly) )
return false;
- QTextStream t( f );
+ TQTextStream t( f );
while ( !t.eof() && !stop ) {
s = t.readLine();
- if ( s.contains("drive name:") )
+ if ( s.tqcontains("drive name:") )
stop = true;
}
if ( !stop )
return false;
- pos = s.find(":");
+ pos = s.tqfind(":");
c = s.right( s.length()-pos-1 );
sscanf( c.latin1(), "%s %s %s %s", dev[0], dev[1], dev[2], dev[3] );
@@ -129,19 +129,19 @@ bool Paranoia::findCdrom()
-bool Paranoia::procCdrom( QString name )
+bool Paranoia::procCdrom( TQString name )
{
int pos;
- if ( name.contains("sr") ) {
- pos = name.find("r");
+ if ( name.tqcontains("sr") ) {
+ pos = name.tqfind("r");
name = name.right( name.length()-pos-1 );
name = "/dev/scd"+name;
d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 );
if ( cdda_open( d )==0 )
return true;
}
- else if ( name.contains("hd") ) {
+ else if ( name.tqcontains("hd") ) {
name = "/dev/"+name;
d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 );
if ( cdda_open( d )==0 )
@@ -205,9 +205,9 @@ bool Paranoia::isAudio( int t )
-QString Paranoia::trackSize( int t )
+TQString Paranoia::trackSize( int t )
{
- QString s, c;
+ TQString s, c;
long total;
total = CD_FRAMESIZE_RAW * (cdda_track_lastsector( d, t+1 )-cdda_track_firstsector( d, t+1 ) );
@@ -228,7 +228,7 @@ long Paranoia::trackSectorSize( int t )
long Paranoia::trackTime( int t )
{
- QString c;
+ TQString c;
long total, time;
// int m, s;
diff --git a/src/paranoia.h b/src/paranoia.h
index f1a5ae8..93819a7 100755
--- a/src/paranoia.h
+++ b/src/paranoia.h
@@ -18,7 +18,7 @@
#ifndef PARANOIA_H
#define PARANOIA_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
extern "C"
{
@@ -32,7 +32,7 @@ class Paranoia
{
public:
Paranoia();
- bool init( QString dev );
+ bool init( TQString dev );
~Paranoia();
long getTracks();
long trackTime( int t );
@@ -42,11 +42,11 @@ public:
private:
bool findCdrom();
- bool procCdrom( QString name );
+ bool procCdrom( TQString name );
bool initTrack( int t );
void setMode( int mode );
bool isAudio( int t );
- QString trackSize( int t );
+ TQString trackSize( int t );
long trackSectorSize( int t );
long nTracks;
diff --git a/src/pluginloader/convertpluginloader.cpp b/src/pluginloader/convertpluginloader.cpp
index 89996ba..0631c19 100755
--- a/src/pluginloader/convertpluginloader.cpp
+++ b/src/pluginloader/convertpluginloader.cpp
@@ -1,7 +1,7 @@
#include "convertpluginloader.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kglobal.h>
@@ -21,9 +21,9 @@ ConvertPluginLoader::ConvertPluginLoader()
ConvertPluginLoader::~ConvertPluginLoader()
{}
-int ConvertPluginLoader::verifyFile( QString fileName )
+int ConvertPluginLoader::verifyFile( TQString fileName )
{
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return -1;
}
@@ -32,10 +32,10 @@ int ConvertPluginLoader::verifyFile( QString fileName )
}
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "converter" ) return -1;
int version;
- QDomNode node;
+ TQDomNode node;
node = root.firstChild();
while( !node.isNull() ) {
if( node.isElement() && node.nodeName() == "info" ) {
@@ -47,17 +47,17 @@ int ConvertPluginLoader::verifyFile( QString fileName )
return version;
}
-ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName )
+ConvertPlugin* ConvertPluginLoader::loadFile( TQString fileName )
{
int t_int;
float t_float;
- QString t_str;
+ TQString t_str;
ConvertPlugin* plugin = new ConvertPlugin();
plugin->info.version = -1; // if something goes wrong, we can see that by looking at plugin->info.version
plugin->filePathName = fileName;
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return plugin;
}
@@ -66,11 +66,11 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName )
}
opmlFile.close();
- QString language = KGlobal::locale()->languagesTwoAlpha().first();
+ TQString language = KGlobal::locale()->languagesTwoAlpha().first();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "converter" ) return plugin;
- QDomNode node, sub1Node, sub2Node, sub3Node, sub4Node;
+ TQDomNode node, sub1Node, sub2Node, sub3Node, sub4Node;
node = root.firstChild();
plugin->enc.enabled = false;
@@ -110,7 +110,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName )
plugin->enc.bin = node.toElement().attribute( "bin" );
plugin->enc.param = node.toElement().attribute("param");
plugin->enc.silent_param = node.toElement().attribute("silent_param");
- plugin->enc.mime_types = QStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") );
+ plugin->enc.mime_types = TQStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") );
plugin->enc.in_out_files = node.toElement().attribute("in_out_files");
plugin->enc.overwrite = node.toElement().attribute("overwrite");
@@ -124,7 +124,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName )
plugin->enc.strength.separator = sub1Node.toElement().attribute("separator").at(0);
plugin->enc.strength.param = sub1Node.toElement().attribute("param");
plugin->enc.strength.step = sub1Node.toElement().attribute("step").toFloat();
- plugin->enc.strength.profiles = QStringList::split( ',', sub1Node.toElement().attribute("profiles") );
+ plugin->enc.strength.profiles = TQStringList::split( ',', sub1Node.toElement().attribute("profiles") );
plugin->enc.strength.default_value = sub1Node.toElement().attribute("default_value").toFloat();
}
@@ -144,7 +144,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName )
plugin->enc.lossy.quality.output = sub2Node.toElement().attribute("output");
plugin->enc.lossy.quality.param = sub2Node.toElement().attribute("param");
plugin->enc.lossy.quality.step = sub2Node.toElement().attribute("step").toFloat();
- plugin->enc.lossy.quality.profiles = QStringList::split( ',', sub2Node.toElement().attribute("profiles") );
+ plugin->enc.lossy.quality.profiles = TQStringList::split( ',', sub2Node.toElement().attribute("profiles") );
}
else if( sub2Node.isElement() && sub2Node.nodeName() == "bitrate" ) {
@@ -252,7 +252,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName )
plugin->dec.output = node.toElement().attribute("output");
plugin->dec.param = node.toElement().attribute("param");
plugin->dec.overwrite = node.toElement().attribute("overwrite");
- plugin->dec.mime_types = QStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") );
+ plugin->dec.mime_types = TQStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") );
plugin->dec.in_out_files = node.toElement().attribute("in_out_files");
plugin->dec.silent_param = node.toElement().attribute("silent_param");
diff --git a/src/pluginloader/convertpluginloader.h b/src/pluginloader/convertpluginloader.h
index ad09e12..52c2374 100755
--- a/src/pluginloader/convertpluginloader.h
+++ b/src/pluginloader/convertpluginloader.h
@@ -24,35 +24,35 @@ public:
*/
virtual ~ConvertPlugin();
- QString filePathName; // the file name of th plugin (needed to detect write permissions)
+ TQString filePathName; // the file name of th plugin (needed to detect write permissions)
struct Info
{
int version; // the version of our plugin (v0.2.1 = 201, v11.3 = 110300)
- QString name; // the name of our plugin
- QString author; // the author of the plugin
- QString about; // a short information aboue the plugin
+ TQString name; // the name of our plugin
+ TQString author; // the author of the plugin
+ TQString about; // a short information aboue the plugin
} info;
struct Enc
{
bool enabled;
int rank;
- QString bin;
- QString param;
- QString silent_param;
- QStringList mime_types;
- QString in_out_files;
- QString overwrite;
+ TQString bin;
+ TQString param;
+ TQString silent_param;
+ TQStringList mime_types;
+ TQString in_out_files;
+ TQString overwrite;
struct Strength {
bool enabled;
- QString param;
+ TQString param;
float range_min;
float range_max;
float step;
- QChar separator;
- QStringList profiles;
+ TQChar separator;
+ TQStringList profiles;
float default_value;
} strength;
@@ -61,104 +61,104 @@ public:
struct Quality {
bool enabled;
- QString param;
+ TQString param;
float range_min;
float range_max;
float step;
- QChar separator;
- QString help;
- QString output;
- QStringList profiles; // NOTE when using profiles, step must be 1 and range_min 0
+ TQChar separator;
+ TQString help;
+ TQString output;
+ TQStringList profiles; // NOTE when using profiles, step must be 1 and range_min 0
} quality;
struct Bitrate {
struct Abr
{
bool enabled;
- QString param;
- QString output;
+ TQString param;
+ TQString output;
struct BitrateRange {
bool enabled;
- QString param_min;
- QString param_max;
+ TQString param_min;
+ TQString param_max;
} bitrate_range;
} abr;
struct Cbr {
bool enabled;
- QString param;
- QString output;
+ TQString param;
+ TQString output;
} cbr;
} bitrate;
struct Samplingrate {
bool enabled;
- QString param;
+ TQString param;
PluginLoaderBase::Unit unit;
} samplingrate;
struct Channels {
bool stereo_enabled;
- QString stereo_param;
+ TQString stereo_param;
bool joint_stereo_enabled;
- QString joint_stereo_param;
+ TQString joint_stereo_param;
bool forced_joint_stereo_enabled;
- QString forced_joint_stereo_param;
+ TQString forced_joint_stereo_param;
bool dual_channels_enabled;
- QString dual_channels_param;
+ TQString dual_channels_param;
bool mono_enabled;
- QString mono_param;
+ TQString mono_param;
} channels;
} lossy;
struct Lossless {
bool enabled;
- QString param;
- QString output;
+ TQString param;
+ TQString output;
} lossless;
struct Hybrid {
bool enabled;
- QString param;
- QString output;
- QString correction_file_mime_type;
+ TQString param;
+ TQString output;
+ TQString correction_file_mime_type;
} hybrid;
struct ReplayGain {
bool enabled;
- QString use;
- QString avoid;
+ TQString use;
+ TQString avoid;
int rank;
} replaygain;
struct Tag {
bool enabled;
- QString param;
- QString artist;
- QString composer;
- QString album;
- QString disc;
- QString title;
- QString genre;
- QString comment;
- QString track;
- QString year;
+ TQString param;
+ TQString artist;
+ TQString composer;
+ TQString album;
+ TQString disc;
+ TQString title;
+ TQString genre;
+ TQString comment;
+ TQString track;
+ TQString year;
} tag;
} enc;
struct Dec {
bool enabled;
int rank;
- QString bin;
- QString param;
- QString silent_param;
- QStringList mime_types;
- QString output;
- QString in_out_files;
- QString overwrite;
+ TQString bin;
+ TQString param;
+ TQString silent_param;
+ TQStringList mime_types;
+ TQString output;
+ TQString in_out_files;
+ TQString overwrite;
} dec;
};
@@ -170,6 +170,7 @@ public:
class ConvertPluginLoader : public PluginLoaderBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -182,9 +183,9 @@ public:
virtual ~ConvertPluginLoader();
/** is this file a converter plugin and loadable? */
- int verifyFile( QString );
+ int verifyFile( TQString );
/** load a given file */
- ConvertPlugin* loadFile( QString );
+ ConvertPlugin* loadFile( TQString );
};
#endif // CONVERTPLUGINLOADER_H
diff --git a/src/pluginloader/formatinfoloader.cpp b/src/pluginloader/formatinfoloader.cpp
index c585ed6..8a559bb 100755
--- a/src/pluginloader/formatinfoloader.cpp
+++ b/src/pluginloader/formatinfoloader.cpp
@@ -1,7 +1,7 @@
#include "formatinfoloader.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kglobal.h>
@@ -19,9 +19,9 @@ FormatInfoLoader::FormatInfoLoader()
FormatInfoLoader::~FormatInfoLoader()
{}
-bool FormatInfoLoader::verifyFile( QString fileName )
+bool FormatInfoLoader::verifyFile( TQString fileName )
{
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return false;
}
@@ -30,22 +30,22 @@ bool FormatInfoLoader::verifyFile( QString fileName )
}
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") == "format_info" ) return true;
return false;
}
-FormatInfo* FormatInfoLoader::loadFile( QString fileName )
+FormatInfo* FormatInfoLoader::loadFile( TQString fileName )
{
int t_int;
float t_float;
- QString t_str;
+ TQString t_str;
FormatInfo* plugin = new FormatInfo();
plugin->mime_types = "application/octet-stream"; // if something goes wrong, we can see that by looking at plugin->mimetype
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return plugin;
}
@@ -54,25 +54,25 @@ FormatInfo* FormatInfoLoader::loadFile( QString fileName )
}
opmlFile.close();
- QString language = KGlobal::locale()->languagesTwoAlpha().first();
+ TQString language = KGlobal::locale()->languagesTwoAlpha().first();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "format_info" ) return plugin;
- QDomNode node;
+ TQDomNode node;
node = root.firstChild();
while( !node.isNull() ) {
if( node.isElement() && node.nodeName() == "data" ) {
- plugin->mime_types = QStringList::split( ',',node.toElement().attribute("mime_types","application/octet-stream") );
- plugin->extensions = QStringList::split( ',',node.toElement().attribute("extensions") );
+ plugin->mime_types = TQStringList::split( ',',node.toElement().attribute("mime_types","application/octet-stream") );
+ plugin->extensions = TQStringList::split( ',',node.toElement().attribute("extensions") );
plugin->description = node.toElement().attribute("description_"+language);
if( plugin->description.isEmpty() ) plugin->description = node.toElement().attribute("description");
- plugin->urls = QStringList::split( ',',node.toElement().attribute("urls_"+language) );
- if( plugin->urls.isEmpty() ) plugin->urls = QStringList::split( ',',node.toElement().attribute("urls") );
- QStringList compressionTypeList = QStringList::split( ',',node.toElement().attribute("compression_type") );
+ plugin->urls = TQStringList::split( ',',node.toElement().attribute("urls_"+language) );
+ if( plugin->urls.isEmpty() ) plugin->urls = TQStringList::split( ',',node.toElement().attribute("urls") );
+ TQStringList compressionTypeList = TQStringList::split( ',',node.toElement().attribute("compression_type") );
plugin->compressionType = (FormatInfo::CompressionType)0x0000;
- for( QStringList::Iterator it = compressionTypeList.begin(); it != compressionTypeList.end(); ++it ) {
+ for( TQStringList::Iterator it = compressionTypeList.begin(); it != compressionTypeList.end(); ++it ) {
if( *it == "lossy" ) plugin->compressionType = FormatInfo::CompressionType( plugin->compressionType | FormatInfo::lossy );
else if( *it == "lossless" ) plugin->compressionType = FormatInfo::CompressionType( plugin->compressionType | FormatInfo::lossless );
else if( *it == "hybrid" ) plugin->compressionType = FormatInfo::CompressionType( plugin->compressionType | FormatInfo::hybrid );
diff --git a/src/pluginloader/formatinfoloader.h b/src/pluginloader/formatinfoloader.h
index f36f7fe..583cb9c 100755
--- a/src/pluginloader/formatinfoloader.h
+++ b/src/pluginloader/formatinfoloader.h
@@ -3,9 +3,9 @@
#ifndef FORMATINFOLOADER_H
#define FORMATINFOLOADER_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
/**
* @short The complete information about that format
@@ -25,10 +25,10 @@ public:
*/
virtual ~FormatInfo();
- QStringList mime_types;
- QStringList extensions;
- QString description;
- QStringList urls;
+ TQStringList mime_types;
+ TQStringList extensions;
+ TQString description;
+ TQStringList urls;
enum CompressionType {
lossy = 0x0001, // encode with loss
lossless = 0x0002, // encode without loss
@@ -42,9 +42,10 @@ public:
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class FormatInfoLoader : public QObject
+class FormatInfoLoader : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -57,11 +58,11 @@ public:
virtual ~FormatInfoLoader();
/** is this file a converter plugin and loadable? */
- bool verifyFile( QString );
+ bool verifyFile( TQString );
/** load a given file */
- FormatInfo* loadFile( QString );
+ FormatInfo* loadFile( TQString );
/** the dom tree for loading the xml file */
- QDomDocument domTree;
+ TQDomDocument domTree;
};
#endif // FORMATINFOLOADER_H
diff --git a/src/pluginloader/pluginloaderbase.cpp b/src/pluginloader/pluginloaderbase.cpp
index d9a8413..f55a8e4 100755
--- a/src/pluginloader/pluginloaderbase.cpp
+++ b/src/pluginloader/pluginloaderbase.cpp
@@ -10,8 +10,8 @@ PluginLoaderBase::~PluginLoaderBase()
void PluginLoaderBase::unloadAll()
{}
-void PluginLoaderBase::unload( QString pluginName )
+void PluginLoaderBase::unload( TQString pluginName )
{}
-void PluginLoaderBase::remove( QString pluginName )
+void PluginLoaderBase::remove( TQString pluginName )
{}
diff --git a/src/pluginloader/pluginloaderbase.h b/src/pluginloader/pluginloaderbase.h
index c35bebe..4b85563 100755
--- a/src/pluginloader/pluginloaderbase.h
+++ b/src/pluginloader/pluginloaderbase.h
@@ -3,9 +3,9 @@
#ifndef PLUGINLOADERBASE_H
#define PLUGINLOADERBASE_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include "config.h"
@@ -16,9 +16,10 @@
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class PluginLoaderBase : public QObject
+class PluginLoaderBase : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Do we recommend this backend to the user
@@ -50,10 +51,10 @@ public:
virtual ~PluginLoaderBase();
/** a list of all plugin files that are loaded at the moment */
-// QStringList openPluginFiles;
+// TQStringList openPluginFiles;
/** the dom tree for loading the xml file */
- QDomDocument domTree;
+ TQDomDocument domTree;
public slots:
/**
@@ -64,12 +65,12 @@ public slots:
/**
* Unoad a specific plugin with name @p pluginName
*/
- void unload( QString pluginName );
+ void unload( TQString pluginName );
/**
* Unoad a specific plugin with name @p pluginName and delete the plugin file
*/
- void remove( QString pluginName );
+ void remove( TQString pluginName );
};
#endif // PLUGINLOADERBASE_H
@@ -77,7 +78,7 @@ public slots:
/**
-Each plugin package contains 3 files:
+Each plugin package tqcontains 3 files:
- The plugin file ( $KDE_DIR/share/apps/soundkonverter/plugins/'filename' )
- The format info file ( $KDE_DIR/share/apps/soundkonverter/format_infos/'lang'/'plugin'_'filename' )
- The service menu ( $KDE_DIR/share/apps/konqueror/servicemenus/'filename' )
diff --git a/src/pluginloader/replaygainpluginloader.cpp b/src/pluginloader/replaygainpluginloader.cpp
index 7ac11f6..2e37081 100755
--- a/src/pluginloader/replaygainpluginloader.cpp
+++ b/src/pluginloader/replaygainpluginloader.cpp
@@ -1,7 +1,7 @@
#include "replaygainpluginloader.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
@@ -19,9 +19,9 @@ ReplayGainPluginLoader::ReplayGainPluginLoader()
ReplayGainPluginLoader::~ReplayGainPluginLoader()
{}
-int ReplayGainPluginLoader::verifyFile( QString fileName )
+int ReplayGainPluginLoader::verifyFile( TQString fileName )
{
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return -1;
}
@@ -30,10 +30,10 @@ int ReplayGainPluginLoader::verifyFile( QString fileName )
}
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "replaygain" ) return -1;
int version;
- QDomNode node;
+ TQDomNode node;
node = root.firstChild();
while( !node.isNull() ) {
if( node.isElement() && node.nodeName() == "info" ) {
@@ -45,17 +45,17 @@ int ReplayGainPluginLoader::verifyFile( QString fileName )
return version;
}
-ReplayGainPlugin* ReplayGainPluginLoader::loadFile( QString fileName )
+ReplayGainPlugin* ReplayGainPluginLoader::loadFile( TQString fileName )
{
//int t_int;
//float t_float;
- //QString t_str;
+ //TQString t_str;
ReplayGainPlugin* plugin = new ReplayGainPlugin();
plugin->info.version = -1; // if something goes wrong, we can see that by looking at plugin->info.version
plugin->filePathName = fileName;
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return plugin;
}
@@ -64,9 +64,9 @@ ReplayGainPlugin* ReplayGainPluginLoader::loadFile( QString fileName )
}
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "replaygain" ) return plugin;
- QDomNode node;//, sub1Node;
+ TQDomNode node;//, sub1Node;
node = root.firstChild();
while( !node.isNull() ) {
@@ -87,7 +87,7 @@ ReplayGainPlugin* ReplayGainPluginLoader::loadFile( QString fileName )
plugin->replaygain.in_files = node.toElement().attribute("in_files");
plugin->replaygain.output_single = node.toElement().attribute("output_single");
plugin->replaygain.output_multiple = node.toElement().attribute("output_multiple");
- plugin->replaygain.mime_types = QStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") );
+ plugin->replaygain.mime_types = TQStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") );
plugin->replaygain.force = node.toElement().attribute("force");
plugin->replaygain.skip = node.toElement().attribute("skip");
plugin->replaygain.track = node.toElement().attribute("track");
diff --git a/src/pluginloader/replaygainpluginloader.h b/src/pluginloader/replaygainpluginloader.h
index d1c1237..639514f 100755
--- a/src/pluginloader/replaygainpluginloader.h
+++ b/src/pluginloader/replaygainpluginloader.h
@@ -24,39 +24,39 @@ public:
*/
virtual ~ReplayGainPlugin();
- QString filePathName; // the file name of th plugin (needed to detect write permissions)
+ TQString filePathName; // the file name of th plugin (needed to detect write permissions)
struct Info
{
int version; // the version of our plugin (v0.2.1 = 201, v11.3 = 110300)
- QString name; // the name of our plugin
- QString author; // the author of the plugin
- QString about; // a short information aboue the plugin
+ TQString name; // the name of our plugin
+ TQString author; // the author of the plugin
+ TQString about; // a short information aboue the plugin
} info;
struct ReplayGain
{
//PluginLoaderBase::FeatureLevel level;
int rank;
- QString bin;
- QString param;
- QString silent_param;
- QStringList mime_types;
- QString in_files;
- QString output_single;
- QString output_multiple;
- QString force;
- QString skip;
- QString track; // TODO remove track and album (put them into param)
- QString album;
- QString remove;
+ TQString bin;
+ TQString param;
+ TQString silent_param;
+ TQStringList mime_types;
+ TQString in_files;
+ TQString output_single;
+ TQString output_multiple;
+ TQString force;
+ TQString skip;
+ TQString track; // TODO remove track and album (put them into param)
+ TQString album;
+ TQString remove;
/*struct Test // obsolete
{
bool enabled;
- QString param;
- QString output_track;
- QString output_album;
+ TQString param;
+ TQString output_track;
+ TQString output_album;
} test;*/
} replaygain;
};
@@ -69,6 +69,7 @@ public:
class ReplayGainPluginLoader : public PluginLoaderBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -81,9 +82,9 @@ public:
virtual ~ReplayGainPluginLoader();
/** is this file a replaygain plugin and loadable? */
- int verifyFile( QString );
+ int verifyFile( TQString );
/** load a given file */
- ReplayGainPlugin* loadFile( QString );
+ ReplayGainPlugin* loadFile( TQString );
};
#endif // REPLAYGAINPLUGINLOADER_H
diff --git a/src/pluginloader/ripperpluginloader.cpp b/src/pluginloader/ripperpluginloader.cpp
index 9c1f9d4..780efc8 100755
--- a/src/pluginloader/ripperpluginloader.cpp
+++ b/src/pluginloader/ripperpluginloader.cpp
@@ -1,7 +1,7 @@
#include "ripperpluginloader.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
@@ -19,9 +19,9 @@ RipperPluginLoader::RipperPluginLoader()
RipperPluginLoader::~RipperPluginLoader()
{}
-int RipperPluginLoader::verifyFile( QString fileName )
+int RipperPluginLoader::verifyFile( TQString fileName )
{
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return -1;
}
@@ -30,10 +30,10 @@ int RipperPluginLoader::verifyFile( QString fileName )
}
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "ripper" ) return -1;
int version;
- QDomNode node;
+ TQDomNode node;
node = root.firstChild();
while( !node.isNull() ) {
if( node.isElement() && node.nodeName() == "info" ) {
@@ -45,17 +45,17 @@ int RipperPluginLoader::verifyFile( QString fileName )
return version;
}
-RipperPlugin* RipperPluginLoader::loadFile( QString fileName )
+RipperPlugin* RipperPluginLoader::loadFile( TQString fileName )
{
int t_int;
float t_float;
- QString t_str;
+ TQString t_str;
RipperPlugin* plugin = new RipperPlugin();
plugin->info.version = -1; // if something goes wrong, we can see that by looking at plugin->info.version
plugin->filePathName = fileName;
- QFile opmlFile( fileName );
+ TQFile opmlFile( fileName );
if( !opmlFile.open( IO_ReadOnly ) ) {
return plugin;
}
@@ -64,9 +64,9 @@ RipperPlugin* RipperPluginLoader::loadFile( QString fileName )
}
opmlFile.close();
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.attribute("type") != "ripper" ) return plugin;
- QDomNode node, sub1Node;
+ TQDomNode node, sub1Node;
node = root.firstChild();
while( !node.isNull() ) {
diff --git a/src/pluginloader/ripperpluginloader.h b/src/pluginloader/ripperpluginloader.h
index 6cf965e..7221d54 100755
--- a/src/pluginloader/ripperpluginloader.h
+++ b/src/pluginloader/ripperpluginloader.h
@@ -24,34 +24,34 @@ public:
*/
virtual ~RipperPlugin();
- QString filePathName; // the file name of th plugin (needed to detect write permissions)
+ TQString filePathName; // the file name of th plugin (needed to detect write permissions)
struct Info
{
int version; // the version of our plugin (v0.2.1 = 201, v11.3 = 110300)
- QString name; // the name of our plugin
- QString author; // the author of the plugin
- QString about; // a short information aboue the plugin
+ TQString name; // the name of our plugin
+ TQString author; // the author of the plugin
+ TQString about; // a short information aboue the plugin
} info;
struct Rip
{
//PluginLoaderBase::FeatureLevel level;
int rank;
- QString bin;
- QString param;
- QString silent_param;
- QString out_file;
- QString track;
- QString device;
- QString overwrite;
- QString output;
+ TQString bin;
+ TQString param;
+ TQString silent_param;
+ TQString out_file;
+ TQString track;
+ TQString device;
+ TQString overwrite;
+ TQString output;
struct FullDisc
{
bool enabled;
- QString param;
- QString output;
+ TQString param;
+ TQString output;
} full_disc;
} rip;
};
@@ -64,6 +64,7 @@ public:
class RipperPluginLoader : public PluginLoaderBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -76,9 +77,9 @@ public:
virtual ~RipperPluginLoader();
/** is this file a ripper plugin and loadable? */
- int verifyFile( QString );
+ int verifyFile( TQString );
/** load a given file */
- RipperPlugin* loadFile( QString );
+ RipperPlugin* loadFile( TQString );
};
#endif // RIPPERPLUGINLOADER_H
diff --git a/src/progressindicator.cpp b/src/progressindicator.cpp
index 91a40a2..bc8ec76 100755
--- a/src/progressindicator.cpp
+++ b/src/progressindicator.cpp
@@ -1,10 +1,10 @@
#include "progressindicator.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <ksystemtray.h>
@@ -13,40 +13,40 @@
// #include <kdebug.h>
-ProgressIndicator::ProgressIndicator( KSystemTray* _systemTray, QWidget* parent, const char* name )
- : QWidget( parent, name )
+ProgressIndicator::ProgressIndicator( KSystemTray* _systemTray, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
systemTray = _systemTray;
time = processedTime = 0;
- QGridLayout *grid = new QGridLayout( this, 1, 1, 0, 6, "grid" );
+ TQGridLayout *grid = new TQGridLayout( this, 1, 1, 0, 6, "grid" );
- QHBoxLayout *box = new QHBoxLayout( );
+ TQHBoxLayout *box = new TQHBoxLayout( );
grid->addLayout( box, 0, 0 );
- pBar = new QProgressBar( this, "pBar" );
+ pBar = new TQProgressBar( this, "pBar" );
box->addWidget( pBar );
- QGridLayout *statusChildGrid = new QGridLayout( box, 2, 2, 6, "statusChildGrid" );
+ TQGridLayout *statusChildGrid = new TQGridLayout( box, 2, 2, 6, "statusChildGrid" );
- QLabel *lSpeedText = new QLabel( i18n("Speed")+":", this, "lSpeedText" );
- statusChildGrid->addWidget( lSpeedText, 0, 0, Qt::AlignVCenter );
+ TQLabel *lSpeedText = new TQLabel( i18n("Speed")+":", this, "lSpeedText" );
+ statusChildGrid->addWidget( lSpeedText, 0, 0, TQt::AlignVCenter );
- lSpeed = new QLabel( "0.0x", this, "lSpeed" );
- lSpeed->setFont( QFont( "Courier" ) );
- statusChildGrid->addWidget( lSpeed, 0, 1, Qt::AlignVCenter | Qt::AlignRight );
+ lSpeed = new TQLabel( "0.0x", this, "lSpeed" );
+ lSpeed->setFont( TQFont( "Courier" ) );
+ statusChildGrid->addWidget( lSpeed, 0, 1, TQt::AlignVCenter | TQt::AlignRight );
speedTime.setHMS( 24, 0, 0 );
- QLabel *lTimeText = new QLabel( i18n("Time remaining")+":", this, "lTimeText" );
- statusChildGrid->addWidget( lTimeText, 1, 0, Qt::AlignVCenter );
+ TQLabel *lTimeText = new TQLabel( i18n("Time remaining")+":", this, "lTimeText" );
+ statusChildGrid->addWidget( lTimeText, 1, 0, TQt::AlignVCenter );
- lTime = new QLabel( "00:00", this, "lTime" );
- lTime->setFont( QFont( "Courier" ) );
- statusChildGrid->addWidget( lTime, 1, 1, Qt::AlignVCenter | Qt::AlignRight );
+ lTime = new TQLabel( "00:00", this, "lTime" );
+ lTime->setFont( TQFont( "Courier" ) );
+ statusChildGrid->addWidget( lTime, 1, 1, TQt::AlignVCenter | TQt::AlignRight );
elapsedTime.setHMS( 24, 0, 0 );
- QToolTip::add( systemTray, i18n("Waiting") );
+ TQToolTip::add( systemTray, i18n("Waiting") );
}
ProgressIndicator::~ProgressIndicator()
@@ -92,7 +92,7 @@ void ProgressIndicator::finished( float t )
lTime->setText( "00:00" );
speedTime.setHMS( 24, 0, 0 );
lSpeed->setText( "0.0x" );
- QToolTip::add( systemTray, i18n("Finished") );
+ TQToolTip::add( systemTray, i18n("Finished") );
emit setTitle( i18n("Finished") );
}
@@ -117,7 +117,7 @@ void ProgressIndicator::update( float t )
int sec = tim % 60;
int min = ( tim / 60 ) % 60;
int hou = tim / 3600;
- QString timeLeft;
+ TQString timeLeft;
if( hou > 0 )
timeLeft.sprintf( "%d:%02d:%02d", hou, min, sec );
else
@@ -130,15 +130,15 @@ void ProgressIndicator::update( float t )
float speed = ( processedTime + t - speedProcessedTime ) / tim;
speedProcessedTime = processedTime + t;
if( speed >= 0.0f && speed < 100000.0f ) {
- QString actSpeed;
+ TQString actSpeed;
actSpeed.sprintf( "%.1fx", speed );
lSpeed->setText( actSpeed );
}
}
- QString percent;
+ TQString percent;
percent.sprintf( "%i%%", (int)fPercent );
emit setTitle( percent );
- QToolTip::add( systemTray, percent );
+ TQToolTip::add( systemTray, percent );
}
diff --git a/src/progressindicator.h b/src/progressindicator.h
index 873a4f9..5bf4d3d 100755
--- a/src/progressindicator.h
+++ b/src/progressindicator.h
@@ -3,11 +3,11 @@
#ifndef PROGRESSINDICATOR_H
#define PROGRESSINDICATOR_H
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
-class QProgressBar;
-class QLabel;
+class TQProgressBar;
+class TQLabel;
class KSystemTray;
/**
@@ -15,14 +15,15 @@ class KSystemTray;
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class ProgressIndicator : public QWidget
+class ProgressIndicator : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- ProgressIndicator( KSystemTray* _systemTray, QWidget* parent = 0, const char* name = 0 );
+ ProgressIndicator( KSystemTray* _systemTray, TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destructor
@@ -42,20 +43,20 @@ public slots:
//private slots:
private:
- QProgressBar* pBar;
- QLabel* lSpeed;
- QLabel* lTime;
+ TQProgressBar* pBar;
+ TQLabel* lSpeed;
+ TQLabel* lTime;
KSystemTray* systemTray;
- QTime elapsedTime;
- QTime speedTime;
+ TQTime elapsedTime;
+ TQTime speedTime;
float speedProcessedTime;
float time;
float processedTime;
signals:
- void setTitle( const QString& );
+ void setTitle( const TQString& );
};
#endif // PROGRESSINDICATOR_H
diff --git a/src/replaygain.cpp b/src/replaygain.cpp
index f815a21..3e6aabd 100755
--- a/src/replaygain.cpp
+++ b/src/replaygain.cpp
@@ -4,7 +4,7 @@
#include "logger.h"
#include "replaygainpluginloader.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <klocale.h>
@@ -19,10 +19,10 @@ ReplayGain::ReplayGain( Config* _config, Logger* _logger )
ReplayGain::~ReplayGain()
{}
-bool ReplayGain::apply( QStringList files, const QString& format, KProcess* proc, int logID, Mode mode )
+bool ReplayGain::apply( TQStringList files, const TQString& format, KProcess* proc, int logID, Mode mode )
{
- QStringList params;
- QString param, paramSplinter;
+ TQStringList params;
+ TQString param, paramSplinter;
proc->clearArguments();
@@ -32,7 +32,7 @@ bool ReplayGain::apply( QStringList files, const QString& format, KProcess* proc
return false;
}
- param = QString::null;
+ param = TQString();
if( plugin->replaygain.param ) param.append( " " + plugin->replaygain.param );
if( mode & remove ) {
if( plugin->replaygain.remove ) param.append( " " + plugin->replaygain.remove );
@@ -48,29 +48,29 @@ bool ReplayGain::apply( QStringList files, const QString& format, KProcess* proc
}
}
-// if( plugin->replaygain.in_files.find("%p") != -1 ) {
-// QString t_str = plugin->replaygain.in_files;
-// t_str.replace( "%p", param );
+// if( plugin->replaygain.in_files.tqfind("%p") != -1 ) {
+// TQString t_str = plugin->replaygain.in_files;
+// t_str.tqreplace( "%p", param );
// param = plugin->replaygain.bin + " " + t_str;
// }
// else {
// param = plugin->replaygain.bin + param + " " + plugin->replaygain.in_files;
// }
- QString t_str = plugin->replaygain.in_files;
- t_str.replace( "%p", param );
+ TQString t_str = plugin->replaygain.in_files;
+ t_str.tqreplace( "%p", param );
param = config->binaries[plugin->replaygain.bin] + " " + t_str;
// cosmetic surgery
param.simplifyWhiteSpace();
- params = QStringList::split( ' ', param );
+ params = TQStringList::split( ' ', param );
- for( QStringList::Iterator it = params.begin(); it != params.end(); ++it )
+ for( TQStringList::Iterator it = params.begin(); it != params.end(); ++it )
{
paramSplinter = *it;
if( paramSplinter == "%i" ) {
- for( QStringList::Iterator b = files.begin(); b != files.end(); ++b ) {
+ for( TQStringList::Iterator b = files.begin(); b != files.end(); ++b ) {
*(proc) << KURL::decode_string( *b );
}
}
@@ -79,12 +79,12 @@ bool ReplayGain::apply( QStringList files, const QString& format, KProcess* proc
}
}
- for( QStringList::Iterator it = files.begin(); it != files.end(); ++it )
+ for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it )
{
*it = KURL::decode_string( *it );
}
- param.replace( "%i", "\""+files.join("\" \"")+"\"" );
+ param.tqreplace( "%i", "\""+files.join("\" \"")+"\"" );
logger->log( logID, " " + i18n("Executing") + ": `" + param + "'" );
proc->setPriority( config->data.general.priority );
@@ -93,4 +93,4 @@ bool ReplayGain::apply( QStringList files, const QString& format, KProcess* proc
return true;
}
-//QValueList<float> ReplayGain::getReplayGain( QString file ) {} // obsolete
+//TQValueList<float> ReplayGain::getReplayGain( TQString file ) {} // obsolete
diff --git a/src/replaygain.h b/src/replaygain.h
index ff9e38a..568d3a8 100755
--- a/src/replaygain.h
+++ b/src/replaygain.h
@@ -3,8 +3,8 @@
#ifndef REPLAYGAIN_H
#define REPLAYGAIN_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class Config;
class Logger;
@@ -15,9 +15,10 @@ class KProcess;
* @author Daniel Faust <[email protected]>
* @version 0.3
*/
-class ReplayGain : public QObject
+class ReplayGain : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode {
calc_track = 0x0001,
@@ -43,12 +44,12 @@ public:
* @param prc a pointer to a KProcess
* @param remove if true the Replay Gain tags are being removed, if false (default) the tags are calculated and added
*/
- bool apply( QStringList files, const QString& format, KProcess* proc, int logID, Mode mode = Mode(calc_track|calc_album) ); // NOTE const QStringList& ?
+ bool apply( TQStringList files, const TQString& format, KProcess* proc, int logID, Mode mode = Mode(calc_track|calc_album) ); // NOTE const TQStringList& ?
/*
* Returns the track and the album gain (in this order) of the @p file
*/
- //static QValueList<float> getReplayGain( QString file ); // obsolete
+ //static TQValueList<float> getReplayGain( TQString file ); // obsolete
private:
Config* config;
diff --git a/src/replaygainfilelist.cpp b/src/replaygainfilelist.cpp
index 2d71806..6f2eff2 100755
--- a/src/replaygainfilelist.cpp
+++ b/src/replaygainfilelist.cpp
@@ -6,13 +6,13 @@
#include "replaygain.h"
#include "replaygainpluginloader.h"
-#include <qdir.h>
-#include <qpainter.h>
-#include <qsimplerichtext.h>
-#include <qapplication.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqpainter.h>
+#include <tqsimplerichtext.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -33,8 +33,8 @@
// ### soundkonverter 0.4: give the 'track' and 'album' column a minimum width and fill the rest of the space with the 'file' column - make some margins, too
-ReplayGainFileListItem::ReplayGainFileListItem( QListView* parent )
- : KListViewItem( parent )
+ReplayGainFileListItem::ReplayGainFileListItem( TQListView* tqparent )
+ : KListViewItem( tqparent )
{
m_type = File;
mimeType = "application/octet-stream";
@@ -42,8 +42,8 @@ ReplayGainFileListItem::ReplayGainFileListItem( QListView* parent )
queued = false;
}
-// ReplayGainFileListItem::ReplayGainFileListItem( QListView* parent, QListViewItem* after )
-// : KListViewItem( parent, after )
+// ReplayGainFileListItem::ReplayGainFileListItem( TQListView* tqparent, TQListViewItem* after )
+// : KListViewItem( tqparent, after )
// {
// m_type = File;
// mimeType = "application/octet-stream";
@@ -51,8 +51,8 @@ ReplayGainFileListItem::ReplayGainFileListItem( QListView* parent )
// queued = false;
// }
-ReplayGainFileListItem::ReplayGainFileListItem( ReplayGainFileListItem* parent )
- : KListViewItem( parent )
+ReplayGainFileListItem::ReplayGainFileListItem( ReplayGainFileListItem* tqparent )
+ : KListViewItem( tqparent )
{
m_type = File;
mimeType = "application/octet-stream";
@@ -63,59 +63,59 @@ ReplayGainFileListItem::ReplayGainFileListItem( ReplayGainFileListItem* parent )
ReplayGainFileListItem::~ReplayGainFileListItem()
{}
-void ReplayGainFileListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+void ReplayGainFileListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment )
{
// NOTE speed up this function
// NOTE calculate the red color
- QColorGroup _cg( cg );
- QColor c;
+ TQColorGroup _cg( cg );
+ TQColor c;
if( column == ((ReplayGainFileList*)listView())->columnByName(i18n("File")) )
{
int margin = listView()->itemMargin();
int w = width - 2*margin;
int h = height();
- QRect textRect = p->boundingRect( margin, 0, w, h, alignment, text(column) );
+ TQRect textRect = p->boundingRect( margin, 0, w, h, tqalignment, text(column) );
if( textRect.width() > w ) {
- alignment = Qt::AlignRight | Qt::SingleLine;
+ tqalignment = TQt::AlignRight | TQt::SingleLine;
}
}
if( isSelected() && addingReplayGain ) {
- _cg.setColor( QColorGroup::Highlight, QColor( 215, 62, 62 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Highlight, TQColor( 215, 62, 62 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( addingReplayGain && column != listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 255, 234, 234 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 255, 234, 234 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( addingReplayGain && column == listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 247, 227, 227 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 247, 227, 227 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
if( isSelected() && queued ) {
- _cg.setColor( QColorGroup::Highlight, QColor( 230, 232, 100 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Highlight, TQColor( 230, 232, 100 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( queued && column != listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 255, 255, 190 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 255, 255, 190 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
else if( queued && column == listView()->sortColumn() ) {
- _cg.setColor( QColorGroup::Base, QColor( 255, 243, 168 ) );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( TQColorGroup::Base, TQColor( 255, 243, 168 ) );
+ TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
return;
}
- KListViewItem::paintCell( p, _cg, column, width, alignment );
+ KListViewItem::paintCell( p, _cg, column, width, tqalignment );
}
void ReplayGainFileListItem::setType( Type type )
@@ -138,13 +138,13 @@ void ReplayGainFileListItem::updateReplayGainCells( TagData* tags )
}
else {
if( tags->track_gain != 210588 ) {
- setText( ((ReplayGainFileList*)listView())->columnByName(i18n("Track")), QString().sprintf("%+.2f dB",tags->track_gain) );
+ setText( ((ReplayGainFileList*)listView())->columnByName(i18n("Track")), TQString().sprintf("%+.2f dB",tags->track_gain) );
}
else {
setText( ((ReplayGainFileList*)listView())->columnByName(i18n("Track")), i18n("Unknown") );
}
if( tags->album_gain != 210588 ) {
- setText( ((ReplayGainFileList*)listView())->columnByName(i18n("Album")), QString().sprintf("%+.2f dB",tags->album_gain) );
+ setText( ((ReplayGainFileList*)listView())->columnByName(i18n("Album")), TQString().sprintf("%+.2f dB",tags->album_gain) );
}
else {
setText( ((ReplayGainFileList*)listView())->columnByName(i18n("Album")), i18n("Unknown") );
@@ -152,7 +152,7 @@ void ReplayGainFileListItem::updateReplayGainCells( TagData* tags )
}
}
-int ReplayGainFileListItem::compare( QListViewItem* item, int column, bool ascending ) const
+int ReplayGainFileListItem::compare( TQListViewItem* item, int column, bool ascending ) const
{
// NOTE looking at the types, not the strings would be better
if( text(1) == "" && item->text(1) != "" ) return -1;
@@ -160,8 +160,8 @@ int ReplayGainFileListItem::compare( QListViewItem* item, int column, bool ascen
else return KListViewItem::compare( item, column, ascending );
}
-ReplayGainFileList::ReplayGainFileList( TagEngine* _tagEngine, Config* _config, Logger* _logger, QWidget *parent, const char *name )
- : KListView( parent, name )
+ReplayGainFileList::ReplayGainFileList( TagEngine* _tagEngine, Config* _config, Logger* _logger, TQWidget *tqparent, const char *name )
+ : KListView( tqparent, name )
{
tagEngine = _tagEngine;
config = _config;
@@ -174,15 +174,15 @@ ReplayGainFileList::ReplayGainFileList( TagEngine* _tagEngine, Config* _config,
processedTime = 0;
addColumn( i18n("File"), 390 );
- setColumnWidthMode( 0, QListView::Manual );
+ setColumnWidthMode( 0, TQListView::Manual );
addColumn( i18n("Track"), 90 );
- setColumnAlignment( 1, Qt::AlignRight );
+ setColumnAlignment( 1, TQt::AlignRight );
addColumn( i18n("Album"), 90 );
- setColumnAlignment( 2, Qt::AlignRight );
+ setColumnAlignment( 2, TQt::AlignRight );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
setAllColumnsShowFocus( true );
- setResizeMode( QListView::LastColumn );
+ setResizeMode( TQListView::LastColumn );
setShowSortIndicator( true );
setSorting( 0 );
setRootIsDecorated( true );
@@ -190,66 +190,66 @@ ReplayGainFileList::ReplayGainFileList( TagEngine* _tagEngine, Config* _config,
setDragEnabled( true );
setAcceptDrops( true );
- QGridLayout* grid = new QGridLayout( this, 2, 1, 11, 6 );
+ TQGridLayout* grid = new TQGridLayout( this, 2, 1, 11, 6 );
grid->setRowStretch( 0, 1 );
grid->setRowStretch( 2, 1 );
grid->setColStretch( 0, 1 );
grid->setColStretch( 2, 1 );
- pScanStatus = new KProgress( this, "pScanStatus" );
- pScanStatus->setMinimumHeight( pScanStatus->height() );
- pScanStatus->setFormat( "%v / %m" );
- pScanStatus->hide();
- grid->addWidget( pScanStatus, 1, 1 );
+ pScantqStatus = new KProgress( this, "pScantqStatus" );
+ pScantqStatus->setMinimumHeight( pScantqStatus->height() );
+ pScantqStatus->setFormat( "%v / %m" );
+ pScantqStatus->hide();
+ grid->addWidget( pScantqStatus, 1, 1 );
grid->setColStretch( 1, 2 );
contextMenu = new KPopupMenu( this );
- connect( this, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)),
- this, SLOT(showContextMenu(QListViewItem*,const QPoint&,int))
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)),
+ TQT_TQOBJECT(this), TQT_SLOT(showContextMenu(TQListViewItem*,const TQPoint&,int))
);
// we haven't got access to the action collection of soundKonverter, so let's create a new one
actionCollection = new KActionCollection( this );
- calc_gain = new KAction( i18n("Calculate Replay Gain tags"), "apply", 0, this, SLOT(calcSelectedItemsGain()), actionCollection, "calc_album" );
- remove_gain = new KAction( i18n("Remove Replay Gain tags"), "cancel", 0, this, SLOT(removeSelectedItemsGain()), actionCollection, "remove_gain" );
- remove = new KAction( i18n("Remove"), "edittrash", Key_Delete, this, SLOT(removeSelectedItems()), actionCollection, "remove" );
- paste = new KAction( i18n("Paste"), "editpaste", 0, this, 0, actionCollection, "paste" );
- newalbum = new KAction( i18n("New album"), "filenew", 0, this, SLOT(createNewAlbum()), actionCollection, "newalbum" );
- open_albums = new KAction( i18n("Open all albums"), "view_tree", 0, this, SLOT(openAlbums()), actionCollection, "open_albums" );
- close_albums = new KAction( i18n("Cloase all albums"), "view_text", 0, this, SLOT(closeAlbums()), actionCollection, "close_albums" );
+ calc_gain = new KAction( i18n("Calculate Replay Gain tags"), "apply", 0, TQT_TQOBJECT(this), TQT_SLOT(calcSelectedItemsGain()), actionCollection, "calc_album" );
+ remove_gain = new KAction( i18n("Remove Replay Gain tags"), "cancel", 0, TQT_TQOBJECT(this), TQT_SLOT(removeSelectedItemsGain()), actionCollection, "remove_gain" );
+ remove = new KAction( i18n("Remove"), "edittrash", Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(removeSelectedItems()), actionCollection, "remove" );
+ paste = new KAction( i18n("Paste"), "editpaste", 0, TQT_TQOBJECT(this), 0, actionCollection, "paste" );
+ newalbum = new KAction( i18n("New album"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(createNewAlbum()), actionCollection, "newalbum" );
+ open_albums = new KAction( i18n("Open all albums"), "view_tree", 0, TQT_TQOBJECT(this), TQT_SLOT(openAlbums()), actionCollection, "open_albums" );
+ close_albums = new KAction( i18n("Cloase all albums"), "view_text", 0, TQT_TQOBJECT(this), TQT_SLOT(closeAlbums()), actionCollection, "close_albums" );
replayGain = new ReplayGain( config, logger );
- bubble = new QSimpleRichText( i18n( "<div align=center>"
+ bubble = new TQSimpleRichText( i18n( "<div align=center>"
"<h3>Replay Gain Tool</h3>"
"With this tool you can add Replay Gain tags to your audio files and remove them."
//"<br>Replay Gain adds a volume correction information to the files for playing them at the same volume."
//"Replay Gain allows you to play all audio files at the same volume level without modifying the audio data."
"<br>Replay Gain adds a volume correction information to the files so that they can be played at an equal volume level."
// "<br><a href=\"documenation:replaygaintool\">Learn more about Replay Gain ...</a><br/>"
- "</div>" ), QApplication::font() );
+ "</div>" ), TQApplication::font() );
- connect( header(), SIGNAL(sizeChange( int, int, int )),
- SLOT(columnResizeEvent( int, int, int ))
+ connect( header(), TQT_SIGNAL(sizeChange( int, int, int )),
+ TQT_SLOT(columnResizeEvent( int, int, int ))
);
- connect( this, SIGNAL( dropped(QDropEvent*, QListViewItem*, QListViewItem*) ),
- SLOT( slotDropped(QDropEvent*, QListViewItem*, QListViewItem*) )
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*) ),
+ TQT_SLOT( slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*) )
);
process = new KProcess();
- connect( process, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(processOutput(KProcess*,char*,int))
+ connect( process, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ TQT_TQOBJECT(this), TQT_SLOT(processOutput(KProcess*,char*,int))
);
- connect( process, SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, SLOT(processOutput(KProcess*,char*,int))
+ connect( process, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ TQT_TQOBJECT(this), TQT_SLOT(processOutput(KProcess*,char*,int))
);
- connect( process, SIGNAL(processExited(KProcess*)),
- this, SLOT(processExit(KProcess*))
+ connect( process, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_TQOBJECT(this), TQT_SLOT(processExit(KProcess*))
);
- tUpdateProgress = new QTimer( this, "tUpdateProgress" );
- connect( tUpdateProgress, SIGNAL(timeout()),
- this, SLOT(update())
+ tUpdateProgress = new TQTimer( this, "tUpdateProgress" );
+ connect( tUpdateProgress, TQT_SIGNAL(timeout()),
+ TQT_TQOBJECT(this), TQT_SLOT(update())
);
}
@@ -258,7 +258,7 @@ ReplayGainFileList::~ReplayGainFileList()
delete replayGain;
}
-int ReplayGainFileList::columnByName( const QString& name )
+int ReplayGainFileList::columnByName( const TQString& name )
{
for( int i = 0; i < columns(); ++i ) {
if( columnText( i ) == name ) return i;
@@ -266,26 +266,26 @@ int ReplayGainFileList::columnByName( const QString& name )
return -1;
}
-void ReplayGainFileList::viewportPaintEvent( QPaintEvent* e )
+void ReplayGainFileList::viewportPaintEvent( TQPaintEvent* e )
{
KListView::viewportPaintEvent( e );
// the bubble help
if( childCount() == 0 ) {
- QPainter p( viewport() );
+ TQPainter p( viewport() );
bubble->setWidth( width() - 50 );
const uint w = bubble->width() + 20;
const uint h = bubble->height() + 20;
- p.setBrush( colorGroup().background() );
+ p.setBrush( tqcolorGroup().background() );
p.drawRoundRect( 15, 15, w, h, (8*200)/w, (8*200)/h );
- bubble->draw( &p, 20, 20, QRect(), colorGroup() );
+ bubble->draw( &p, 20, 20, TQRect(), tqcolorGroup() );
}
}
-void ReplayGainFileList::viewportResizeEvent( QResizeEvent* )
+void ReplayGainFileList::viewportResizeEvent( TQResizeEvent* )
{
// needed for correct redraw of bubble help
triggerUpdate();
@@ -297,22 +297,22 @@ void ReplayGainFileList::columnResizeEvent( int, int, int )
triggerUpdate();
}
-bool ReplayGainFileList::acceptDrag( QDropEvent* e ) const
+bool ReplayGainFileList::acceptDrag( TQDropEvent* e ) const
{
return ( e->source() == viewport() || KURLDrag::canDecode(e) ); // TODO verify the files
}
-void ReplayGainFileList::slotDropped( QDropEvent* e, QListViewItem*, QListViewItem* )
+void ReplayGainFileList::slotDropped( TQDropEvent* e, TQListViewItem*, TQListViewItem* )
{
- QString file;
+ TQString file;
KURL::List list;
if( KURLDrag::decode( e, list ) )
{
for( KURL::List::Iterator it = list.begin(); it != list.end(); ++it )
{
// TODO verify the files (necessary when multiple files are being dropped)
- file = QDir::convertSeparators( (*it).pathOrURL() );
- QFileInfo fileInfo( file );
+ file = TQDir::convertSeparators( (*it).pathOrURL() );
+ TQFileInfo fileInfo( file );
if( fileInfo.isDir() )
{
addDir( file );
@@ -325,12 +325,12 @@ void ReplayGainFileList::slotDropped( QDropEvent* e, QListViewItem*, QListViewIt
}
}
-void ReplayGainFileList::contentsDragEnterEvent( QDragEnterEvent *e )
+void ReplayGainFileList::contentsDragEnterEvent( TQDragEnterEvent *e )
{
e->accept( e->source() == viewport() || KURLDrag::canDecode(e) );
}
-void ReplayGainFileList::contentsDragMoveEvent( QDragMoveEvent *e )
+void ReplayGainFileList::contentsDragMoveEvent( TQDragMoveEvent *e )
{ // the mouse has moved while dragging some stuff
// if the file is added from an external app, don't let the user select the position to drop
@@ -347,7 +347,7 @@ void ReplayGainFileList::contentsDragMoveEvent( QDragMoveEvent *e )
}
// translate the coordinates of the mouse pointer
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
// and get the list view item below the pointer
ReplayGainFileListItem* item = itemAt( vp );
@@ -368,7 +368,7 @@ void ReplayGainFileList::contentsDragMoveEvent( QDragMoveEvent *e )
KListView::contentsDragMoveEvent( e );
}
-void ReplayGainFileList::contentsDropEvent( QDropEvent *e )
+void ReplayGainFileList::contentsDropEvent( TQDropEvent *e )
{ // the stuff has been dropped
emit dropped( e, 0, 0 ); // NOTE it works this way
@@ -379,17 +379,17 @@ void ReplayGainFileList::contentsDropEvent( QDropEvent *e )
cleanItemHighlighter();
// get the item below the mouse pointer, where the stuff has been dropped
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
ReplayGainFileListItem* newParent = itemAt( vp );
- // if the item is a 'file', use the parent item
+ // if the item is a 'file', use the tqparent item
if( newParent && newParent->type() != ReplayGainFileListItem::Album ) {
- newParent = newParent->parent();
+ newParent = newParent->tqparent();
}
- // TODO if the mouse is on the left side under the parent but not under the sibling item, use the parent
+ // TODO if the mouse is on the left side under the tqparent but not under the sibling item, use the tqparent
/* if( newParent == 0 && vp.x() >= 2*treeStepSize() ) {
- QPoint p = vp;
+ TQPoint p = vp;
int height = 0;
if( firstChild() ) {
height = firstChild()->height();
@@ -397,7 +397,7 @@ void ReplayGainFileList::contentsDropEvent( QDropEvent *e )
p.setY( p.y() - height );
ReplayGainFileListItem* it = itemAt( p );
if( it && it->type() != ReplayGainFileListItem::Album ) {
- newParent = it->parent();
+ newParent = it->tqparent();
}
else if( it ) {
newParent = it;
@@ -495,32 +495,32 @@ void ReplayGainFileList::contentsDropEvent( QDropEvent *e )
}
}
-int ReplayGainFileList::listDir( const QString& directory, QStringList filter, bool recursive, bool fast, int count )
+int ReplayGainFileList::listDir( const TQString& directory, TQStringList filter, bool recursive, bool fast, int count )
{ // NOTE speed up?
- QDir dir( directory );
- dir.setFilter( QDir::Files | QDir::Dirs | QDir::NoSymLinks | QDir::Readable );
+ TQDir dir( directory );
+ dir.setFilter( TQDir::Files | TQDir::Dirs | TQDir::NoSymLinks | TQDir::Readable );
- QStringList list = dir.entryList();
+ TQStringList list = dir.entryList();
- for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
if( *it == "." || *it == ".." ) continue;
- QFileInfo fileInfo( directory + "/" + *it );
+ TQFileInfo fileInfo( directory + "/" + *it );
if( fast ) {
if( fileInfo.isDir() && recursive ) {
count = listDir( directory + "/" + *it, filter, recursive, fast, count );
}
else if( !fileInfo.isDir() || !recursive ) { // NOTE checking for isFile may not work with all file names
// NOTE filter feature
- for( QStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
- if( (*it).endsWith("."+(*jt),false) ) {
+ for( TQStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
+ if( (*it).tqendsWith("."+(*jt),false) ) {
count++;
- pScanStatus->setTotalSteps( count );
+ pScantqStatus->setTotalSteps( count );
break;
}
}
if( filter.first() == "" ) {
count++;
- pScanStatus->setTotalSteps( count );
+ pScantqStatus->setTotalSteps( count );
}
}
}
@@ -530,18 +530,18 @@ int ReplayGainFileList::listDir( const QString& directory, QStringList filter, b
}
else if( !fileInfo.isDir() || !recursive ) { // NOTE checking for isFile may not work with all file names
// NOTE filter feature
- for( QStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
- if( (*it).endsWith("."+(*jt),false) ) {
+ for( TQStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
+ if( (*it).tqendsWith("."+(*jt),false) ) {
addFile( KURL::encode_string(directory + "/" + *it) );
count++;
- pScanStatus->setProgress( count );
+ pScantqStatus->setProgress( count );
break;
}
}
if( filter.first() == "" ) {
addFile( KURL::encode_string(directory + "/" + *it) );
count++;
- pScanStatus->setProgress( count );
+ pScantqStatus->setProgress( count );
}
}
}
@@ -550,7 +550,7 @@ int ReplayGainFileList::listDir( const QString& directory, QStringList filter, b
return count;
}
-void ReplayGainFileList::showContextMenu( QListViewItem* item, const QPoint& point, int )
+void ReplayGainFileList::showContextMenu( TQListViewItem* item, const TQPoint& point, int )
{
// remove all items from the context menu
contextMenu->clear();
@@ -581,11 +581,11 @@ void ReplayGainFileList::showContextMenu( QListViewItem* item, const QPoint& poi
contextMenu->popup( point );
}
-void ReplayGainFileList::addFile( const QString& file )
+void ReplayGainFileList::addFile( const TQString& file )
{
- QString filename = file;
- QString filePathName;
- QString device;
+ TQString filename = file;
+ TQString filePathName;
+ TQString device;
if( filename.left( 1 ) == "/" ) {
filePathName = filename;
@@ -597,13 +597,13 @@ void ReplayGainFileList::addFile( const QString& file )
else if( filename.left( 13 ) == "system:/home/" ) {
filePathName = filename;
filePathName.remove( 0, 13 );
- filePathName = QDir::homeDirPath() + "/" + filePathName;
+ filePathName = TQDir::homeDirPath() + "/" + filePathName;
}
else if( filename.left( 14 ) == "system:/users/" || filename.left( 6 ) == "home:/" ) {
int length = ( filename.left(6) == "home:/" ) ? 6 : 14;
- QString username = filename;
+ TQString username = filename;
username.remove( 0, length );
- username = username.left( username.find("/") );
+ username = username.left( username.tqfind("/") );
filePathName = filename;
filePathName.remove( 0, length + username.length() );
KUser user( username );
@@ -613,7 +613,7 @@ void ReplayGainFileList::addFile( const QString& file )
int length = ( filename.left(7) == "media:/" ) ? 7 : 14;
device = filename;
device.remove( 0, length );
- device = "/dev/" + device.left( device.find( "/" ) );
+ device = "/dev/" + device.left( device.tqfind( "/" ) );
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
@@ -634,7 +634,7 @@ void ReplayGainFileList::addFile( const QString& file )
TagData* tags = tagEngine->readTags( KURL::decode_string(filePathName) );
if( !tags || tags->album.isEmpty() ) {
ReplayGainFileListItem* item = new ReplayGainFileListItem( this );
- item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 );
+ item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 );
item->mimeType = KMimeType::findByFileContent( filePathName )->name();
item->fileFormat = KMimeType::findByFileContent( filePathName )->patterns().first();
if( item->mimeType.isEmpty() || item->mimeType == "application/octet-stream" || item->mimeType == "text/plain" ) {
@@ -651,30 +651,30 @@ void ReplayGainFileList::addFile( const QString& file )
else {
FormatItem* formatItem = config->getFormatItem( item->mimeType );
if( formatItem && formatItem->size > 0 ) {
- QFileInfo fileInfo( filePathName );
+ TQFileInfo fileInfo( filePathName );
item->time = fileInfo.size() / formatItem->size;
}
else {
item->time = 210;
}
}
- item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).replace("%2f","/").replace("%%","%") );
+ item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).tqreplace("%2f","/").tqreplace("%%","%") );
if( tags && tags->track_gain != 210588 ) {
- item->setText( columnByName(i18n("Track")), QString().sprintf("%+.2f dB",tags->track_gain) );
+ item->setText( columnByName(i18n("Track")), TQString().sprintf("%+.2f dB",tags->track_gain) );
}
else {
item->setText( columnByName(i18n("Track")), i18n("Unknown") );
}
if( tags && tags->album_gain != 210588 ) {
- item->setText( columnByName(i18n("Album")), QString().sprintf("%+.2f dB",tags->album_gain) );
+ item->setText( columnByName(i18n("Album")), TQString().sprintf("%+.2f dB",tags->album_gain) );
}
else {
item->setText( columnByName(i18n("Album")), i18n("Unknown") );
}
}
else {
- QString mimeType = KMimeType::findByFileContent( filePathName )->name();
- QString fileFormat = KMimeType::findByFileContent( filePathName )->patterns().first();
+ TQString mimeType = KMimeType::findByFileContent( filePathName )->name();
+ TQString fileFormat = KMimeType::findByFileContent( filePathName )->patterns().first();
if( mimeType.isEmpty() || mimeType == "application/octet-stream" || mimeType == "text/plain" ) {
mimeType = KMimeType::findByURL( filePathName.lower() )->name();
fileFormat = KMimeType::findByURL( filePathName.lower() )->patterns().first();
@@ -685,23 +685,23 @@ void ReplayGainFileList::addFile( const QString& file )
}
for( ReplayGainFileListItem* it = firstChild(); it != 0; it = it->nextSibling() ) {
- //if( it->text(0) == QString(tags->artist+" - "+tags->album) ) {
+ //if( it->text(0) == TQString(tags->artist+" - "+tags->album) ) {
if( it->text(columnByName(i18n("File"))) == tags->album && it->type() == ReplayGainFileListItem::Album && it->mimeType == mimeType ) {
ReplayGainFileListItem* item = new ReplayGainFileListItem( it );
- item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 );
+ item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 );
item->filePathName = filePathName;
item->mimeType = mimeType;
item->fileFormat = fileFormat;
item->time = tags->length;
- item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).replace("%2f","/").replace("%%","%") );
+ item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).tqreplace("%2f","/").tqreplace("%%","%") );
if( tags->track_gain != 210588 ) {
- item->setText( columnByName(i18n("Track")), QString().sprintf("%+.2f dB",tags->track_gain) );
+ item->setText( columnByName(i18n("Track")), TQString().sprintf("%+.2f dB",tags->track_gain) );
}
else {
item->setText( columnByName(i18n("Track")), i18n("Unknown") );
}
if( tags->album_gain != 210588 ) {
- item->setText( columnByName(i18n("Album")), QString().sprintf("%+.2f dB",tags->album_gain) );
+ item->setText( columnByName(i18n("Album")), TQString().sprintf("%+.2f dB",tags->album_gain) );
}
else {
item->setText( columnByName(i18n("Album")), i18n("Unknown") );
@@ -711,27 +711,27 @@ void ReplayGainFileList::addFile( const QString& file )
} // |
} // |
if( tags ) { // <--'
- ReplayGainFileListItem* parent = new ReplayGainFileListItem( this );
- //parent->setText( 0, tags->artist+" - "+tags->album );
- parent->setText( columnByName(i18n("File")), tags->album );
- parent->setType( ReplayGainFileListItem::Album );
- parent->mimeType = mimeType;
- parent->fileFormat = fileFormat;
- ReplayGainFileListItem* item = new ReplayGainFileListItem( parent );
- item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.findRev(".") - 1 );
+ ReplayGainFileListItem* tqparent = new ReplayGainFileListItem( this );
+ //tqparent->setText( 0, tags->artist+" - "+tags->album );
+ tqparent->setText( columnByName(i18n("File")), tags->album );
+ tqparent->setType( ReplayGainFileListItem::Album );
+ tqparent->mimeType = mimeType;
+ tqparent->fileFormat = fileFormat;
+ ReplayGainFileListItem* item = new ReplayGainFileListItem( tqparent );
+ item->originalFileFormat = filePathName.right( filePathName.length() - filePathName.tqfindRev(".") - 1 );
item->filePathName = filePathName;
item->mimeType = mimeType;
item->fileFormat = fileFormat;
item->time = tags->length;
- item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).replace("%2f","/").replace("%%","%") );
+ item->setText( columnByName(i18n("File")), KURL::decode_string(filePathName).tqreplace("%2f","/").tqreplace("%%","%") );
if( tags->track_gain != 210588 ) {
- item->setText( columnByName(i18n("Track")), QString().sprintf("%+.2f dB",tags->track_gain) );
+ item->setText( columnByName(i18n("Track")), TQString().sprintf("%+.2f dB",tags->track_gain) );
}
else {
item->setText( columnByName(i18n("Track")), i18n("Unknown") );
}
if( tags->album_gain != 210588 ) {
- item->setText( columnByName(i18n("Album")), QString().sprintf("%+.2f dB",tags->album_gain) );
+ item->setText( columnByName(i18n("Album")), TQString().sprintf("%+.2f dB",tags->album_gain) );
}
else {
item->setText( columnByName(i18n("Album")), i18n("Unknown") );
@@ -740,17 +740,17 @@ void ReplayGainFileList::addFile( const QString& file )
}
}
-void ReplayGainFileList::addDir( const QString& directory, const QStringList& filter, bool recursive )
+void ReplayGainFileList::addDir( const TQString& directory, const TQStringList& filter, bool recursive )
{
- pScanStatus->setProgress( 0 );
- pScanStatus->setTotalSteps( 0 );
- pScanStatus->show(); // show the status while scanning the directories
+ pScantqStatus->setProgress( 0 );
+ pScantqStatus->setTotalSteps( 0 );
+ pScantqStatus->show(); // show the status while scanning the directories
kapp->processEvents();
int count = listDir( directory, filter, recursive, true );
listDir( directory, filter, recursive );
- pScanStatus->hide(); // hide the status bar, when the scan is done
+ pScantqStatus->hide(); // hide the status bar, when the scan is done
}
void ReplayGainFileList::openAlbums()
@@ -836,18 +836,18 @@ void ReplayGainFileList::calcSelectedItemsGain()
if( item->type() == ReplayGainFileListItem::File ) {
if( item->isSelected() ) {
item->queued = true;
- item->repaint();
+ item->tqrepaint();
item->mode = ReplayGainFileListItem::force;
}
}
else {
if( item->isSelected() ) {
item->queued = true;
- item->repaint();
+ item->tqrepaint();
item->mode = ReplayGainFileListItem::force;
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
sub_item->queued = true;
- sub_item->repaint();
+ sub_item->tqrepaint();
sub_item->mode = ReplayGainFileListItem::force;
}
}
@@ -855,11 +855,11 @@ void ReplayGainFileList::calcSelectedItemsGain()
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
if( sub_item->isSelected() ) {
item->queued = true;
- item->repaint();
+ item->tqrepaint();
item->mode = ReplayGainFileListItem::force;
for( ReplayGainFileListItem* sub_item2 = item->firstChild(); sub_item2 != 0; sub_item2 = sub_item2->nextSibling() ) {
sub_item2->queued = true;
- sub_item2->repaint();
+ sub_item2->tqrepaint();
sub_item2->mode = ReplayGainFileListItem::force;
}
break;
@@ -878,18 +878,18 @@ void ReplayGainFileList::removeSelectedItemsGain()
if( item->type() == ReplayGainFileListItem::File ) {
if( item->isSelected() && !item->addingReplayGain ) {
item->queued = true;
- item->repaint();
+ item->tqrepaint();
item->mode = ReplayGainFileListItem::remove;
}
}
else {
if( item->isSelected() && !item->addingReplayGain ) {
item->queued = true;
- item->repaint();
+ item->tqrepaint();
item->mode = ReplayGainFileListItem::remove;
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
sub_item->queued = true;
- sub_item->repaint();
+ sub_item->tqrepaint();
sub_item->mode = ReplayGainFileListItem::remove;
}
}
@@ -897,7 +897,7 @@ void ReplayGainFileList::removeSelectedItemsGain()
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
if( sub_item->isSelected() && !sub_item->addingReplayGain ) {
sub_item->queued = true;
- sub_item->repaint();
+ sub_item->tqrepaint();
sub_item->mode = ReplayGainFileListItem::remove;
}
}
@@ -913,10 +913,10 @@ void ReplayGainFileList::calcReplayGain( ReplayGainFileListItem* item )
logger->log( logID, "Mime Type: " + item->mimeType );
logger->log( logID, i18n("Applying Replay Gain") );
- QStringList fileList;
+ TQStringList fileList;
bool force = false;
if( mode & ReplayGainFileListItem::force ) force = true;
- QString album_gain = "";
+ TQString album_gain = "";
bool skip = true;
timeCount = 0;
@@ -926,18 +926,18 @@ void ReplayGainFileList::calcReplayGain( ReplayGainFileListItem* item )
if( item->type() == ReplayGainFileListItem::Album ) {
item->queued = false;
item->addingReplayGain = true;
- item->repaint();
+ item->tqrepaint();
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
if( sub_item->queued && sub_item->mode & ReplayGainFileListItem::force ) force = true; // NOTE can this be replaced by checking item?
sub_item->queued = false;
sub_item->addingReplayGain = true;
- sub_item->repaint();
+ sub_item->tqrepaint();
fileList += sub_item->filePathName;
files++;
timeCount += sub_item->time;
- QString current_gain = sub_item->text( columnByName(i18n("Album")) );
+ TQString current_gain = sub_item->text( columnByName(i18n("Album")) );
if( album_gain == "" ) album_gain = current_gain;
else if( album_gain != current_gain ) skip = false;
}
@@ -953,10 +953,10 @@ void ReplayGainFileList::calcReplayGain( ReplayGainFileListItem* item )
else {
logger->processCompleted( logID, 0 );
item->addingReplayGain = false;
- item->repaint();
+ item->tqrepaint();
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
sub_item->addingReplayGain = false;
- sub_item->repaint();
+ sub_item->tqrepaint();
}
processNextFile();
}
@@ -966,7 +966,7 @@ void ReplayGainFileList::calcReplayGain( ReplayGainFileListItem* item )
item->queued = false;
item->addingReplayGain = true;
- item->repaint();
+ item->tqrepaint();
files = 1;
timeCount = item->time;
@@ -989,13 +989,13 @@ void ReplayGainFileList::removeReplayGain( ReplayGainFileListItem* item )
if( item->type() == ReplayGainFileListItem::File ) {
item->queued = false;
item->addingReplayGain = true;
- item->repaint();
+ item->tqrepaint();
timeCount = item->time;
replayGain->apply( item->filePathName, item->mimeType, process, logID, ReplayGain::remove );
}
else {
item->queued = false;
- item->repaint();
+ item->tqrepaint();
processNextFile();
}
}
@@ -1074,9 +1074,9 @@ void ReplayGainFileList::processNextFile()
ReplayGainFileListItem* currentSubItem = 0;
if( !currentItem ) { currentItem = firstChild(); }
- else if( currentItem->type() == ReplayGainFileListItem::File && currentItem->parent() == 0 ) { currentItem = currentItem->nextSibling(); }
+ else if( currentItem->type() == ReplayGainFileListItem::File && currentItem->tqparent() == 0 ) { currentItem = currentItem->nextSibling(); }
else if( currentItem->type() == ReplayGainFileListItem::Album ) { currentItem = currentItem->nextSibling(); }
- else { currentSubItem = currentItem->nextSibling(); currentItem = currentItem->parent(); if( !currentSubItem ) { currentItem = currentItem->nextSibling(); } }
+ else { currentSubItem = currentItem->nextSibling(); currentItem = currentItem->tqparent(); if( !currentSubItem ) { currentItem = currentItem->nextSibling(); } }
for( ReplayGainFileListItem* item = currentItem; item != 0; item = item->nextSibling() ) {
if( item->type() == ReplayGainFileListItem::File ) {
@@ -1133,11 +1133,11 @@ void ReplayGainFileList::processOutput( KProcess* proc, char* data, int )
{
int iPercent = 0, iTime = 0, iPos = 0, iNum = 0;
- QString log_data = data;
- log_data.replace("\n","\\n");
- log_data.replace("\t","\\t");
- log_data.replace("\r","\\r");
- log_data.replace("\b","\\b");
+ TQString log_data = data;
+ log_data.tqreplace("\n","\\n");
+ log_data.tqreplace("\t","\\t");
+ log_data.tqreplace("\r","\\r");
+ log_data.tqreplace("\b","\\b");
logger->log( logID, " " + i18n("Output") + ": " + log_data );
ReplayGainPlugin* plugin = config->replaygainForFormat( currentItem->mimeType );
@@ -1150,28 +1150,28 @@ void ReplayGainFileList::processOutput( KProcess* proc, char* data, int )
return;
}
- QString outputPattern = ( files > 1 ) ? plugin->replaygain.output_multiple : plugin->replaygain.output_single;
- //outputPattern.replace( "%i", "%p" ); // for compatibility with old plugins
+ TQString outputPattern = ( files > 1 ) ? plugin->replaygain.output_multiple : plugin->replaygain.output_single;
+ //outputPattern.tqreplace( "%i", "%p" ); // for compatibility with old plugins
- if( outputPattern.find("%p") != -1 || outputPattern.find("%a") != -1 ) {
- outputPattern.replace( "%p", "%i" );
- //outputPattern.replace( "%a", "%i" ); // for compatibility with old plugins
+ if( outputPattern.tqfind("%p") != -1 || outputPattern.tqfind("%a") != -1 ) {
+ outputPattern.tqreplace( "%p", "%i" );
+ //outputPattern.tqreplace( "%a", "%i" ); // for compatibility with old plugins
sscanf( data, outputPattern, &iPercent );
}
- /*else if( outputPattern.find("%t") != -1 ) { // NOTE a little bit complicated and not necessary
- outputPattern.replace( "%t", "%i" );
+ /*else if( outputPattern.tqfind("%t") != -1 ) { // NOTE a little bit complicated and not necessary
+ outputPattern.tqreplace( "%t", "%i" );
sscanf( data, outputPattern, &iTime );
iPercent = iTime * 100 / currentItem->time;
}*/
- else if( outputPattern.find("%0") != -1 && outputPattern.find("%1") != -1 ) {
- if( outputPattern.find("%0") < outputPattern.find("%1") ) {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ else if( outputPattern.tqfind("%0") != -1 && outputPattern.tqfind("%1") != -1 ) {
+ if( outputPattern.tqfind("%0") < outputPattern.tqfind("%1") ) {
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iPos, &iNum );
}
else {
- outputPattern.replace( "%0", "%i" );
- outputPattern.replace( "%1", "%i" );
+ outputPattern.tqreplace( "%0", "%i" );
+ outputPattern.tqreplace( "%1", "%i" );
sscanf( data, outputPattern, &iNum, &iPos );
}
if( iPos != 0 && iNum != 0 ) iPercent = iPos * 100 / iNum;
@@ -1201,43 +1201,43 @@ void ReplayGainFileList::processExit( KProcess* proc )
if( item->addingReplayGain ) {
processedTime += item->time;
item->addingReplayGain = false;
- item->repaint();
+ item->tqrepaint();
item->updateReplayGainCells( tagEngine->readTags(KURL::decode_string(item->filePathName)) );
}
if( item->queued && proc->signalled() ) {
item->queued = false;
- item->repaint();
+ item->tqrepaint();
}
}
else {
if( item->addingReplayGain ) {
item->addingReplayGain = false;
- item->repaint();
+ item->tqrepaint();
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
processedTime += sub_item->time;
sub_item->addingReplayGain = false;
- sub_item->repaint();
+ sub_item->tqrepaint();
sub_item->updateReplayGainCells( tagEngine->readTags(KURL::decode_string(sub_item->filePathName)) );
}
}
if( item->queued && proc->signalled() ) {
item->queued = false;
- item->repaint();
+ item->tqrepaint();
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
sub_item->queued = false;
- sub_item->repaint();
+ sub_item->tqrepaint();
}
}
for( ReplayGainFileListItem* sub_item = item->firstChild(); sub_item != 0; sub_item = sub_item->nextSibling() ) {
if( sub_item->addingReplayGain ) {
processedTime += sub_item->time;
sub_item->addingReplayGain = false;
- sub_item->repaint();
+ sub_item->tqrepaint();
sub_item->updateReplayGainCells( tagEngine->readTags(KURL::decode_string(sub_item->filePathName)) );
}
if( sub_item->queued && proc->signalled() ) {
sub_item->queued = false;
- sub_item->repaint();
+ sub_item->tqrepaint();
}
}
}
diff --git a/src/replaygainfilelist.h b/src/replaygainfilelist.h
index a147c44..1228aea 100755
--- a/src/replaygainfilelist.h
+++ b/src/replaygainfilelist.h
@@ -5,7 +5,7 @@
#include <klistview.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class TagEngine;
@@ -14,7 +14,7 @@ class ReplayGain;
class Config;
class Logger;
-class QSimpleRichText;
+class TQSimpleRichText;
class KProgress;
class KPopupMenu;
@@ -44,38 +44,38 @@ public:
/**
* Constructor
- * @param parent The parent list view
+ * @param tqparent The tqparent list view
*/
- ReplayGainFileListItem( QListView* parent );
+ ReplayGainFileListItem( TQListView* tqparent );
/*
* Constructor
- * @param parent The parent list view
+ * @param tqparent The tqparent list view
* @param after The item, the new item should be placed after
*/
- //ReplayGainFileListItem( QListView* parent, QListViewItem* after );
+ //ReplayGainFileListItem( TQListView* tqparent, TQListViewItem* after );
/**
* Constructor
- * @param parent The parent list view item
+ * @param tqparent The tqparent list view item
*/
- ReplayGainFileListItem( ReplayGainFileListItem* parent );
+ ReplayGainFileListItem( ReplayGainFileListItem* tqparent );
/**
* Destructor
*/
virtual ~ReplayGainFileListItem();
- virtual void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int alignment );
+ virtual void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int tqalignment );
- int compare( QListViewItem* item, int column, bool ascending ) const;
+ int compare( TQListViewItem* item, int column, bool ascending ) const;
void updateReplayGainCells( TagData* );
ReplayGainFileListItem* firstChild() const { return static_cast<ReplayGainFileListItem*>( KListViewItem::firstChild() ); }
ReplayGainFileListItem* nextSibling() const { return static_cast<ReplayGainFileListItem*>( KListViewItem::nextSibling() ); }
//ReplayGainFileListItem* itemBelow() { return static_cast<ReplayGainFileListItem*>( KListViewItem::itemBelow() ); }
- ReplayGainFileListItem* parent() const { return static_cast<ReplayGainFileListItem*>( KListViewItem::parent() ); }
+ ReplayGainFileListItem* tqparent() const { return static_cast<ReplayGainFileListItem*>( KListViewItem::tqparent() ); }
Type type() { return m_type; }
void setType( Type );
@@ -86,11 +86,11 @@ public:
* metaflac: 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
*/
- QString filePathName; // the path and name of the file
- //QString fileName; // just the _name_ of the file
- QString mimeType; // the mime type of the file / the mime type of all files in this album
- QString fileFormat; // just the _format_ of the file / the format of all files in this album (for easier use)
- QString originalFileFormat; // after renaming we need to re-rename the file
+ TQString filePathName; // the path and name of the file
+ //TQString fileName; // just the _name_ of the file
+ TQString mimeType; // the mime type of the file / the mime type of all files in this album
+ TQString fileFormat; // just the _format_ of the file / the format of all files in this album (for easier use)
+ TQString originalFileFormat; // after renaming we need to re-rename the file
bool addingReplayGain; // are we adding replay gain tags at the moment?
bool queued; // is this item queued for adding/removing replay gain?
Mode mode;
@@ -109,13 +109,14 @@ private:
class ReplayGainFileList : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
- * @param parent The parent widget
+ * @param tqparent The tqparent widget
* @param name The name of the file list
*/
- ReplayGainFileList( TagEngine*, Config*, Logger*, QWidget *parent=0, const char *name=0 );
+ ReplayGainFileList( TagEngine*, Config*, Logger*, TQWidget *tqparent=0, const char *name=0 );
/**
* Destructor
@@ -123,12 +124,12 @@ public:
virtual ~ReplayGainFileList();
ReplayGainFileListItem* firstChild() const { return static_cast<ReplayGainFileListItem*>( KListView::firstChild() ); }
- ReplayGainFileListItem* itemAt( const QPoint& point ) const { return static_cast<ReplayGainFileListItem*>( KListView::itemAt(point) ); }
+ ReplayGainFileListItem* itemAt( const TQPoint& point ) const { return static_cast<ReplayGainFileListItem*>( KListView::itemAt(point) ); }
- int columnByName( const QString& name );
+ int columnByName( const TQString& name );
protected:
- virtual bool acceptDrag( QDropEvent *e ) const;
+ virtual bool acceptDrag( TQDropEvent *e ) const;
private slots:
void columnResizeEvent( int, int, int );
@@ -137,18 +138,18 @@ private slots:
void update();
public slots:
- void addFile( const QString& );
- void addDir( const QString&, const QStringList& filter = "", bool recursive = true );
+ void addFile( const TQString& );
+ void addDir( const TQString&, const TQStringList& filter = "", bool recursive = true );
void calcAllReplayGain( bool force );
void removeAllReplayGain();
void cancelProcess();
private:
/** Lists all file in a directory and adds them to the file list, if @p fast is false. The number of listed files is returned */
- int listDir( const QString& directory, QStringList filter, bool recursive = true, bool fast = false, int count = 0 );
+ int listDir( const TQString& directory, TQStringList filter, bool recursive = true, bool fast = false, int count = 0 );
/** A progressbar, that is shown, when a directory is added recursive */
- KProgress* pScanStatus;
+ KProgress* pScantqStatus;
TagEngine* tagEngine;
Config* config;
@@ -158,14 +159,14 @@ private:
ReplayGain* replayGain;
int logID;
- void contentsDragEnterEvent( QDragEnterEvent *e );
- void contentsDragMoveEvent( QDragMoveEvent *e );
- void contentsDropEvent( QDropEvent *e );
+ void contentsDragEnterEvent( TQDragEnterEvent *e );
+ void contentsDragMoveEvent( TQDragMoveEvent *e );
+ void contentsDropEvent( TQDropEvent *e );
- void viewportPaintEvent( QPaintEvent* );
- void viewportResizeEvent( QResizeEvent* );
+ void viewportPaintEvent( TQPaintEvent* );
+ void viewportResizeEvent( TQResizeEvent* );
- QSimpleRichText* bubble;
+ TQSimpleRichText* bubble;
void startProcess();
@@ -178,7 +179,7 @@ private:
ReplayGainFileListItem::Mode mode;
ReplayGainFileListItem* currentItem;
- QTimer* tUpdateProgress;
+ TQTimer* tUpdateProgress;
bool processing; // true, if the progress is active (hide some options in the context menu)
int percent; // the progress of the current file / album
int lastPercent; // cache the last percent in order to record a 'track change'
@@ -201,7 +202,7 @@ private:
KAction* close_albums;
private slots:
- void showContextMenu( QListViewItem*, const QPoint&, int );
+ void showContextMenu( TQListViewItem*, const TQPoint&, int );
/**
* Remove selected items from the file list
@@ -223,7 +224,7 @@ private slots:
*/
void removeSelectedItemsGain();
- void slotDropped( QDropEvent*, QListViewItem*, QListViewItem* ); // NOTE rename?
+ void slotDropped( TQDropEvent*, TQListViewItem*, TQListViewItem* ); // NOTE rename?
void processOutput( KProcess*, char*, int );
void processExit( KProcess* );
@@ -231,7 +232,7 @@ private slots:
signals:
//void calcGain();
//void removeGain();
-// void addFile( const QString& filename );
+// void addFile( const TQString& filename );
void processStarted();
void processStopped();
diff --git a/src/replaygainscanner.cpp b/src/replaygainscanner.cpp
index 9eb0bcd..2303e18 100755
--- a/src/replaygainscanner.cpp
+++ b/src/replaygainscanner.cpp
@@ -5,11 +5,11 @@
#include "config.h"
#include "dirdialog.h"
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -20,8 +20,8 @@
// FIXME file name encoding !!!
-ReplayGainScanner::ReplayGainScanner( TagEngine* _tagEngine, Config* _config, Logger* _logger, QWidget *parent, const char *name, bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+ReplayGainScanner::ReplayGainScanner( TagEngine* _tagEngine, Config* _config, Logger* _logger, TQWidget *tqparent, const char *name, bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
tagEngine = _tagEngine;
config = _config;
@@ -34,29 +34,29 @@ ReplayGainScanner::ReplayGainScanner( TagEngine* _tagEngine, Config* _config, Lo
resize( 600, 400 );
setIcon( iconLoader->loadIcon("soundkonverter_replaygain",KIcon::Small) );
- QGridLayout* grid = new QGridLayout( this, 4, 1, 11, 6 );
+ TQGridLayout* grid = new TQGridLayout( this, 4, 1, 11, 6 );
- QHBoxLayout* filterBox = new QHBoxLayout();
+ TQHBoxLayout* filterBox = new TQHBoxLayout();
grid->addLayout( filterBox, 0, 0 );
cAdd = new ComboButton( this, "cAdd" );
cAdd->insertItem( iconLoader->loadIcon("folder",KIcon::Small),i18n("Add Folder ...") );
cAdd->insertItem( iconLoader->loadIcon("sound",KIcon::Small),i18n("Add Files ...") );
filterBox->addWidget( cAdd );
- connect( cAdd, SIGNAL(clicked(int)),
- this, SLOT(addClicked(int))
+ connect( cAdd, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(addClicked(int))
);
filterBox->addStretch();
- cForce = new QCheckBox( i18n("Force recalculation"), this, "cForce" );
- QToolTip::add( cForce, i18n("Recalculate Replay Gain tag for files that already have a Replay Gain tag set.") );
+ cForce = new TQCheckBox( i18n("Force recalculation"), this, "cForce" );
+ TQToolTip::add( cForce, i18n("Recalculate Replay Gain tag for files that already have a Replay Gain tag set.") );
filterBox->addWidget( cForce );
- /*QLabel *lFilter=new QLabel(i18n("Show:"),this,"lFilter");
+ /*TQLabel *lFilter=new TQLabel(i18n("Show:"),this,"lFilter");
filterBox->addWidget(lFilter);
- cFilter=new QComboBox(this,"cFilter");
+ cFilter=new TQComboBox(this,"cFilter");
cFilter->insertItem(i18n("All"));
cFilter->insertItem(i18n("With Replay Gain"));
cFilter->insertItem(i18n("Without Replay Gain"));
@@ -65,59 +65,59 @@ ReplayGainScanner::ReplayGainScanner( TagEngine* _tagEngine, Config* _config, Lo
lList = new ReplayGainFileList( tagEngine, config, logger, this, "lList" );
grid->addWidget( lList, 1, 0 );
- connect( this, SIGNAL(addFile(const QString&)),
- lList, SLOT(addFile(const QString&))
+ connect( this, TQT_SIGNAL(addFile(const TQString&)),
+ lList, TQT_SLOT(addFile(const TQString&))
);
- connect( this, SIGNAL(addDir(const QString&,const QStringList&,bool)),
- lList, SLOT(addDir(const QString&,const QStringList&,bool))
+ connect( this, TQT_SIGNAL(addDir(const TQString&,const TQStringList&,bool)),
+ lList, TQT_SLOT(addDir(const TQString&,const TQStringList&,bool))
);
- connect( this, SIGNAL(calcAllReplayGain(bool)),
- lList, SLOT(calcAllReplayGain(bool))
+ connect( this, TQT_SIGNAL(calcAllReplayGain(bool)),
+ lList, TQT_SLOT(calcAllReplayGain(bool))
);
- connect( this, SIGNAL(removeAllReplayGain()),
- lList, SLOT(removeAllReplayGain())
+ connect( this, TQT_SIGNAL(removeAllReplayGain()),
+ lList, TQT_SLOT(removeAllReplayGain())
);
- connect( this, SIGNAL(cancelProcess()),
- lList, SLOT(cancelProcess())
+ connect( this, TQT_SIGNAL(cancelProcess()),
+ lList, TQT_SLOT(cancelProcess())
);
- connect( lList, SIGNAL(processStarted()),
- this, SLOT(processStarted())
+ connect( lList, TQT_SIGNAL(processStarted()),
+ this, TQT_SLOT(processStarted())
);
- connect( lList, SIGNAL(processStopped()),
- this, SLOT(processStopped())
+ connect( lList, TQT_SIGNAL(processStopped()),
+ this, TQT_SLOT(processStopped())
);
- connect( lList, SIGNAL(updateProgress(int,int)),
- this, SLOT(updateProgress(int,int))
+ connect( lList, TQT_SIGNAL(updateProgress(int,int)),
+ this, TQT_SLOT(updateProgress(int,int))
);
- QHBoxLayout* progressBox = new QHBoxLayout();
+ TQHBoxLayout* progressBox = new TQHBoxLayout();
grid->addLayout( progressBox, 2, 0 );
pProgressBar = new KProgress( this, "pProgressBar" );
progressBox->addWidget( pProgressBar );
- QHBoxLayout* buttonBox = new QHBoxLayout();
+ TQHBoxLayout* buttonBox = new TQHBoxLayout();
grid->addLayout( buttonBox, 3, 0 );
pTagVisible = new KPushButton( iconLoader->loadIcon("apply",KIcon::Small), i18n("Tag untagged"), this, "pTagVisible" );
- QToolTip::add( pTagVisible, i18n("Calculate Replay Gain tag for all files in the file list without Replay Gain tag.") );
+ TQToolTip::add( pTagVisible, i18n("Calculate Replay Gain tag for all files in the file list without Replay Gain tag.") );
buttonBox->addWidget( pTagVisible );
- connect( pTagVisible, SIGNAL(clicked()),
- this, SLOT(calcReplayGainClicked())
+ connect( pTagVisible, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(calcReplayGainClicked())
);
pRemoveTag = new KPushButton( iconLoader->loadIcon("cancel",KIcon::Small), i18n("Untag tagged"), this, "pRemoveTag" );
- QToolTip::add( pRemoveTag, i18n("Remove the Replay Gain tag from all files in the file list.") );
+ TQToolTip::add( pRemoveTag, i18n("Remove the Replay Gain tag from all files in the file list.") );
buttonBox->addWidget( pRemoveTag );
- connect( pRemoveTag, SIGNAL(clicked()),
- this, SLOT(removeReplayGainClicked())
+ connect( pRemoveTag, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removeReplayGainClicked())
);
pCancel = new KPushButton( iconLoader->loadIcon("cancel",KIcon::Small),i18n("Cancel"), this, "pCancel" );
pCancel->hide();
buttonBox->addWidget( pCancel );
- connect( pCancel, SIGNAL(clicked()),
- this, SLOT(cancelClicked())
+ connect( pCancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(cancelClicked())
);
buttonBox->addStretch();
@@ -125,8 +125,8 @@ ReplayGainScanner::ReplayGainScanner( TagEngine* _tagEngine, Config* _config, Lo
pOk = new KPushButton( iconLoader->loadIcon("exit",KIcon::Small), i18n("Close"), this, "pOk" );
pOk->setFocus();
buttonBox->addWidget( pOk );
- connect( pOk, SIGNAL(clicked()),
- this, SLOT(accept())
+ connect( pOk, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(accept())
);
// delete the icon loader object
@@ -151,8 +151,8 @@ void ReplayGainScanner::showFileDialog()
KFileDialog* dialog = new KFileDialog( ":file_open", config->replayGainFilter(), this, i18n("Choose files!"), true );
dialog->setMode ( KFile::Files | KFile::ExistingOnly );
if( dialog->exec() == KDialog::Accepted ) {
- QStringList urls = dialog->selectedURLs().toStringList();
- for( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it ) {
+ TQStringList urls = dialog->selectedURLs().toStringList();
+ for( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it ) {
emit addFile( *it );
}
}
@@ -160,7 +160,7 @@ void ReplayGainScanner::showFileDialog()
void ReplayGainScanner::showDirDialog()
{
-// QString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory!") );
+// TQString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory!") );
// if( directory != NULL )
// {
// emit addDir( directory );
@@ -177,9 +177,9 @@ void ReplayGainScanner::showDirDialog()
delete dialog;
}
-void ReplayGainScanner::addFiles( QStringList files )
+void ReplayGainScanner::addFiles( TQStringList files )
{
- for( QStringList::Iterator it = files.begin(); it != files.end(); ++it ) {
+ for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) {
emit addFile( *it );
}
}
@@ -226,7 +226,7 @@ void ReplayGainScanner::updateProgress( int progress, int totalSteps )
if( pProgressBar->totalSteps() > 0 ) fPercent = pProgressBar->progress() * 100 / pProgressBar->totalSteps();
else fPercent = 0;
- QString percent;
+ TQString percent;
percent.sprintf( "%i%%", (int)fPercent );
setCaption( percent + " - " + i18n("Replay Gain Tool") );
}
diff --git a/src/replaygainscanner.h b/src/replaygainscanner.h
index 6b2bfdc..8c10770 100755
--- a/src/replaygainscanner.h
+++ b/src/replaygainscanner.h
@@ -11,7 +11,7 @@ class Config;
class Logger;
class ComboButton;
-class QCheckBox;
+class TQCheckBox;
class KPushButton;
class KProgress;
@@ -25,18 +25,19 @@ class KProgress;
class ReplayGainScanner : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- ReplayGainScanner( TagEngine*, Config*, Logger*, QWidget* parent=0, const char* name=0, bool modal=true, WFlags f=0 );
+ ReplayGainScanner( TagEngine*, Config*, Logger*, TQWidget* tqparent=0, const char* name=0, bool modal=true, WFlags f=0 );
/**
* Destructor
*/
virtual ~ReplayGainScanner();
- void addFiles( QStringList );
+ void addFiles( TQStringList );
private slots:
void addClicked( int );
@@ -51,8 +52,8 @@ private slots:
private:
ComboButton* cAdd;
- QCheckBox* cForce;
- //QComboBox* cFilter;
+ TQCheckBox* cForce;
+ //TQComboBox* cFilter;
ReplayGainFileList* lList;
KProgress* pProgressBar;
KPushButton* pTagVisible;
@@ -64,11 +65,11 @@ private:
Config* config;
Logger* logger;
- QTime elapsedTime;
+ TQTime elapsedTime;
signals:
- void addFile( const QString& );
- void addDir( const QString&, const QStringList& filter = "", bool recursive = true );
+ void addFile( const TQString& );
+ void addDir( const TQString&, const TQStringList& filter = "", bool recursive = true );
void calcAllReplayGain( bool force );
void removeAllReplayGain();
void cancelProcess();
diff --git a/src/soundkonverter.cpp b/src/soundkonverter.cpp
index 692f898..2a6ff0f 100755
--- a/src/soundkonverter.cpp
+++ b/src/soundkonverter.cpp
@@ -36,11 +36,11 @@
#include <kprocess.h>
#include <ksystemtray.h>
-#include <qlayout.h>
-#include <qprogressbar.h>
-#include <qfont.h>
-#include <qhbox.h>
-#include <qeventloop.h>
+#include <tqlayout.h>
+#include <tqprogressbar.h>
+#include <tqfont.h>
+#include <tqhbox.h>
+#include <tqeventloop.h>
// TODO stop all processes on exit / clean tmp up
@@ -79,7 +79,7 @@ soundKonverter::soundKonverter()
// KMessageBox::information( this, "You are using a pre-release of soundKonverter. This version is designed for testing only.\nThere are a few things not implemented at the moment but it should run without crashes and big problems. So feel free to report such an error if you find one.\nPlease have a look at the README.\n\nYour old configuration file has been moved to soundkonverterrc.back." );
}
// if( config->data.app.configVersion < 290 ) {
-// QFile plugin_dir( locateLocal("data","soundkonverter/plugins") );
+// TQFile plugin_dir( locateLocal("data","soundkonverter/plugins") );
// if( plugin_dir.exists() ) {
// KIO::rename( locateLocal("data","soundkonverter/plugins"), locateLocal("data","soundkonverter/plugins.back"), true );
// int ret = KMessageBox::questionYesNo( this, i18n("soundKonverter has cleaned up it's old installation. It seems to be necessary to restart soundKonverter!\n\nDo you want to restart soundKonverter now?") );
@@ -106,24 +106,24 @@ soundKonverter::soundKonverter()
// create an icon loader object for loading icons
KIconLoader *iconLoader = new KIconLoader();
- QWidget* widget = new QWidget( this, "widget" );
+ TQWidget* widget = new TQWidget( this, "widget" );
setCentralWidget( widget );
// NOTE created here because of some dependences
options = new Options( config, i18n("Choose your prefered output options and click on \"Add files ...\"!"), widget, "options" );
fileList = new FileList( cdManager, tagEngine, config, options, logger, widget, "fileList" );
- startAction = new KAction( i18n("&Start conversion"), "run", 0, fileList, SLOT(startConversion()), actionCollection(), "start" );
+ startAction = new KAction( i18n("&Start conversion"), "run", 0, TQT_TQOBJECT(fileList), TQT_SLOT(startConversion()), actionCollection(), "start" );
startAction->setEnabled( false );
- new KAction( i18n("&Replay Gain Tool ..."), "soundkonverter_replaygain", CTRL+Key_R, this, SLOT(showReplayGainScanner()), actionCollection(), "replaygainscanner" );
- //new KAction( i18n("R&epair Tool ..."), "soundkonverter_repair", CTRL+Key_E, this, SLOT(showRepairTool()), actionCollection(), "repairtool" );
- new KAction( i18n("C&uesheet Editor ..."), "kwrite", CTRL+Key_U, this, SLOT(showCuesheetEditor()), actionCollection(), "cuesheeteditor" );
- new KAction( i18n("Show &Log ..."), "view_text", CTRL+Key_L, this, SLOT(showLogViewer()), actionCollection(), "log" );
-// new KAction( i18n("About &Plugins ..."), "connect_creating", CTRL+Key_P, this, SLOT(showAboutPlugins()), actionCollection(), "about_plugins" );
-
- stopAction = new KAction( i18n("S&top after current file is complete"), "stop", CTRL+Key_O, fileList, SLOT(stopConversion()), actionCollection(), "stop" );
- continueAction = new KAction( i18n("&Continue after current file is complete"), "run", CTRL+Key_T, fileList, SLOT(continueConversion()), actionCollection(), "continue" );
- killAction = new KAction( i18n("Stop &immediately"), "exit", CTRL+Key_K, fileList, SLOT(killConversion()), actionCollection(), "kill" );
+ new KAction( i18n("&Replay Gain Tool ..."), "soundkonverter_replaygain", CTRL+Key_R, TQT_TQOBJECT(this), TQT_SLOT(showReplayGainScanner()), actionCollection(), "replaygainscanner" );
+ //new KAction( i18n("R&epair Tool ..."), "soundkonverter_repair", CTRL+Key_E, TQT_TQOBJECT(this), TQT_SLOT(showRepairTool()), actionCollection(), "repairtool" );
+ new KAction( i18n("C&uesheet Editor ..."), "kwrite", CTRL+Key_U, TQT_TQOBJECT(this), TQT_SLOT(showCuesheetEditor()), actionCollection(), "cuesheeteditor" );
+ new KAction( i18n("Show &Log ..."), "view_text", CTRL+Key_L, TQT_TQOBJECT(this), TQT_SLOT(showLogViewer()), actionCollection(), "log" );
+// new KAction( i18n("About &Plugins ..."), "connect_creating", CTRL+Key_P, TQT_TQOBJECT(this), TQT_SLOT(showAboutPlugins()), actionCollection(), "about_plugins" );
+
+ stopAction = new KAction( i18n("S&top after current file is complete"), "stop", CTRL+Key_O, TQT_TQOBJECT(fileList), TQT_SLOT(stopConversion()), actionCollection(), "stop" );
+ continueAction = new KAction( i18n("&Continue after current file is complete"), "run", CTRL+Key_T, TQT_TQOBJECT(fileList), TQT_SLOT(continueConversion()), actionCollection(), "continue" );
+ killAction = new KAction( i18n("Stop &immediately"), "exit", CTRL+Key_K, TQT_TQOBJECT(fileList), TQT_SLOT(killConversion()), actionCollection(), "kill" );
stopActionMenu = new KActionMenu( i18n("Stop"), "stop", actionCollection(), "stopMenu" );
stopActionMenu->setDelayed( false );
stopActionMenu->setEnabled( false );
@@ -131,16 +131,16 @@ soundKonverter::soundKonverter()
// stopActionMenu->insert( continueAction );
// stopActionMenu->insert( killAction );
-/* veryHighPriorityAction = new KToggleAction( i18n("Very hi&gh"), CTRL+Key_1, this, SLOT(priorityChanged()), actionCollection(), "veryhigh" );
+/* veryHighPriorityAction = new KToggleAction( i18n("Very hi&gh"), CTRL+Key_1, TQT_TQOBJECT(this), TQT_SLOT(priorityChanged()), actionCollection(), "veryhigh" );
veryHighPriorityAction->setExclusiveGroup("priorityActionMenu");
- highPriorityAction = new KToggleAction( i18n("&High"), CTRL+Key_2, this, SLOT(priorityChanged()), actionCollection(), "high" );
+ highPriorityAction = new KToggleAction( i18n("&High"), CTRL+Key_2, TQT_TQOBJECT(this), TQT_SLOT(priorityChanged()), actionCollection(), "high" );
highPriorityAction->setExclusiveGroup("priorityActionMenu");
- normalPriorityAction = new KToggleAction( i18n("&Normal"), CTRL+Key_3, this, SLOT(priorityChanged()), actionCollection(), "nomal" );
+ normalPriorityAction = new KToggleAction( i18n("&Normal"), CTRL+Key_3, TQT_TQOBJECT(this), TQT_SLOT(priorityChanged()), actionCollection(), "nomal" );
normalPriorityAction->setExclusiveGroup("priorityActionMenu");
normalPriorityAction->setChecked(true);
- lowPriorityAction = new KToggleAction( i18n("&Low"), CTRL+Key_4, this, SLOT(priorityChanged()), actionCollection(), "low" );
+ lowPriorityAction = new KToggleAction( i18n("&Low"), CTRL+Key_4, TQT_TQOBJECT(this), TQT_SLOT(priorityChanged()), actionCollection(), "low" );
lowPriorityAction->setExclusiveGroup("priorityActionMenu");
- veryLowPriorityAction = new KToggleAction( i18n("Very lo&w"), CTRL+Key_5, this, SLOT(priorityChanged()), actionCollection(), "verylow" );
+ veryLowPriorityAction = new KToggleAction( i18n("Very lo&w"), CTRL+Key_5, TQT_TQOBJECT(this), TQT_SLOT(priorityChanged()), actionCollection(), "verylow" );
veryLowPriorityAction->setExclusiveGroup("priorityActionMenu");
priorityActionMenu = new KActionMenu( i18n("En-/Decoder priority"), "ksysguard", actionCollection(), "priorityMenu" );
priorityActionMenu->setDelayed( false );
@@ -151,22 +151,22 @@ soundKonverter::soundKonverter()
priorityActionMenu->insert(veryLowPriorityAction);*/
//priorityChanged();
- new KAction( i18n("A&dd Files ..."), "sound", CTRL+Key_D, this, SLOT(showFileDialog()), actionCollection(), "add_files" );
- new KAction( i18n("Add &Folder ..."), "folder", CTRL+Key_F, this, SLOT(showDirDialog()), actionCollection(), "add_folder" );
- new KAction( i18n("Add CD &tracks ..."), "cdaudio_unmount", CTRL+Key_T, this, SLOT(showCdDialog()), actionCollection(), "add_audiocd" );
- new KAction( i18n("Add &URL ..."), "browser", CTRL+Key_U, this, SLOT(showUrlDialog()), actionCollection(), "add_url" );
- KStdAction::quit(this, SLOT(close()), actionCollection());
+ new KAction( i18n("A&dd Files ..."), "sound", CTRL+Key_D, TQT_TQOBJECT(this), TQT_SLOT(showFileDialog()), actionCollection(), "add_files" );
+ new KAction( i18n("Add &Folder ..."), "folder", CTRL+Key_F, TQT_TQOBJECT(this), TQT_SLOT(showDirDialog()), actionCollection(), "add_folder" );
+ new KAction( i18n("Add CD &tracks ..."), "cdaudio_unmount", CTRL+Key_T, TQT_TQOBJECT(this), TQT_SLOT(showCdDialog()), actionCollection(), "add_audiocd" );
+ new KAction( i18n("Add &URL ..."), "browser", CTRL+Key_U, TQT_TQOBJECT(this), TQT_SLOT(showUrlDialog()), actionCollection(), "add_url" );
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
- new KAction( i18n("L&oad file list"), "fileopen", 0, fileList, SLOT(load()), actionCollection(), "load" );
- new KAction( i18n("Sa&ve file list"), "filesave", 0, fileList, SLOT(save()), actionCollection(), "save" );
+ new KAction( i18n("L&oad file list"), "fileopen", 0, TQT_TQOBJECT(fileList), TQT_SLOT(load()), actionCollection(), "load" );
+ new KAction( i18n("Sa&ve file list"), "filesave", 0, TQT_TQOBJECT(fileList), TQT_SLOT(save()), actionCollection(), "save" );
- // TODO //KStdAction::paste( this, SLOT(pasteFiles()), actionCollection() );
+ // TODO //KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(pasteFiles()), actionCollection() );
- KStdAction::preferences( this, SLOT(showConfigDialog()), actionCollection() );
+ KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(showConfigDialog()), actionCollection() );
- showToolBarAction = KStdAction::showToolbar( this, SLOT(showToolbar()), actionCollection() );
+ showToolBarAction = KStdAction::showToolbar( TQT_TQOBJECT(this), TQT_SLOT(showToolbar()), actionCollection() );
//KStdAction::showStatusbar( 0, 0, actionCollection() );
- KStdAction::configureToolbars( this, SLOT(editToolbar()), actionCollection() );
+ KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT(editToolbar()), actionCollection() );
createGUI();
@@ -180,16 +180,16 @@ soundKonverter::soundKonverter()
}
// the grid for all widgets in the main window
- QGridLayout* gridLayout = new QGridLayout( widget, 1, 1, 6, 6, "gridLayout" );
+ TQGridLayout* gridLayout = new TQGridLayout( widget, 1, 1, 6, 6, "gridLayout" );
// generate the options input area
// NOTE created above because of some dependences
//options = new Options( config, i18n("Choose your prefered output options and click on \"Add files ...\"!"), this, "options" );
- connect( options, SIGNAL(showConfigPluginsPage()),
- this, SLOT(showConfigPluginsPage())
+ connect( options, TQT_SIGNAL(showConfigPluginsPage()),
+ TQT_TQOBJECT(this), TQT_SLOT(showConfigPluginsPage())
);
- connect( options, SIGNAL(showConfigEnvironmentPage()),
- this, SLOT(showConfigEnvironmentPage())
+ connect( options, TQT_SIGNAL(showConfigEnvironmentPage()),
+ TQT_TQOBJECT(this), TQT_SLOT(showConfigEnvironmentPage())
);
gridLayout->addWidget( options, 0, 0 );
@@ -198,38 +198,38 @@ soundKonverter::soundKonverter()
//fileList = new FileList( cdManager, tagEngine, config, options, this, "fileList" );
gridLayout->addWidget( fileList, 1, 0 );
gridLayout->setRowStretch( 1, 1 );
- /*connect( this, SIGNAL(windowMoved(int,int)),
- fileList, SLOT(moveOptionsEditor(int,int))
+ /*connect( TQT_TQOBJECT(this), TQT_SIGNAL(windowMoved(int,int)),
+ TQT_TQOBJECT(fileList), TQT_SLOT(moveOptionsEditor(int,int))
);*/
- connect( fileList, SIGNAL(fileCountChanged(int)),
- this, SLOT(fileCountChanged(int))
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(fileCountChanged(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(fileCountChanged(int))
);
- connect( fileList, SIGNAL(startedConversion()),
- this, SLOT(startedConversion())
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(startedConversion()),
+ TQT_TQOBJECT(this), TQT_SLOT(startedConversion())
);
- connect( fileList, SIGNAL(stopClicked()),
- this, SLOT(stopClicked())
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(stopClicked()),
+ TQT_TQOBJECT(this), TQT_SLOT(stopClicked())
);
- connect( fileList, SIGNAL(continueClicked()),
- this, SLOT(continueClicked())
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(continueClicked()),
+ TQT_TQOBJECT(this), TQT_SLOT(continueClicked())
);
- connect( fileList, SIGNAL(stoppedConversion()),
- this, SLOT(stoppedConversion())
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(stoppedConversion()),
+ TQT_TQOBJECT(this), TQT_SLOT(stoppedConversion())
);
convert = new Convert( config, tagEngine, cdManager, fileList, logger );
-// connect( this, SIGNAL(setPriority(int)),
-// convert, SLOT(priorityChanged(int))
+// connect( TQT_TQOBJECT(this), TQT_SIGNAL(setPriority(int)),
+// convert, TQT_SLOT(priorityChanged(int))
// );
- // add a horizontal box layout for the add combobutton to the grid
- QHBoxLayout *addBox = new QHBoxLayout( -1, "addBox" );
+ // add a horizontal box tqlayout for the add combobutton to the grid
+ TQHBoxLayout *addBox = new TQHBoxLayout( -1, "addBox" );
gridLayout->addLayout( addBox, 2, 0 );
// create the combobutton for adding files to the file list
cAdd = new ComboButton( widget, "cAdd" );
- QFont font = cAdd->font();
- //font.setWeight( QFont::DemiBold );
+ TQFont font = cAdd->font();
+ //font.setWeight( TQFont::DemiBold );
font.setPointSize( font.pointSize() + 1 );
cAdd->setFont( font );
cAdd->insertItem( iconLoader->loadIcon("sound",KIcon::Toolbar), i18n("Add files ...") );
@@ -237,8 +237,8 @@ soundKonverter::soundKonverter()
cAdd->insertItem( iconLoader->loadIcon("cdaudio_unmount",KIcon::Toolbar), i18n("Add CD tracks ...") );
cAdd->insertItem( iconLoader->loadIcon("browser",KIcon::Toolbar), i18n("Add URL ...") );
addBox->addWidget( cAdd );
- connect( cAdd, SIGNAL(clicked(int)),
- this, SLOT(addClicked(int))
+ connect( cAdd, TQT_SIGNAL(clicked(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(addClicked(int))
);
addBox->addSpacing( 18 );
@@ -247,8 +247,8 @@ soundKonverter::soundKonverter()
pStart->setFixedHeight( pStart->size().height() );
pStart->setEnabled( false );
addBox->addWidget( pStart );
- connect( pStart, SIGNAL(clicked()),
- fileList, SLOT(startConversion())
+ connect( pStart, TQT_SIGNAL(clicked()),
+ TQT_TQOBJECT(fileList), TQT_SLOT(startConversion())
);
pStop = new KPushButton( iconLoader->loadIcon("stop",KIcon::Small), i18n("Stop"), widget, "pStop" );
@@ -261,29 +261,29 @@ soundKonverter::soundKonverter()
progressIndicator = new ProgressIndicator( systemTray, widget, "progressIndicator" );
addBox->addWidget( progressIndicator );
- connect( fileList, SIGNAL(increaseTime(float)),
- progressIndicator, SLOT(increaseTime(float))
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(increaseTime(float)),
+ progressIndicator, TQT_SLOT(increaseTime(float))
);
- connect( fileList, SIGNAL(decreaseTime(float)),
- progressIndicator, SLOT(decreaseTime(float))
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(decreaseTime(float)),
+ progressIndicator, TQT_SLOT(decreaseTime(float))
);
- /*connect( fileList, SIGNAL(setTime(float)),
- progressIndicator, SLOT(setTime(float))
+ /*connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(setTime(float)),
+ progressIndicator, TQT_SLOT(setTime(float))
);*/
- connect( fileList, SIGNAL(finished(float)),
- progressIndicator, SLOT(finished(float))
+ connect( TQT_TQOBJECT(fileList), TQT_SIGNAL(finished(float)),
+ progressIndicator, TQT_SLOT(finished(float))
);
- connect( convert, SIGNAL(countTime(float)),
- progressIndicator, SLOT(countTime(float))
+ connect( convert, TQT_SIGNAL(countTime(float)),
+ progressIndicator, TQT_SLOT(countTime(float))
);
- connect( convert, SIGNAL(uncountTime(float)),
- progressIndicator, SLOT(uncountTime(float))
+ connect( convert, TQT_SIGNAL(uncountTime(float)),
+ progressIndicator, TQT_SLOT(uncountTime(float))
);
- connect( convert, SIGNAL(update(float)),
- progressIndicator, SLOT(update(float))
+ connect( convert, TQT_SIGNAL(update(float)),
+ progressIndicator, TQT_SLOT(update(float))
);
- connect( progressIndicator, SIGNAL(setTitle(const QString&)),
- this, SLOT(setTitle(const QString&))
+ connect( progressIndicator, TQT_SIGNAL(setTitle(const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(setTitle(const TQString&))
);
cAdd->increaseHeight( /*progressIndicator->height() - cAdd->height()*/ 10 ); // FIXME detect the height automaticly
@@ -319,32 +319,32 @@ bool soundKonverter::queryClose()
convert->cleanUp();
logger->cleanUp();
- QFile::remove( locateLocal("data","soundkonverter/filelist.autosave.xml") );
+ TQFile::remove( locateLocal("data","soundkonverter/filelist.autosave.xml") );
return true;
}
-void soundKonverter::setNotify( const QString& cmd )
+void soundKonverter::setNotify( const TQString& cmd )
{
fileList->setNotify( cmd );
}
-/*void soundKonverter::moveEvent( QMoveEvent* e )
+/*void soundKonverter::moveEvent( TQMoveEvent* e )
{
// emit windowMoved( pos().x(), pos().y() + height() );
}*/
-void soundKonverter::openArgFiles( const QStringList &files )
+void soundKonverter::openArgFiles( const TQStringList &files )
{
if( ( instances <= 1 || config->data.general.askForNewOptions ) && ( profile == "" || format == "" || directory == "" ) )
{
OptionsRequester* dialog = new OptionsRequester( config, files, this );
- connect( dialog, SIGNAL(setCurrentOptions(const ConversionOptions&)),
- options, SLOT(setCurrentOptions(const ConversionOptions&))
+ connect( dialog, TQT_SIGNAL(setCurrentOptions(const ConversionOptions&)),
+ options, TQT_SLOT(setCurrentOptions(const ConversionOptions&))
);
- connect( dialog, SIGNAL(addFiles(QStringList)),
- fileList, SLOT(addFiles(QStringList))
+ connect( dialog, TQT_SIGNAL(addFiles(TQStringList)),
+ TQT_TQOBJECT(fileList), TQT_SLOT(addFiles(TQStringList))
);
Q_CHECK_PTR( dialog );
@@ -364,8 +364,8 @@ void soundKonverter::openArgFiles( const QStringList &files )
dialog->exec();
- disconnect( dialog, SIGNAL(setCurrentOptions(const ConversionOptions&)), 0, 0 );
- disconnect( dialog, SIGNAL(addFiles(QStringList)), 0, 0 );
+ disconnect( dialog, TQT_SIGNAL(setCurrentOptions(const ConversionOptions&)), 0, 0 );
+ disconnect( dialog, TQT_SIGNAL(addFiles(TQStringList)), 0, 0 );
delete dialog;
}
@@ -393,13 +393,13 @@ void soundKonverter::openArgFiles( const QStringList &files )
if( !visible ) fileList->startConversion(); // NOTE should be save!
}
-void soundKonverter::openArgReplayGainFiles( const QStringList &files )
+void soundKonverter::openArgReplayGainFiles( const TQStringList &files )
{
showReplayGainScanner();
if( replayGainScanner ) replayGainScanner->addFiles( files );
}
-// void soundKonverter::openArgRepairFiles( const QStringList &files )
+// void soundKonverter::openArgRepairFiles( const TQStringList &files )
// {}
void soundKonverter::startedConversion()
@@ -492,9 +492,9 @@ void soundKonverter::addClicked( int index )
void soundKonverter::showFileDialog()
{
- QStringList urls = KFileDialog::getOpenURLs( ":file_open", config->fileFilter(), this, i18n("Choose files to convert") ).toStringList();
+ TQStringList urls = KFileDialog::getOpenURLs( ":file_open", config->fileFilter(), this, i18n("Choose files to convert") ).toStringList();
if( !urls.empty() ) {
-/* for( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it ) {
+/* for( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it ) {
*it = KURL::decode_string( *it );
}*/
fileList->addFiles( urls );
@@ -503,7 +503,7 @@ void soundKonverter::showFileDialog()
void soundKonverter::showDirDialog()
{
-// QString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory") );
+// TQString directory = KFileDialog::getExistingDirectory( ":file_open", this, i18n("Choose a directory") );
// if( !directory.isEmpty() )
// {
// fileList->addDir( directory );
@@ -528,11 +528,11 @@ void soundKonverter::showCdDialog( bool intern )
{
OptionsRequester* dialog = new OptionsRequester( config, "", this );
- connect( dialog, SIGNAL(setCurrentOptions(const ConversionOptions&)),
- options, SLOT(setCurrentOptions(const ConversionOptions&))
+ connect( dialog, TQT_SIGNAL(setCurrentOptions(const ConversionOptions&)),
+ options, TQT_SLOT(setCurrentOptions(const ConversionOptions&))
);
-// connect( dialog, SIGNAL(addFiles(QStringList)),
-// fileList, SLOT(addFiles(QStringList))
+// connect( dialog, TQT_SIGNAL(addFiles(TQStringList)),
+// TQT_TQOBJECT(fileList), TQT_SLOT(addFiles(TQStringList))
// );
Q_CHECK_PTR( dialog );
@@ -552,8 +552,8 @@ void soundKonverter::showCdDialog( bool intern )
dialog->exec();
- disconnect( dialog, SIGNAL(setCurrentOptions(const ConversionOptions&)), 0, 0 );
-// disconnect( dialog, SIGNAL(addFiles(QStringList)), 0, 0 );
+ disconnect( dialog, TQT_SIGNAL(setCurrentOptions(const ConversionOptions&)), 0, 0 );
+// disconnect( dialog, TQT_SIGNAL(addFiles(TQStringList)), 0, 0 );
delete dialog;
}
@@ -575,9 +575,9 @@ void soundKonverter::showCdDialog( bool intern )
// support for media:/ and system:/ urls
if( !device.isEmpty() ) {
- device.replace( "system:/media", "/dev" );
- device.replace( "media:", "/dev" );
- device.replace( "devices:", "/dev" ); // NOTE obsolete, since soundkonverter 0.3 won't run on KDE < 3.5
+ device.tqreplace( "system:/media", "/dev" );
+ device.tqreplace( "media:", "/dev" );
+ device.tqreplace( "devices:", "/dev" ); // NOTE obsolete, since soundkonverter 0.3 won't run on KDE < 3.5
}
if( device.left(5) != "/dev/" || device == "auto" ) {
device = "";
@@ -594,21 +594,21 @@ void soundKonverter::showCdDialog( bool intern )
if( !dialog->noCD )
{
- connect( dialog, SIGNAL(addTracks(const QString&,QValueList<int>)),
- fileList, SLOT(addTracks(const QString&,QValueList<int>))
+ connect( dialog, TQT_SIGNAL(addTracks(const TQString&,TQValueList<int>)),
+ TQT_TQOBJECT(fileList), TQT_SLOT(addTracks(const TQString&,TQValueList<int>))
);
- connect( dialog, SIGNAL(addDisc(const QString&)),
- fileList, SLOT(addDisc(const QString&))
+ connect( dialog, TQT_SIGNAL(addDisc(const TQString&)),
+ TQT_TQOBJECT(fileList), TQT_SLOT(addDisc(const TQString&))
);
- /*connect( dialog, SIGNAL(openCuesheetEditor(const QString&)),
- this, SLOT(openCuesheetEditor(const QString&))
+ /*connect( dialog, TQT_SIGNAL(openCuesheetEditor(const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(openCuesheetEditor(const TQString&))
);*/
dialog->exec();
- disconnect( dialog, SIGNAL(addTracks(const QString&,QValueList<int>)), 0, 0 );
- disconnect( dialog, SIGNAL(addDisc(const QString&)), 0, 0 );
- //disconnect( dialog, SIGNAL(openCuesheetEditor(const QString&)), 0, 0 );
+ disconnect( dialog, TQT_SIGNAL(addTracks(const TQString&,TQValueList<int>)), 0, 0 );
+ disconnect( dialog, TQT_SIGNAL(addDisc(const TQString&)), 0, 0 );
+ //disconnect( dialog, TQT_SIGNAL(openCuesheetEditor(const TQString&)), 0, 0 );
}
delete dialog;
@@ -620,11 +620,11 @@ void soundKonverter::showCdDialog( bool intern )
void soundKonverter::showUrlDialog()
{
bool ok;
- QString url = KInputDialog::getText( i18n("Open URL"), i18n("Enter a URL:"), "", &ok );
+ TQString url = KInputDialog::getText( i18n("Open URL"), i18n("Enter a URL:"), "", &ok );
if( ok )
{
// if it isn't a local file and no protocol is given, we assume, it's http
- if( url.left(1) != "/" && !url.contains(":/") )
+ if( url.left(1) != "/" && !url.tqcontains(":/") )
url.prepend( "http://" );
fileList->addFiles( url );
@@ -639,8 +639,8 @@ void soundKonverter::showReplayGainScanner()
// TODO error message
return;
}
-// connect( this, SIGNAL(addFilesToReplayGainScanner(QStringList)),
-// replayGainScanner, SLOT(addFiles(QStringList))
+// connect( TQT_TQOBJECT(this), TQT_SIGNAL(addFilesToReplayGainScanner(TQStringList)),
+// replayGainScanner, TQT_SLOT(addFiles(TQStringList))
// );
}
replayGainScanner->show();
@@ -663,7 +663,7 @@ void soundKonverter::showCuesheetEditor()
cuesheetEditor->raise();
}
-/*void soundKonverter::openCuesheetEditor( const QString& content )
+/*void soundKonverter::openCuesheetEditor( const TQString& content )
{
if( cuesheetEditor == 0 ) {
cuesheetEditor = new CuesheetEditor( 0, "cuesheetEditor", false );
@@ -684,8 +684,8 @@ void soundKonverter::showLogViewer()
// TODO error message
return;
}
-// connect( convert, SIGNAL(finishedProcess(int,int)),
-// logViewer, SLOT(processCompleted(int,int))
+// connect( convert, TQT_SIGNAL(finishedProcess(int,int)),
+// logViewer, TQT_SLOT(processCompleted(int,int))
// );
}
logViewer->show();
@@ -747,8 +747,8 @@ void soundKonverter::editToolbar()
{
saveMainWindowSettings( kapp->config(), "MainWindow" );
KEditToolbar dlg( actionCollection() );
- connect( &dlg, SIGNAL(newToolbarConfig()),
- this, SLOT(newToolbarConfig())
+ connect( &dlg, TQT_SIGNAL(newToolbarConfig()),
+ TQT_TQOBJECT(this), TQT_SLOT(newToolbarConfig())
);
dlg.exec();
}
@@ -771,7 +771,7 @@ void soundKonverter::fileCountChanged( int count )
}
}
-void soundKonverter::setTitle( const QString& title )
+void soundKonverter::setTitle( const TQString& title )
{
setCaption( title );
}
diff --git a/src/soundkonverter.h b/src/soundkonverter.h
index ce441cf..3ba52aa 100755
--- a/src/soundkonverter.h
+++ b/src/soundkonverter.h
@@ -20,7 +20,7 @@ class CuesheetEditor;
class Logger;
class LogViewer;
-class QProgressBar;
+class TQProgressBar;
class KPushButton;
class KAction;
class KToggleAction;
@@ -35,6 +35,7 @@ class KSystemTray;
class soundKonverter : public KMainWindow, virtual public DCOPInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
@@ -50,19 +51,19 @@ public:
* When a new instance of soundKonverter should be created,
* this function is called and all @p files are passed, that should be opened (for conversion).
*/
- void openArgFiles( const QStringList &files );
+ void openArgFiles( const TQStringList &files );
/**
* When a new instance of soundKonverter should be created,
* this function is called and all @p files are passed, that should be opened for editing the replaygain tag.
*/
- void openArgReplayGainFiles( const QStringList &files );
+ void openArgReplayGainFiles( const TQStringList &files );
/*
* When a new instance of soundKonverter should be created,
* this function is called and all @p files are passed, that should be opened for repair.
*/
-// void openArgRepairFiles( const QStringList &files );
+// void openArgRepairFiles( const TQStringList &files );
/**
* When a new instance of soundKonverter should be created,
@@ -75,18 +76,18 @@ public:
*/
int getInstances() { return instances; }
- QString device;
- QString format;
- QString profile;
- QString directory;
+ TQString device;
+ TQString format;
+ TQString profile;
+ TQString directory;
bool visible;
bool autoclose;
- void setNotify( const QString& cmd );
+ void setNotify( const TQString& cmd );
/** A system tray icon that is shown, when the main window is hidden */
KSystemTray* systemTray;
- //virtual void moveEvent( QMoveEvent* );
+ //virtual void moveEvent( TQMoveEvent* );
protected:
virtual bool queryClose();
@@ -187,9 +188,9 @@ private slots:
void editToolbar();
void newToolbarConfig();
void fileCountChanged( int );
- void setTitle( const QString& );
+ void setTitle( const TQString& );
- //void openCuesheetEditor( const QString& content );
+ //void openCuesheetEditor( const TQString& content );
public slots:
void showFileDialog();
@@ -200,7 +201,7 @@ public slots:
signals:
//void windowMoved( int x, int y );
// void setPriority( int );
-// void addFilesToReplayGainScanner( QStringList );
+// void addFilesToReplayGainScanner( TQStringList );
};
#endif // SOUNDKONVERTER_H
diff --git a/src/soundkonverterapp.cpp b/src/soundkonverterapp.cpp
index 91ea877..79d7bfc 100755
--- a/src/soundkonverterapp.cpp
+++ b/src/soundkonverterapp.cpp
@@ -2,9 +2,9 @@
#include "soundkonverterapp.h"
#include "soundkonverter.h"
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qmovie.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqmovie.h>
#include <kglobal.h>
#include <kstartupinfo.h>
@@ -45,32 +45,32 @@ int soundKonverterApp::newInstance()
else
KStartupInfo::setNewStartupId( mainWidget(), kapp->startupId());
- soundKonverter *widget = ::qt_cast<soundKonverter*>( mainWidget() );
+ soundKonverter *widget = ::tqqt_cast<soundKonverter*>( mainWidget() );
widget->increaseInstances();
- QCString notify = args->getOption( "command" );
- if( notify ) {
+ TQCString notify = args->getOption( "command" );
+ if( !notify.isNull() ) {
widget->setNotify( notify );
}
- QCString profile = args->getOption( "profile" );
- if( profile ) {
+ TQCString profile = args->getOption( "profile" );
+ if( !profile.isNull() ) {
widget->profile = profile;
}
- QCString format = args->getOption( "format" );
- if( format ) {
+ TQCString format = args->getOption( "format" );
+ if( !format.isNull() ) {
widget->format = format;
}
- QCString directory = args->getOption( "output" );
- if( directory ) {
+ TQCString directory = args->getOption( "output" );
+ if( !directory.isNull() ) {
widget->directory = directory;
}
- QCString device = args->getOption( "rip" );
- if( device ) {
+ TQCString device = args->getOption( "rip" );
+ if( !device.isNull() ) {
if( !args->isSet( "invisible" ) ) {
widget->visible = true;
widget->show();
@@ -89,7 +89,7 @@ int soundKonverterApp::newInstance()
widget->hide();
widget->systemTray->show();
KStandardDirs* stdDirs = new KStandardDirs();
- widget->systemTray->setMovie( QMovie(stdDirs->findResource("data","soundkonverter/pics/systray.mng")) );
+ widget->systemTray->setMovie( TQMovie(stdDirs->findResource("data","soundkonverter/pics/systray.mng")) );
delete stdDirs;
}
else {
@@ -101,7 +101,7 @@ int soundKonverterApp::newInstance()
// add the files to the file lists depending on the used switch
if( args->isSet( "replaygain" ) ) {
- QStringList replayGainFiles;
+ TQStringList replayGainFiles;
for( int i = 0; i < args->count(); i++ ) {
replayGainFiles.append(KURL::encode_string(args->arg(i)));
}
@@ -109,15 +109,15 @@ int soundKonverterApp::newInstance()
widget->openArgReplayGainFiles(replayGainFiles);
}
// else if( args->isSet( "repair" ) ) {
-// QStringList repairFiles;
+// TQStringList repairFiles;
// for( int i = 0; i < args->count(); i++ ) {
-// repairFiles.append(QFile::decodeName(args->arg(i)));
+// repairFiles.append(TQFile::decodeName(args->arg(i)));
// }
// if(!repairFiles.isEmpty())
// widget->openArgRepairFiles(repairFiles);
// }
else {
- QStringList files;
+ TQStringList files;
for( int i = 0; i < args->count(); i++ )
{
files.append(KURL::encode_string(args->arg(i)));
diff --git a/src/soundkonverterapp.h b/src/soundkonverterapp.h
index 77e5b9f..d4ef700 100755
--- a/src/soundkonverterapp.h
+++ b/src/soundkonverterapp.h
@@ -17,6 +17,7 @@ class soundKonverter;
class soundKonverterApp : public KUniqueApplication
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.