diff options
Diffstat (limited to 'noatun')
175 files changed, 3355 insertions, 3355 deletions
diff --git a/noatun/library/app.cpp b/noatun/library/app.cpp index 04167fe7..cf340f68 100644 --- a/noatun/library/app.cpp +++ b/noatun/library/app.cpp @@ -30,11 +30,11 @@ #include <kmessagebox.h> #include <knotifyclient.h> #include <kpopupmenu.h> -#include <qfile.h> -#include <qimage.h> +#include <tqfile.h> +#include <tqimage.h> #include <qiomanager.h> -#include <qsessionmanager.h> -#include <qtextstream.h> +#include <tqsessionmanager.h> +#include <tqtextstream.h> #include <signal.h> #include <kmimetype.h> @@ -69,10 +69,10 @@ NoatunApp::NoatunApp() // set the default config data // TODO: Maybe a first time wizard instead? KConfig *config=KGlobal::config(); // + - config->setGroup(QString::null); // 1 + config->setGroup(TQString::null); // 1 if (!config->readEntry("Modules").length()) { - QStringList modules; + TQStringList modules; modules.append("excellent.plugin"); modules.append("splitplaylist.plugin"); modules.append("marquis.plugin"); @@ -101,7 +101,7 @@ NoatunApp::NoatunApp() mEffectView=new EffectView; // 859 mEqualizerView=new EqualizerView; // 24 - QTimer::singleShot(0, mDownloader, SLOT(start())); + TQTimer::singleShot(0, mDownloader, TQT_SLOT(start())); ::globalVideo = new GlobalVideo; @@ -122,7 +122,7 @@ NoatunApp::NoatunApp() } else { - config->setGroup(QString::null); // 0 + config->setGroup(TQString::null); // 0 player()->setVolume(config->readNumEntry("Volume", 100)); // 10 player()->loop(config->readNumEntry("LoopStyle", (int)Player::None)); mPlayer->engine()->setInitialized(); // 0 @@ -147,11 +147,11 @@ NoatunApp::~NoatunApp() { saveEngineState(); KConfig *config = KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("Volume", player()->volume()); config->writeEntry("LoopStyle", player()->loopStyle()); // for version continuity in the future - config->writeEntry("Version", QString(version())); // 1 + config->writeEntry("Version", TQString(version())); // 1 config->sync(); // 40 mPlayer->stop(); @@ -171,7 +171,7 @@ NoatunApp::~NoatunApp() delete d; } -QCString NoatunApp::version() const +TQCString NoatunApp::version() const { return aboutData()->version().ascii(); } @@ -212,14 +212,14 @@ bool NoatunApp::clearOnStart() const int NoatunApp::startupPlayMode() const { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); return config->readNumEntry("StartupPlayMode", autoPlay() ? Play : Restore); } void NoatunApp::setStartupPlayMode(int mode) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("StartupPlayMode", mode); config->sync(); } @@ -227,7 +227,7 @@ void NoatunApp::setStartupPlayMode(int mode) void NoatunApp::setHackUpPlaylist(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("HackUpPlaylist", b); config->sync(); } @@ -238,7 +238,7 @@ void NoatunApp::setFastMixer(bool b) if (whatBefore!=b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("FastMixer", b); config->sync(); player()->engine()->useHardwareMixer(b); @@ -256,7 +256,7 @@ void NoatunApp::setOneInstance(bool b) void NoatunApp::setLoopList(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("LoopList", b); KGlobal::config()->sync(); } @@ -264,7 +264,7 @@ void NoatunApp::setLoopList(bool b) void NoatunApp::setAutoPlay(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("AutoPlay", b); KGlobal::config()->sync(); } @@ -272,37 +272,37 @@ void NoatunApp::setAutoPlay(bool b) void NoatunApp::setRememberPositions(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("RememberPositions", b); KGlobal::config()->sync(); } -void NoatunApp::setSaveDirectory(const QString &s) +void NoatunApp::setSaveDirectory(const TQString &s) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writePathEntry("SaveDirectory", s); config->sync(); } -QString NoatunApp::saveDirectory() const +TQString NoatunApp::saveDirectory() const { KConfig *c=KGlobal::config(); - c->setGroup(QString::null); - return c->readPathEntry("SaveDirectory", QString(getenv("HOME"))); + c->setGroup(TQString::null); + return c->readPathEntry("SaveDirectory", TQString(getenv("HOME"))); } -QString NoatunApp::titleFormat() const +TQString NoatunApp::titleFormat() const { KConfig *c=KGlobal::config(); - c->setGroup(QString::null); + c->setGroup(TQString::null); return c->readEntry("TitleFormat", "$(\"[\"author\"] - \")$(title)$(\" (\"bitrate\"kbps)\")"); } -void NoatunApp::setTitleFormat(const QString &format) +void NoatunApp::setTitleFormat(const TQString &format) { KConfig *c=KGlobal::config(); - c->setGroup(QString::null); + c->setGroup(TQString::null); return c->writeEntry("TitleFormat", format); } @@ -314,7 +314,7 @@ void NoatunApp::setClearOnStart(bool b) void NoatunApp::setClearOnOpen(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("ClearOnOpen", b); config->sync(); } @@ -322,7 +322,7 @@ void NoatunApp::setClearOnOpen(bool b) void NoatunApp::setDisplayRemaining(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("DisplayRemaining", b); config->sync(); } @@ -350,7 +350,7 @@ void NoatunApp::hideInterfaces() } -int NoatunApp::pluginMenuAdd(const QString &text, const QObject *receiver, const char *member) +int NoatunApp::pluginMenuAdd(const TQString &text, const TQObject *receiver, const char *member) { return pluginActionMenu()->menuAdd(text, receiver, member); } @@ -432,9 +432,9 @@ Effects *NoatunApp::effects() const return d->effects; } -QString NoatunApp::mimeTypes() +TQString NoatunApp::mimeTypes() { - QString mimeTypes; + TQString mimeTypes; Arts::TraderQuery q; vector<Arts::TraderOffer> *results = q.query(); vector<Arts::TraderOffer>::iterator i; @@ -484,16 +484,16 @@ void NoatunApp::commitData(QSessionManager &) void NoatunApp::saveState(QSessionManager &sm) { - QStringList restartCommand = sm.restartCommand(); + TQStringList restartCommand = sm.restartCommand(); sm.setRestartCommand( restartCommand ); KApplication::saveState(sm); } // Deprecated -QImage NoatunApp::readPNG(const QString &filename) +TQImage NoatunApp::readPNG(const TQString &filename) { - QImageIO file(filename, "PNG"); + TQImageIO file(filename, "PNG"); file.setGamma(0.0); file.read(); return file.image(); @@ -502,7 +502,7 @@ QImage NoatunApp::readPNG(const QString &filename) void NoatunApp::restoreEngineState() { KConfig* config = KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); int state = config->readNumEntry("EngineState", Arts::posPlaying); switch (state) { @@ -522,7 +522,7 @@ void NoatunApp::restoreEngineState() void NoatunApp::saveEngineState() { KConfig* config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("EngineState", player()->engine()->state()); // we don't sync here since it's done in the destructor afterwards anyway } diff --git a/noatun/library/cmodule.cpp b/noatun/library/cmodule.cpp index a624fb64..27dbc686 100644 --- a/noatun/library/cmodule.cpp +++ b/noatun/library/cmodule.cpp @@ -3,24 +3,24 @@ #include <common.h> #include <noatun/app.h> -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <klocale.h> #include <kdebug.h> #include <klistview.h> -#include <qsplitter.h> -#include <qlabel.h> -#include <qdragobject.h> +#include <tqsplitter.h> +#include <tqlabel.h> +#include <tqdragobject.h> #include <kurlrequester.h> #include <kfiledialog.h> #include <kdialog.h> #include <klineedit.h> -#include <qtextview.h> -#include <qwhatsthis.h> +#include <tqtextview.h> +#include <tqwhatsthis.h> #include "mimetypetree.h" @@ -28,67 +28,67 @@ * General options *****************************************************************/ -General::General(QObject *parent) +General::General(TQObject *parent) : CModule(i18n("General"), i18n("General Options"), "configure", parent) { - mLoopList=new QCheckBox(i18n("&Return to start of playlist on finish"), this); + mLoopList=new TQCheckBox(i18n("&Return to start of playlist on finish"), this); mLoopList->setChecked(napp->loopList()); - QWhatsThis::add(mLoopList, i18n("When the playlist is finished playing, return to the start, but do not start playing.")); + TQWhatsThis::add(mLoopList, i18n("When the playlist is finished playing, return to the start, but do not start playing.")); - mOneInstance=new QCheckBox(i18n("Allow only one &instance of Noatun"), this); + mOneInstance=new TQCheckBox(i18n("Allow only one &instance of Noatun"), this); mOneInstance->setChecked(napp->oneInstance()); - QWhatsThis::add(mOneInstance, i18n("Starting noatun a second time will cause it to just append items from the start to the current instance.")); + TQWhatsThis::add(mOneInstance, i18n("Starting noatun a second time will cause it to just append items from the start to the current instance.")); - mClearOnOpen = new QCheckBox(i18n("Clear playlist &when opening a file"), this); + mClearOnOpen = new TQCheckBox(i18n("Clear playlist &when opening a file"), this); mClearOnOpen->setChecked(napp->clearOnOpen()); - QWhatsThis::add(mClearOnOpen, i18n("Opening a file with the global Open menu item will clear the playlist first.")); + TQWhatsThis::add(mClearOnOpen, i18n("Opening a file with the global Open menu item will clear the playlist first.")); - mFastVolume=new QCheckBox(i18n("&Use fast hardware volume control"), this); + mFastVolume=new TQCheckBox(i18n("&Use fast hardware volume control"), this); mFastVolume->setChecked(napp->fastMixer()); - QWhatsThis::add(mFastVolume, i18n("Use the hardware mixer instead of aRts'. It affects all streams, not just Noatun's, but is a little faster.")); + TQWhatsThis::add(mFastVolume, i18n("Use the hardware mixer instead of aRts'. It affects all streams, not just Noatun's, but is a little faster.")); - mRemaining=new QCheckBox(i18n("Display &remaining play time"), this); + mRemaining=new TQCheckBox(i18n("Display &remaining play time"), this); mRemaining->setChecked(napp->displayRemaining()); - QWhatsThis::add(mRemaining, i18n("Counters count down towards zero, showing remaining time instead of elapsed time.")); + TQWhatsThis::add(mRemaining, i18n("Counters count down towards zero, showing remaining time instead of elapsed time.")); - QLabel *titleLabel=new QLabel(i18n("Title &format:"), this); + TQLabel *titleLabel=new TQLabel(i18n("Title &format:"), this); mTitleFormat=new KLineEdit(this); titleLabel->setBuddy(mTitleFormat); mTitleFormat->setText(napp->titleFormat()); - QWhatsThis::add(mTitleFormat, i18n( + TQWhatsThis::add(mTitleFormat, i18n( "Select a title to use for each file (in the playlist and user interface). " "Each element such as $(title) is replaced with the property with the name " "as given in the parentheses. The properties include, but are not limited to: " "title, author, date, comments and album.")); - QLabel *dlsaver=new QLabel(i18n("&Download folder:"), this); + TQLabel *dlsaver=new TQLabel(i18n("&Download folder:"), this); mDlSaver=new KURLRequester(napp->saveDirectory(), this); dlsaver->setBuddy(mDlSaver); - connect( mDlSaver, SIGNAL( openFileDialog( KURLRequester * )), - this, SLOT( slotRequesterClicked( KURLRequester * ))); - QWhatsThis::add(mDlSaver, i18n("When opening a non-local file, download it to the selected folder.")); + connect( mDlSaver, TQT_SIGNAL( openFileDialog( KURLRequester * )), + this, TQT_SLOT( slotRequesterClicked( KURLRequester * ))); + TQWhatsThis::add(mDlSaver, i18n("When opening a non-local file, download it to the selected folder.")); - mPlayOnStartup = new QButtonGroup(1, Horizontal, i18n("Play Behavior on Startup"), this); + mPlayOnStartup = new TQButtonGroup(1, Horizontal, i18n("Play Behavior on Startup"), this); mPlayOnStartup->setExclusive(true); mPlayOnStartup->insert( - new QRadioButton(i18n("Restore &play state"), mPlayOnStartup), + new TQRadioButton(i18n("Restore &play state"), mPlayOnStartup), NoatunApp::Restore ); mPlayOnStartup->insert( - new QRadioButton(i18n("Automatically play &first file"), mPlayOnStartup), + new TQRadioButton(i18n("Automatically play &first file"), mPlayOnStartup), NoatunApp::Play ); mPlayOnStartup->insert( - new QRadioButton(i18n("&Do not start playing"), mPlayOnStartup), + new TQRadioButton(i18n("&Do not start playing"), mPlayOnStartup), NoatunApp::DontPlay ); - if (QButton* b = mPlayOnStartup->find(napp->startupPlayMode())) + if (TQButton* b = mPlayOnStartup->find(napp->startupPlayMode())) { b->toggle(); } - QGridLayout *layout = new QGridLayout(this, 0, KDialog::spacingHint()); + TQGridLayout *layout = new TQGridLayout(this, 0, KDialog::spacingHint()); layout->setSpacing(KDialog::spacingHint()); layout->addMultiCellWidget(mLoopList, 0, 0, 0, 1); diff --git a/noatun/library/cmodule.h b/noatun/library/cmodule.h index 6e0e1179..881842a9 100644 --- a/noatun/library/cmodule.h +++ b/noatun/library/cmodule.h @@ -1,7 +1,7 @@ #ifndef CMODULE_H #define CMODULE_H -#include <qframe.h> +#include <tqframe.h> #include <klistview.h> #include "noatun/pref.h" @@ -23,16 +23,16 @@ class General : public CModule { Q_OBJECT public: - General(QObject *parent=0); + General(TQObject *parent=0); virtual void save(); private slots: void slotRequesterClicked( KURLRequester * ); private: - QCheckBox *mLoopList, *mOneInstance, *mRememberPositions, + TQCheckBox *mLoopList, *mOneInstance, *mRememberPositions, *mClearOnOpen, *mFastVolume, *mRemaining; - QButtonGroup* mPlayOnStartup; + TQButtonGroup* mPlayOnStartup; KURLRequester *mDlSaver; KLineEdit *mTitleFormat; }; diff --git a/noatun/library/controls.cpp b/noatun/library/controls.cpp index 1fb08269..dc67ffaa 100644 --- a/noatun/library/controls.cpp +++ b/noatun/library/controls.cpp @@ -1,14 +1,14 @@ #include <noatun/controls.h> -L33tSlider::L33tSlider(QWidget * parent, const char * name) : - QSlider(parent,name), pressed(false) +L33tSlider::L33tSlider(TQWidget * parent, const char * name) : + TQSlider(parent,name), pressed(false) {} -L33tSlider::L33tSlider(Orientation o, QWidget * parent, const char * name) : - QSlider(o,parent,name), pressed(false) +L33tSlider::L33tSlider(Orientation o, TQWidget * parent, const char * name) : + TQSlider(o,parent,name), pressed(false) {} L33tSlider::L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation o, QWidget * parent, const char * name) : - QSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false) + Orientation o, TQWidget * parent, const char * name) : + TQSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false) {} bool L33tSlider::currentlyPressed() const @@ -19,28 +19,28 @@ bool L33tSlider::currentlyPressed() const void L33tSlider::setValue(int i) { if (!pressed) - QSlider::setValue(i); + TQSlider::setValue(i); } -void L33tSlider::mousePressEvent(QMouseEvent*e) +void L33tSlider::mousePressEvent(TQMouseEvent*e) { if (e->button()!=RightButton) { pressed=true; - QSlider::mousePressEvent(e); + TQSlider::mousePressEvent(e); } } -void L33tSlider::mouseReleaseEvent(QMouseEvent*e) +void L33tSlider::mouseReleaseEvent(TQMouseEvent*e) { pressed=false; - QSlider::mouseReleaseEvent(e); + TQSlider::mouseReleaseEvent(e); emit userChanged(value()); } -void L33tSlider::wheelEvent(QWheelEvent *e) +void L33tSlider::wheelEvent(TQWheelEvent *e) { - QSlider::wheelEvent(e); + TQSlider::wheelEvent(e); int newValue=value() /* +e->delta()/120 */; if (newValue<minValue()) newValue=minValue(); @@ -51,15 +51,15 @@ void L33tSlider::wheelEvent(QWheelEvent *e) } -SliderAction::SliderAction(const QString& text, int accel, const QObject *receiver, - const char *member, QObject* parent, const char* name ) +SliderAction::SliderAction(const TQString& text, int accel, const TQObject *receiver, + const char *member, TQObject* parent, const char* name ) : KAction( text, accel, parent, name ) { m_receiver = receiver; m_member = member; } -int SliderAction::plug( QWidget *w, int index ) +int SliderAction::plug( TQWidget *w, int index ) { if (!w->inherits("KToolBar")) return -1; @@ -73,11 +73,11 @@ int SliderAction::plug( QWidget *w, int index ) addContainer( toolBar, id ); - connect( toolBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); toolBar->setItemAutoSized( id, true ); if (w->inherits( "KToolBar" )) - connect(toolBar, SIGNAL(moved(KToolBar::BarPosition)), this, SLOT(toolbarMoved(KToolBar::BarPosition))); + connect(toolBar, TQT_SIGNAL(moved(KToolBar::BarPosition)), this, TQT_SLOT(toolbarMoved(KToolBar::BarPosition))); emit plugged(); @@ -102,7 +102,7 @@ return; */ } -void SliderAction::unplug( QWidget *w ) +void SliderAction::unplug( TQWidget *w ) { KToolBar *toolBar = (KToolBar *)w; int idx = findContainer( w ); diff --git a/noatun/library/downloader.cpp b/noatun/library/downloader.cpp index 734f5e11..cce6e4d9 100644 --- a/noatun/library/downloader.cpp +++ b/noatun/library/downloader.cpp @@ -1,8 +1,8 @@ #include <noatun/downloader.h> #include <noatun/app.h> #include <assert.h> -#include <qfile.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqtimer.h> #include <kio/job.h> #include <klocale.h> @@ -21,12 +21,12 @@ bool DownloadItem::isDownloaded() const return true; } -QString DownloadItem::localFilename() const +TQString DownloadItem::localFilename() const { return mLocalFilename; } -void DownloadItem::setLocalFilename(const QString &filename) +void DownloadItem::setLocalFilename(const TQString &filename) { mLocalFilename=filename; } @@ -65,11 +65,11 @@ void DownloadItem::dequeue() -Downloader::Downloader(QObject *parent) - : QObject(parent), localfile(0), current(0), mJob(0), mTimeout(0) +Downloader::Downloader(TQObject *parent) + : TQObject(parent), localfile(0), current(0), mJob(0), mTimeout(0) { mStarted=false; - mUnstartedQueue=new QPtrList<Downloader::QueueItem>; + mUnstartedQueue=new TQPtrList<Downloader::QueueItem>; } Downloader::~Downloader() @@ -84,7 +84,7 @@ void Downloader::start() if (current) emit enqueued(current->notifier, current->file); - for (QPtrListIterator<Downloader::QueueItem> i(*mUnstartedQueue); i.current(); ++i) + for (TQPtrListIterator<Downloader::QueueItem> i(*mUnstartedQueue); i.current(); ++i) { (*i)->notifier->mLocalFilename = (*i)->local; mQueue.append(*i); @@ -93,24 +93,24 @@ void Downloader::start() delete mUnstartedQueue; mUnstartedQueue=0; - QTimer::singleShot(0, this, SLOT(getNext())); + TQTimer::singleShot(0, this, TQT_SLOT(getNext())); } -static QString nonExistantFile(const QString &file) +static TQString nonExistantFile(const TQString &file) { if (file.right(1)=="/") return i18n("Unknown"); int i=0; - QString f(file); - while (QFile(f).exists()) + TQString f(file); + while (TQFile(f).exists()) { i++; f=file; - f.insert(f.findRev('.'), '_'+QString::number(i)); + f.insert(f.findRev('.'), '_'+TQString::number(i)); } return f; } -QString Downloader::enqueue(DownloadItem *notifier, const KURL &file) +TQString Downloader::enqueue(DownloadItem *notifier, const KURL &file) { if (file.isLocalFile()) return 0; QueueItem *i=new QueueItem; @@ -142,7 +142,7 @@ QString Downloader::enqueue(DownloadItem *notifier, const KURL &file) } mQueue.append(i); - QTimer::singleShot(0, this, SLOT(getNext())); + TQTimer::singleShot(0, this, TQT_SLOT(getNext())); emit enqueued(notifier, file); return i->local; } @@ -155,7 +155,7 @@ void Downloader::dequeue(DownloadItem *notifier) jobDone(mJob); return; } - for (QPtrListIterator<Downloader::QueueItem> i(mQueue); i.current(); ++i) + for (TQPtrListIterator<Downloader::QueueItem> i(mQueue); i.current(); ++i) { if ((*i)->notifier==notifier) { @@ -176,22 +176,22 @@ void Downloader::getNext() current=mQueue.take(0); // open the QFile - localfile=new QFile(current->local); + localfile=new TQFile(current->local); localfile->open(IO_ReadWrite | IO_Append); mJob= KIO::get(current->file, true, false); - connect(mJob, SIGNAL(data(KIO::Job*, const QByteArray&)), SLOT(data(KIO::Job*, const QByteArray&))); - connect(mJob, SIGNAL(result(KIO::Job*)), SLOT(jobDone(KIO::Job*))); - connect(mJob, SIGNAL(percent(KIO::Job*, unsigned long)), SLOT(percent(KIO::Job*, unsigned long))); + connect(mJob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(mJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(jobDone(KIO::Job*))); + connect(mJob, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), TQT_SLOT(percent(KIO::Job*, unsigned long))); if (mTimeout) delete mTimeout; - mTimeout=new QTimer(this); + mTimeout=new TQTimer(this); mTimeout->start(30000, true); - connect(mTimeout, SIGNAL(timeout()), SLOT(giveUpWithThisDownloadServerIsRunningNT())); + connect(mTimeout, TQT_SIGNAL(timeout()), TQT_SLOT(giveUpWithThisDownloadServerIsRunningNT())); } -void Downloader::data(KIO::Job *, const QByteArray &data) +void Downloader::data(KIO::Job *, const TQByteArray &data) { localfile->writeBlock(data); localfile->flush(); diff --git a/noatun/library/effects.cpp b/noatun/library/effects.cpp index 3c6c601e..a71e0b43 100644 --- a/noatun/library/effects.cpp +++ b/noatun/library/effects.cpp @@ -7,7 +7,7 @@ #include <player.h> #include <soundserver.h> #include <noatunarts.h> -#include <qlayout.h> +#include <tqlayout.h> #include <config.h> @@ -28,8 +28,8 @@ using namespace Arts; class EffectConfigWidget : public QWidget { public: - EffectConfigWidget(Effect *e, QWidget *parent=0) - : QWidget(parent), mEf(e) + EffectConfigWidget(Effect *e, TQWidget *parent=0) + : TQWidget(parent), mEf(e) {} virtual ~EffectConfigWidget() @@ -62,8 +62,8 @@ StereoEffect *Effect::effect() const Effect *Effect::after() const { - QPtrList<Effect> effects=napp->effects()->effects(); - QPtrListIterator<Effect> i(effects); + TQPtrList<Effect> effects=napp->effects()->effects(); + TQPtrListIterator<Effect> i(effects); for(; i.current(); ++i) if ((*i)->id()==mId) { @@ -77,8 +77,8 @@ Effect *Effect::after() const Effect *Effect::before() const { - QPtrList<Effect> effects=napp->effects()->effects(); - QPtrListIterator<Effect> i(effects); + TQPtrList<Effect> effects=napp->effects()->effects(); + TQPtrListIterator<Effect> i(effects); for(; i.current(); ++i) if ((*i)->id()==mId) { @@ -90,17 +90,17 @@ Effect *Effect::before() const return 0; } -QCString Effect::name() const +TQCString Effect::name() const { return mName; } -QString Effect::title() const +TQString Effect::title() const { return clean(mName); } -QString Effect::clean(const QCString &name) +TQString Effect::clean(const TQCString &name) { int pos=name.findRev("::"); if (pos>0) @@ -113,7 +113,7 @@ bool Effect::isNull() const return effect()->isNull(); } -QWidget *Effect::configure(bool /*friendly*/) +TQWidget *Effect::configure(bool /*friendly*/) { #ifdef HAS_ARTSVERSION_H if (mConfig) return mConfig; @@ -127,7 +127,7 @@ QWidget *Effect::configure(bool /*friendly*/) mConfig=new EffectConfigWidget(this); mConfig->setCaption(title()); - QBoxLayout *l=new QHBoxLayout(mConfig); + TQBoxLayout *l=new TQHBoxLayout(mConfig); l->add(new KArtsWidget(gui, mConfig)); l->freeze(); } @@ -235,14 +235,14 @@ void Effects::remove(Effect *item, bool del) void Effects::removeAll(bool del) { - for (QPtrListIterator<Effect> i(mItems); i.current(); ++i) + for (TQPtrListIterator<Effect> i(mItems); i.current(); ++i) if ((*i)->id()) remove(*i, del); } -QStrList Effects::available() const +TQStrList Effects::available() const { - QStrList val; + TQStrList val; Arts::TraderQuery query; query.supports("Interface", "Arts::StereoEffect"); query.supports("Interface", "Arts::SynthModule"); @@ -251,7 +251,7 @@ QStrList Effects::available() const for (vector<Arts::TraderOffer>::iterator i=offers->begin(); i!=offers->end(); i++) { Arts::TraderOffer &offer=*i; - QCString name = offer.interfaceName().c_str(); + TQCString name = offer.interfaceName().c_str(); val.append(name); } delete offers; @@ -260,16 +260,16 @@ QStrList Effects::available() const Effect *Effects::findId(long id) const { - for (QPtrListIterator<Effect> i(mItems); i.current(); ++i) + for (TQPtrListIterator<Effect> i(mItems); i.current(); ++i) if ((*i)->id()==id) return *i; return 0; } -QPtrList<Effect> Effects::effects() const +TQPtrList<Effect> Effects::effects() const { vector<long> *items=stack.effectList(); - QPtrList<Effect> effects; + TQPtrList<Effect> effects; for (vector<long>::iterator i=items->begin();i!=items->end();i++) if (Effect *e=findId(*i)) effects.append(e); diff --git a/noatun/library/effectview.cpp b/noatun/library/effectview.cpp index 73af1fc2..334781a1 100644 --- a/noatun/library/effectview.cpp +++ b/noatun/library/effectview.cpp @@ -30,22 +30,22 @@ #include <kdialog.h> #include <kiconloader.h> #include <klocale.h> -#include <qdragobject.h> -#include <qheader.h> -#include <qhgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qvgroupbox.h> -#include <qwhatsthis.h> +#include <tqdragobject.h> +#include <tqheader.h> +#include <tqhgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqvgroupbox.h> +#include <tqwhatsthis.h> class EffectListItem : public QListViewItem { public: - EffectListItem(QListView *parent, QListViewItem *after, Effect *e) - : QListViewItem(parent, after, e->title()), mEffect(e) + EffectListItem(TQListView *parent, TQListViewItem *after, Effect *e) + : TQListViewItem(parent, after, e->title()), mEffect(e) { } @@ -55,24 +55,24 @@ private: Effect *mEffect; }; -EffectList::EffectList(QWidget *parent) +EffectList::EffectList(TQWidget *parent) : KListView(parent) { } -bool EffectList::acceptDrag(QDropEvent *event) const +bool EffectList::acceptDrag(TQDropEvent *event) const { - return QCString(event->format()) == "application/x-noatun-effectdrag"; + return TQCString(event->format()) == "application/x-noatun-effectdrag"; } -QDragObject *EffectList::dragObject() const +TQDragObject *EffectList::dragObject() const { if (!currentItem()) return 0; - return new QStoredDrag("application/x-noatun-effectdrag", (QWidget*)this); + return new TQStoredDrag("application/x-noatun-effectdrag", (TQWidget*)this); } EffectView::EffectView() - : KDialogBase((QWidget*)0L, 0, false, i18n("Effects"), Help | Close, Close, true) + : KDialogBase((TQWidget*)0L, 0, false, i18n("Effects"), Help | Close, Close, true) , initialized(false) { } @@ -85,13 +85,13 @@ void EffectView::show() namespace { -QToolButton *newButton(const QIconSet &iconSet, const QString &textLabel, QObject *receiver, const char * slot, QWidget *parent, const char *name = 0) +TQToolButton *newButton(const TQIconSet &iconSet, const TQString &textLabel, TQObject *receiver, const char * slot, TQWidget *parent, const char *name = 0) { - QToolButton *button = new QToolButton(parent, name); + TQToolButton *button = new TQToolButton(parent, name); button->setIconSet(iconSet); button->setTextLabel(textLabel, true); - QObject::connect(button, SIGNAL(clicked()), receiver, slot); - button->setFixedSize(QSize(22, 22)); + TQObject::connect(button, TQT_SIGNAL(clicked()), receiver, slot); + button->setFixedSize(TQSize(22, 22)); return button; } } @@ -105,21 +105,21 @@ void EffectView::init(void) setIcon(SmallIcon("effect")); // Create widgets and layouts - QFrame *box = makeMainWidget(); - QVBoxLayout *boxLayout = new QVBoxLayout(box, 0, KDialog::spacingHint()); + TQFrame *box = makeMainWidget(); + TQVBoxLayout *boxLayout = new TQVBoxLayout(box, 0, KDialog::spacingHint()); // Available - QVGroupBox *topBox = new QVGroupBox(i18n("Available Effects"), box); + TQVGroupBox *topBox = new TQVGroupBox(i18n("Available Effects"), box); topBox->setInsideSpacing(KDialog::spacingHint()); - QFrame *topTopFrame = new QFrame(topBox); - QHBoxLayout *topTopLayout = new QHBoxLayout(topTopFrame, 0, KDialog::spacingHint()); + TQFrame *topTopFrame = new TQFrame(topBox); + TQHBoxLayout *topTopLayout = new TQHBoxLayout(topTopFrame, 0, KDialog::spacingHint()); topTopLayout->setAutoAdd(true); available = new KComboBox(false, topTopFrame); - QToolButton *add = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Add"), this, SLOT(addEffect()), topTopFrame); + TQToolButton *add = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Add"), this, TQT_SLOT(addEffect()), topTopFrame); // Active - QHGroupBox *bottomBox = new QHGroupBox(i18n("Active Effects"), box); + TQHGroupBox *bottomBox = new TQHGroupBox(i18n("Active Effects"), box); bottomBox->setInsideSpacing(KDialog::spacingHint()); active = new EffectList(bottomBox); @@ -136,27 +136,27 @@ void EffectView::init(void) active->setSorting(-1); active->setDropVisualizer(true); active->setItemsMovable(true); - active->setSelectionMode(QListView::Single); + active->setSelectionMode(TQListView::Single); active->setDragEnabled(true); - connect(active, SIGNAL(dropped(QDropEvent *, QListViewItem *)), SLOT(activeDrop(QDropEvent *, QListViewItem *))); + connect(active, TQT_SIGNAL(dropped(TQDropEvent *, TQListViewItem *)), TQT_SLOT(activeDrop(TQDropEvent *, TQListViewItem *))); // when a new effect is added - connect(napp->effects(), SIGNAL(added(Effect *)), SLOT(added(Effect *))); - connect(napp->effects(), SIGNAL(removed(Effect *)), SLOT(removed(Effect *))); - connect(napp->effects(), SIGNAL(moved(Effect *)), SLOT(moved(Effect *))); + connect(napp->effects(), TQT_SIGNAL(added(Effect *)), TQT_SLOT(added(Effect *))); + connect(napp->effects(), TQT_SIGNAL(removed(Effect *)), TQT_SLOT(removed(Effect *))); + connect(napp->effects(), TQT_SIGNAL(moved(Effect *)), TQT_SLOT(moved(Effect *))); available->setCurrentItem(0); - connect(active, SIGNAL(currentChanged(QListViewItem *)), SLOT(activeChanged(QListViewItem *))); + connect(active, TQT_SIGNAL(currentChanged(TQListViewItem *)), TQT_SLOT(activeChanged(TQListViewItem *))); active->setCurrentItem(0); // the buttons - QFrame *bottomLeftFrame = new QFrame(bottomBox); - QVBoxLayout *bottomLeftLayout = new QVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint()); - up = newButton(BarIconSet("up", KIcon::SizeSmall), i18n("Up"), this, SLOT(moveUp()), bottomLeftFrame); - down = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Down"), this, SLOT(moveDown()), bottomLeftFrame); - configure = newButton(BarIconSet("configure", KIcon::SizeSmall), i18n("Configure"), this, SLOT(configureEffect()), bottomLeftFrame); - remove = newButton(BarIconSet("remove", KIcon::SizeSmall), i18n("Remove"), this, SLOT(removeEffect()), bottomLeftFrame); + TQFrame *bottomLeftFrame = new TQFrame(bottomBox); + TQVBoxLayout *bottomLeftLayout = new TQVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint()); + up = newButton(BarIconSet("up", KIcon::SizeSmall), i18n("Up"), this, TQT_SLOT(moveUp()), bottomLeftFrame); + down = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Down"), this, TQT_SLOT(moveDown()), bottomLeftFrame); + configure = newButton(BarIconSet("configure", KIcon::SizeSmall), i18n("Configure"), this, TQT_SLOT(configureEffect()), bottomLeftFrame); + remove = newButton(BarIconSet("remove", KIcon::SizeSmall), i18n("Remove"), this, TQT_SLOT(removeEffect()), bottomLeftFrame); bottomLeftLayout->addWidget(up); bottomLeftLayout->addWidget(down); bottomLeftLayout->addWidget(configure); @@ -167,18 +167,18 @@ void EffectView::init(void) activeChanged(active->currentItem()); // Inline documentation - QWhatsThis::add(available, i18n("This shows all available effects.\n\nTo activate a plugin, drag files from here to the active pane on the right.")); - QWhatsThis::add(add, i18n("This will place the selected effect at the bottom of your chain.")); - QWhatsThis::add(active, i18n("This shows your effect chain. Noatun supports an unlimited amount of effects in any order. You can even have the same effect twice.\n\nDrag the items to and from here to add and remove them, respectively. You may also reorder them with drag-and-drop. These actions can also be performed with the buttons to the right.")); - QWhatsThis::add(up, i18n("Move the currently selected effect up in the chain.")); - QWhatsThis::add(down, i18n("Move the currently selected effect down in the chain.")); - QWhatsThis::add(configure, i18n("Configure the currently selected effect.\n\nYou can change things such as intensity from here.")); - QWhatsThis::add(remove, i18n("This will remove the selected effect from your chain.")); + TQWhatsThis::add(available, i18n("This shows all available effects.\n\nTo activate a plugin, drag files from here to the active pane on the right.")); + TQWhatsThis::add(add, i18n("This will place the selected effect at the bottom of your chain.")); + TQWhatsThis::add(active, i18n("This shows your effect chain. Noatun supports an unlimited amount of effects in any order. You can even have the same effect twice.\n\nDrag the items to and from here to add and remove them, respectively. You may also reorder them with drag-and-drop. These actions can also be performed with the buttons to the right.")); + TQWhatsThis::add(up, i18n("Move the currently selected effect up in the chain.")); + TQWhatsThis::add(down, i18n("Move the currently selected effect down in the chain.")); + TQWhatsThis::add(configure, i18n("Configure the currently selected effect.\n\nYou can change things such as intensity from here.")); + TQWhatsThis::add(remove, i18n("This will remove the selected effect from your chain.")); resize(300, 400); } -void EffectView::activeDrop(QDropEvent *, QListViewItem *pafter) +void EffectView::activeDrop(TQDropEvent *, TQListViewItem *pafter) { EffectListItem *after(static_cast<EffectListItem*>(pafter)); napp->effects()->move(after ? after->effect() : 0, @@ -186,9 +186,9 @@ void EffectView::activeDrop(QDropEvent *, QListViewItem *pafter) activeChanged(active->currentItem()); } -QListViewItem *EffectView::toListItem(Effect *e) const +TQListViewItem *EffectView::toListItem(Effect *e) const { - for(QListViewItem *i = active->firstChild(); i; i = i->itemBelow()) + for(TQListViewItem *i = active->firstChild(); i; i = i->itemBelow()) if(static_cast<EffectListItem*>(i)->effect() == e) return i; return 0; @@ -257,11 +257,11 @@ void EffectView::configureEffect() Effect *e = static_cast<EffectListItem*>(active->currentItem())->effect(); if(!e) return; - QWidget *c = e->configure(); + TQWidget *c = e->configure(); if(c) c->show(); } -void EffectView::activeChanged(QListViewItem *i) +void EffectView::activeChanged(TQListViewItem *i) { if(i) { diff --git a/noatun/library/effectview.h b/noatun/library/effectview.h index 1cdb1907..2a6e3ce6 100644 --- a/noatun/library/effectview.h +++ b/noatun/library/effectview.h @@ -53,20 +53,20 @@ public slots: void addEffect(); void configureEffect(); - void activeChanged(QListViewItem *); + void activeChanged(TQListViewItem *); protected slots: - void activeDrop(QDropEvent *, QListViewItem *); + void activeDrop(TQDropEvent *, TQListViewItem *); private: - QListViewItem *toListItem(Effect *) const; + TQListViewItem *toListItem(Effect *) const; void init(void); bool initialized; KComboBox *available; - QToolButton *up, *down, *configure, *remove; + TQToolButton *up, *down, *configure, *remove; EffectList *active; }; @@ -75,9 +75,9 @@ class EffectList : public KListView { Q_OBJECT public: - EffectList(QWidget *parent); - virtual bool acceptDrag(QDropEvent *) const; - virtual QDragObject *dragObject() const; + EffectList(TQWidget *parent); + virtual bool acceptDrag(TQDropEvent *) const; + virtual TQDragObject *dragObject() const; }; #endif diff --git a/noatun/library/engine.cpp b/noatun/library/engine.cpp index e937fa7f..00f26022 100644 --- a/noatun/library/engine.cpp +++ b/noatun/library/engine.cpp @@ -14,8 +14,8 @@ #include <kstandarddirs.h> #include <kconfig.h> #include <kdebug.h> -#include <qfile.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqdir.h> #include <sys/wait.h> #include <kplayobject.h> #include <kplayobjectfactory.h> @@ -248,7 +248,7 @@ Noatun::StereoEffectStack *Engine::globalEffectStack() const { return &d->globa Noatun::Equalizer *Engine::equalizer() const { return &d->equalizer; } Noatun::Session *Engine::session() const { return &d->session; } -Engine::Engine(QObject *parent) : QObject(parent, "Engine"), mPlay(false) +Engine::Engine(TQObject *parent) : TQObject(parent, "Engine"), mPlay(false) { d=new EnginePrivate; // Connect to aRts @@ -293,19 +293,19 @@ bool Engine::open(const PlaylistItem &file) d->pProxy = new TitleProxy::Proxy(KURL(file.property("stream_"))); d->playobj = factory.createPlayObject(d->pProxy->proxyUrl(), false); - connect(d->playobj, SIGNAL(destroyed()), this, SLOT(deleteProxy())); + connect(d->playobj, TQT_SIGNAL(destroyed()), this, TQT_SLOT(deleteProxy())); connect( - d->pProxy, SIGNAL( + d->pProxy, TQT_SIGNAL( metaData( - const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)), - this, SIGNAL( - receivedStreamMeta(const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)) + const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)), + this, TQT_SIGNAL( + receivedStreamMeta(const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)) ); - connect(d->pProxy, SIGNAL(proxyError()), this, SLOT(slotProxyError())); + connect(d->pProxy, TQT_SIGNAL(proxyError()), this, TQT_SLOT(slotProxyError())); } else { @@ -328,7 +328,7 @@ bool Engine::open(const PlaylistItem &file) } else { - connect( d->playobj, SIGNAL( playObjectCreated() ), this, SLOT( connectPlayObject() ) ); + connect( d->playobj, TQT_SIGNAL( playObjectCreated() ), this, TQT_SLOT( connectPlayObject() ) ); } if (mPlay) @@ -463,7 +463,7 @@ bool Engine::initArts() // aRts seems not to be running, let's try to run it // First, let's read the configuration as in kcmarts KConfig config("kcmartsrc"); - QCString cmdline; + TQCString cmdline; config.setGroup("Arts"); @@ -472,7 +472,7 @@ bool Engine::initArts() // put the value of x11Comm into .mcoprc { - KConfig X11CommConfig(QDir::homeDirPath()+"/.mcoprc"); + KConfig X11CommConfig(TQDir::homeDirPath()+"/.mcoprc"); if(x11Comm) X11CommConfig.writeEntry("GlobalComm", "Arts::X11GlobalComm"); @@ -482,15 +482,15 @@ bool Engine::initArts() X11CommConfig.sync(); } - cmdline = QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("kdeinit_wrapper"))); + cmdline = TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("kdeinit_wrapper"))); cmdline += " "; if (rt) - cmdline += QFile::encodeName(KStandardDirs::findExe( - QString::fromLatin1("artswrapper"))); + cmdline += TQFile::encodeName(KStandardDirs::findExe( + TQString::fromLatin1("artswrapper"))); else - cmdline += QFile::encodeName(KStandardDirs::findExe( - QString::fromLatin1("artsd"))); + cmdline += TQFile::encodeName(KStandardDirs::findExe( + TQString::fromLatin1("artsd"))); cmdline += " "; cmdline += config.readEntry("Arguments","-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f").utf8(); diff --git a/noatun/library/equalizer.cpp b/noatun/library/equalizer.cpp index 2ee208db..61b10d01 100644 --- a/noatun/library/equalizer.cpp +++ b/noatun/library/equalizer.cpp @@ -8,10 +8,10 @@ #include <soundserver.h> #include <noatunarts.h> #include <ktempfile.h> -#include <qdom.h> +#include <tqdom.h> #include <kio/netaccess.h> #include <kstandarddirs.h> -#include <qtextstream.h> +#include <tqtextstream.h> #include <math.h> #include <kconfig.h> #include <klocale.h> @@ -28,7 +28,7 @@ struct OldEqCruft static OldEqCruft *eqCruft=0; -Preset::Preset(const QString &) +Preset::Preset(const TQString &) { } // unused Preset::Preset(VPreset p) @@ -36,7 +36,7 @@ Preset::Preset(VPreset p) VPreset *copy = new VPreset(p); // isn't this horrible? :) - mFile = QString::number((unsigned long)copy); + mFile = TQString::number((unsigned long)copy); } Preset::Preset() @@ -48,12 +48,12 @@ VPreset &Preset::vpreset() const return *(VPreset*)addr; } -QString Preset::name() const +TQString Preset::name() const { return vpreset().name(); } -bool Preset::setName(const QString &name) +bool Preset::setName(const TQString &name) { return vpreset().setName(name); } @@ -75,7 +75,7 @@ void Preset::remove() vpreset().remove(); } -QString Preset::file() const +TQString Preset::file() const { return vpreset().file(); } @@ -120,17 +120,17 @@ int Band::center() const return eqCruft->interpolated->band(mNum).center(); } -QString Band::formatStart(bool withHz) const +TQString Band::formatStart(bool withHz) const { return eqCruft->interpolated->band(mNum).formatStart(withHz); } -QString Band::formatEnd(bool withHz) const +TQString Band::formatEnd(bool withHz) const { return eqCruft->interpolated->band(mNum).formatEnd(withHz); } -QString Band::format(bool withHz) const +TQString Band::format(bool withHz) const { return eqCruft->interpolated->band(mNum).format(withHz); } @@ -164,19 +164,19 @@ void Equalizer::init() mBands.append(new Band(4)); mBands.append(new Band(5)); - connect(VEQ, SIGNAL(changed()), SIGNAL(changed())); + connect(VEQ, TQT_SIGNAL(changed()), TQT_SIGNAL(changed())); - connect(VEQ, SIGNAL(created(VPreset)), SLOT(created(VPreset))); - connect(VEQ, SIGNAL(selected(VPreset)), SLOT(selected(VPreset))); - connect(VEQ, SIGNAL(renamed(VPreset)), SLOT(renamed(VPreset))); - connect(VEQ, SIGNAL(removed(VPreset)), SLOT(removed(VPreset))); + connect(VEQ, TQT_SIGNAL(created(VPreset)), TQT_SLOT(created(VPreset))); + connect(VEQ, TQT_SIGNAL(selected(VPreset)), TQT_SLOT(selected(VPreset))); + connect(VEQ, TQT_SIGNAL(renamed(VPreset)), TQT_SLOT(renamed(VPreset))); + connect(VEQ, TQT_SIGNAL(removed(VPreset)), TQT_SLOT(removed(VPreset))); - connect(VEQ, SIGNAL(enabled()), SIGNAL(enabled())); - connect(VEQ, SIGNAL(disabled()), SIGNAL(disabled())); - connect(VEQ, SIGNAL(enabled(bool)), SIGNAL(enabled(bool))); + connect(VEQ, TQT_SIGNAL(enabled()), TQT_SIGNAL(enabled())); + connect(VEQ, TQT_SIGNAL(disabled()), TQT_SIGNAL(disabled())); + connect(VEQ, TQT_SIGNAL(enabled(bool)), TQT_SIGNAL(enabled(bool))); - connect(VEQ, SIGNAL(preampChanged(int)), SIGNAL(preampChanged(int))); - connect(VEQ, SIGNAL(preampChanged(int)), SIGNAL(preampChanged(int))); + connect(VEQ, TQT_SIGNAL(preampChanged(int)), TQT_SIGNAL(preampChanged(int))); + connect(VEQ, TQT_SIGNAL(preampChanged(int)), TQT_SIGNAL(preampChanged(int))); } void Equalizer::created(VPreset preset) @@ -207,12 +207,12 @@ void Equalizer::removed(VPreset preset) delete p; } -QPtrList<Preset> Equalizer::presets() const +TQPtrList<Preset> Equalizer::presets() const { - QValueList<VPreset> presets = VEQ->presets(); - QPtrList<Preset> list; + TQValueList<VPreset> presets = VEQ->presets(); + TQPtrList<Preset> list; for ( - QValueList<VPreset>::Iterator i(presets.begin()); + TQValueList<VPreset>::Iterator i(presets.begin()); i != presets.end(); ++i ) { @@ -221,35 +221,35 @@ QPtrList<Preset> Equalizer::presets() const return list; } -Preset *Equalizer::preset(const QString &file) +Preset *Equalizer::preset(const TQString &file) { VPreset p = VEQ->presetByFile(file); if (!p) return 0; return new Preset(p); } -bool Equalizer::presetExists(const QString &name) const +bool Equalizer::presetExists(const TQString &name) const { return VEQ->presetExists(name); } -Preset *Equalizer::createPreset(const QString &name, bool smart) +Preset *Equalizer::createPreset(const TQString &name, bool smart) { VPreset p = VEQ->createPreset(name, smart); if (!p) return 0; return new Preset(p); } -const QPtrList<Band> &Equalizer::bands() const +const TQPtrList<Band> &Equalizer::bands() const { return mBands; } Band *Equalizer::band(int num) const { - // can't use QPtrList::at since it sets current + // can't use TQPtrList::at since it sets current - QPtrListIterator<Band> item(mBands); + TQPtrListIterator<Band> item(mBands); item+=(unsigned int)num; return *item; } @@ -290,17 +290,17 @@ void Equalizer::setEnabled(bool e) VEQ->setEnabled(e); } -QString Equalizer::toString(const QString &name) const +TQString Equalizer::toString(const TQString &name) const { return VEQ->toString(name); } -bool Equalizer::fromString(const QString &str) +bool Equalizer::fromString(const TQString &str) { return VEQ->fromString(str); } -bool Equalizer::save(const KURL &filename, const QString &name) const +bool Equalizer::save(const KURL &filename, const TQString &name) const { return VEQ->save(filename, name); } diff --git a/noatun/library/equalizerview.cpp b/noatun/library/equalizerview.cpp index 5e406e13..098226a7 100644 --- a/noatun/library/equalizerview.cpp +++ b/noatun/library/equalizerview.cpp @@ -11,18 +11,18 @@ #include <kiconloader.h> #include <klocale.h> -#include <qlayout.h> -#include <qslider.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qtabwidget.h> -#include <qpushbutton.h> -#include <qheader.h> -#include <qfileinfo.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qframe.h> -#include <qgroupbox.h> +#include <tqlayout.h> +#include <tqslider.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqtabwidget.h> +#include <tqpushbutton.h> +#include <tqheader.h> +#include <tqfileinfo.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> #define EQ (napp->vequalizer()) @@ -30,14 +30,14 @@ //////////////////////////////////////////////// // PresetList -PresetList::PresetList(QWidget *parent, const char *name) +PresetList::PresetList(TQWidget *parent, const char *name) : KListView(parent, name) { setItemsRenameable(true); setRenameable(0, true); addColumn(""); // first column is the visible one addColumn("", 0); // create one column to store cruft in - setColumnWidthMode(0, QListView::Maximum); + setColumnWidthMode(0, TQListView::Maximum); header()->setStretchEnabled(true,0); header()->hide(); // a try to set a sne minimum width. unfortuately the custom item @@ -45,14 +45,14 @@ PresetList::PresetList(QWidget *parent, const char *name) setMinimumWidth(kapp->fontMetrics().boundingRect(i18n("Custom")).width()+2*itemMargin()); } -void PresetList::rename(QListViewItem *item, int c) +void PresetList::rename(TQListViewItem *item, int c) { // We can't rename the "Custom" metapreset if (item->text(0)==i18n("Custom")) return; // Or presets we don't have write access to - if (!QFileInfo(item->text(1)).isWritable()) + if (!TQFileInfo(item->text(1)).isWritable()) return; KListView::rename(item, c); @@ -61,18 +61,18 @@ void PresetList::rename(QListViewItem *item, int c) //////////////////////////////////////////////// // EqualizerLevel -EqualizerLevel::EqualizerLevel(QWidget *parent, VBand band) - : QWidget(parent), mBand(band) +EqualizerLevel::EqualizerLevel(TQWidget *parent, VBand band) + : TQWidget(parent), mBand(band) { - QVBoxLayout *layout = new QVBoxLayout(this, + TQVBoxLayout *layout = new TQVBoxLayout(this, 0, 0, "EqualizerLevel::layout"); - mSlider = new QSlider(-200, 200, 25, 0, Qt::Vertical, this, "EqualizerLevel::mSlider"); - mSlider->setTickmarks(QSlider::Left); + mSlider = new TQSlider(-200, 200, 25, 0, Qt::Vertical, this, "EqualizerLevel::mSlider"); + mSlider->setTickmarks(TQSlider::Left); mSlider->setTickInterval(25); layout->addWidget(mSlider); - connect(mSlider, SIGNAL(valueChanged(int)), SLOT(changed(int))); - mLabel = new QLabel("", this, "EqualizerLevel::mLabel"); + connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed(int))); + mLabel = new TQLabel("", this, "EqualizerLevel::mLabel"); mLabel->setAlignment(AlignHCenter | AlignVCenter); layout->addWidget(mLabel); @@ -82,8 +82,8 @@ EqualizerLevel::EqualizerLevel(QWidget *parent, VBand band) setBand(band); - connect(EQ, SIGNAL(modified()), SLOT(changed())); - connect(mSlider, SIGNAL(valueChanged(int)), SLOT(changed(int))); + connect(EQ, TQT_SIGNAL(modified()), TQT_SLOT(changed())); + connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed(int))); } void EqualizerLevel::setBand(VBand band) @@ -123,56 +123,56 @@ void EqualizerView::show() mWidget = new EqualizerWidget(this, "mWidget"); setMainWidget(mWidget); - bandsLayout = new QHBoxLayout(mWidget->bandsFrame, + bandsLayout = new TQHBoxLayout(mWidget->bandsFrame, 0, KDialog::spacingHint(), "bandsLayout"); - connect(mWidget->preampSlider, SIGNAL(valueChanged(int)), - this, SLOT(setPreamp(int))); - connect(EQ, SIGNAL(preampChanged(int)), - this, SLOT(changedPreamp(int))); + connect(mWidget->preampSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(setPreamp(int))); + connect(EQ, TQT_SIGNAL(preampChanged(int)), + this, TQT_SLOT(changedPreamp(int))); mWidget->bandCount->setRange(EQ->minBands(), EQ->maxBands()); - connect(mWidget->bandCount, SIGNAL(valueChanged(int)), - EQ, SLOT(setBands(int))); + connect(mWidget->bandCount, TQT_SIGNAL(valueChanged(int)), + EQ, TQT_SLOT(setBands(int))); - QVBoxLayout *l = new QVBoxLayout(mWidget->presetFrame); + TQVBoxLayout *l = new TQVBoxLayout(mWidget->presetFrame); mPresets = new PresetList(mWidget->presetFrame, "mPresets"); l->addWidget(mPresets); - connect(mWidget->removePresetButton, SIGNAL(clicked()), SLOT(remove())); - connect(mWidget->addPresetButton, SIGNAL(clicked()), SLOT(create())); - connect(mWidget->resetEqButton, SIGNAL(clicked()), SLOT(reset())); + connect(mWidget->removePresetButton, TQT_SIGNAL(clicked()), TQT_SLOT(remove())); + connect(mWidget->addPresetButton, TQT_SIGNAL(clicked()), TQT_SLOT(create())); + connect(mWidget->resetEqButton, TQT_SIGNAL(clicked()), TQT_SLOT(reset())); new KListViewItem(mPresets, i18n("Custom")); - connect(mPresets, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(select(QListViewItem*))); + connect(mPresets, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(select(TQListViewItem*))); - connect(mPresets, SIGNAL(itemRenamed(QListViewItem*)), - this, SLOT(rename(QListViewItem*))); + connect(mPresets, TQT_SIGNAL(itemRenamed(TQListViewItem*)), + this, TQT_SLOT(rename(TQListViewItem*))); // populate the preset list - QValueList<VPreset> presets = EQ->presets(); - QValueList<VPreset>::Iterator it; + TQValueList<VPreset> presets = EQ->presets(); + TQValueList<VPreset>::Iterator it; for (it=presets.begin(); it!=presets.end(); ++it) { created(*it); } - connect(EQ, SIGNAL(created(VPreset)), SLOT(created(VPreset))); - connect(EQ, SIGNAL(renamed(VPreset)), SLOT(renamed(VPreset))); - connect(EQ, SIGNAL(removed(VPreset)), SLOT(removed(VPreset))); + connect(EQ, TQT_SIGNAL(created(VPreset)), TQT_SLOT(created(VPreset))); + connect(EQ, TQT_SIGNAL(renamed(VPreset)), TQT_SLOT(renamed(VPreset))); + connect(EQ, TQT_SIGNAL(removed(VPreset)), TQT_SLOT(removed(VPreset))); mWidget->enabledCheckBox->setChecked(EQ->isEnabled()); - connect(mWidget->enabledCheckBox, SIGNAL(toggled(bool)), - EQ, SLOT(setEnabled(bool))); - connect(EQ, SIGNAL(enabled(bool)), - mWidget->enabledCheckBox, SLOT(setChecked(bool))); + connect(mWidget->enabledCheckBox, TQT_SIGNAL(toggled(bool)), + EQ, TQT_SLOT(setEnabled(bool))); + connect(EQ, TQT_SIGNAL(enabled(bool)), + mWidget->enabledCheckBox, TQT_SLOT(setChecked(bool))); - connect(EQ, SIGNAL(changed()), - this, SLOT(changedEq())); - connect(EQ, SIGNAL(changedBands()), - this, SLOT(changedBands())); + connect(EQ, TQT_SIGNAL(changed()), + this, TQT_SLOT(changedEq())); + connect(EQ, TQT_SIGNAL(changedBands()), + this, TQT_SLOT(changedBands())); changedBands(); changedEq(); @@ -184,23 +184,23 @@ void EqualizerView::show() KDialogBase::show(); } -QListViewItem *EqualizerView::itemFor(const QString &filename) +TQListViewItem *EqualizerView::itemFor(const TQString &filename) { - for (QListViewItem *i=mPresets->firstChild(); i!=0; i=i->itemBelow()) + for (TQListViewItem *i=mPresets->firstChild(); i!=0; i=i->itemBelow()) { - QString t = i->text(1); + TQString t = i->text(1); if ((t.length()==0 && filename.length()==0) || t==filename) return i; } return 0; } -QListViewItem *EqualizerView::itemFor(const VPreset &preset) +TQListViewItem *EqualizerView::itemFor(const VPreset &preset) { return itemFor(preset.file()); } -// why is it that when you move a QSlider up, it goes down? +// why is it that when you move a TQSlider up, it goes down? void EqualizerView::setPreamp(int x) { EQ->setPreamp(-x); @@ -233,7 +233,7 @@ void EqualizerView::changedEq() { if (!mGoingPreset) { - QListViewItem *customitem = itemFor(""); + TQListViewItem *customitem = itemFor(""); if (!customitem) // this should never happen! return; mPresets->setSelected(customitem, true); @@ -247,15 +247,15 @@ void EqualizerView::removed(VPreset p) void EqualizerView::created(VPreset p) { - // store the filename in QListViewItem::text(0) - QString n = p.name(); - QString f = p.file(); + // store the filename in TQListViewItem::text(0) + TQString n = p.name(); + TQString f = p.file(); new KListViewItem(mPresets, n, f); } void EqualizerView::renamed(VPreset p) { - QListViewItem *renamed = itemFor(p); + TQListViewItem *renamed = itemFor(p); if (!renamed) // WTF ! { created(p); @@ -266,10 +266,10 @@ void EqualizerView::renamed(VPreset p) void EqualizerView::remove() { - QListViewItem *current=mPresets->currentItem(); + TQListViewItem *current=mPresets->currentItem(); if (current->text(0)==i18n("Custom")) return; - QListViewItem *then=current->itemAbove(); + TQListViewItem *then=current->itemAbove(); if (!then) then=current->itemBelow(); if (then) @@ -290,7 +290,7 @@ void EqualizerView::create() // We should have just made a list view item for this preset // See EquailizerView::presetAdded() - QListViewItem *i = itemFor(p); + TQListViewItem *i = itemFor(p); if (i) mPresets->setSelected(i, true); @@ -307,13 +307,13 @@ void EqualizerView::reset() } -void EqualizerView::rename(QListViewItem *item) +void EqualizerView::rename(TQListViewItem *item) { EQ->presetByFile(item->text(1)).setName(item->text(0)); item->setText(0, EQ->presetByFile(item->text(1)).name()); } -void EqualizerView::select(QListViewItem *item) +void EqualizerView::select(TQListViewItem *item) { mGoingPreset = true; EQ->presetByFile(item->text(1)).load(); diff --git a/noatun/library/equalizerview.h b/noatun/library/equalizerview.h index 98778fcc..321b5ef0 100644 --- a/noatun/library/equalizerview.h +++ b/noatun/library/equalizerview.h @@ -1,7 +1,7 @@ #ifndef EQUALIZERVIEW_H #define EQUALIZERVIEW_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> #include <klistview.h> @@ -18,7 +18,7 @@ class EqualizerLevel : public QWidget { Q_OBJECT public: - EqualizerLevel(QWidget *parent, VBand band); + EqualizerLevel(TQWidget *parent, VBand band); public slots: void changed(); @@ -28,8 +28,8 @@ public slots: private: VBand mBand; - QSlider *mSlider; - QLabel *mLabel; + TQSlider *mSlider; + TQLabel *mLabel; }; @@ -37,24 +37,24 @@ class PresetList : public KListView { Q_OBJECT public: - PresetList(QWidget *parent, const char *name=0); + PresetList(TQWidget *parent, const char *name=0); public: - void rename(QListViewItem *item, int c); + void rename(TQListViewItem *item, int c); }; class EqualizerView : public KDialogBase { Q_OBJECT - QPtrList<EqualizerLevel> mBands; + TQPtrList<EqualizerLevel> mBands; public: EqualizerView(); virtual void show(); - QListViewItem *itemFor(const QString &filename); - QListViewItem *itemFor(const VPreset &preset); + TQListViewItem *itemFor(const TQString &filename); + TQListViewItem *itemFor(const VPreset &preset); public slots: void setPreamp(int); @@ -71,19 +71,19 @@ private slots: void remove(); void create(); void reset(); - void rename(QListViewItem *); - void select(QListViewItem*); + void rename(TQListViewItem *); + void select(TQListViewItem*); private: bool first; EqualizerWidget *mWidget; - QHBoxLayout *bandsLayout; -// QCheckBox *mOn; -// QSlider *mPreamp; + TQHBoxLayout *bandsLayout; +// TQCheckBox *mOn; +// TQSlider *mPreamp; PresetList *mPresets; bool mGoingPreset; -// QPushButton *mRemovePreset, *mAddPreset; -// QFrame *mSliders; +// TQPushButton *mRemovePreset, *mAddPreset; +// TQFrame *mSliders; // KIntNumInput *mBandCount; }; diff --git a/noatun/library/globalvideo.h b/noatun/library/globalvideo.h index e0f28cb0..c070ab30 100644 --- a/noatun/library/globalvideo.h +++ b/noatun/library/globalvideo.h @@ -7,7 +7,7 @@ class GlobalVideo : public QWidget { Q_OBJECT - QPopupMenu *menu; + TQPopupMenu *menu; VideoFrame *video; public: @@ -19,7 +19,7 @@ public slots: void slotAdaptSize(int w, int h); protected: - void mouseReleaseEvent(QMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); }; diff --git a/noatun/library/ksaver.cpp b/noatun/library/ksaver.cpp index f1cc6a61..40b3606c 100644 --- a/noatun/library/ksaver.cpp +++ b/noatun/library/ksaver.cpp @@ -39,11 +39,11 @@ public: KSaverPrivate() : isLocal(true), tempFile(0), file(0), textStream(0), dataStream(0) {}; bool isLocal; KTempFile *tempFile; - QFile *file; + TQFile *file; KURL url; - QString error; - QTextStream *textStream; - QDataStream *dataStream; + TQString error; + TQTextStream *textStream; + TQDataStream *dataStream; }; Noatun::KSaver::KSaver(const KURL &_target) @@ -54,7 +54,7 @@ Noatun::KSaver::KSaver(const KURL &_target) if(d->url.protocol() == "file") { d->isLocal = true; - d->file = new QFile(d->url.path()); + d->file = new TQFile(d->url.path()); } else { @@ -124,22 +124,22 @@ bool Noatun::KSaver::close(void) } } -QString Noatun::KSaver::error(void) +TQString Noatun::KSaver::error(void) { return d->error; } -QFile &Noatun::KSaver::file(void) +TQFile &Noatun::KSaver::file(void) { if(d->isLocal && d->file) return *d->file; else if(!d->isLocal && d->tempFile) return *d->tempFile->file(); else - return *static_cast<QFile *>(0); + return *static_cast<TQFile *>(0); } -QTextStream &Noatun::KSaver::textStream() +TQTextStream &Noatun::KSaver::textStream() { if(d->textStream) { @@ -147,7 +147,7 @@ QTextStream &Noatun::KSaver::textStream() } else if(d->isLocal && d->file) { - d->textStream = new QTextStream(d->file); + d->textStream = new TQTextStream(d->file); return *d->textStream; } else if(!d->isLocal && d->tempFile) @@ -157,11 +157,11 @@ QTextStream &Noatun::KSaver::textStream() } else { - return *static_cast<QTextStream *>(0); + return *static_cast<TQTextStream *>(0); } } -QDataStream &Noatun::KSaver::dataStream() +TQDataStream &Noatun::KSaver::dataStream() { if(d->dataStream) { @@ -169,7 +169,7 @@ QDataStream &Noatun::KSaver::dataStream() } else if(d->isLocal && d->file) { - d->dataStream = new QDataStream(d->file); + d->dataStream = new TQDataStream(d->file); return *d->dataStream; } else if(!d->isLocal && d->tempFile) @@ -179,6 +179,6 @@ QDataStream &Noatun::KSaver::dataStream() } else { - return *static_cast<QDataStream *>(0); + return *static_cast<TQDataStream *>(0); } } diff --git a/noatun/library/ksaver.h b/noatun/library/ksaver.h index e55b2c0d..91fc4af8 100644 --- a/noatun/library/ksaver.h +++ b/noatun/library/ksaver.h @@ -25,10 +25,10 @@ #define KSAVER_H #include <kurl.h> -#include <qfile.h> -#include <qstring.h> -#include <qtextstream.h> -#include <qdatastream.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqdatastream.h> namespace Noatun { @@ -42,7 +42,7 @@ class KSaver public: /** * The constructor takes the url and decides the best way to save, - * which will mean using something like KIO::NetAccess or QFile. + * which will mean using something like KIO::NetAccess or TQFile. */ KSaver(const KURL &_target); @@ -69,29 +69,29 @@ public: * If open or close returns false, there was an error, and error * returns what the error was, when available. */ - QString error(void); + TQString error(void); /** - * file returns a QFile open for writing, which may be for a temporary + * file returns a TQFile open for writing, which may be for a temporary * file on the local filesystem. * * If this is called before the file is opened, you will crash. */ - QFile &file(void); + TQFile &file(void); /** * You can use this to write out your data. * * If this is called before the file is opened, you will crash. */ - QTextStream &textStream(void); + TQTextStream &textStream(void); /** * You can use this to write out your data. * * If this is called before the file is opened, you will crash. */ - QDataStream &dataStream(void); + TQDataStream &dataStream(void); private: class KSaverPrivate; KSaverPrivate *d; diff --git a/noatun/library/mimetypetree.cpp b/noatun/library/mimetypetree.cpp index c2b60c81..0370b048 100644 --- a/noatun/library/mimetypetree.cpp +++ b/noatun/library/mimetypetree.cpp @@ -1,54 +1,54 @@ #include "mimetypetree.h" #include <kmimetype.h> -#include <qdict.h> -#include <qheader.h> +#include <tqdict.h> +#include <tqheader.h> -MimeTypeTree::MimeTypeTree(QWidget *parent) +MimeTypeTree::MimeTypeTree(TQWidget *parent) : KListView(parent) { KMimeType::List list=KMimeType::allMimeTypes(); - QDict<QListViewItem> map; + TQDict<TQListViewItem> map; setRootIsDecorated(true); addColumn("-"); header()->hide(); - QValueListIterator<KMimeType::Ptr> i(list.begin()); + TQValueListIterator<KMimeType::Ptr> i(list.begin()); for (; i != list.end(); ++i) { - QString mimetype = (*i)->name(); + TQString mimetype = (*i)->name(); int slash = mimetype.find("/"); - QString major = mimetype.left(slash); + TQString major = mimetype.left(slash); // hide all and inode majors if (major == "all" || major=="inode") continue; - QString minor = mimetype.mid(slash+1); - QListViewItem *majorItem=map[major]; + TQString minor = mimetype.mid(slash+1); + TQListViewItem *majorItem=map[major]; if (!majorItem) { majorItem=addMajor(major); map.insert(major, majorItem); } - new QListViewItem(majorItem, minor); + new TQListViewItem(majorItem, minor); } } -void MimeTypeTree::sel(QListViewItem *item) +void MimeTypeTree::sel(TQListViewItem *item) { - QListViewItem *p=item->parent(); + TQListViewItem *p=item->parent(); if (!p) return; - QString major=p->text(0); - QString minor=item->text(0); + TQString major=p->text(0); + TQString minor=item->text(0); emit selected(major+'/'+minor); } -QListViewItem* MimeTypeTree::addMajor(const QString &name) +TQListViewItem* MimeTypeTree::addMajor(const TQString &name) { - return new QListViewItem(this, name); + return new TQListViewItem(this, name); } diff --git a/noatun/library/mimetypetree.h b/noatun/library/mimetypetree.h index 1f315526..92af43ec 100644 --- a/noatun/library/mimetypetree.h +++ b/noatun/library/mimetypetree.h @@ -20,15 +20,15 @@ class MimeTypeTree : public KListView { Q_OBJECT public: - MimeTypeTree(QWidget *parent); + MimeTypeTree(TQWidget *parent); private: - QListViewItem *addMajor(const QString &name); + TQListViewItem *addMajor(const TQString &name); private slots: - void sel(QListViewItem *item); + void sel(TQListViewItem *item); signals: - void selected(const QString &mimetype); + void selected(const TQString &mimetype); }; #endif diff --git a/noatun/library/noatun/app.h b/noatun/library/noatun/app.h index c4effa4d..0b8af3ee 100644 --- a/noatun/library/noatun/app.h +++ b/noatun/library/noatun/app.h @@ -56,20 +56,20 @@ public: /** * @return a list of mimetypes aRts (and thus Noatun) can play - * KFileDialog accepts this QString instead of the shell globs in + * KFileDialog accepts this TQString instead of the shell globs in * its static functions, make use of it :) **/ - QString mimeTypes(); + TQString mimeTypes(); LibraryLoader *libraryLoader() const { return mLibraryLoader; } Downloader *downloader() const { return mDownloader; } - static QImage readPNG(const QString &filename); + static TQImage readPNG(const TQString &filename); Effects *effects() const; ::Equalizer *equalizer() const { return mEqualizer; } ::VEqualizer *vequalizer(); KDialogBase *equalizerView() const { return mEqualizerView; } - QCString version() const; + TQCString version() const; virtual void commitData(QSessionManager &); virtual void saveState(QSessionManager &); @@ -121,7 +121,7 @@ public: //options int startupPlayMode() const; bool loopList() const; bool oneInstance() const; - QString saveDirectory() const; + TQString saveDirectory() const; /** * @deprecated * now merged with clearOnOpen() @@ -138,7 +138,7 @@ public: //options * software mixing is active **/ bool fastMixer() const; - QString titleFormat() const; + TQString titleFormat() const; /** * @return true if remaining time is displayed to the user, false if * played time is displayed @@ -152,7 +152,7 @@ public: //options */ void setAutoPlay(bool); void setStartupPlayMode(int mode); - void setSaveDirectory(const QString &); + void setSaveDirectory(const TQString &); void setRememberPositions(bool); /** * @deprecated @@ -171,7 +171,7 @@ public: //options **/ void setFastMixer(bool); - void setTitleFormat(const QString &); + void setTitleFormat(const TQString &); /** * Pass true if remaining time should be displayed to the user, false if @@ -192,7 +192,7 @@ public: //options * * @return the ID associated with the menu item, for use in pluginMenuRemove() **/ - int pluginMenuAdd(const QString &text, const QObject *receiver, const char *member); + int pluginMenuAdd(const TQString &text, const TQObject *receiver, const char *member); /** * @deprecated diff --git a/noatun/library/noatun/controls.h b/noatun/library/noatun/controls.h index 6db8d1cd..27186c08 100644 --- a/noatun/library/noatun/controls.h +++ b/noatun/library/noatun/controls.h @@ -1,12 +1,12 @@ #ifndef __CONTROLS_H #define __CONTROLS_H -#include <qguardedptr.h> +#include <tqguardedptr.h> #include <kaction.h> #include <ktoolbar.h> -#include <qslider.h> -#include <qstringlist.h> +#include <tqslider.h> +#include <tqstringlist.h> #include <kdemacros.h> class QComboBox; @@ -16,7 +16,7 @@ class QLabel; * A slider that can be moved around while being * changed internally * - * @short Special QSlider based class suitable for time sliders + * @short Special TQSlider based class suitable for time sliders * @author Charles Samuels * @version 2.3 **/ @@ -24,10 +24,10 @@ class KDE_EXPORT L33tSlider : public QSlider { Q_OBJECT public: - L33tSlider(QWidget * parent, const char * name=0); - L33tSlider(Orientation, QWidget * parent, const char * name=0); + L33tSlider(TQWidget * parent, const char * name=0); + L33tSlider(Orientation, TQWidget * parent, const char * name=0); L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation, QWidget * parent, const char * name=0); + Orientation, TQWidget * parent, const char * name=0); bool currentlyPressed() const; signals: @@ -40,9 +40,9 @@ public slots: virtual void setValue(int); protected: - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void wheelEvent(QWheelEvent *); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void wheelEvent(TQWheelEvent *); private: bool pressed; @@ -57,11 +57,11 @@ class SliderAction : public KAction { Q_OBJECT public: - SliderAction(const QString& text, int accel, const QObject *receiver, - const char *member, QObject* parent, const char* name ); - virtual int plug( QWidget *w, int index = -1 ); - virtual void unplug( QWidget *w ); - QSlider* slider() const { return m_slider; } + SliderAction(const TQString& text, int accel, const TQObject *receiver, + const char *member, TQObject* parent, const char* name ); + virtual int plug( TQWidget *w, int index = -1 ); + virtual void unplug( TQWidget *w ); + TQSlider* slider() const { return m_slider; } signals: void plugged(); @@ -70,9 +70,9 @@ public slots: void toolbarMoved(KToolBar::BarPosition pos); private: - QGuardedPtr<QSlider> m_slider; - QStringList m_items; - const QObject *m_receiver; + TQGuardedPtr<TQSlider> m_slider; + TQStringList m_items; + const TQObject *m_receiver; const char *m_member; }; diff --git a/noatun/library/noatun/downloader.h b/noatun/library/noatun/downloader.h index c281a006..624518d0 100644 --- a/noatun/library/noatun/downloader.h +++ b/noatun/library/noatun/downloader.h @@ -2,8 +2,8 @@ #define _DOWNLOADER_H #include <kurl.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> class QFile; class QTimer; @@ -31,9 +31,9 @@ public: /** * @return the local filename this item will be saved to **/ - QString localFilename() const; + TQString localFilename() const; - virtual void setLocalFilename(const QString &filename); + virtual void setLocalFilename(const TQString &filename); /** * Called if this item has been fully downloaded @@ -57,7 +57,7 @@ public: void dequeue(); private: - QString mLocalFilename; + TQString mLocalFilename; }; /** @@ -70,15 +70,15 @@ Q_OBJECT { DownloadItem *notifier; KURL file; - QString local; + TQString local; }; public: - Downloader(QObject *parent=0); + Downloader(TQObject *parent=0); virtual ~Downloader(); public slots: - QString enqueue(DownloadItem *notifier, const KURL &file); + TQString enqueue(DownloadItem *notifier, const KURL &file); void dequeue(DownloadItem *notifier); /** @@ -101,18 +101,18 @@ signals: private slots: void getNext(); - void data( KIO::Job *, const QByteArray &data); + void data( KIO::Job *, const TQByteArray &data); void percent( KIO::Job *, unsigned long percent); void jobDone( KIO::Job *); void giveUpWithThisDownloadServerIsRunningNT(); private: - QPtrList<Downloader::QueueItem> mQueue; - QPtrList<Downloader::QueueItem> *mUnstartedQueue; - QFile *localfile; + TQPtrList<Downloader::QueueItem> mQueue; + TQPtrList<Downloader::QueueItem> *mUnstartedQueue; + TQFile *localfile; Downloader::QueueItem *current; KIO::TransferJob *mJob; - QTimer *mTimeout; + TQTimer *mTimeout; bool mStarted; }; diff --git a/noatun/library/noatun/effects.h b/noatun/library/noatun/effects.h index c39cb8aa..4c014a93 100644 --- a/noatun/library/noatun/effects.h +++ b/noatun/library/noatun/effects.h @@ -1,10 +1,10 @@ #ifndef EFFECTS_H #define EFFECTS_H -#include <qptrlist.h> -#include <qcstring.h> -#include <qstrlist.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqcstring.h> +#include <tqstrlist.h> +#include <tqobject.h> namespace Arts { class StereoEffect; } class Engine; @@ -48,12 +48,12 @@ public: /** * Get the name of the object. **/ - QCString name() const; + TQCString name() const; /** * get the "clean" title of effect **/ - QString title() const; + TQString title() const; /** * @return true if this effect name is invalid, false otherwise @@ -69,7 +69,7 @@ public: * set an icon and make it purdy. Otherwise * create a plan widget that you can reparent. **/ - QWidget *configure(bool friendly=true); + TQWidget *configure(bool friendly=true); /** * Does this widget have a configurable @@ -82,12 +82,12 @@ public: * Return an effect name that can be presented to a user * i.e. Arts::FREEVERB will end up as FREEVERB **/ - static QString clean(const QCString &name); + static TQString clean(const TQCString &name); private: long mId; Arts::StereoEffect *mEffect; - QCString mName; - QWidget *mConfig; + TQCString mName; + TQWidget *mConfig; }; /** @@ -137,12 +137,12 @@ public: * each of these can be given to the first * argument of the Effect constructor **/ - QStrList available() const; + TQStrList available() const; /** * A list of all available effects objects **/ - QPtrList<Effect> effects() const; + TQPtrList<Effect> effects() const; /** * Get the Effect that has the following id @@ -150,7 +150,7 @@ public: Effect *findId(long id) const; private: - QPtrListIterator<Effect> stackPosition() const; + TQPtrListIterator<Effect> stackPosition() const; signals: /** @@ -177,7 +177,7 @@ signals: private: // stored in no specific order - QPtrList<Effect> mItems; + TQPtrList<Effect> mItems; }; diff --git a/noatun/library/noatun/engine.h b/noatun/library/noatun/engine.h index 2244fa1e..b47eb087 100644 --- a/noatun/library/noatun/engine.h +++ b/noatun/library/noatun/engine.h @@ -1,7 +1,7 @@ #ifndef _ENGINE_H #define _ENGINE_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> #include <arts/kmedia2.h> #include <noatun/playlist.h> @@ -35,7 +35,7 @@ class KDE_EXPORT Engine : public QObject Q_OBJECT friend class NoatunApp; public: - Engine(QObject *parent=0); + Engine(TQObject *parent=0); ~Engine(); void setInitialized(); bool initialized() const; @@ -78,9 +78,9 @@ signals: void aboutToPlay(); void receivedStreamMeta( - const QString &streamName, const QString &streamGenre, - const QString &streamUrl, const QString &streamBitrate, - const QString &trackTitle, const QString &trackUrl + const TQString &streamName, const TQString &streamGenre, + const TQString &streamUrl, const TQString &streamBitrate, + const TQString &trackTitle, const TQString &trackUrl ); void playingFailed(); diff --git a/noatun/library/noatun/equalizer.h b/noatun/library/noatun/equalizer.h index 10de88c5..d048d21d 100644 --- a/noatun/library/noatun/equalizer.h +++ b/noatun/library/noatun/equalizer.h @@ -1,8 +1,8 @@ #ifndef NOATUN_EQUALIZER_H #define NOATUN_EQUALIZER_H -#include <qptrlist.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqobject.h> #include <kurl.h> #include <noatun/vequalizer.h> @@ -20,23 +20,23 @@ class Preset { friend class Equalizer; - Preset(const QString &file); + Preset(const TQString &file); Preset(); Preset(VPreset p); public: - QString name() const; - bool setName(const QString &name); + TQString name() const; + bool setName(const TQString &name); bool save() const; bool load(); void remove(); - QString file() const; + TQString file() const; VPreset &vpreset() const; private: - QString mFile; + TQString mFile; }; /** @@ -49,7 +49,7 @@ private: class Band { friend class Equalizer; -friend class QPtrList<Band>; +friend class TQPtrList<Band>; private: Band(); @@ -75,12 +75,12 @@ public: **/ int center() const; - QString formatStart(bool withHz=true) const; - QString formatEnd(bool withHz=true) const; + TQString formatStart(bool withHz=true) const; + TQString formatEnd(bool withHz=true) const; /** * return the format for center() **/ - QString format(bool withHz=true) const; + TQString format(bool withHz=true) const; private: int mOffset; @@ -110,7 +110,7 @@ public: Equalizer(); ~Equalizer(); - const QPtrList<Band> &bands() const; + const TQPtrList<Band> &bands() const; Band *band(int num) const; int bandCount() const; @@ -141,7 +141,7 @@ public: * pattern. Nevertheless, the file can be identified * by magic, so it's not required **/ - bool save(const KURL &file, const QString &friendly) const; + bool save(const KURL &file, const TQString &friendly) const; /** * restore the EQ settings from this file @@ -154,14 +154,14 @@ public: * * @see fromString **/ - QString toString(const QString &name="stored") const; + TQString toString(const TQString &name="stored") const; /** * undo a toString, restoring the EQ * to the settings in the given string, * emitting the changed signals **/ - bool fromString(const QString &str); + bool fromString(const TQString &str); /** * create a preset with such a name @@ -171,16 +171,16 @@ public: * If smart is true, append a number to the end * of the name, if one already exists by the given **/ - Preset *createPreset(const QString &name, bool smart=true); + Preset *createPreset(const TQString &name, bool smart=true); /** * return all the presets * remember to setAutoDelete on this **/ - QPtrList<Preset> presets() const; + TQPtrList<Preset> presets() const; - Preset *preset(const QString &file); - bool presetExists(const QString &name) const; + Preset *preset(const TQString &file); + bool presetExists(const TQString &name) const; signals: void changed(Band *band); @@ -227,7 +227,7 @@ private: void update(bool full=false); private: - QPtrList<Band> mBands; + TQPtrList<Band> mBands; bool mUpdates; int mPreamp; }; diff --git a/noatun/library/noatun/player.h b/noatun/library/noatun/player.h index bccda62b..a61c2335 100644 --- a/noatun/library/noatun/player.h +++ b/noatun/library/noatun/player.h @@ -1,8 +1,8 @@ #ifndef PLAYER_H #define PLAYER_H -#include <qobject.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqtimer.h> #include <kurl.h> #include <noatun/playlist.h> #include <kdemacros.h> @@ -41,14 +41,14 @@ public: enum LoopType { None=0, Song, Playlist, Random }; public: - Player(QObject *parent=0); + Player(TQObject *parent=0); ~Player(); /** * @return a string with the time that can be used in the UI: * CC:CC/LL:LL (mm:ss) **/ - QString lengthString(int _position=-1); + TQString lengthString(int _position=-1); /** * @return LoopType enum **/ @@ -180,9 +180,9 @@ private slots: void posTimeout(); void aboutToPlay(); void slotUpdateStreamMeta( - const QString &streamName, const QString &streamGenre, - const QString &streamUrl, const QString &streamBitrate, - const QString &trackTitle, const QString &trackUrl + const TQString &streamName, const TQString &streamGenre, + const TQString &streamUrl, const TQString &streamBitrate, + const TQString &trackTitle, const TQString &trackUrl ); signals: @@ -257,12 +257,12 @@ signals: private: Engine *mEngine; - QTimer filePos; + TQTimer filePos; int position; int mLoopStyle; bool firstTimeout; PlaylistItem mCurrent; // TODO eliminate - QPtrList<PlaylistNotifier> mNotifiers; + TQPtrList<PlaylistNotifier> mNotifiers; }; diff --git a/noatun/library/noatun/playlist.h b/noatun/library/noatun/playlist.h index 37eabb0b..013d63a4 100644 --- a/noatun/library/noatun/playlist.h +++ b/noatun/library/noatun/playlist.h @@ -1,10 +1,10 @@ #ifndef NOATUNPLAYLIST_H #define NOATUNPLAYLIST_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> -#include <qdict.h> -#include <qstringlist.h> +#include <tqdict.h> +#include <tqstringlist.h> #include <cassert> #include <kdemacros.h> @@ -35,7 +35,7 @@ public: /** * Noatun asks your playlist for properties. It is your - * responsiblity to store the information. But usually a QMap<QString,QString> + * responsiblity to store the information. But usually a TQMap<TQString,TQString> * is enough. * * If you return the default value, the default should not @@ -43,30 +43,30 @@ public: * * This returns the property, or def if such a property doesn't exist **/ - virtual QString property(const QString &key, const QString &def=0) const=0; + virtual TQString property(const TQString &key, const TQString &def=0) const=0; /** * This sets the property with the given key and value. * - * Important: If you use a QMap, you'll have to remove the current + * Important: If you use a TQMap, you'll have to remove the current * item before adding a new one **/ - virtual void setProperty(const QString &key, const QString &property)=0; + virtual void setProperty(const TQString &key, const TQString &property)=0; /** * remove the item with given key **/ - virtual void clearProperty(const QString &key)=0; + virtual void clearProperty(const TQString &key)=0; /** * return a list of property keys **/ - virtual QStringList properties() const=0; + virtual TQStringList properties() const=0; /** * return whether if the given key exists **/ - virtual bool isProperty(const QString &key) const=0; + virtual bool isProperty(const TQString &key) const=0; /** * return the title of the song. By default, this will @@ -78,7 +78,7 @@ public: * * you shouldn't need to override this. **/ - virtual QString title() const; + virtual TQString title() const; /** * the true filename of the song, remote or local @@ -93,18 +93,18 @@ public: * first, this checks for the property "mimetype", else * it'l ask KMimeType based on file() **/ - virtual QCString mimetype() const; + virtual TQCString mimetype() const; /** * first, checks for the property "playObject", else, * it'l ask aRts **/ - virtual QCString playObject() const; + virtual TQCString playObject() const; /** * return the filename to send to the playobject **/ - virtual QString file() const { return url().path(); } + virtual TQString file() const { return url().path(); } /** * what's the length of the song, in milliseconds? @@ -120,7 +120,7 @@ public: * returns a friendly representation of the length * of this file **/ - QString lengthString() const; + TQString lengthString() const; /** * compare yourself with the given PlaylistItemData @@ -243,31 +243,31 @@ public: bool operator !=(const PlaylistItemData *i) const { return ! (*this->data()==*i); } - QString property(const QString &key, const QString &def=0) const + TQString property(const TQString &key, const TQString &def=0) const { assert(mData); return mData->property(key, def); } - void setProperty(const QString &key, const QString &property) + void setProperty(const TQString &key, const TQString &property) { assert(mData); const_cast<PlaylistItemData*>(mData)->setProperty(key, property); } - void clearProperty(const QString &key) + void clearProperty(const TQString &key) { assert(mData); const_cast<PlaylistItemData*>(mData)->clearProperty(key); } - QStringList properties() const + TQStringList properties() const { assert(mData); return mData->properties(); } - bool isProperty(const QString &key) const + bool isProperty(const TQString &key) const { assert(mData); return mData->isProperty(key); @@ -280,11 +280,11 @@ public: const_cast<PlaylistItemData*>(mData)->setUrl(url); } - QCString mimetype() const { assert(mData); return mData->mimetype(); } - QCString playObject() const { assert(mData); return mData->playObject(); } - QString file() const { assert(mData); return mData->file(); } + TQCString mimetype() const { assert(mData); return mData->mimetype(); } + TQCString playObject() const { assert(mData); return mData->playObject(); } + TQString file() const { assert(mData); return mData->file(); } - QString title() const + TQString title() const { assert(mData); return mData->title(); @@ -302,7 +302,7 @@ public: mData->setLength(ms); } - QString lengthString() const { assert(mData); return mData->lengthString(); } + TQString lengthString() const { assert(mData); return mData->lengthString(); } void remove() { assert(mData); mData->remove(); } @@ -331,7 +331,7 @@ class Playlist : public QObject Q_OBJECT friend class PlaylistItemData; public: - Playlist(QObject *parent, const char *name); + Playlist(TQObject *parent, const char *name); /** * on playlist unload, your playlist must * have current()==0 and emit playCurrent @@ -432,8 +432,8 @@ public: * to the items in the playlist. The keys * are always compared with case sensitivity **/ - virtual QValueList<PlaylistItem> select( - const QStringList &keys, const QStringList &values, + virtual TQValueList<PlaylistItem> select( + const TQStringList &keys, const TQStringList &values, int limit=-1, bool exact=false, bool caseSensitive=false ); @@ -443,21 +443,21 @@ public: * both of these (with different mechanisms if need be) * for speed **/ - virtual QValueList<PlaylistItem> select( - const QString &key, const QString &value, + virtual TQValueList<PlaylistItem> select( + const TQString &key, const TQString &value, int limit=-1, bool exact=false, bool caseSensitive=false ); /** * exactly the same as the above, except converts - * the const char* to QString (utf8) + * the const char* to TQString (utf8) **/ - inline QValueList<PlaylistItem> select( + inline TQValueList<PlaylistItem> select( const char *key, const char *value, int limit=-1, bool exact=false, bool caseSensitive=false ) { return select( - QString(key), QString(value), + TQString(key), TQString(value), limit, exact, caseSensitive ); } diff --git a/noatun/library/noatun/playlistsaver.h b/noatun/library/noatun/playlistsaver.h index e83761ca..781b8fc6 100644 --- a/noatun/library/noatun/playlistsaver.h +++ b/noatun/library/noatun/playlistsaver.h @@ -2,7 +2,7 @@ #define NOATUNPLAYLISTSAVER_H #include <kurl.h> -#include <qmap.h> +#include <tqmap.h> #include <noatun/playlist.h> class Structure; @@ -52,7 +52,7 @@ public: * unused, for future expansion, do not use * @internal **/ - virtual void setGroup(const QString &); + virtual void setGroup(const TQString &); protected: /** @@ -60,7 +60,7 @@ protected: * Given is a list of properties which coincide * with the standard noatun ones **/ - virtual void readItem(const QMap<QString,QString> &properties) = 0; + virtual void readItem(const TQMap<TQString,TQString> &properties) = 0; /** * add this item to the XML file @@ -72,7 +72,7 @@ protected: * unused, for future expansion * @internal **/ - virtual void changeGroup(const QString &) {} + virtual void changeGroup(const TQString &) {} /** * this is called when you should either diff --git a/noatun/library/noatun/plugin.h b/noatun/library/noatun/plugin.h index f90dcc0d..2bd8c994 100644 --- a/noatun/library/noatun/plugin.h +++ b/noatun/library/noatun/plugin.h @@ -2,7 +2,7 @@ #define NPLUGIN_H #include <noatun/pluginloader.h> -#include <qmemarray.h> +#include <tqmemarray.h> #include <vector> #include <kdemacros.h> @@ -153,7 +153,7 @@ public: private: int mTimeout; TimerThingy *mTimerThingy; - QCString mVisualizationStack; + TQCString mVisualizationStack; Arts::SoundServerV2 *mServer; static Arts::Dispatcher *mDispatcher; static bool internalVis; @@ -408,7 +408,7 @@ Q_OBJECT friend class NoatunListenerNotif; public: - NoatunListener(QObject *parent=0); + NoatunListener(TQObject *parent=0); virtual ~NoatunListener(); signals: @@ -432,11 +432,11 @@ protected: class ExitNotifier : public NoatunListener { public: - ExitNotifier(int pid, QObject *parent=0); + ExitNotifier(int pid, TQObject *parent=0); virtual ~ExitNotifier(); private: - QCString appid; + TQCString appid; }; /** @@ -454,7 +454,7 @@ class BoolNotifier : public QObject { Q_OBJECT public: - BoolNotifier(bool *value, NoatunListener *listener, QObject *parent=0); + BoolNotifier(bool *value, NoatunListener *listener, TQObject *parent=0); private slots: void event() {*mValue=false;} diff --git a/noatun/library/noatun/pluginloader.h b/noatun/library/noatun/pluginloader.h index 611fe358..04c1b750 100644 --- a/noatun/library/noatun/pluginloader.h +++ b/noatun/library/noatun/pluginloader.h @@ -1,27 +1,27 @@ #ifndef PLUGIN_LOADER_H #define PLUGIN_LOADER_H -#include <qstring.h> -#include <qvaluelist.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> #include <noatun/app.h> #include <klibloader.h> -#include <qdict.h> +#include <tqdict.h> #include <kdemacros.h> struct NoatunLibraryInfo { - QString specfile; - QString filename; - QString author; - QString license; - QString type; - QString site; - QString email; - QString name; - QString comment; - QStringList require; + TQString specfile; + TQString filename; + TQString author; + TQString license; + TQString type; + TQString site; + TQString email; + TQString name; + TQString comment; + TQStringList require; }; bool operator ==(const NoatunLibraryInfo &, const NoatunLibraryInfo &); @@ -46,30 +46,30 @@ public: LibraryLoader(); ~LibraryLoader(); - QValueList<NoatunLibraryInfo> available() const; - QValueList<NoatunLibraryInfo> loaded() const; - QValueList<NoatunLibraryInfo> loadedByType(const QString &type) const; + TQValueList<NoatunLibraryInfo> available() const; + TQValueList<NoatunLibraryInfo> loaded() const; + TQValueList<NoatunLibraryInfo> loadedByType(const TQString &type) const; /** * loads all the enabled plugins **/ bool loadAll(void); - bool loadAll(const QStringList &); + bool loadAll(const TQStringList &); - bool isLoaded(const QString &spec) const; - void add(const QString &spec); - void setModules(const QStringList &mods); + bool isLoaded(const TQString &spec) const; + void add(const TQString &spec); + void setModules(const TQStringList &mods); /** * unload the plugin specified by spec **/ - bool remove(const QString &spec); + bool remove(const TQString &spec); /** * Same as the above, but does not call kapp->exit() even * when the last userinterface plugin is removed. Necessary * during session management (see marquis plugin). * ### BIC: merge with above with terminateOnLastUI = true */ - bool remove(const QString &spec, bool terminateOnLastUI); + bool remove(const TQString &spec, bool terminateOnLastUI); /** * unload the plugin that is referenced by @par plugin **/ @@ -83,15 +83,15 @@ public: * to see what plugins are required to show * (when required by another noatun-plugin) **/ - NoatunLibraryInfo getInfo(const QString &spec) const; - QPtrList<Plugin> plugins() const; + NoatunLibraryInfo getInfo(const TQString &spec) const; + TQPtrList<Plugin> plugins() const; private: - bool loadSO(const QString &spec); - void removeNow(const QString &spec); + bool loadSO(const TQString &spec); + void removeNow(const TQString &spec); private: - QDict<LibraryLoader::PluginLibrary> mLibHash; + TQDict<LibraryLoader::PluginLibrary> mLibHash; Playlist *mPlaylist; }; diff --git a/noatun/library/noatun/pref.h b/noatun/library/noatun/pref.h index 95be5e0e..5a7d056e 100644 --- a/noatun/library/noatun/pref.h +++ b/noatun/library/noatun/pref.h @@ -2,7 +2,7 @@ #define NOATUNPREF_H #include <kdialogbase.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdemacros.h> class CModule; @@ -19,7 +19,7 @@ public: /** * @internal **/ - NoatunPreferences(QWidget *); + NoatunPreferences(TQWidget *); public: /** @@ -44,7 +44,7 @@ private: class NoatunPreferencesPrivate; NoatunPreferencesPrivate *d; - QPtrList<CModule> mModules; + TQPtrList<CModule> mModules; }; /** @@ -65,7 +65,7 @@ public: * parent is the object that is this modules virtual-parent. * When that is deleted, this also will go away, automagically. **/ - CModule(const QString &name, const QString &description, const QString &icon, QObject *parent=0); + CModule(const TQString &name, const TQString &description, const TQString &icon, TQObject *parent=0); virtual ~CModule(); diff --git a/noatun/library/noatun/scrollinglabel.h b/noatun/library/noatun/scrollinglabel.h index 1615a64f..231d3158 100644 --- a/noatun/library/noatun/scrollinglabel.h +++ b/noatun/library/noatun/scrollinglabel.h @@ -23,7 +23,7 @@ #ifndef SCROLLING_LABEL_H #define SCROLLING_LABEL_H -#include <qwidget.h> +#include <tqwidget.h> /** * A clever label that scrolls its contents as soon as there is not enough * space to show everything at once. @@ -33,7 +33,7 @@ class ScrollingLabel : public QWidget Q_OBJECT public: - ScrollingLabel(const QString &initialText,QWidget *parent, + ScrollingLabel(const TQString &initialText,TQWidget *parent, const char * name = 0); virtual ~ScrollingLabel(); @@ -41,15 +41,15 @@ class ScrollingLabel : public QWidget * Sets the label's text * set @p time (ms) if you want to display a temporary message **/ - virtual void setText(const QString &text, int time = -1); + virtual void setText(const TQString &text, int time = -1); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; /** * @return the label's text. **/ - virtual QString text() const; + virtual TQString text() const; /** * Used to enable/disable scrolling manually @@ -58,8 +58,8 @@ class ScrollingLabel : public QWidget protected: - virtual void paintEvent(QPaintEvent *); - virtual void resizeEvent(QResizeEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void resizeEvent(TQResizeEvent *); protected slots: diff --git a/noatun/library/noatun/stdaction.h b/noatun/library/noatun/stdaction.h index 7cac67fe..bfa34164 100644 --- a/noatun/library/noatun/stdaction.h +++ b/noatun/library/noatun/stdaction.h @@ -21,7 +21,7 @@ class PlayAction : public KAction { Q_OBJECT public: - PlayAction(QObject *parent, const char *name); + PlayAction(TQObject *parent, const char *name); private slots: void playing(); void notplaying(); @@ -34,7 +34,7 @@ class PlaylistAction : public KToggleAction { Q_OBJECT public: - PlaylistAction(QObject *parent, const char *name); + PlaylistAction(TQObject *parent, const char *name); private slots: void shown(); void hidden(); @@ -48,7 +48,7 @@ class PluginActionMenu : public KActionMenu { Q_OBJECT public: - PluginActionMenu(QObject *parent, const char *name); + PluginActionMenu(TQObject *parent, const char *name); /** * inserts the given @p action into the action-menu * @param action the action to insert @@ -63,7 +63,7 @@ public: * Wrapper method for old Noatun API * <b>DON'T USE</b> **/ - int menuAdd(const QString &text, const QObject *receiver, const char *member); + int menuAdd(const TQString &text, const TQObject *receiver, const char *member); /** * Wrapper method for old Noatun API * <b>DON'T USE</b> @@ -81,12 +81,12 @@ class VisActionMenu : public KActionMenu { Q_OBJECT public: - VisActionMenu(QObject *parent, const char *name); + VisActionMenu(TQObject *parent, const char *name); private slots: void fillPopup(); void toggleVisPlugin(int); private: - QMap<int, QString>mSpecMap; + TQMap<int, TQString>mSpecMap; }; @@ -98,7 +98,7 @@ class LoopActionMenu : public KActionMenu { Q_OBJECT public: - LoopActionMenu(QObject *parent, const char *name); + LoopActionMenu(TQObject *parent, const char *name); private slots: void updateLooping(int); void loopNoneSelected(); @@ -116,48 +116,48 @@ private: /** * @return pointer to a KAction which opens the effects dialog on activation */ -KDE_EXPORT KAction *effects(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *effects(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which opens the equalizer dialog on activation */ -KDE_EXPORT KAction *equalizer(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *equalizer(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which goes back one track on activation */ -KDE_EXPORT KAction *back(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *back(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which stops playback on activation */ -KDE_EXPORT KAction *stop(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *stop(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which starts/pauses playback on activation */ -KDE_EXPORT KAction *playpause(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *playpause(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which advances one track on activation */ -KDE_EXPORT KAction *forward(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *forward(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KToggleAction which shows/hides the playlist */ -KDE_EXPORT KToggleAction *playlist(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KToggleAction *playlist(TQObject *parent = 0, const char *name = 0); /** * loop action **/ -KDE_EXPORT LoopActionMenu *loop(QObject *parent, const char *name); +KDE_EXPORT LoopActionMenu *loop(TQObject *parent, const char *name); /** * play action */ -KDE_EXPORT KAction *play(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *play(TQObject *parent = 0, const char *name = 0); /** * pause action */ -KDE_EXPORT KAction *pause(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *pause(TQObject *parent = 0, const char *name = 0); /** * @return pointer to the global PluginActionMenu object (there is only one instance) @@ -167,7 +167,7 @@ KDE_EXPORT PluginActionMenu *actions(); /** * @return pointer to a VisActionMenu object */ -KDE_EXPORT VisActionMenu *visualizations(QObject *parent = 0, const char *name = 0); +KDE_EXPORT VisActionMenu *visualizations(TQObject *parent = 0, const char *name = 0); /** * The global popupmenu of noatun, there's not two or three but only one of these :) @@ -176,7 +176,7 @@ KDE_EXPORT VisActionMenu *visualizations(QObject *parent = 0, const char *name = class KDE_EXPORT ContextMenu { public: - static KPopupMenu *createContextMenu(QWidget *p); + static KPopupMenu *createContextMenu(TQWidget *p); /** * One menu to show them all, One menu to find them @@ -189,7 +189,7 @@ public: /** * Show the context menu at point **/ - static void showContextMenu(const QPoint &); + static void showContextMenu(const TQPoint &); /** * show the context menu at the mouse's current position diff --git a/noatun/library/noatun/stereobuttonaction.h b/noatun/library/noatun/stereobuttonaction.h index ce423b64..d6d6edb9 100644 --- a/noatun/library/noatun/stereobuttonaction.h +++ b/noatun/library/noatun/stereobuttonaction.h @@ -14,12 +14,12 @@ class StereoButtonAction : public KAction { Q_OBJECT public: - StereoButtonAction(const QString& text, int accel = 0, QObject* parent = 0, const char* name = 0 ); - StereoButtonAction(const QString& text, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); - StereoButtonAction(const QString& text, const QIconSet& pix, int accel = 0, QObject* parent = 0, const char* name = 0 ); - StereoButtonAction(const QString& text, const QString& pix, int accel = 0, QObject* parent = 0, const char* name = 0 ); - StereoButtonAction(const QString& text, const QIconSet& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); - StereoButtonAction(const QString& text, const QString& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); + StereoButtonAction(const TQString& text, int accel = 0, TQObject* parent = 0, const char* name = 0 ); + StereoButtonAction(const TQString& text, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel = 0, TQObject* parent = 0, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQString& pix, int accel = 0, TQObject* parent = 0, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQString& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); public slots: void disable(void); void enable(void); diff --git a/noatun/library/noatun/vequalizer.h b/noatun/library/noatun/vequalizer.h index 73c421e1..d5ee7ecf 100644 --- a/noatun/library/noatun/vequalizer.h +++ b/noatun/library/noatun/vequalizer.h @@ -39,8 +39,8 @@ #ifndef NOATUN_VEQUALIZER_H #define NOATUN_VEQUALIZER_H -#include <qptrlist.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqobject.h> #include <kurl.h> #include <kdemacros.h> class VBand; @@ -111,12 +111,12 @@ public: **/ int center() const; - QString formatStart(bool withHz=true) const; - QString formatEnd(bool withHz=true) const; + TQString formatStart(bool withHz=true) const; + TQString formatEnd(bool withHz=true) const; /** * return the format for center() **/ - QString format(bool withHz=true) const; + TQString format(bool withHz=true) const; }; @@ -134,7 +134,7 @@ public: * @short interpolated representation of Eq data * @author Charles Samuels **/ -class KDE_EXPORT VInterpolation : public QObject, public VBandsInterface +class KDE_EXPORT VInterpolation : public TQObject, public VBandsInterface { Q_OBJECT struct Private; @@ -173,7 +173,7 @@ class VPreset; * @short Noatun EQ * @author Charles Samuels **/ -class KDE_EXPORT VEqualizer : public QObject, public VBandsInterface +class KDE_EXPORT VEqualizer : public TQObject, public VBandsInterface { Q_OBJECT friend class VBand; @@ -197,7 +197,7 @@ public: * of each band, for example: { 40, 60, 100 } if * you hear up to 40hz **/ - static QValueList<int> frequencies(int num); + static TQValueList<int> frequencies(int num); /** * @return number of bands I have, which may be different @@ -243,7 +243,7 @@ public: // serialization * pattern. Nevertheless, the file can be identified * by magic, so it's not required **/ - bool save(const KURL &file, const QString &friendly) const; + bool save(const KURL &file, const TQString &friendly) const; /** * restore the EQ settings from this file @@ -256,14 +256,14 @@ public: // serialization * * @see fromString **/ - QString toString(const QString &name="stored") const; + TQString toString(const TQString &name="stored") const; /** * undo a toString, restoring the EQ * to the settings in the given string, * emitting the changed signals **/ - bool fromString(const QString &str); + bool fromString(const TQString &str); public: // presets /** @@ -274,31 +274,31 @@ public: // presets * If smart is true, append a number to the end * of the name, if one already exists by the given **/ - VPreset createPreset(const QString &name, bool smart=true); + VPreset createPreset(const TQString &name, bool smart=true); /** * return all the presets * remember to setAutoDelete on this **/ - QValueList<VPreset> presets() const; + TQValueList<VPreset> presets() const; /** * @returns the preset with the given name * or an invalid Preset if none exists **/ - VPreset presetByName(const QString &name); + VPreset presetByName(const TQString &name); /** * @returns the preset in the given file * or an invalid Preset if none exists **/ - VPreset presetByFile(const QString &file); + VPreset presetByFile(const TQString &file); /** * @returns whether a preset with the * given name exists **/ - bool presetExists(const QString &name) const; + bool presetExists(const TQString &name) const; signals: /** @@ -374,7 +374,7 @@ public slots: private: virtual int level(int index) const; virtual void setLevel(int index, int level); - void setLevels(const QValueList<int> &levels); + void setLevels(const TQValueList<int> &levels); private: /** @@ -405,7 +405,7 @@ class VPreset Private *d; void *_bc; - VPreset(const QString &file); + VPreset(const TQString &file); public: VPreset(); VPreset(const VPreset ©); @@ -416,7 +416,7 @@ public: /** * @returns the name of the preset, which is user visible **/ - QString name() const; + TQString name() const; /** * set the user-presentable name of the preset * @@ -425,12 +425,12 @@ public: * @returns success. If another preset is named * this, it'l fail. **/ - bool setName(const QString &name); + bool setName(const TQString &name); /** * @returns the file that this preset is in **/ - QString file() const; + TQString file() const; bool isValid() const; bool isNull() const { return !isValid(); } diff --git a/noatun/library/noatun/video.h b/noatun/library/noatun/video.h index 3655c489..e6fde310 100644 --- a/noatun/library/noatun/video.h +++ b/noatun/library/noatun/video.h @@ -15,12 +15,12 @@ Q_OBJECT struct Private; VideoFrame::Private *d; - static QPtrList<VideoFrame> frames; + static TQPtrList<VideoFrame> frames; static VideoFrame *whose; public: - VideoFrame(KXMLGUIClient *clientParent, QWidget *parent=0, const char *name=0, WFlags f=0); - VideoFrame(QWidget *parent = 0, const char *name=0, WFlags f=0); + VideoFrame(KXMLGUIClient *clientParent, TQWidget *parent=0, const char *name=0, WFlags f=0); + VideoFrame(TQWidget *parent = 0, const char *name=0, WFlags f=0); ~VideoFrame(); /** @@ -28,8 +28,8 @@ public: **/ static VideoFrame *playing(); - QPopupMenu *popupMenu(QWidget *parent); - QPopupMenu *popupMenu() { return popupMenu(this); } + TQPopupMenu *popupMenu(TQWidget *parent); + TQPopupMenu *popupMenu() { return popupMenu(this); } public slots: /** diff --git a/noatun/library/noatunlistview.h b/noatun/library/noatunlistview.h index 1571f64e..851751ef 100644 --- a/noatun/library/noatunlistview.h +++ b/noatun/library/noatunlistview.h @@ -1,5 +1,5 @@ // yeah yeah yeah.. fix qt and this can go away #define private protected -#include <qlistview.h> +#include <tqlistview.h> #undef private diff --git a/noatun/library/noatunstdaction.cpp b/noatun/library/noatunstdaction.cpp index f2837623..99b69cb3 100644 --- a/noatun/library/noatunstdaction.cpp +++ b/noatun/library/noatunstdaction.cpp @@ -9,8 +9,8 @@ #include <klocale.h> #include <kpopupmenu.h> #include <kstdaction.h> -#include <qcursor.h> -#include <qmap.h> +#include <tqcursor.h> +#include <tqmap.h> #include <kdebug.h> #include <kstdguiitem.h> @@ -21,12 +21,12 @@ namespace NoatunStdAction { ///////////////////////////////////////////////////// -PlayAction::PlayAction(QObject *parent, const char *name) - : KAction(i18n("Play"), 0, napp->player(), SLOT(playpause()), parent, name) +PlayAction::PlayAction(TQObject *parent, const char *name) + : KAction(i18n("Play"), 0, napp->player(), TQT_SLOT(playpause()), parent, name) { - connect(napp->player(), SIGNAL(playing()), SLOT(playing())); - connect(napp->player(), SIGNAL(paused()), SLOT(notplaying())); - connect(napp->player(), SIGNAL(stopped()), SLOT(notplaying())); + connect(napp->player(), TQT_SIGNAL(playing()), TQT_SLOT(playing())); + connect(napp->player(), TQT_SIGNAL(paused()), TQT_SLOT(notplaying())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(notplaying())); if (napp->player()->isPlaying()) playing(); else if (napp->player()->isPaused() || napp->player()->isStopped()) @@ -35,23 +35,23 @@ PlayAction::PlayAction(QObject *parent, const char *name) void PlayAction::playing() { - setIconSet(QIconSet(SmallIcon("player_pause"))); + setIconSet(TQIconSet(SmallIcon("player_pause"))); setText(i18n("Pause")); } void PlayAction::notplaying() { - setIconSet(QIconSet(SmallIcon("player_play"))); + setIconSet(TQIconSet(SmallIcon("player_play"))); setText(i18n("Play")); } ///////////////////////////////////////////////////// -PlaylistAction::PlaylistAction(QObject *parent, const char *name) - : KToggleAction(i18n("Show Playlist"), "playlist", 0, napp->player(), SLOT(toggleListView()), parent, name) +PlaylistAction::PlaylistAction(TQObject *parent, const char *name) + : KToggleAction(i18n("Show Playlist"), "playlist", 0, napp->player(), TQT_SLOT(toggleListView()), parent, name) { setCheckedState(i18n("Hide Playlist")); - connect(napp->player(), SIGNAL(playlistShown()), SLOT(shown())); - connect(napp->player(), SIGNAL(playlistHidden()), SLOT(hidden())); + connect(napp->player(), TQT_SIGNAL(playlistShown()), TQT_SLOT(shown())); + connect(napp->player(), TQT_SIGNAL(playlistHidden()), TQT_SLOT(hidden())); setChecked(napp->playlist()->listVisible()); } @@ -67,7 +67,7 @@ void PlaylistAction::hidden() //////////////////////////////////////////////////// -PluginActionMenu::PluginActionMenu(QObject *parent, const char *name) +PluginActionMenu::PluginActionMenu(TQObject *parent, const char *name) : KActionMenu(i18n("&Actions"), parent, name) { // kdDebug(66666) << k_funcinfo << "called" << endl; @@ -92,7 +92,7 @@ void PluginActionMenu::remove(KAction *action) setEnabled(false); } -int PluginActionMenu::menuAdd(const QString &text, const QObject *receiver, const char *member) +int PluginActionMenu::menuAdd(const TQString &text, const TQObject *receiver, const char *member) { // kdDebug(66666) << k_funcinfo << "called, mCount is currently at " << mCount << endl; setEnabled(true); @@ -111,11 +111,11 @@ void PluginActionMenu::menuRemove(int id) //////////////////////////////////////////////////// -VisActionMenu::VisActionMenu(QObject *parent, const char *name) +VisActionMenu::VisActionMenu(TQObject *parent, const char *name) : KActionMenu(i18n("&Visualizations"), parent, name) { - connect(popupMenu(), SIGNAL(aboutToShow()), this, SLOT(fillPopup())); - connect(popupMenu(), SIGNAL(activated(int)), this, SLOT(toggleVisPlugin(int))); + connect(popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(fillPopup())); + connect(popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(toggleVisPlugin(int))); } void VisActionMenu::fillPopup() @@ -124,10 +124,10 @@ void VisActionMenu::fillPopup() popupMenu()->clear(); mSpecMap.clear(); - QValueList<NoatunLibraryInfo> available = napp->libraryLoader()->available(); - QValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); + TQValueList<NoatunLibraryInfo> available = napp->libraryLoader()->available(); + TQValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); - for(QValueList<NoatunLibraryInfo>::Iterator i = available.begin(); i != available.end(); ++i) + for(TQValueList<NoatunLibraryInfo>::Iterator i = available.begin(); i != available.end(); ++i) { if ((*i).type == "visualization") { @@ -143,7 +143,7 @@ void VisActionMenu::toggleVisPlugin(int id) if(!mSpecMap.contains(id)) return; - QString specfile = mSpecMap[id]; + TQString specfile = mSpecMap[id]; if(popupMenu()->isItemChecked(id)) { @@ -159,30 +159,30 @@ void VisActionMenu::toggleVisPlugin(int id) //////////////////////////////////////////////////// -LoopActionMenu::LoopActionMenu(QObject *parent, const char *name) +LoopActionMenu::LoopActionMenu(TQObject *parent, const char *name) : KActionMenu(i18n("&Loop"), parent, name) { - mLoopNone = new KRadioAction(i18n("&None"), QString::fromLocal8Bit("noatunloopnone"), - 0, this, SLOT(loopNoneSelected()), this, "loop_none"); + mLoopNone = new KRadioAction(i18n("&None"), TQString::fromLocal8Bit("noatunloopnone"), + 0, this, TQT_SLOT(loopNoneSelected()), this, "loop_none"); mLoopNone->setExclusiveGroup("loopType"); insert(mLoopNone); - mLoopSong = new KRadioAction(i18n("&Song"), QString::fromLocal8Bit("noatunloopsong"), - 0, this, SLOT(loopSongSelected()), this, "loop_song"); + mLoopSong = new KRadioAction(i18n("&Song"), TQString::fromLocal8Bit("noatunloopsong"), + 0, this, TQT_SLOT(loopSongSelected()), this, "loop_song"); mLoopSong->setExclusiveGroup("loopType"); insert(mLoopSong); - mLoopPlaylist = new KRadioAction(i18n("&Playlist"), QString::fromLocal8Bit("noatunloopplaylist"), - 0, this, SLOT(loopPlaylistSelected()), this, "loop_playlist"); + mLoopPlaylist = new KRadioAction(i18n("&Playlist"), TQString::fromLocal8Bit("noatunloopplaylist"), + 0, this, TQT_SLOT(loopPlaylistSelected()), this, "loop_playlist"); mLoopPlaylist->setExclusiveGroup("loopType"); insert(mLoopPlaylist); - mLoopRandom = new KRadioAction(i18n("&Random"), QString::fromLocal8Bit("noatunlooprandom"), - 0, this, SLOT(loopRandomSelected()), this, "loop_random"); + mLoopRandom = new KRadioAction(i18n("&Random"), TQString::fromLocal8Bit("noatunlooprandom"), + 0, this, TQT_SLOT(loopRandomSelected()), this, "loop_random"); mLoopRandom->setExclusiveGroup("loopType"); insert(mLoopRandom); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(updateLooping(int))); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(updateLooping(int))); updateLooping(static_cast<int>(napp->player()->loopStyle())); } @@ -232,32 +232,32 @@ void LoopActionMenu::loopRandomSelected() //////////////////////////////////////////////////// -KAction *playpause(QObject *parent, const char *name) +KAction *playpause(TQObject *parent, const char *name) { return new PlayAction(parent, name); } -KAction *effects(QObject *parent, const char *name) +KAction *effects(TQObject *parent, const char *name) { - return new KAction(i18n("&Effects..."), "effect", 0, napp, SLOT(effectView()), parent, name); + return new KAction(i18n("&Effects..."), "effect", 0, napp, TQT_SLOT(effectView()), parent, name); } -KAction *equalizer(QObject *parent, const char *name) +KAction *equalizer(TQObject *parent, const char *name) { - return new KAction(i18n("E&qualizer..."), "equalizer", 0, napp, SLOT(equalizerView()), parent, name); + return new KAction(i18n("E&qualizer..."), "equalizer", 0, napp, TQT_SLOT(equalizerView()), parent, name); } -KAction *back(QObject *parent, const char *name) +KAction *back(TQObject *parent, const char *name) { - return new KAction(i18n("&Back"), "player_start", 0, napp->player(), SLOT(back()), parent, name); + return new KAction(i18n("&Back"), "player_start", 0, napp->player(), TQT_SLOT(back()), parent, name); } -KAction *stop(QObject *parent, const char *name) +KAction *stop(TQObject *parent, const char *name) { - StereoButtonAction *action = new StereoButtonAction(i18n("Stop"), "player_stop", 0, napp->player(), SLOT(stop()), parent, name); - QObject::connect(napp->player(), SIGNAL(playing()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(paused()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(stopped()), action, SLOT(disable())); + StereoButtonAction *action = new StereoButtonAction(i18n("Stop"), "player_stop", 0, napp->player(), TQT_SLOT(stop()), parent, name); + TQObject::connect(napp->player(), TQT_SIGNAL(playing()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(paused()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(stopped()), action, TQT_SLOT(disable())); if(napp->player()->isStopped()) action->disable(); else @@ -265,17 +265,17 @@ KAction *stop(QObject *parent, const char *name) return action; } -KAction *forward(QObject *parent, const char *name) +KAction *forward(TQObject *parent, const char *name) { - return new KAction(i18n("&Forward"), "player_end", 0, napp->player(), SLOT(forward()), parent, name); + return new KAction(i18n("&Forward"), "player_end", 0, napp->player(), TQT_SLOT(forward()), parent, name); } -KAction *play(QObject *parent, const char *name) +KAction *play(TQObject *parent, const char *name) { - StereoButtonAction *action = new StereoButtonAction(i18n("&Play"), "player_play", 0, napp->player(), SLOT(playpause()), parent, name); - QObject::connect(napp->player(), SIGNAL(playing()), action, SLOT(disable())); - QObject::connect(napp->player(), SIGNAL(paused()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(stopped()), action, SLOT(enable())); + StereoButtonAction *action = new StereoButtonAction(i18n("&Play"), "player_play", 0, napp->player(), TQT_SLOT(playpause()), parent, name); + TQObject::connect(napp->player(), TQT_SIGNAL(playing()), action, TQT_SLOT(disable())); + TQObject::connect(napp->player(), TQT_SIGNAL(paused()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(stopped()), action, TQT_SLOT(enable())); if(napp->player()->isPlaying()) action->disable(); else @@ -283,12 +283,12 @@ KAction *play(QObject *parent, const char *name) return action; } -KAction *pause(QObject *parent, const char *name) +KAction *pause(TQObject *parent, const char *name) { - StereoButtonAction *action = new StereoButtonAction(i18n("&Pause"), "player_pause", 0, napp->player(), SLOT(playpause()), parent, name); - QObject::connect(napp->player(), SIGNAL(playing()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(paused()), action, SLOT(disable())); - QObject::connect(napp->player(), SIGNAL(stopped()), action, SLOT(disable())); + StereoButtonAction *action = new StereoButtonAction(i18n("&Pause"), "player_pause", 0, napp->player(), TQT_SLOT(playpause()), parent, name); + TQObject::connect(napp->player(), TQT_SIGNAL(playing()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(paused()), action, TQT_SLOT(disable())); + TQObject::connect(napp->player(), TQT_SIGNAL(stopped()), action, TQT_SLOT(disable())); if(napp->player()->isPlaying()) action->enable(); else @@ -296,7 +296,7 @@ KAction *pause(QObject *parent, const char *name) return action; } -LoopActionMenu *loop(QObject *parent, const char *name) +LoopActionMenu *loop(TQObject *parent, const char *name) { return new LoopActionMenu(parent, name); } @@ -307,12 +307,12 @@ PluginActionMenu *actions() return napp->pluginActionMenu(); } -VisActionMenu *visualizations(QObject *parent, const char *name) +VisActionMenu *visualizations(TQObject *parent, const char *name) { return new VisActionMenu(parent, name); } -KToggleAction *playlist(QObject *parent, const char *name) +KToggleAction *playlist(TQObject *parent, const char *name) { return new PlaylistAction(parent, name); } @@ -326,18 +326,18 @@ KPopupMenu *ContextMenu::contextMenu() return mContextMenu; } -KPopupMenu *ContextMenu::createContextMenu(QWidget *p) +KPopupMenu *ContextMenu::createContextMenu(TQWidget *p) { KPopupMenu *contextMenu = new KPopupMenu(p, "NoatunContextMenu"); KHelpMenu *helpmenu = new KHelpMenu(contextMenu, kapp->aboutData(), false); KActionCollection* actions = new KActionCollection(helpmenu); - KStdAction::open(napp, SLOT(fileOpen()), actions)->plug(contextMenu); - KStdAction::quit(napp, SLOT(quit()), actions)->plug(contextMenu); + KStdAction::open(napp, TQT_SLOT(fileOpen()), actions)->plug(contextMenu); + KStdAction::quit(napp, TQT_SLOT(quit()), actions)->plug(contextMenu); contextMenu->insertItem(SmallIcon("help"), KStdGuiItem::help().text(), helpmenu->menu()); contextMenu->insertSeparator(); - KStdAction::preferences(napp, SLOT(preferences()), actions)->plug(contextMenu); + KStdAction::preferences(napp, TQT_SLOT(preferences()), actions)->plug(contextMenu); NoatunStdAction::playlist(contextMenu)->plug(contextMenu); NoatunStdAction::effects(contextMenu)->plug(contextMenu); NoatunStdAction::equalizer(napp)->plug(contextMenu); @@ -347,14 +347,14 @@ KPopupMenu *ContextMenu::createContextMenu(QWidget *p) return contextMenu; } -void ContextMenu::showContextMenu(const QPoint &p) +void ContextMenu::showContextMenu(const TQPoint &p) { contextMenu()->exec(p); } void ContextMenu::showContextMenu() { - showContextMenu(QCursor::pos()); + showContextMenu(TQCursor::pos()); } } // END namespace NoatunStdAction diff --git a/noatun/library/noatuntags/tags.cpp b/noatun/library/noatuntags/tags.cpp index 38fd4abf..268f7bd9 100644 --- a/noatun/library/noatuntags/tags.cpp +++ b/noatun/library/noatuntags/tags.cpp @@ -1,22 +1,22 @@ #include "tags.h" #include "tagsgetter.h" #include <klocale.h> -#include <qslider.h> -#include <qspinbox.h> +#include <tqslider.h> +#include <tqspinbox.h> #include <kconfig.h> -#include <qlayout.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qtimer.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqtimer.h> #include <noatun/player.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> TagsGetter *Tags::getter=0; TagsGetter::TagsGetter() { new Control(this); - connect(napp->player(), SIGNAL(newSong()), SLOT(newSong())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSong())); } int TagsGetter::interval() const @@ -50,7 +50,7 @@ void TagsGetter::getSongs() startTimer(interval()); } -void TagsGetter::timerEvent(QTimerEvent *) +void TagsGetter::timerEvent(TQTimerEvent *) { if (!items.size()) { @@ -115,7 +115,7 @@ void TagsGetter::associate(Tags *t) tags.append(t); sortPriority(); // getSongs(); - QTimer::singleShot(interval(), this, SLOT(getSongs())); + TQTimer::singleShot(interval(), this, TQT_SLOT(getSongs())); } void TagsGetter::sortPriority() @@ -129,7 +129,7 @@ void TagsGetter::sortPriority() lowest=i->mPriority; } - QPtrList<Tags> sorted; + TQPtrList<Tags> sorted; while (tags.count()) { // find the one equal to myself @@ -183,41 +183,41 @@ Control::Control(TagsGetter *parent) // todo (void)I18N_NOOP("Rescan All Tags"); - QVBoxLayout *l=new QVBoxLayout(this); - QCheckBox *onPlay; + TQVBoxLayout *l=new TQVBoxLayout(this); + TQCheckBox *onPlay; { - onPlay=new QCheckBox(i18n("Load tags &automatically"), this); + onPlay=new TQCheckBox(i18n("Load tags &automatically"), this); l->addWidget(onPlay); onPlay->show(); } { - QHBox *intervalLine=new QHBox(this); + TQHBox *intervalLine=new TQHBox(this); l->addWidget(intervalLine); l->addStretch(); - new QLabel(i18n( + new TQLabel(i18n( "The time between each time noatun scans for a new file" ", and updates tags (e.g., ID3)", "Interval:"), intervalLine); - QSlider *slider=new QSlider( + TQSlider *slider=new TQSlider( 0, 2000, 100, 0, Horizontal, intervalLine ); - QSpinBox *spin=new QSpinBox( + TQSpinBox *spin=new TQSpinBox( 0, 2000, 10, intervalLine ); spin->setSuffix(i18n("Milliseconds", " ms")); - connect(slider, SIGNAL(valueChanged(int)), spin, SLOT(setValue(int))); - connect(spin, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int))); + connect(slider, TQT_SIGNAL(valueChanged(int)), spin, TQT_SLOT(setValue(int))); + connect(spin, TQT_SIGNAL(valueChanged(int)), slider, TQT_SLOT(setValue(int))); slider->setValue(parent->interval()); - connect(slider, SIGNAL(valueChanged(int)), parent, SLOT(setInterval(int))); + connect(slider, TQT_SIGNAL(valueChanged(int)), parent, TQT_SLOT(setInterval(int))); - connect(onPlay, SIGNAL(toggled(bool)), intervalLine, SLOT(setEnabled(bool))); + connect(onPlay, TQT_SIGNAL(toggled(bool)), intervalLine, TQT_SLOT(setEnabled(bool))); } - connect(onPlay, SIGNAL(toggled(bool)), parent, SLOT(setLoadAuto(bool))); + connect(onPlay, TQT_SIGNAL(toggled(bool)), parent, TQT_SLOT(setLoadAuto(bool))); onPlay->setChecked(parent->loadAuto()); } diff --git a/noatun/library/noatuntags/tagsgetter.h b/noatun/library/noatuntags/tagsgetter.h index 269b7b90..8b6eddb9 100644 --- a/noatun/library/noatuntags/tagsgetter.h +++ b/noatun/library/noatuntags/tagsgetter.h @@ -1,13 +1,13 @@ #ifndef TAGSGET_H #define TAGSGET_H -#include <qobject.h> +#include <tqobject.h> #include <cmodule.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> #include "tags.h" -class TagsGetter : public QObject, public PlaylistNotifier +class TagsGetter : public TQObject, public PlaylistNotifier { Q_OBJECT public: @@ -24,7 +24,7 @@ public: //playlistnotifier virtual void removed(PlaylistItem &); protected: - void timerEvent(QTimerEvent *); + void timerEvent(TQTimerEvent *); private slots: // select the songs that need updating @@ -40,8 +40,8 @@ private: void sortPriority(); private: - QPtrList<Tags> tags; - QValueList<PlaylistItem> items; + TQPtrList<Tags> tags; + TQValueList<PlaylistItem> items; }; class Control : public CModule diff --git a/noatun/library/player.cpp b/noatun/library/player.cpp index 7760d9a8..0b90952c 100644 --- a/noatun/library/player.cpp +++ b/noatun/library/player.cpp @@ -8,28 +8,28 @@ #include <klibloader.h> #include <knotifyclient.h> #include <klocale.h> -#include <qfile.h> +#include <tqfile.h> enum ArtsPOS { posIdle=0, posPlaying, posPaused }; -Player::Player(QObject *parent) : QObject(parent, "Player"), +Player::Player(TQObject *parent) : TQObject(parent, "Player"), position(-1), mLoopStyle(None), firstTimeout(true) { mEngine=new Engine; - connect(&filePos, SIGNAL(timeout()), SLOT(posTimeout())); - connect(mEngine, SIGNAL(aboutToPlay()), this, SLOT(aboutToPlay())); + connect(&filePos, TQT_SIGNAL(timeout()), TQT_SLOT(posTimeout())); + connect(mEngine, TQT_SIGNAL(aboutToPlay()), this, TQT_SLOT(aboutToPlay())); connect(mEngine, - SIGNAL(receivedStreamMeta(const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)), - this, SLOT( - slotUpdateStreamMeta(const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)) + TQT_SIGNAL(receivedStreamMeta(const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)), + this, TQT_SLOT( + slotUpdateStreamMeta(const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)) ); - connect(mEngine, SIGNAL(playingFailed()), this, SLOT(forward())); + connect(mEngine, TQT_SIGNAL(playingFailed()), this, TQT_SLOT(forward())); handleButtons(); } @@ -231,13 +231,13 @@ void Player::posTimeout() emit timeout(); } -QString Player::lengthString(int _position) +TQString Player::lengthString(int _position) { if (!current()) - return QString("--:--/--:--"); + return TQString("--:--/--:--"); - QString posString; - QString lenString; + TQString posString; + TQString lenString; int secs, seconds, minutes; if (_position < 0) @@ -352,9 +352,9 @@ void Player::aboutToPlay() } void Player::slotUpdateStreamMeta( - const QString &streamName, const QString &streamGenre, - const QString &streamUrl, const QString &streamBitrate, - const QString &trackTitle, const QString &trackUrl) + const TQString &streamName, const TQString &streamGenre, + const TQString &streamUrl, const TQString &streamBitrate, + const TQString &trackTitle, const TQString &trackUrl) { PlaylistItem currentItem = napp->playlist()->current(); if(currentItem) diff --git a/noatun/library/playlist.cpp b/noatun/library/playlist.cpp index 4e729924..7cc28337 100644 --- a/noatun/library/playlist.cpp +++ b/noatun/library/playlist.cpp @@ -7,9 +7,9 @@ #include <kcmdlineargs.h> #include <kfile.h> #include <kmimetype.h> -#include <qregexp.h> +#include <tqregexp.h> #include <assert.h> -#include <qmetaobject.h> +#include <tqmetaobject.h> #include <kmedia2.h> #include <vector> @@ -22,7 +22,7 @@ PlaylistItemData::~PlaylistItemData() { } -QCString PlaylistItemData::mimetype() const +TQCString PlaylistItemData::mimetype() const { if (isProperty("mimetype")) return property("mimetype").latin1(); @@ -31,7 +31,7 @@ QCString PlaylistItemData::mimetype() const return mimetype->name().latin1(); } -QCString PlaylistItemData::playObject() const +TQCString PlaylistItemData::playObject() const { if (isProperty("playObject")) return property("playObject").latin1(); @@ -50,19 +50,19 @@ QCString PlaylistItemData::playObject() const delete offers; - return QCString(objectType.c_str()); + return TQCString(objectType.c_str()); } -QString PlaylistItemData::title() const +TQString PlaylistItemData::title() const { if (isProperty("realtitle")) return property("realtitle"); // "$(property)" - QString format=napp->titleFormat(); + TQString format=napp->titleFormat(); - QRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)"); + TQRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)"); int start=0; while (start != -1) @@ -76,7 +76,7 @@ QString PlaylistItemData::title() const // yes, so half the amount of backslashes // count how many there are first - QRegExp counter("([\\\\]+)"); + TQRegExp counter("([\\\\]+)"); counter.search(format, start-1); uint len=counter.cap(1).length()-1; @@ -91,7 +91,7 @@ QString PlaylistItemData::title() const if (format[start]=='\\') { // count how many there are first - QRegExp counter("([\\\\]+)"); + TQRegExp counter("([\\\\]+)"); counter.search(format, start); uint len=counter.cap(1).length(); @@ -101,8 +101,8 @@ QString PlaylistItemData::title() const } // "sth"foo"sth" - QString cont(find.cap(1)); - QString prefix,suffix,propname; + TQString cont(find.cap(1)); + TQString prefix,suffix,propname; unsigned int i=0; if (cont[i] == '"') { @@ -141,7 +141,7 @@ QString PlaylistItemData::title() const i++; - QString propval = property(propname); + TQString propval = property(propname); if (propname == "title" && !propval.length()) { propval = url().filename(); @@ -175,7 +175,7 @@ int PlaylistItemData::length() const void PlaylistItemData::setLength(int ms) { - setProperty("length", QString::number(ms)); + setProperty("length", TQString::number(ms)); } PlaylistItem::PlaylistItem(const PlaylistItem &source) @@ -246,14 +246,14 @@ void PlaylistItem::addRef() const mData->addRef(); } -QString PlaylistItemData::lengthString() const +TQString PlaylistItemData::lengthString() const { if ( length() == -1 ) // no file loaded - return QString("--:--"); + return TQString("--:--"); int secs = length()/1000; // convert milliseconds -> seconds int seconds = secs % 60; - return QString().sprintf("%.2d:%.2d", ((secs-seconds)/60), seconds); + return TQString().sprintf("%.2d:%.2d", ((secs-seconds)/60), seconds); } @@ -278,11 +278,11 @@ bool PlaylistItemData::operator != (const PlaylistItemData &d) const -Playlist::Playlist(QObject *parent, const char *name) : QObject(parent, name) +Playlist::Playlist(TQObject *parent, const char *name) : TQObject(parent, name) { - napp->player()->connect(this, SIGNAL(playCurrent()), SLOT(playCurrent())); - napp->player()->connect(this, SIGNAL(listHidden()), SIGNAL(playlistHidden())); - napp->player()->connect(this, SIGNAL(listShown()), SIGNAL(playlistShown())); + napp->player()->connect(this, TQT_SIGNAL(playCurrent()), TQT_SLOT(playCurrent())); + napp->player()->connect(this, TQT_SIGNAL(listHidden()), TQT_SIGNAL(playlistHidden())); + napp->player()->connect(this, TQT_SIGNAL(listShown()), TQT_SIGNAL(playlistShown())); } @@ -316,15 +316,15 @@ int Playlist::handleArguments() return i; } -QValueList<PlaylistItem> Playlist::select( - const QStringList &keys, const QStringList &values, +TQValueList<PlaylistItem> Playlist::select( + const TQStringList &keys, const TQStringList &values, int limit, bool exact, bool caseSensitive ) { - QValueList<PlaylistItem> list; - QString k; - QString v; - QStringList::ConstIterator key, val; + TQValueList<PlaylistItem> list; + TQString k; + TQString v; + TQStringList::ConstIterator key, val; for (PlaylistItem i(getFirst()); i && limit; i=getAfter(i)) { for (key = keys.begin(); key != keys.end() && limit ; ++key) @@ -371,13 +371,13 @@ QValueList<PlaylistItem> Playlist::select( return list; } -QValueList<PlaylistItem> Playlist::select( - const QString &key, const QString &value, +TQValueList<PlaylistItem> Playlist::select( + const TQString &key, const TQString &value, int limit, bool exact, bool caseSensitive ) { - QStringList keys(key); - QStringList values(value); + TQStringList keys(key); + TQStringList values(value); return select(keys, values, limit, exact, caseSensitive); } diff --git a/noatun/library/playlistsaver.cpp b/noatun/library/playlistsaver.cpp index 58f5d5d2..8b34deca 100644 --- a/noatun/library/playlistsaver.cpp +++ b/noatun/library/playlistsaver.cpp @@ -1,15 +1,15 @@ #include <noatun/playlistsaver.h> -#include <qdom.h> +#include <tqdom.h> #include <kio/netaccess.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <noatun/app.h> #include "ksaver.h" #include <ksimpleconfig.h> #include <kmimetype.h> #include <klocale.h> -#include <qregexp.h> -#include <qxml.h> +#include <tqregexp.h> +#include <tqxml.h> #include <kdebug.h> PlaylistSaver::PlaylistSaver() @@ -71,7 +71,7 @@ bool PlaylistSaver::metalist(const KURL &url) { kdDebug(66666) << k_funcinfo << "url=" << url.url() << endl; - QString end=url.filename().right(3).lower(); + TQString end=url.filename().right(3).lower(); /* if (end=="mp3" || end=="ogg") // we want to download streams only { @@ -100,12 +100,12 @@ bool PlaylistSaver::metalist(const KURL &url) url.protocol().lower()=="http") { KMimeType::Ptr mimetype = KMimeType::findByURL(url); - QString type=mimetype->name(); + TQString type=mimetype->name(); if (type!="application/octet-stream") return false; - QMap<QString,QString> map; + TQMap<TQString,TQString> map; map["playObject"]="Arts::StreamPlayObject"; map["title"] = i18n("Stream from %1").arg(url.host()); @@ -138,29 +138,29 @@ bool PlaylistSaver::metalist(const KURL &url) bool PlaylistSaver::saveXML(const KURL &file, int ) { - QString localFile; + TQString localFile; if (file.isLocalFile()) - localFile = QFile::encodeName(file.path()); + localFile = TQFile::encodeName(file.path()); else localFile = napp->tempSaveName(file.path()); // QDom is a pain :) - QDomDocument doc("playlist"); - doc.setContent(QString("<!DOCTYPE XMLPlaylist><playlist version=\"1.0\" client=\"noatun\"/>")); + TQDomDocument doc("playlist"); + doc.setContent(TQString("<!DOCTYPE XMLPlaylist><playlist version=\"1.0\" client=\"noatun\"/>")); - QDomElement docElem=doc.documentElement(); + TQDomElement docElem=doc.documentElement(); reset(); PlaylistItem i; - QStringList props; + TQStringList props; while ((i=writeItem())) { // write all properties props=i.properties(); - QDomElement elem=doc.createElement("item"); - for (QStringList::Iterator pi(props.begin()); pi!=props.end(); ++pi) + TQDomElement elem=doc.createElement("item"); + for (TQStringList::Iterator pi(props.begin()); pi!=props.end(); ++pi) { - QString val=i.property(*pi); + TQString val=i.property(*pi); elem.setAttribute(*pi, val); if ((*pi)=="url") @@ -179,7 +179,7 @@ bool PlaylistSaver::saveXML(const KURL &file, int ) Noatun::KSaver saver(localFile); if (!saver.open()) return false; - saver.textStream().setEncoding(QTextStream::UnicodeUTF8); + saver.textStream().setEncoding(TQTextStream::UnicodeUTF8); saver.textStream() << doc.toString(); saver.close(); @@ -198,8 +198,8 @@ public: } bool startElement( - const QString&, const QString &, - const QString &name, const QXmlAttributes &a + const TQString&, const TQString &, + const TQString &name, const TQXmlAttributes &a ) { if (fresh) @@ -218,7 +218,7 @@ public: if (name != "item") return true; - QMap<QString,QString> propMap; + TQMap<TQString,TQString> propMap; for (int i=0; i<a.count(); i++) { @@ -237,18 +237,18 @@ public: PlaylistSaver *saver; bool fresh; bool inEntry, inTitle; - QMap<QString,QString> propMap; - QString mAbsPath; + TQMap<TQString,TQString> propMap; + TQString mAbsPath; - MSASXStructure(PlaylistSaver *s, const QString &absPath) + MSASXStructure(PlaylistSaver *s, const TQString &absPath) : saver(s), fresh(true), inEntry(false), inTitle(false), mAbsPath(absPath) { //kdDebug(66666) << k_funcinfo << endl; } - bool startElement(const QString&, const QString &, - const QString &name, const QXmlAttributes &a) + bool startElement(const TQString&, const TQString &, + const TQString &name, const TQXmlAttributes &a) { if (fresh) { @@ -290,12 +290,12 @@ public: { if(a.qName(i).lower()=="href") { - QString filename=a.value(i); - if (filename.find(QRegExp("^[a-zA-Z0-9]+:/"))==0) + TQString filename=a.value(i); + if (filename.find(TQRegExp("^[a-zA-Z0-9]+:/"))==0) { KURL url(filename); KMimeType::Ptr mimetype = KMimeType::findByURL(url); - QString type=mimetype->name(); + TQString type=mimetype->name(); if (type != "application/octet-stream") { propMap["url"]=filename; @@ -333,7 +333,7 @@ public: } else if(name.lower()=="param") { - QString keyName="", keyValue=""; + TQString keyName="", keyValue=""; for (int i=0; i<a.count(); i++) { @@ -382,7 +382,7 @@ public: return true; } - bool endElement(const QString&,const QString&, const QString& name) + bool endElement(const TQString&,const TQString&, const TQString& name) { // kdDebug(66666) << k_funcinfo << "name='" << name << "'" << endl; if (name.lower()=="entry") @@ -390,7 +390,7 @@ public: if(inEntry) { /* kdDebug(66666) << "</ENTRY> =====================" << endl; - for (QMap<QString,QString>::ConstIterator it=propMap.begin(); it!=propMap.end(); ++it ) + for (TQMap<TQString,TQString>::ConstIterator it=propMap.begin(); it!=propMap.end(); ++it ) kdDebug(66666) << "key='" << it.key() << "', val='" << it.data() << "'" << endl; */ saver->readItem(propMap); @@ -419,7 +419,7 @@ public: return true; } - bool characters(const QString &ch) + bool characters(const TQString &ch) { if(inTitle) { @@ -439,18 +439,18 @@ bool PlaylistSaver::loadXML(const KURL &url, int opt) kdDebug(66666) << k_funcinfo << "file='" << url.url() << "', opt=" << opt << endl; - QString dest; + TQString dest; if(KIO::NetAccess::download(url, dest, 0L)) { - QFile file(dest); + TQFile file(dest); if (!file.open(IO_ReadOnly)) return false; reset(); // QXml is horribly documented - QXmlInputSource source(&file); - QXmlSimpleReader reader; + TQXmlInputSource source(&file); + TQXmlSimpleReader reader; if (opt == ASX || url.path().right(4).lower()==".wax" || @@ -478,7 +478,7 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) { kdDebug(66666) << k_funcinfo << "file='" << file.path() << endl; - QString localFile; + TQString localFile; if(!KIO::NetAccess::download(file, localFile, 0L)) return false; @@ -489,7 +489,7 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) list.setGroup("playlist"); // some stupid Windows lusers like to be case insensitive - QStringList groups=list.groupList().grep(QRegExp("^playlist$", false)); + TQStringList groups=list.groupList().grep(TQRegExp("^playlist$", false)); if (groups.count()) { KURL l; @@ -499,14 +499,14 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) } #endif - QFile saver(localFile); + TQFile saver(localFile); saver.open(IO_ReadOnly); - QTextStream t(&saver); + TQTextStream t(&saver); bool isExt = false; // flag telling if we load an EXTM3U file - QString filename; - QString extinf; - QMap<QString,QString> prop; + TQString filename; + TQString extinf; + TQMap<TQString,TQString> prop; reset(); while (!t.eof()) @@ -541,7 +541,7 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) if (filename.isEmpty()) continue; - if (filename.find(QRegExp("^[a-zA-Z0-9]+:/"))==0) + if (filename.find(TQRegExp("^[a-zA-Z0-9]+:/"))==0) { //kdDebug(66666) << k_funcinfo << "url filename = " << filename << endl; @@ -591,9 +591,9 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) int length = (extinf.left(timeTitleSep)).toInt(); if (length>0) - prop["length"]=QString::number(length*1000); + prop["length"]=TQString::number(length*1000); - QString displayTitle=extinf.mid(timeTitleSep+1); + TQString displayTitle=extinf.mid(timeTitleSep+1); if (!displayTitle.isEmpty()) { int artistTitleSep = displayTitle.find(" - ",0); @@ -628,14 +628,14 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) bool isExt=(opt==EXTM3U); // easier ;) - QString local(napp->tempSaveName(file.path())); - QFile saver(local); + TQString local(napp->tempSaveName(file.path())); + TQFile saver(local); saver.open(IO_ReadWrite | IO_Truncate); - QTextStream t(&saver); + TQTextStream t(&saver); reset(); PlaylistItem i; - QStringList props; + TQStringList props; // this is more code but otoh faster than checking for isExt inside the loop if(isExt) @@ -647,7 +647,7 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) int length = static_cast<int>(((i.property("length")).toInt())/1000); if(length==0) length=-1; // special value in an EXTM3U file, means "unknown" KURL u(i.property("url")); - QString title; + TQString title; // if a playlistitem is without a tag or ONLY title is set if((i.property("author").isEmpty() && i.property("title").isEmpty()) @@ -656,8 +656,8 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) else title = i.property("author") + " - " + i.property("title"); -// kdDebug(66666) << "#EXTINF:"<< QString::number(length) << "," << title << endl; - t << "#EXTINF:"<< QString::number(length) << "," << title << '\n'; +// kdDebug(66666) << "#EXTINF:"<< TQString::number(length) << "," << title << endl; + t << "#EXTINF:"<< TQString::number(length) << "," << title << '\n'; if (u.isLocalFile()) t << u.path() << '\n'; @@ -683,9 +683,9 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) return true; } -static QString findNoCase(const QMap<QString,QString> &map, const QString &key) +static TQString findNoCase(const TQMap<TQString,TQString> &map, const TQString &key) { - for (QMap<QString,QString>::ConstIterator i=map.begin(); i!=map.end(); ++i) + for (TQMap<TQString,TQString>::ConstIterator i=map.begin(); i!=map.end(); ++i) { if (i.key().lower() == key.lower()) return i.data(); @@ -697,14 +697,14 @@ bool PlaylistSaver::loadPLS(const KURL &file, int /*opt*/) { kdDebug(66666) << k_funcinfo << "file='" << file.path() << endl; - QString localFile; + TQString localFile; if(!KIO::NetAccess::download(file, localFile, 0L)) return false; - QFile checkFile(localFile); + TQFile checkFile(localFile); checkFile.open(IO_ReadOnly); - QTextStream t(&checkFile); - QString firstLine = t.readLine(); + TQTextStream t(&checkFile); + TQString firstLine = t.readLine(); if(firstLine.lower() != "[playlist]") { kdDebug(66666) << k_funcinfo << "PLS didn't start with '[playlist]', aborting" << endl; @@ -716,15 +716,15 @@ bool PlaylistSaver::loadPLS(const KURL &file, int /*opt*/) //list.setGroup("playlist"); // some stupid Windows lusers like to be case insensitive - QStringList groups = list.groupList().grep(QRegExp("^playlist$", false)); + TQStringList groups = list.groupList().grep(TQRegExp("^playlist$", false)); /* if (!groups.count()) // didn't find "[playlist]", it's not a .pls file return false; */ - QMap<QString,QString> group = list.entryMap(groups[0]); + TQMap<TQString,TQString> group = list.entryMap(groups[0]); - QString numOfEntries = findNoCase(group, "numberofentries"); + TQString numOfEntries = findNoCase(group, "numberofentries"); if(numOfEntries.isEmpty()) return false; @@ -733,14 +733,14 @@ bool PlaylistSaver::loadPLS(const KURL &file, int /*opt*/) unsigned int nEntries = numOfEntries.toInt(); for(unsigned int entry = 1; entry <= nEntries; ++entry ) { - QString str; + TQString str; str.sprintf("file%d", entry); - QString cast = findNoCase(group, str.utf8()); + TQString cast = findNoCase(group, str.utf8()); str.sprintf("title%d", entry); - QString title = findNoCase(group, str.utf8()); + TQString title = findNoCase(group, str.utf8()); // assume that everything in a pls is a streamable file - QMap<QString,QString> map; + TQMap<TQString,TQString> map; KURL url(cast); if (!url.hasPath()) @@ -764,7 +764,7 @@ bool PlaylistSaver::savePLS(const KURL &, int) return false; } -void PlaylistSaver::setGroup(const QString &) +void PlaylistSaver::setGroup(const TQString &) { } diff --git a/noatun/library/plugin.cpp b/noatun/library/plugin.cpp index e9090609..3c5b6f5d 100644 --- a/noatun/library/plugin.cpp +++ b/noatun/library/plugin.cpp @@ -1,5 +1,5 @@ -#include <qtimer.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqfile.h> #include <artsflow.h> #include <vector> #include <artsflow.h> @@ -46,7 +46,7 @@ TimerThingy::TimerThingy(Visualization *vis) { } -void TimerThingy::timerEvent(QTimerEvent *) +void TimerThingy::timerEvent(TQTimerEvent *) { mVis->timeout(); } @@ -88,15 +88,15 @@ Visualization::Visualization(int timeout, int pid) int parent=pid ? pid : getppid(); if (getenv("NOATUN_PID")) - parent = QString::fromLatin1(getenv("NOATUN_PID")).toInt(); + parent = TQString::fromLatin1(getenv("NOATUN_PID")).toInt(); DCOPClient c; c.attach(); - QCString appids[2]; - appids[0]=QString("noatun-%1").arg(parent).local8Bit(); + TQCString appids[2]; + appids[0]=TQString("noatun-%1").arg(parent).local8Bit(); appids[1]="noatun"; - QCString &appid=appids[0]; + TQCString &appid=appids[0]; if (!internalVis && c.isApplicationRegistered(appids[0])) { @@ -115,10 +115,10 @@ Visualization::Visualization(int timeout, int pid) } { - QByteArray replyData; - QCString replyType; + TQByteArray replyData; + TQCString replyType; - if (!c.call(appid, "Noatun", "visStack()", QByteArray(), replyType, replyData)) + if (!c.call(appid, "Noatun", "visStack()", TQByteArray(), replyType, replyData)) { kdDebug(66666) << "Error communicating to parent noatun" << endl; } @@ -127,8 +127,8 @@ Visualization::Visualization(int timeout, int pid) initDispatcher(); mServer=new Arts::SoundServerV2; *mServer = Arts::Reference("global:Arts_SoundServerV2"); - QDataStream reply(replyData, IO_ReadOnly); - QCString result; + TQDataStream reply(replyData, IO_ReadOnly); + TQCString result; reply >> result; mVisualizationStack=result; } @@ -213,8 +213,8 @@ FFTScope::FFTScope(int interval, int pid) : Visualization(interval, pid) float FFTScope::magic(int bands) { -/* QString path=locate("data", "noatun/magictable"); - QFile magic(path); +/* TQString path=locate("data", "noatun/magictable"); + TQFile magic(path); if (!magic.open(IO_ReadOnly | IO_Raw)) return 0; if (!magic.at(bands*sizeof(float))) @@ -473,7 +473,7 @@ void StereoScope::setSamples(int len) -NoatunListener::NoatunListener(QObject *parent) : QObject(parent) +NoatunListener::NoatunListener(TQObject *parent) : TQObject(parent) { } NoatunListener::~NoatunListener() @@ -495,7 +495,7 @@ void NoatunListenerNotif::message() } -ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) +ExitNotifier::ExitNotifier(int pid, TQObject *parent) : NoatunListener(parent) { mNotif=new NoatunListenerNotif(this); @@ -503,8 +503,8 @@ ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) c.attach(); - QCString appids[2]; - appids[0]=QString("noatun-%1").arg(pid).local8Bit(); + TQCString appids[2]; + appids[0]=TQString("noatun-%1").arg(pid).local8Bit(); appids[1]="noatun"; appid=appids[0]; @@ -521,18 +521,18 @@ ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) return; } - QByteArray replyData; - QCString replyType; + TQByteArray replyData; + TQCString replyType; - QCString sessionName; + TQCString sessionName; - if (!c.call(appid, "Noatun", "session()", QByteArray(), replyType, replyData)) + if (!c.call(appid, "Noatun", "session()", TQByteArray(), replyType, replyData)) { kdDebug(66666) << "Error communicating to parent noatun" << endl; } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); reply >> sessionName; } @@ -544,17 +544,17 @@ ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) ExitNotifier::~ExitNotifier() { - QByteArray replyData; - QCString replyType; + TQByteArray replyData; + TQCString replyType; - QCString sessionName; + TQCString sessionName; DCOPClient c; c.attach(); - if (c.call(appid, "Noatun", "session()", QByteArray(), replyType, replyData)) + if (c.call(appid, "Noatun", "session()", TQByteArray(), replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); reply >> sessionName; Noatun::Session session=Arts::Reference(sessionName); @@ -563,10 +563,10 @@ ExitNotifier::~ExitNotifier() delete mNotif; } -BoolNotifier::BoolNotifier(bool *value, NoatunListener *listener, QObject *parent) - : QObject(parent) +BoolNotifier::BoolNotifier(bool *value, NoatunListener *listener, TQObject *parent) + : TQObject(parent) { - connect(listener, SIGNAL(event()), SLOT(event())); + connect(listener, TQT_SIGNAL(event()), TQT_SLOT(event())); mValue=value; } diff --git a/noatun/library/plugin_deps.h b/noatun/library/plugin_deps.h index a2f3f628..330636e3 100644 --- a/noatun/library/plugin_deps.h +++ b/noatun/library/plugin_deps.h @@ -1,8 +1,8 @@ #ifndef PLUGIN_DEPS_H #define PLUGIN_DEPS_H -#include <qtimer.h> -#include <qobject.h> +#include <tqtimer.h> +#include <tqobject.h> #include <noatunarts.h> class Visualization; @@ -20,7 +20,7 @@ public: void start(); public: - virtual void timerEvent(QTimerEvent *); + virtual void timerEvent(TQTimerEvent *); private: Visualization *mVis; diff --git a/noatun/library/pluginloader.cpp b/noatun/library/pluginloader.cpp index c367228a..0897e76d 100644 --- a/noatun/library/pluginloader.cpp +++ b/noatun/library/pluginloader.cpp @@ -1,6 +1,6 @@ -#include <qfile.h> +#include <tqfile.h> #include <kglobal.h> -#include <qdir.h> +#include <tqdir.h> #include <ksimpleconfig.h> #include <kstandarddirs.h> #include <knotifyclient.h> @@ -22,10 +22,10 @@ LibraryLoader::LibraryLoader() : mPlaylist(0) LibraryLoader::~LibraryLoader() { - QValueList<NoatunLibraryInfo> l; + TQValueList<NoatunLibraryInfo> l; l = loaded(); - for(QValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) + for(TQValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) { if((*i).type != "userinterface" && (*i).type != "playlist" && (*i).type != "systray") { @@ -34,7 +34,7 @@ LibraryLoader::~LibraryLoader() } l = loaded(); - for(QValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) + for(TQValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) { if((*i).type == "userinterface") { @@ -43,26 +43,26 @@ LibraryLoader::~LibraryLoader() } l = loaded(); - for(QValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) + for(TQValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) { removeNow((*i).specfile); } } -QValueList<NoatunLibraryInfo> LibraryLoader::available() const +TQValueList<NoatunLibraryInfo> LibraryLoader::available() const { - QValueList<NoatunLibraryInfo> items; - QStringList files=KGlobal::dirs()->findAllResources("appdata", "*.plugin", false, true); - for (QStringList::Iterator i=files.begin(); i!=files.end(); ++i) + TQValueList<NoatunLibraryInfo> items; + TQStringList files=KGlobal::dirs()->findAllResources("appdata", "*.plugin", false, true); + for (TQStringList::Iterator i=files.begin(); i!=files.end(); ++i) items.append(getInfo(*i)); return items; } -QPtrList<Plugin> LibraryLoader::plugins() const +TQPtrList<Plugin> LibraryLoader::plugins() const { - QPtrList<Plugin> list; - for (QDictIterator<LibraryLoader::PluginLibrary> i(mLibHash); i.current(); ++i) + TQPtrList<Plugin> list; + for (TQDictIterator<LibraryLoader::PluginLibrary> i(mLibHash); i.current(); ++i) list.append(i.current()->plugin); return list; } @@ -71,14 +71,14 @@ bool LibraryLoader::loadAll() { KConfig *config=KGlobal::config(); config->setGroup(""); - QStringList modules = config->readListEntry("Modules"); + TQStringList modules = config->readListEntry("Modules"); return loadAll(modules); } -bool LibraryLoader::loadAll(const QStringList &modules) +bool LibraryLoader::loadAll(const TQStringList &modules) { // Session management... - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if (!info.type.contains("sm")) @@ -87,7 +87,7 @@ bool LibraryLoader::loadAll(const QStringList &modules) } // load all the playlists in the first - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if (!info.type.contains("playlist")) @@ -103,7 +103,7 @@ bool LibraryLoader::loadAll(const QStringList &modules) } // load all the user interfaces now - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if (!info.type.contains("userinterface")) @@ -118,7 +118,7 @@ bool LibraryLoader::loadAll(const QStringList &modules) return false; } - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if((!info.type.contains("playlist")) @@ -132,11 +132,11 @@ bool LibraryLoader::loadAll(const QStringList &modules) return true; } -NoatunLibraryInfo LibraryLoader::getInfo(const QString &spec) const +NoatunLibraryInfo LibraryLoader::getInfo(const TQString &spec) const { NoatunLibraryInfo info; - QString specPath = (spec[0]=='/') ? spec : KGlobal::dirs()->findResource("appdata", spec); - if (!QFile::exists(specPath)) + TQString specPath = (spec[0]=='/') ? spec : KGlobal::dirs()->findResource("appdata", spec); + if (!TQFile::exists(specPath)) return info; KSimpleConfig file(specPath); if (spec.find('/')>=0) @@ -155,14 +155,14 @@ NoatunLibraryInfo LibraryLoader::getInfo(const QString &spec) const return info; } -bool LibraryLoader::isLoaded(const QString &spec) const +bool LibraryLoader::isLoaded(const TQString &spec) const { PluginLibrary *lib=mLibHash[spec]; if (!lib) return false; return lib->plugin; } -bool LibraryLoader::loadSO(const QString &spec) +bool LibraryLoader::loadSO(const TQString &spec) { if(!isLoaded(spec)) { @@ -170,7 +170,7 @@ bool LibraryLoader::loadSO(const QString &spec) if (info.specfile != spec) return false; - for (QStringList::ConstIterator it = info.require.begin(); it != info.require.end(); ++it) + for (TQStringList::ConstIterator it = info.require.begin(); it != info.require.end(); ++it) loadSO(*it); // get the library loader instance @@ -180,8 +180,8 @@ bool LibraryLoader::loadSO(const QString &spec) if (!listitem) { - QString filename = KGlobal::dirs()->findResource("module", info.filename); - KLibrary *lib = loader->library(QFile::encodeName(filename)); + TQString filename = KGlobal::dirs()->findResource("module", info.filename); + KLibrary *lib = loader->library(TQFile::encodeName(filename)); if (!lib) return false; listitem=new PluginLibrary; @@ -210,7 +210,7 @@ bool LibraryLoader::loadSO(const QString &spec) return false; } -void LibraryLoader::add(const QString &spec) +void LibraryLoader::add(const TQString &spec) { PluginLibrary *lib=mLibHash[spec]; if (lib) @@ -219,7 +219,7 @@ void LibraryLoader::add(const QString &spec) loadSO(spec); } -void LibraryLoader::setModules(const QStringList &mods) +void LibraryLoader::setModules(const TQStringList &mods) { KConfig *config=KGlobal::config(); config->setGroup(0); @@ -227,7 +227,7 @@ void LibraryLoader::setModules(const QStringList &mods) config->sync(); } -bool LibraryLoader::remove(const QString& spec, bool terminateOnLastUI) +bool LibraryLoader::remove(const TQString& spec, bool terminateOnLastUI) { bool SystrayPluginEnabled=false; @@ -235,10 +235,10 @@ bool LibraryLoader::remove(const QString& spec, bool terminateOnLastUI) // exit if this is the last UI if (info.type=="userinterface" && terminateOnLastUI) { - QValueList<NoatunLibraryInfo> l=loaded(); + TQValueList<NoatunLibraryInfo> l=loaded(); // Iterate over other plugins - for (QValueList<NoatunLibraryInfo>::Iterator i=l.begin(); i!=l.end(); ++i) + for (TQValueList<NoatunLibraryInfo>::Iterator i=l.begin(); i!=l.end(); ++i) { // Is this a UI plugin? if ((*i).specfile!=spec && (*i).type=="userinterface") @@ -275,7 +275,7 @@ bool LibraryLoader::remove(const QString& spec, bool terminateOnLastUI) return true; } -bool LibraryLoader::remove(const QString &spec) +bool LibraryLoader::remove(const TQString &spec) { remove(spec, true); return true; @@ -283,7 +283,7 @@ bool LibraryLoader::remove(const QString &spec) bool LibraryLoader::remove(const PluginLibrary *pl) { - for (QDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) + for (TQDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) { if (i.current()==pl) return remove(i.currentKey()); @@ -293,7 +293,7 @@ bool LibraryLoader::remove(const PluginLibrary *pl) bool LibraryLoader::remove(const Plugin *plugin) { - for (QDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) + for (TQDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) { if (i.current()->plugin==plugin) return remove(i.currentKey()); @@ -309,22 +309,22 @@ Playlist *LibraryLoader::playlist() const return mPlaylist; } -QValueList<NoatunLibraryInfo> LibraryLoader::loaded() const +TQValueList<NoatunLibraryInfo> LibraryLoader::loaded() const { - QValueList<NoatunLibraryInfo> items; + TQValueList<NoatunLibraryInfo> items; - for (QDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) + for (TQDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) if (isLoaded(i.currentKey())) items.append(getInfo(i.currentKey())); return items; } -QValueList<NoatunLibraryInfo> LibraryLoader::loadedByType(const QString &type) const +TQValueList<NoatunLibraryInfo> LibraryLoader::loadedByType(const TQString &type) const { - QValueList<NoatunLibraryInfo> items; + TQValueList<NoatunLibraryInfo> items; - for (QDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) + for (TQDictIterator<PluginLibrary> i(mLibHash); i.current(); ++i) { if (isLoaded(i.currentKey())) { @@ -337,15 +337,15 @@ QValueList<NoatunLibraryInfo> LibraryLoader::loadedByType(const QString &type) c return items; } -void LibraryLoader::removeNow(const QString &spec) +void LibraryLoader::removeNow(const TQString &spec) { NoatunLibraryInfo info = getInfo(spec); if (info.specfile == spec) { - QValueList<NoatunLibraryInfo> l = loaded(); - for (QValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) + TQValueList<NoatunLibraryInfo> l = loaded(); + for (TQValueList<NoatunLibraryInfo>::Iterator i = l.begin(); i != l.end(); ++i) { - for (QStringList::ConstIterator it = (*i).require.begin(); it != (*i).require.end(); ++it) + for (TQStringList::ConstIterator it = (*i).require.begin(); it != (*i).require.end(); ++it) { if (*it == spec) removeNow((*i).specfile); diff --git a/noatun/library/pluginmodule.cpp b/noatun/library/pluginmodule.cpp index aec76e44..77047471 100644 --- a/noatun/library/pluginmodule.cpp +++ b/noatun/library/pluginmodule.cpp @@ -25,20 +25,20 @@ #include <kiconloader.h> #include <klocale.h> #include <kmessagebox.h> -#include <qtabwidget.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqtabwidget.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> #include "noatunlistview.h" #include "pluginmodule.h" -#include <qwhatsthis.h> +#include <tqwhatsthis.h> #include "common.h" -PluginListItem::PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, QListView *_parent) - : QCheckListItem(_parent, _info.name, CheckBox) +PluginListItem::PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, TQListView *_parent) + : TQCheckListItem(_parent, _info.name, CheckBox) , mInfo(_info) , silentStateChange(false) , exclusive(_exclusive) @@ -61,14 +61,14 @@ void PluginListItem::stateChange(bool b) static_cast<PluginListView *>(listView())->stateChanged(this, b); } -void PluginListItem::paintCell(QPainter *p, const QColorGroup &cg, int a, int b, int c) +void PluginListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int a, int b, int c) { if(exclusive) myType = RadioButton; - QCheckListItem::paintCell(p, cg, a, b, c); + TQCheckListItem::paintCell(p, cg, a, b, c); if(exclusive) myType = CheckBox; } -PluginListView::PluginListView(unsigned _min, unsigned _max, QWidget *_parent, const char *_name) +PluginListView::PluginListView(unsigned _min, unsigned _max, TQWidget *_parent, const char *_name) : KListView(_parent, _name) , hasMaximum(true) , max(_max) @@ -77,7 +77,7 @@ PluginListView::PluginListView(unsigned _min, unsigned _max, QWidget *_parent, c { } -PluginListView::PluginListView(unsigned _min, QWidget *_parent, const char *_name) +PluginListView::PluginListView(unsigned _min, TQWidget *_parent, const char *_name) : KListView(_parent, _name) , hasMaximum(false) , min(_min) @@ -85,7 +85,7 @@ PluginListView::PluginListView(unsigned _min, QWidget *_parent, const char *_nam { } -PluginListView::PluginListView(QWidget *_parent, const char *_name) +PluginListView::PluginListView(TQWidget *_parent, const char *_name) : KListView(_parent, _name) , hasMaximum(false) , min(0) @@ -110,7 +110,7 @@ void PluginListView::stateChanged(PluginListItem *item, bool b) { // Find a different one and turn it off - QListViewItem *cur = firstChild(); + TQListViewItem *cur = firstChild(); PluginListItem *curItem = dynamic_cast<PluginListItem *>(cur); while(cur == item || !curItem || !curItem->isOn()) @@ -136,58 +136,58 @@ void PluginListView::stateChanged(PluginListItem *item, bool b) } } -Plugins::Plugins(QObject *_parent) +Plugins::Plugins(TQObject *_parent) : CModule(i18n("Plugins"), i18n("Select Your Plugins"), "gear", _parent) , shown(false) { - (new QVBoxLayout(this))->setAutoAdd(true); - QTabWidget *tabControl = new QTabWidget(this,"tabControl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + TQTabWidget *tabControl = new TQTabWidget(this,"tabControl"); - QFrame *interfaceTab = new QFrame(tabControl); - (new QVBoxLayout(interfaceTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("<b>Select one or more interfaces to use:</b>"), interfaceTab); + TQFrame *interfaceTab = new TQFrame(tabControl); + (new TQVBoxLayout(interfaceTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("<b>Select one or more interfaces to use:</b>"), interfaceTab); // At least one interface is required interfaceList = new PluginListView(1, interfaceTab); interfaceList->addColumn(i18n("Name")); interfaceList->addColumn(i18n("Description")); interfaceList->addColumn(i18n("Author")); interfaceList->addColumn(i18n("License")); - connect(interfaceList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(interfaceList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(interfaceTab, i18n("&Interfaces")); - QFrame *playlistTab = new QFrame(tabControl); - (new QVBoxLayout(playlistTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("<b>Select one playlist to use:</b>"), playlistTab); + TQFrame *playlistTab = new TQFrame(tabControl); + (new TQVBoxLayout(playlistTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("<b>Select one playlist to use:</b>"), playlistTab); // Exactly one playlist is required playlistList = new PluginListView(1, 1, playlistTab); playlistList->addColumn(i18n("Name")); playlistList->addColumn(i18n("Description")); playlistList->addColumn(i18n("Author")); playlistList->addColumn(i18n("License")); - connect(playlistList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(playlistList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(playlistTab, i18n("&Playlist")); - QFrame *visTab = new QFrame(tabControl); - (new QVBoxLayout(visTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("<b>Select any visualizations to use:</b>"), visTab); + TQFrame *visTab = new TQFrame(tabControl); + (new TQVBoxLayout(visTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("<b>Select any visualizations to use:</b>"), visTab); visList = new PluginListView(0, visTab); visList->addColumn(i18n("Name")); visList->addColumn(i18n("Description")); visList->addColumn(i18n("Author")); visList->addColumn(i18n("License")); - connect(visList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(visList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(visTab, i18n("&Visualizations")); // Other plugins are not restricted - QFrame *otherTab = new QFrame(tabControl); - (new QVBoxLayout(otherTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("<b>Select any other plugins to use:</b>"), otherTab); + TQFrame *otherTab = new TQFrame(tabControl); + (new TQVBoxLayout(otherTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("<b>Select any other plugins to use:</b>"), otherTab); otherList = new PluginListView(0, otherTab); otherList->addColumn(i18n("Name")); otherList->addColumn(i18n("Description")); otherList->addColumn(i18n("Author")); otherList->addColumn(i18n("License")); - connect(otherList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(otherList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(otherTab, i18n("O&ther Plugins")); } @@ -198,10 +198,10 @@ void Plugins::reopen() otherList->clear(); visList->clear(); - QValueList<NoatunLibraryInfo> available = napp->libraryLoader()->available(); - QValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); + TQValueList<NoatunLibraryInfo> available = napp->libraryLoader()->available(); + TQValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); - for(QValueList<NoatunLibraryInfo>::Iterator i = available.begin(); i != available.end(); ++i) + for(TQValueList<NoatunLibraryInfo>::Iterator i = available.begin(); i != available.end(); ++i) { PluginListView *parent; bool exclusive = false; @@ -250,7 +250,7 @@ void Plugins::stateChange(PluginListItem *item, bool b) void Plugins::addPlugin(const NoatunLibraryInfo &info) { // Load any that this one depends upon - for(QStringList::ConstIterator i = info.require.begin(); i != info.require.end(); ++i) + for(TQStringList::ConstIterator i = info.require.begin(); i != info.require.end(); ++i) { NoatunLibraryInfo requiredInfo = napp->libraryLoader()->getInfo(*i); PluginListItem *item = findItem(requiredInfo); @@ -268,20 +268,20 @@ void Plugins::removePlugin(const NoatunLibraryInfo &info) LibraryLoader &loader = *(napp->libraryLoader()); // Here are the ones loaded - QValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); + TQValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); // Add the ones marked for loading - for(QStringList::ConstIterator i = mAdded.begin(); i != mAdded.end(); ++i) + for(TQStringList::ConstIterator i = mAdded.begin(); i != mAdded.end(); ++i) loaded.append(loader.getInfo(*i)); // Subtract the ones marked for removal - for(QStringList::ConstIterator i = mDeleted.begin(); i != mDeleted.end(); ++i) + for(TQStringList::ConstIterator i = mDeleted.begin(); i != mDeleted.end(); ++i) loaded.remove(loader.getInfo(*i)); // If any depend on this plugin, mark them for removal (or remove them from mAdded) - for(QValueList<NoatunLibraryInfo>::Iterator i = loaded.begin(); i != loaded.end(); ++i) + for(TQValueList<NoatunLibraryInfo>::Iterator i = loaded.begin(); i != loaded.end(); ++i) { - for(QStringList::ConstIterator j = (*i).require.begin(); j != (*i).require.end(); ++j) + for(TQStringList::ConstIterator j = (*i).require.begin(); j != (*i).require.end(); ++j) { if(*j == info.specfile) { @@ -299,7 +299,7 @@ void Plugins::removePlugin(const NoatunLibraryInfo &info) PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const { - for(QListViewItem *cur = otherList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = otherList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast<PluginListItem *>(cur); if(item && item->info() == info) @@ -307,7 +307,7 @@ PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const } // visualizations - for(QListViewItem *cur = visList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = visList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast<PluginListItem *>(cur); if(item && item->info() == info) @@ -316,7 +316,7 @@ PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const // If our only interface has a dependency removed, that's a double dose of trouble // We may as well have this here for completeness, though - for(QListViewItem *cur = interfaceList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = interfaceList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast<PluginListItem *>(cur); if(item && item->info() == info) @@ -325,7 +325,7 @@ PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const // If a playlist is added or removed due to a dependency, we're doom-diddly-oomed // We may as well have this here for completeness, though - for(QListViewItem *cur = playlistList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = playlistList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast<PluginListItem *>(cur); if(item && item->info() == info) @@ -342,20 +342,20 @@ void Plugins::save() // Load the plugins the user added //loader.loadAll(mAdded); - QString oldPlaylist, newPlaylist; + TQString oldPlaylist, newPlaylist; // first load all non playlist things - for (QStringList::Iterator i = mAdded.begin(); i != mAdded.end(); ++i) + for (TQStringList::Iterator i = mAdded.begin(); i != mAdded.end(); ++i) { NoatunLibraryInfo info = loader.getInfo(*i); if(info.type != "playlist") - loader.loadAll(QStringList(*i)); + loader.loadAll(TQStringList(*i)); else newPlaylist = (*i); } // Remove the plugins the user removed - for (QStringList::Iterator i = mDeleted.begin(); i != mDeleted.end(); ++i) + for (TQStringList::Iterator i = mDeleted.begin(); i != mDeleted.end(); ++i) { NoatunLibraryInfo info = loader.getInfo(*i); if(info.type != "playlist") @@ -372,15 +372,15 @@ void Plugins::save() kdDebug(66666) << k_funcinfo << "Unloading " << oldPlaylist << endl; loader.remove(oldPlaylist); kdDebug(66666) << k_funcinfo << "Loading " << oldPlaylist << endl; - loader.loadAll(QStringList(newPlaylist)); + loader.loadAll(TQStringList(newPlaylist)); } // Round up the ones that weren't loaded right now, for saving in the configuration - QStringList specList(mAdded); + TQStringList specList(mAdded); - QValueList<NoatunLibraryInfo> loaded = loader.loaded(); - for(QValueList<NoatunLibraryInfo>::Iterator i = loaded.begin(); i != loaded.end(); ++i) + TQValueList<NoatunLibraryInfo> loaded = loader.loaded(); + for(TQValueList<NoatunLibraryInfo>::Iterator i = loaded.begin(); i != loaded.end(); ++i) { if(!specList.contains((*i).specfile) && loader.isLoaded((*i).specfile)) specList += (*i).specfile; @@ -393,12 +393,12 @@ void Plugins::save() mAdded.clear(); } -void Plugins::showEvent(QShowEvent *e) +void Plugins::showEvent(TQShowEvent *e) { if(!shown) { shown = true; - KMessageBox::information(this, i18n("<qt>Changing your playlist plugin will stop playback. Different playlists may use different methods of storing information, so after changing playlists you may have to recreate your playlist.</qt>"), QString::null, "Plugin warning"); + KMessageBox::information(this, i18n("<qt>Changing your playlist plugin will stop playback. Different playlists may use different methods of storing information, so after changing playlists you may have to recreate your playlist.</qt>"), TQString::null, "Plugin warning"); } CModule::showEvent(e); } diff --git a/noatun/library/pluginmodule.h b/noatun/library/pluginmodule.h index 75d3e04d..59ece235 100644 --- a/noatun/library/pluginmodule.h +++ b/noatun/library/pluginmodule.h @@ -25,15 +25,15 @@ #include "noatun/pluginloader.h" #include <klistview.h> -#include <qframe.h> -#include <qstringlist.h> +#include <tqframe.h> +#include <tqstringlist.h> class KTabCtl; class PluginListItem : public QCheckListItem { public: - PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, QListView *_parent); + PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, TQListView *_parent); const NoatunLibraryInfo &info() const { return mInfo; } // This will toggle the state without "emitting" the stateChange @@ -41,7 +41,7 @@ public: protected: virtual void stateChange(bool); - virtual void paintCell(QPainter *, const QColorGroup &, int, int, int); + virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int); private: NoatunLibraryInfo mInfo; bool silentStateChange; @@ -55,9 +55,9 @@ Q_OBJECT friend class PluginListItem; public: - PluginListView(QWidget *_parent = 0, const char *_name = 0); - PluginListView(unsigned _min, QWidget *_parent = 0, const char *_name = 0); - PluginListView(unsigned _min, unsigned _max, QWidget *_parent = 0, const char *_name = 0); + PluginListView(TQWidget *_parent = 0, const char *_name = 0); + PluginListView(unsigned _min, TQWidget *_parent = 0, const char *_name = 0); + PluginListView(unsigned _min, unsigned _max, TQWidget *_parent = 0, const char *_name = 0); virtual void clear(); @@ -76,12 +76,12 @@ class Plugins : public CModule { Q_OBJECT public: - Plugins(QObject *_parent = 0); + Plugins(TQObject *_parent = 0); virtual void save(); virtual void reopen(); protected: - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private slots: void stateChange(PluginListItem *, bool); @@ -91,7 +91,7 @@ private: void removePlugin(const NoatunLibraryInfo &); PluginListItem *findItem(const NoatunLibraryInfo &) const; - QStringList mAdded, mDeleted; + TQStringList mAdded, mDeleted; PluginListView *interfaceList, *playlistList, *otherList, *visList; bool shown; diff --git a/noatun/library/pref.cpp b/noatun/library/pref.cpp index 98e71645..658e7951 100644 --- a/noatun/library/pref.cpp +++ b/noatun/library/pref.cpp @@ -4,11 +4,11 @@ #include <kglobal.h> #include <kiconloader.h> #include <kdebug.h> -#include <qlayout.h> -//#include <qlabel.h> +#include <tqlayout.h> +//#include <tqlabel.h> #include "cmodule.h" -NoatunPreferences::NoatunPreferences(QWidget *parent) +NoatunPreferences::NoatunPreferences(TQWidget *parent) : KDialogBase(TreeList, i18n("Preferences - Noatun"), Ok|Apply|Cancel|Help, Ok, parent, "NoatunPreferences", false, true) { @@ -32,7 +32,7 @@ void NoatunPreferences::show() void NoatunPreferences::show(CModule *page) { - int index = pageIndex( static_cast<QWidget *>(page->parent()) ); + int index = pageIndex( static_cast<TQWidget *>(page->parent()) ); if (index != -1) showPage(index); show(); @@ -54,19 +54,19 @@ void NoatunPreferences::remove(CModule *page) mModules.removeRef(page); } -CModule::CModule(const QString &name, const QString &description, const QString &icon, QObject *owner) - : QWidget(napp->preferencesBox()->addPage(name, description, KGlobal::iconLoader()->loadIcon( +CModule::CModule(const TQString &name, const TQString &description, const TQString &icon, TQObject *owner) + : TQWidget(napp->preferencesBox()->addPage(name, description, KGlobal::iconLoader()->loadIcon( icon, KIcon::Small,0, KIcon::DefaultState,0, true))) { if (owner) - connect(owner, SIGNAL(destroyed()), SLOT(ownerDeleted())); + connect(owner, TQT_SIGNAL(destroyed()), TQT_SLOT(ownerDeleted())); //kdDebug(66666) << k_funcinfo << "name = " << name << endl; napp->preferencesBox()->add(this); - QFrame *page=static_cast<QFrame*>(parent()); - (new QHBoxLayout(page))->addWidget(this); + TQFrame *page=static_cast<TQFrame*>(parent()); + (new TQHBoxLayout(page))->addWidget(this); } CModule::~CModule() @@ -87,7 +87,7 @@ CModule::~CModule() void CModule::ownerDeleted() { - QObject *p=parent(); + TQObject *p=parent(); delete this; p->deleteLater(); } diff --git a/noatun/library/scrollinglabel.cpp b/noatun/library/scrollinglabel.cpp index d7bdd643..09d64678 100644 --- a/noatun/library/scrollinglabel.cpp +++ b/noatun/library/scrollinglabel.cpp @@ -22,10 +22,10 @@ #include <noatun/scrollinglabel.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqtimer.h> +#include <tqtooltip.h> class ScrollingLabel::Private { @@ -58,12 +58,12 @@ ScrollingLabel::ScrollingLabel QWidget * parent, const char * name ) - : QWidget(parent, name) + : TQWidget(parent, name) { d = new Private; - connect(&d->scrollTimer, SIGNAL(timeout()), this, SLOT(scroll())); - connect(&d->resetTimer, SIGNAL(timeout()), this, SLOT(restoreText())); + connect(&d->scrollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(scroll())); + connect(&d->resetTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(restoreText())); setText(initialText); } @@ -74,7 +74,7 @@ ScrollingLabel::~ScrollingLabel() } void -ScrollingLabel::setText(const QString & t, int time) +ScrollingLabel::setText(const TQString & t, int time) { d->resetTimer.stop(); @@ -92,8 +92,8 @@ ScrollingLabel::setText(const QString & t, int time) _update(); } - QToolTip::remove(this); - QToolTip::add(this, d->text); + TQToolTip::remove(this); + TQToolTip::add(this, d->text); } void @@ -121,7 +121,7 @@ ScrollingLabel::_update() d->buf.resize(w, h); d->buf.fill(colorGroup().background()); - QPainter p(&d->buf); + TQPainter p(&d->buf); p.setFont(font()); p.drawText(0, fontMetrics().ascent(), d->text); @@ -132,14 +132,14 @@ ScrollingLabel::_update() } void -ScrollingLabel::paintEvent(QPaintEvent *) +ScrollingLabel::paintEvent(TQPaintEvent *) { bitBlt (this, 0, 0, &d->buf, d->pos, 0, d->pos + width(), height(), Qt::CopyROP); } void -ScrollingLabel::resizeEvent(QResizeEvent *) +ScrollingLabel::resizeEvent(TQResizeEvent *) { _update(); } @@ -174,7 +174,7 @@ ScrollingLabel::sizeHint() const QSize ScrollingLabel::minimumSizeHint() const { - return QSize(0, fontMetrics().height()); + return TQSize(0, fontMetrics().height()); } QString diff --git a/noatun/library/stereobuttonaction.cpp b/noatun/library/stereobuttonaction.cpp index bfb688f7..e8df0046 100644 --- a/noatun/library/stereobuttonaction.cpp +++ b/noatun/library/stereobuttonaction.cpp @@ -3,27 +3,27 @@ namespace NoatunStdAction { -StereoButtonAction::StereoButtonAction(const QString& text, int accel, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, int accel, TQObject* parent, const char* name ) : KAction(text, accel, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(text, accel, receiver, slot, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QIconSet& pix, int accel, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel, TQObject* parent, const char* name ) : KAction(text, pix, accel, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QString& pix, int accel, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQString& pix, int accel, TQObject* parent, const char* name ) : KAction(text, pix, accel, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QIconSet& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(text, pix, accel, receiver, slot, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QString& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQString& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(text, pix, accel, receiver, slot, parent, name) {} diff --git a/noatun/library/titleproxy.cpp b/noatun/library/titleproxy.cpp index 7515a35a..ee62863c 100644 --- a/noatun/library/titleproxy.cpp +++ b/noatun/library/titleproxy.cpp @@ -21,8 +21,8 @@ email : [email protected] #include <kprotocolmanager.h> #include <kmdcodec.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqtimer.h> #include "noatun/app.h" using namespace TitleProxy; @@ -32,7 +32,7 @@ static const uint MAX_PROXYPORT = 7777; static const int BUFSIZE = 32768; Proxy::Proxy( KURL url ) - : QObject() + : TQObject() , m_url( url ) , m_initSuccess( true ) , m_metaInt( 0 ) @@ -50,9 +50,9 @@ Proxy::Proxy( KURL url ) if ( m_url.port() < 1 ) m_url.setPort( 80 ); - connect( &m_sockRemote, SIGNAL( error( int ) ), this, SLOT( connectError() ) ); - connect( &m_sockRemote, SIGNAL( connected() ), this, SLOT( sendRequest() ) ); - connect( &m_sockRemote, SIGNAL( readyRead() ), this, SLOT( readRemote() ) ); + connect( &m_sockRemote, TQT_SIGNAL( error( int ) ), this, TQT_SLOT( connectError() ) ); + connect( &m_sockRemote, TQT_SIGNAL( connected() ), this, TQT_SLOT( sendRequest() ) ); + connect( &m_sockRemote, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readRemote() ) ); uint i = 0; Server* server = 0; @@ -74,7 +74,7 @@ Proxy::Proxy( KURL url ) return; } m_usedPort = i; - connect( server, SIGNAL( connected( int ) ), this, SLOT( accept( int ) ) ); + connect( server, TQT_SIGNAL( connected( int ) ), this, TQT_SLOT( accept( int ) ) ); } @@ -129,8 +129,8 @@ void Proxy::connectToHost() //SLOT } { //connect to server - QTimer::singleShot( KProtocolManager::connectTimeout() * 1000, - this, SLOT( connectError() ) ); + TQTimer::singleShot( KProtocolManager::connectTimeout() * 1000, + this, TQT_SLOT( connectError() ) ); kdDebug(66666) << k_funcinfo << "Connecting to " << m_url.host() << ":" << m_url.port() << endl; @@ -146,12 +146,12 @@ void Proxy::sendRequest() //SLOT { //kdDebug(66666) << "BEGIN " << k_funcinfo << endl; - QCString username = m_url.user().utf8(); - QCString password = m_url.pass().utf8(); - QCString authString = KCodecs::base64Encode( username + ":" + password ); + TQCString username = m_url.user().utf8(); + TQCString password = m_url.pass().utf8(); + TQCString authString = KCodecs::base64Encode( username + ":" + password ); bool auth = !( username.isEmpty() && password.isEmpty() ); - QString request = QString( "GET %1 HTTP/1.0\r\n" + TQString request = TQString( "GET %1 HTTP/1.0\r\n" "Host: %2\r\n" "User-Agent: Noatun/%5\r\n" "%3" @@ -159,8 +159,8 @@ void Proxy::sendRequest() //SLOT "\r\n" ) .arg( m_url.path( -1 ).isEmpty() ? "/" : m_url.path( -1 ) ) .arg( m_url.host() ) - .arg( m_icyMode ? QString( "Icy-MetaData:1\r\n" ) : QString::null ) - .arg( auth ? QString( "Authorization: Basic " ).append( authString ) : QString::null ) + .arg( m_icyMode ? TQString( "Icy-MetaData:1\r\n" ) : TQString::null ) + .arg( auth ? TQString( "Authorization: Basic " ).append( authString ) : TQString::null ) .arg( NOATUN_VERSION ); m_sockRemote.writeBlock( request.latin1(), request.length() ); @@ -257,7 +257,7 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) "Got shoutcast header: '" << m_headerStr << "'" << endl;*/ // Handle redirection - QString loc( "Location: " ); + TQString loc( "Location: " ); int index = m_headerStr.find( loc ); if ( index >= 0 ) { @@ -276,31 +276,31 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) if (m_headerStr.startsWith("ICY")) { - m_metaInt = m_headerStr.section( "icy-metaint:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ).toInt(); - m_bitRate = m_headerStr.section( "icy-br:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamName = m_headerStr.section( "icy-name:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamGenre = m_headerStr.section( "icy-genre:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamUrl = m_headerStr.section( "icy-url:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_metaInt = m_headerStr.section( "icy-metaint:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ).toInt(); + m_bitRate = m_headerStr.section( "icy-br:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamName = m_headerStr.section( "icy-name:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamGenre = m_headerStr.section( "icy-genre:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamUrl = m_headerStr.section( "icy-url:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); } else // not ShoutCast { - QString serverName = m_headerStr.section( "Server:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + TQString serverName = m_headerStr.section( "Server:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); kdDebug(66666) << k_funcinfo << "Server name: " << serverName << endl; if (serverName == "Icecast") { m_metaInt = 0; - m_streamName = m_headerStr.section( "ice-name:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamGenre = m_headerStr.section( "ice-genre:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamUrl = m_headerStr.section( "ice-url:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamName = m_headerStr.section( "ice-name:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamGenre = m_headerStr.section( "ice-genre:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamUrl = m_headerStr.section( "ice-url:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); } else if (serverName.startsWith("icecast/1.")) { m_metaInt = 0; - m_bitRate = m_headerStr.section( "x-audiocast-bitrate:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamName = m_headerStr.section( "x-audiocast-name:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamGenre = m_headerStr.section( "x-audiocast-genre:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamUrl = m_headerStr.section( "x-audiocast-url:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_bitRate = m_headerStr.section( "x-audiocast-bitrate:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamName = m_headerStr.section( "x-audiocast-name:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamGenre = m_headerStr.section( "x-audiocast-genre:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamUrl = m_headerStr.section( "x-audiocast-url:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); } } @@ -316,8 +316,8 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) return false; } - connect( &m_sockRemote, SIGNAL( connectionClosed() ), - this, SLOT( connectError() ) ); + connect( &m_sockRemote, TQT_SIGNAL( connectionClosed() ), + this, TQT_SLOT( connectError() ) ); return true; } } @@ -325,7 +325,7 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) } -void Proxy::transmitData( const QString &data ) +void Proxy::transmitData( const TQString &data ) { /*kdDebug(66666) << k_funcinfo << " received new metadata: '" << data << "'" << endl;*/ @@ -339,8 +339,8 @@ void Proxy::transmitData( const QString &data ) emit metaData( m_streamName, m_streamGenre, m_streamUrl, m_bitRate, - extractStr(data, QString::fromLatin1("StreamTitle")), - extractStr(data, QString::fromLatin1("StreamUrl"))); + extractStr(data, TQString::fromLatin1("StreamTitle")), + extractStr(data, TQString::fromLatin1("StreamUrl"))); } @@ -358,12 +358,12 @@ void Proxy::error() } -QString Proxy::extractStr( const QString &str, const QString &key ) +TQString Proxy::extractStr( const TQString &str, const TQString &key ) { int index = str.find( key, 0, true ); if ( index == -1 ) { - return QString::null; + return TQString::null; } else { diff --git a/noatun/library/titleproxy.h b/noatun/library/titleproxy.h index 058943d6..541f3190 100644 --- a/noatun/library/titleproxy.h +++ b/noatun/library/titleproxy.h @@ -20,9 +20,9 @@ email : #include <kurl.h> //stack allocated -#include <qobject.h> -#include <qserversocket.h> //baseclass -#include <qsocket.h> //stack allocated +#include <tqobject.h> +#include <tqserversocket.h> //baseclass +#include <tqsocket.h> //stack allocated class QString; @@ -58,12 +58,12 @@ namespace TitleProxy signals: void metaData( - const QString &streamName, - const QString &streamGenre, - const QString &streamUrl, - const QString &streamBitrate, - const QString &trackTitle, - const QString &trackUrl); + const TQString &streamName, + const TQString &streamGenre, + const TQString &streamUrl, + const TQString &streamBitrate, + const TQString &trackTitle, + const TQString &trackUrl); void proxyError(); private slots: @@ -75,9 +75,9 @@ namespace TitleProxy private: bool processHeader( Q_LONG &index, Q_LONG bytesRead ); - void transmitData( const QString &data ); + void transmitData( const TQString &data ); void error(); - QString extractStr( const QString &str, const QString &key ); + TQString extractStr( const TQString &str, const TQString &key ); //ATTRIBUTES: KURL m_url; @@ -86,25 +86,25 @@ namespace TitleProxy bool m_connectSuccess; int m_metaInt; - QString m_bitRate; + TQString m_bitRate; int m_byteCount; uint m_metaLen; - QString m_metaData; + TQString m_metaData; bool m_headerFinished; - QString m_headerStr; + TQString m_headerStr; int m_usedPort; - QString m_lastMetadata; + TQString m_lastMetadata; bool m_icyMode; - QString m_streamName; - QString m_streamGenre; - QString m_streamUrl; + TQString m_streamName; + TQString m_streamGenre; + TQString m_streamUrl; char *m_pBuf; - QSocket m_sockRemote; - QSocket m_sockProxy; + TQSocket m_sockRemote; + TQSocket m_sockProxy; }; @@ -113,8 +113,8 @@ namespace TitleProxy Q_OBJECT public: - Server( Q_UINT16 port, QObject* parent ) - : QServerSocket( port, 1, parent, "TitleProxyServer" ) {}; + Server( Q_UINT16 port, TQObject* parent ) + : TQServerSocket( port, 1, parent, "TitleProxyServer" ) {}; signals: void connected( int socket ); diff --git a/noatun/library/vequalizer.cpp b/noatun/library/vequalizer.cpp index 4b131e8a..c081d84b 100644 --- a/noatun/library/vequalizer.cpp +++ b/noatun/library/vequalizer.cpp @@ -56,9 +56,9 @@ #include <kconfig.h> #include <klocale.h> -#include <qdom.h> -#include <qtextstream.h> -#include <qfile.h> +#include <tqdom.h> +#include <tqtextstream.h> +#include <tqfile.h> #include <math.h> @@ -155,13 +155,13 @@ int VBand::center() const return (d->start + d->end)/2; } -static QString formatFreq(int f, bool withHz) +static TQString formatFreq(int f, bool withHz) { - QString format; + TQString format; if (f<991) - format=QString::number(f); + format=TQString::number(f); else - format=QString::number((int)((f+500)/1000.0))+"k"; + format=TQString::number((int)((f+500)/1000.0))+"k"; if (withHz) format+="Hz"; @@ -169,17 +169,17 @@ static QString formatFreq(int f, bool withHz) return format; } -QString VBand::formatStart(bool withHz) const +TQString VBand::formatStart(bool withHz) const { return formatFreq(d->start, withHz); } -QString VBand::formatEnd(bool withHz) const +TQString VBand::formatEnd(bool withHz) const { return formatFreq(d->end, withHz); } -QString VBand::format(bool withHz) const +TQString VBand::format(bool withHz) const { return formatFreq(center(), withHz); } @@ -212,7 +212,7 @@ int VInterpolation::bands() const void VInterpolation::getFrequencies(int num, int *low, int *high) const { - QValueList<int> fs = VEqualizer::frequencies(bands()); + TQValueList<int> fs = VEqualizer::frequencies(bands()); if (num == 0) *low = 1; else *low = fs[num-1]+1; @@ -249,7 +249,7 @@ void VInterpolation::setLevel(int index, int level) } int realbands = EQ->bands(); - QValueList<int> values; + TQValueList<int> values; for (int i=0; i < realbands; ++i) { // i @@ -360,10 +360,10 @@ int VEqualizer::minBands() const } -QValueList<int> VEqualizer::frequencies(int _num) +TQValueList<int> VEqualizer::frequencies(int _num) { #if 0 - QValueList<int> fs; + TQValueList<int> fs; fs += 108; fs += 217; fs += 810; @@ -389,7 +389,7 @@ QValueList<int> VEqualizer::frequencies(int _num) double vend = double(end()); const double base = ::pow(10.0, ::log10(vend-vstart)/num); - QValueList<int> fs; + TQValueList<int> fs; for (double i=1.0; i <= num; i++) { @@ -416,11 +416,11 @@ void VEqualizer::setBands(int num, bool interpolate) if (num == bands()) return; - QValueList<int> fs = VEqualizer::frequencies(num); + TQValueList<int> fs = VEqualizer::frequencies(num); std::vector<Private::BandInfo> modified; int bstart=0; - for (QValueList<int>::Iterator i(fs.begin()); i != fs.end(); ++i) + for (TQValueList<int>::Iterator i(fs.begin()); i != fs.end(); ++i) { Private::BandInfo info; info.start = bstart+1; @@ -514,11 +514,11 @@ void VEqualizer::setLevel(int index, int level) emit modified(); } -void VEqualizer::setLevels(const QValueList<int> &levels) +void VEqualizer::setLevels(const TQValueList<int> &levels) { int index=0; for ( - QValueList<int>::ConstIterator i(levels.begin()); + TQValueList<int>::ConstIterator i(levels.begin()); i != levels.end(); ++i ) { @@ -572,7 +572,7 @@ void VEqualizer::update(bool full) -bool VEqualizer::save(const KURL &filename, const QString &friendly) const +bool VEqualizer::save(const KURL &filename, const TQString &friendly) const { Noatun::KSaver saver(filename); if(!saver.open()) return false; @@ -585,26 +585,26 @@ bool VEqualizer::save(const KURL &filename, const QString &friendly) const bool VEqualizer::load(const KURL &filename) { - QString dest; + TQString dest; if(KIO::NetAccess::download(filename, dest, 0L)) { - QFile file(dest); + TQFile file(dest); if (!file.open(IO_ReadOnly)) return false; - QTextStream t(&file); - QString str = t.read(); + TQTextStream t(&file); + TQString str = t.read(); fromString(str); return true; } return false; } -QString VEqualizer::toString(const QString &name) const +TQString VEqualizer::toString(const TQString &name) const { - QDomDocument doc("noatunequalizer"); - doc.setContent(QString("<!DOCTYPE NoatunEqualizer><noatunequalizer/>")); - QDomElement docElem = doc.documentElement(); + TQDomDocument doc("noatunequalizer"); + doc.setContent(TQString("<!DOCTYPE NoatunEqualizer><noatunequalizer/>")); + TQDomElement docElem = doc.documentElement(); { docElem.setAttribute("level", preamp()); @@ -616,7 +616,7 @@ QString VEqualizer::toString(const QString &name) const for (int i=0; i < bandc; ++i) { VBand band = const_cast<VEqualizer*>(this)->operator[](i); - QDomElement elem = doc.createElement("band"); + TQDomElement elem = doc.createElement("band"); elem.setAttribute("start", band.start()); elem.setAttribute("end", band.end()); elem.setAttribute("level", band.level()); @@ -627,22 +627,22 @@ QString VEqualizer::toString(const QString &name) const return doc.toString(); } -bool VEqualizer::fromString(const QString &str) +bool VEqualizer::fromString(const TQString &str) { - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(str)) return false; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") return false; setPreamp(docElem.attribute("level", "0").toInt()); std::vector<Private::BandInfo> modified; - for (QDomNode n = docElem.firstChild(); !n.isNull(); n = n.nextSibling()) + for (TQDomNode n = docElem.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if(e.isNull()) continue; if (e.tagName().lower() != "band") continue; @@ -662,34 +662,34 @@ bool VEqualizer::fromString(const QString &str) return true; } -static QString makePresetFile() +static TQString makePresetFile() { - QString basedir=kapp->dirs()->localkdedir()+"/share/apps/noatun/eq.preset/"; + TQString basedir=kapp->dirs()->localkdedir()+"/share/apps/noatun/eq.preset/"; // now append a filename that doesn't exist KStandardDirs::makeDir(basedir); - QString fullpath; + TQString fullpath; int num=0; do { if (num) - fullpath=basedir+"preset."+QString::number(num); + fullpath=basedir+"preset."+TQString::number(num); else fullpath=basedir+"preset"; num++; } - while (QFile(fullpath).exists()); + while (TQFile(fullpath).exists()); return fullpath; } -VPreset VEqualizer::createPreset(const QString &name, bool smart) +VPreset VEqualizer::createPreset(const TQString &name, bool smart) { if (presetExists(name) && !smart) return VPreset(); - QString nameReal=name; + TQString nameReal=name; { int number=1; while (presetExists(nameReal)) { - nameReal=name+" ("+QString::number(number)+')'; + nameReal=name+" ("+TQString::number(number)+')'; number++; } } @@ -700,7 +700,7 @@ VPreset VEqualizer::createPreset(const QString &name, bool smart) save(preset.file(), nameReal); KConfig *config=kapp->config(); config->setGroup("Equalizer"); - QStringList list = config->readListEntry("presets"); + TQStringList list = config->readListEntry("presets"); list += preset.file(); config->writeEntry("presets", list); config->sync(); @@ -710,12 +710,12 @@ VPreset VEqualizer::createPreset(const QString &name, bool smart) } -QValueList<VPreset> VEqualizer::presets() const +TQValueList<VPreset> VEqualizer::presets() const { KConfig *conf=KGlobal::config(); conf->setGroup("Equalizer"); - QStringList list; + TQStringList list; if (conf->hasKey("presets")) { list=conf->readListEntry("presets"); @@ -727,17 +727,17 @@ QValueList<VPreset> VEqualizer::presets() const conf->sync(); } - QValueList<VPreset> presets; + TQValueList<VPreset> presets; - for (QStringList::Iterator i = list.begin(); i!=list.end(); ++i) + for (TQStringList::Iterator i = list.begin(); i!=list.end(); ++i) { - QFile file(*i); + TQFile file(*i); if (!file.open(IO_ReadOnly)) continue; - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(&file)) continue; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") continue; presets.append(VPreset(*i)); @@ -745,11 +745,11 @@ QValueList<VPreset> VEqualizer::presets() const return presets; } -VPreset VEqualizer::presetByName(const QString &name) +VPreset VEqualizer::presetByName(const TQString &name) { - QValueList<VPreset> pr = presets(); + TQValueList<VPreset> pr = presets(); for ( - QValueList<VPreset>::Iterator i(pr.begin()); + TQValueList<VPreset>::Iterator i(pr.begin()); i != pr.end(); ++i ) { @@ -759,21 +759,21 @@ VPreset VEqualizer::presetByName(const QString &name) return VPreset(); } -VPreset VEqualizer::presetByFile(const QString &file) +VPreset VEqualizer::presetByFile(const TQString &file) { KConfig *conf=KGlobal::config(); conf->setGroup("Equalizer"); - QStringList list=kapp->config()->readListEntry("presets"); + TQStringList list=kapp->config()->readListEntry("presets"); if (list.contains(file)) return VPreset(file); return VPreset(); } -bool VEqualizer::presetExists(const QString &name) const +bool VEqualizer::presetExists(const TQString &name) const { - QValueList<VPreset> list=presets(); + TQValueList<VPreset> list=presets(); for ( - QValueList<VPreset>::Iterator i(list.begin()); + TQValueList<VPreset>::Iterator i(list.begin()); i != list.end(); ++i ) { @@ -787,12 +787,12 @@ bool VEqualizer::presetExists(const QString &name) const struct VPreset::Private { - QString file; + TQString file; }; -VPreset::VPreset(const QString &file) +VPreset::VPreset(const TQString &file) { d = new Private; d->file = file; @@ -827,18 +827,18 @@ VPreset & VPreset::operator=(const VPreset ©) return *this; } -QString VPreset::name() const +TQString VPreset::name() const { - QFile file(d->file); + TQFile file(d->file); if (!file.open(IO_ReadOnly)) return 0; - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(&file)) return 0; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") return 0; bool standard=docElem.attribute("default", "0")=="0"; - QString n=docElem.attribute("name", 0); + TQString n=docElem.attribute("name", 0); { // All the translations for the presets # ifdef I18N_STUFF @@ -857,15 +857,15 @@ QString VPreset::name() const return n; } -bool VPreset::setName(const QString &name) +bool VPreset::setName(const TQString &name) { - QFile file(d->file); + TQFile file(d->file); if (!file.open(IO_ReadOnly)) return false; - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(&file)) return false; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") return false; if (docElem.attribute("name") == name) return true; @@ -876,7 +876,7 @@ bool VPreset::setName(const QString &name) if (!file.open(IO_ReadWrite | IO_Truncate)) return false; - QTextStream s(&file); + TQTextStream s(&file); s << doc.toString(); file.close(); @@ -904,7 +904,7 @@ void VPreset::load() const EQ->load(url); } -QString VPreset::file() const +TQString VPreset::file() const { return d->file; } @@ -913,7 +913,7 @@ void VPreset::remove() { KConfig *config=kapp->config(); config->setGroup("Equalizer"); - QStringList items=config->readListEntry("presets"); + TQStringList items=config->readListEntry("presets"); items.remove(file()); config->writeEntry("presets", items); config->sync(); @@ -922,7 +922,7 @@ void VPreset::remove() if (file().find(kapp->dirs()->localkdedir())==0) { - QFile f(file()); + TQFile f(file()); f.remove(); } d->file = ""; diff --git a/noatun/library/video.cpp b/noatun/library/video.cpp index c259d4ba..94646315 100644 --- a/noatun/library/video.cpp +++ b/noatun/library/video.cpp @@ -8,14 +8,14 @@ #include <noatun/player.h> #include <noatun/engine.h> -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <kaction.h> #include <klocale.h> #include "globalvideo.h" // sorry :) -QPtrList<VideoFrame> VideoFrame::frames; +TQPtrList<VideoFrame> VideoFrame::frames; VideoFrame *VideoFrame::whose=0; @@ -24,21 +24,21 @@ struct VideoFrame::Private }; -VideoFrame::VideoFrame(KXMLGUIClient *clientParent, QWidget *parent, const char*name, WFlags f) +VideoFrame::VideoFrame(KXMLGUIClient *clientParent, TQWidget *parent, const char*name, WFlags f) : KVideoWidget(clientParent, parent, name, f) { d = new Private; - connect(napp->player(), SIGNAL(newSong()), SLOT(changed())); - connect(napp->player(), SIGNAL(stopped()), SLOT(stopped())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(changed())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(stopped())); frames.append(this); } -VideoFrame::VideoFrame(QWidget *parent, const char *name, WFlags f) +VideoFrame::VideoFrame(TQWidget *parent, const char *name, WFlags f) : KVideoWidget(parent, name, f) { d = new Private; - connect(napp->player(), SIGNAL(newSong()), SLOT(changed())); - connect(napp->player(), SIGNAL(stopped()), SLOT(stopped())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(changed())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(stopped())); frames.append(this); } @@ -62,9 +62,9 @@ VideoFrame *VideoFrame::playing() return whose; } -QPopupMenu *VideoFrame::popupMenu(QWidget *parent) +TQPopupMenu *VideoFrame::popupMenu(TQWidget *parent) { - QPopupMenu *view = new QPopupMenu(parent); + TQPopupMenu *view = new TQPopupMenu(parent); action( "half_size" )->plug( view ); action( "normal_size" )->plug( view ); action( "double_size" )->plug( view ); @@ -110,14 +110,14 @@ void VideoFrame::stopped() } } -#include <qlayout.h> +#include <tqlayout.h> GlobalVideo::GlobalVideo() - : QWidget( 0, 0, WType_TopLevel | WStyle_Customize | WStyle_DialogBorder | WStyle_Title ) + : TQWidget( 0, 0, WType_TopLevel | WStyle_Customize | WStyle_DialogBorder | WStyle_Title ) { setCaption(i18n("Video - Noatun")); - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); video = new VideoFrame(this); menu = video->popupMenu(this); @@ -126,9 +126,9 @@ GlobalVideo::GlobalVideo() // video->setMinimumSize(101,35); video->setMinimumSize(128,96); - connect(video, SIGNAL(acquired()), SLOT(appear())); - connect(video, SIGNAL(lost()), SLOT(hide())); - connect(video, SIGNAL(adaptSize(int,int)), this, SLOT(slotAdaptSize(int,int))); + connect(video, TQT_SIGNAL(acquired()), TQT_SLOT(appear())); + connect(video, TQT_SIGNAL(lost()), TQT_SLOT(hide())); + connect(video, TQT_SIGNAL(adaptSize(int,int)), this, TQT_SLOT(slotAdaptSize(int,int))); video->setNormalSize(); video->give(); @@ -141,15 +141,15 @@ void GlobalVideo::slotAdaptSize(int w, int h) void GlobalVideo::appear() { - QWidget::show(); + TQWidget::show(); } void GlobalVideo::hide() { - QWidget::hide(); + TQWidget::hide(); } -void GlobalVideo::mouseReleaseEvent(QMouseEvent *e) +void GlobalVideo::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == RightButton) { diff --git a/noatun/modules/artseffects/extrastereogui_impl.cc b/noatun/modules/artseffects/extrastereogui_impl.cc index 5952c80e..b5a19bf0 100644 --- a/noatun/modules/artseffects/extrastereogui_impl.cc +++ b/noatun/modules/artseffects/extrastereogui_impl.cc @@ -1,13 +1,13 @@ -#include <qlayout.h> -#include <qslider.h> +#include <tqlayout.h> +#include <tqslider.h> #include "extrastereogui_impl.h" namespace Arts { -ExtraStereoGUI_impl::ExtraStereoGUI_impl() : QWidget(0) +ExtraStereoGUI_impl::ExtraStereoGUI_impl() : TQWidget(0) { - (new QHBoxLayout(this))->setAutoAdd(true); - mSlider=new QSlider(0,100,10, 0, Horizontal, this); + (new TQHBoxLayout(this))->setAutoAdd(true); + mSlider=new TQSlider(0,100,10, 0, Horizontal, this); mSlider->show(); show(); } diff --git a/noatun/modules/artseffects/extrastereogui_impl.h b/noatun/modules/artseffects/extrastereogui_impl.h index 56104ae8..d807644a 100644 --- a/noatun/modules/artseffects/extrastereogui_impl.h +++ b/noatun/modules/artseffects/extrastereogui_impl.h @@ -1,12 +1,12 @@ #include "artseffects.h" #include "stdsynthmodule.h" -#include <qwidget.h> +#include <tqwidget.h> class QSlider; namespace Arts { -class ExtraStereoGUI_impl : public QWidget, virtual public ExtraStereoGUI_skel +class ExtraStereoGUI_impl : public TQWidget, virtual public ExtraStereoGUI_skel { public: ExtraStereo effect; @@ -19,7 +19,7 @@ public slots: void changeSlider(int); private: - QSlider *mSlider; + TQSlider *mSlider; }; diff --git a/noatun/modules/dcopiface/dcopiface.cpp b/noatun/modules/dcopiface/dcopiface.cpp index 93ef6160..aef6c58f 100644 --- a/noatun/modules/dcopiface/dcopiface.cpp +++ b/noatun/modules/dcopiface/dcopiface.cpp @@ -19,12 +19,12 @@ extern "C" NIF::NIF() : Plugin(), DCOPObject("Noatun") { mLastVolume = 0; -// connect(napp->player(), SIGNAL(newSong()), SLOT(newSongPlaying())); +// connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSongPlaying())); } NIF::~NIF() { - kapp->dcopClient()->emitDCOPSignal("exiting()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("exiting()", TQByteArray()); } void NIF::toggleListView() @@ -131,36 +131,36 @@ int NIF::state() return 0; // default to stopped } -QString NIF::lengthString() +TQString NIF::lengthString() { return napp->player()->current() ? napp->player()->current().lengthString() : ""; } -QString NIF::timeString() +TQString NIF::timeString() { return napp->player()->lengthString(); } -QString NIF::title() +TQString NIF::title() { return napp->player()->current() ? napp->player()->current().title() : ""; } -void NIF::setCurrentProperty(const QString &key, const QString &value) +void NIF::setCurrentProperty(const TQString &key, const TQString &value) { if (!napp->player()->current()) return; napp->player()->current().setProperty(key, value); } -QString NIF::currentProperty(const QString &key) +TQString NIF::currentProperty(const TQString &key) { if (!napp->player()->current()) return ""; return napp->player()->current().property(key); } -void NIF::clearCurrentProperty(const QString &key) +void NIF::clearCurrentProperty(const TQString &key) { if (!napp->player()->current()) return; @@ -168,41 +168,41 @@ void NIF::clearCurrentProperty(const QString &key) } -QCString NIF::visStack() +TQCString NIF::visStack() { return napp->player()->engine()->visualizationStack()->toString().c_str(); } -QCString NIF::session() +TQCString NIF::session() { return napp->player()->engine()->session()->toString().c_str(); } // adds one file to the playlist -void NIF::addFile(const QString& f, bool autoplay) +void NIF::addFile(const TQString& f, bool autoplay) { napp->player()->openFile(f, false, autoplay); } // Adds a bunch of files to the playlist -void NIF::addFile(const QStringList &f, bool autoplay) +void NIF::addFile(const TQStringList &f, bool autoplay) { - for (QStringList::ConstIterator it = f.begin(); it != f.end(); ++it ) + for (TQStringList::ConstIterator it = f.begin(); it != f.end(); ++it ) napp->player()->openFile(*it, false, autoplay); } -void NIF::loadPlugin(const QString &spec) +void NIF::loadPlugin(const TQString &spec) { napp->libraryLoader()->add(spec); } -QStringList NIF::availablePlugins() { - QStringList available_spec_files; - QValueList<NoatunLibraryInfo> available; +TQStringList NIF::availablePlugins() { + TQStringList available_spec_files; + TQValueList<NoatunLibraryInfo> available; available = napp->libraryLoader()->available(); - QValueList<NoatunLibraryInfo>::iterator it; + TQValueList<NoatunLibraryInfo>::iterator it; for (it = available.begin();it != available.end();it++) { available_spec_files += (*it).specfile; } @@ -210,13 +210,13 @@ QStringList NIF::availablePlugins() { return available_spec_files; } -QStringList NIF::loadedPlugins() { - QStringList loaded_spec_files; - QValueList<NoatunLibraryInfo> loaded; +TQStringList NIF::loadedPlugins() { + TQStringList loaded_spec_files; + TQValueList<NoatunLibraryInfo> loaded; loaded = napp->libraryLoader()->loaded(); - QValueList<NoatunLibraryInfo>::iterator it; + TQValueList<NoatunLibraryInfo>::iterator it; for (it = loaded.begin();it != loaded.end();it++) { loaded_spec_files += (*it).specfile; } @@ -224,24 +224,24 @@ QStringList NIF::loadedPlugins() { return loaded_spec_files; } -bool NIF::unloadPlugin(const QString &spec) +bool NIF::unloadPlugin(const TQString &spec) { return napp->libraryLoader()->remove(spec); } -QStringList NIF::mimeTypes() +TQStringList NIF::mimeTypes() { return napp->mimeTypes(); } -QCString NIF::version() +TQCString NIF::version() { return napp->version(); } void NIF::newSongPlaying() { - kapp->dcopClient()->emitDCOPSignal("newFile()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("newFile()", TQByteArray()); } void NIF::clear() diff --git a/noatun/modules/dcopiface/dcopiface.h b/noatun/modules/dcopiface/dcopiface.h index 4b9fe5e7..cd58a228 100644 --- a/noatun/modules/dcopiface/dcopiface.h +++ b/noatun/modules/dcopiface/dcopiface.h @@ -53,37 +53,37 @@ k_dcop: **/ int state(); - QString lengthString(); - QString timeString(); + TQString lengthString(); + TQString timeString(); - QString title(); + TQString title(); /** * set a property for the current song **/ - void setCurrentProperty(const QString &key, const QString &value); + void setCurrentProperty(const TQString &key, const TQString &value); /** * get a property from the current song **/ - QString currentProperty(const QString &key); + TQString currentProperty(const TQString &key); /** * clear a property from the current song **/ - void clearCurrentProperty(const QString &key); + void clearCurrentProperty(const TQString &key); - QCString visStack(); - QCString session(); + TQCString visStack(); + TQCString session(); - void addFile(const QString& f, bool autoplay); - void addFile(const QStringList &f, bool autoplay); + void addFile(const TQString& f, bool autoplay); + void addFile(const TQStringList &f, bool autoplay); - void loadPlugin(const QString &specFile); - QStringList availablePlugins(); - QStringList loadedPlugins(); - bool unloadPlugin(const QString &specFile); + void loadPlugin(const TQString &specFile); + TQStringList availablePlugins(); + TQStringList loadedPlugins(); + bool unloadPlugin(const TQString &specFile); - QStringList mimeTypes(); - QCString version(); + TQStringList mimeTypes(); + TQCString version(); /** * clear the playlist diff --git a/noatun/modules/excellent/userinterface.cpp b/noatun/modules/excellent/userinterface.cpp index 7f218e98..dac6fbb3 100644 --- a/noatun/modules/excellent/userinterface.cpp +++ b/noatun/modules/excellent/userinterface.cpp @@ -51,15 +51,15 @@ #include <kwin.h> #include <kurldrag.h> -#include <qbitmap.h> -#include <qdragobject.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qobjectdict.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qvbox.h> +#include <tqbitmap.h> +#include <tqdragobject.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqobjectdict.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqvbox.h> Excellent::Excellent() : KMainWindow(0, "NoatunExcellent") @@ -67,12 +67,12 @@ Excellent::Excellent() { setAcceptDrops(true); - KStdAction::quit(napp, SLOT(quit()), actionCollection()); - KStdAction::open(napp, SLOT(fileOpen()), actionCollection()); + KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection()); + KStdAction::open(napp, TQT_SLOT(fileOpen()), actionCollection()); setStandardToolBarMenuEnabled(true); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), actionCollection()); - KStdAction::preferences(napp, SLOT(preferences()), actionCollection()); + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection()); + KStdAction::preferences(napp, TQT_SLOT(preferences()), actionCollection()); // buttons NoatunStdAction::back(actionCollection(), "back"); @@ -82,7 +82,7 @@ Excellent::Excellent() NoatunStdAction::forward(actionCollection(), "forward"); NoatunStdAction::playlist(actionCollection(), "show_playlist"); - volumeAction = new KToggleAction(i18n("Show &Volume Control"), 0, this, SLOT(showVolumeControl()), actionCollection(), "show_volumecontrol"); + volumeAction = new KToggleAction(i18n("Show &Volume Control"), 0, this, TQT_SLOT(showVolumeControl()), actionCollection(), "show_volumecontrol"); volumeAction->setCheckedState(i18n("Hide &Volume Control")); NoatunStdAction::effects(actionCollection(), "effects"); NoatunStdAction::equalizer(actionCollection(), "equalizer"); @@ -95,17 +95,17 @@ Excellent::Excellent() toolBar("mainToolBar")->hide(); // Who needs Qt Designer? - mainFrame = new QHBox(this); + mainFrame = new TQHBox(this); mainFrame->setSpacing(KDialog::spacingHint()); mainFrame->setMargin(0); slider = new L33tSlider(0, 1000, 10, 0, L33tSlider::Horizontal, mainFrame); - slider->setTickmarks(QSlider::NoMarks); + slider->setTickmarks(TQSlider::NoMarks); - elapsed = new QLabel(mainFrame); - QFont labelFont = elapsed->font(); + elapsed = new TQLabel(mainFrame); + TQFont labelFont = elapsed->font(); labelFont.setPointSize(24); labelFont.setBold(true); - QFontMetrics labelFontMetrics = labelFont; + TQFontMetrics labelFontMetrics = labelFont; elapsed->setFont(labelFont); elapsed->setAlignment(AlignCenter | AlignVCenter | ExpandTabs); elapsed->setText("--:--"); @@ -117,7 +117,7 @@ Excellent::Excellent() setCentralWidget(mainFrame); - total = new QLabel(statusBar()); + total = new TQLabel(statusBar()); labelFont = total->font(); labelFont.setBold(true); total->setFont(labelFont); @@ -129,24 +129,24 @@ Excellent::Excellent() statusBar()->addWidget(total, 0, true); statusBar()->show(); - connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), this, SLOT(show()) ); + connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlaying())); - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPaused())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlaying())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPaused())); napp->player()->handleButtons(); - connect(napp->player(), SIGNAL(timeout()), this, SLOT(slotTimeout())); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(slotLoopTypeChanged(int))); + connect(napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(slotLoopTypeChanged(int))); /* This skipToWrapper is needed to pass milliseconds to Player() as everybody * below the GUI is based on milliseconds instead of some unprecise thingy * like seconds or mille */ - connect(slider, SIGNAL(userChanged(int)), this, SLOT(skipToWrapper(int))); - connect(this, SIGNAL(skipTo(int)), napp->player(), SLOT(skipTo(int))); + connect(slider, TQT_SIGNAL(userChanged(int)), this, TQT_SLOT(skipToWrapper(int))); + connect(this, TQT_SIGNAL(skipTo(int)), napp->player(), TQT_SLOT(skipTo(int))); - connect(slider, SIGNAL(sliderMoved(int)), SLOT(sliderMoved(int))); + connect(slider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(sliderMoved(int))); setCaption("Noatun"); setIcon(SmallIcon("noatun")); @@ -186,7 +186,7 @@ Excellent::Excellent() break; } - for (QPtrListIterator<QObject> i(*children()); i.current(); ++i) + for (TQPtrListIterator<TQObject> i(*children()); i.current(); ++i) (*i)->installEventFilter(this); } @@ -203,7 +203,7 @@ Excellent::~Excellent() config.sync(); } -void Excellent::showEvent(QShowEvent *e) +void Excellent::showEvent(TQShowEvent *e) { KConfig *config = KGlobal::config(); config->setGroup("excellent"); @@ -213,7 +213,7 @@ void Excellent::showEvent(QShowEvent *e) KMainWindow::showEvent(e); } -void Excellent::hideEvent(QHideEvent *e) +void Excellent::hideEvent(TQHideEvent *e) { KConfig *config = KGlobal::config(); config->setGroup("excellent"); @@ -223,18 +223,18 @@ void Excellent::hideEvent(QHideEvent *e) KMainWindow::hideEvent(e); } -void Excellent::closeEvent(QCloseEvent *) +void Excellent::closeEvent(TQCloseEvent *) { unload(); } -void Excellent::dragEnterEvent(QDragEnterEvent *event) +void Excellent::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void Excellent::dropEvent(QDropEvent *event) +void Excellent::dropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -244,17 +244,17 @@ void Excellent::dropEvent(QDropEvent *event) } } -bool Excellent::eventFilter(QObject *o, QEvent *e) +bool Excellent::eventFilter(TQObject *o, TQEvent *e) { - if (e->type() == QEvent::Wheel) + if (e->type() == TQEvent::Wheel) { - wheelEvent(static_cast<QWheelEvent*>(e)); + wheelEvent(static_cast<TQWheelEvent*>(e)); return true; } - return QWidget::eventFilter(o, e); + return TQWidget::eventFilter(o, e); } -void Excellent::wheelEvent(QWheelEvent *e) +void Excellent::wheelEvent(TQWheelEvent *e) { int delta=e->delta(); napp->player()->setVolume(napp->player()->volume() + delta/120*2); @@ -335,7 +335,7 @@ void Excellent::showMenubar(void) } else { - KMessageBox::information(this, i18n("<qt>Press %1 to show the menubar.</qt>").arg(menubarAction->shortcut().toString()), QString::null, "Hide Menu warning"); + KMessageBox::information(this, i18n("<qt>Press %1 to show the menubar.</qt>").arg(menubarAction->shortcut().toString()), TQString::null, "Hide Menu warning"); menuBar()->hide(); } } @@ -354,7 +354,7 @@ void Excellent::changeStatusbar(void) statusBar()->message(napp->player()->current().title()); } -void Excellent::handleLengthString(const QString &text) +void Excellent::handleLengthString(const TQString &text) { if(text.right(5) == "00:00" && text.left(5) == "00:00") { @@ -364,7 +364,7 @@ void Excellent::handleLengthString(const QString &text) else { // Split the length string in to "current" and "elapsed" - QStringList tokens = QStringList::split("/", text); + TQStringList tokens = TQStringList::split("/", text); elapsed->setText(tokens[0]); total->setText(tokens[1]); @@ -376,8 +376,8 @@ void Excellent::growVolumeControl(void) volumeSlider = new L33tSlider(0, 100, 10, 0, Vertical, mainFrame); volumeSlider->setValue(100 - napp->player()->volume()); volumeSlider->show(); - connect(volumeSlider, SIGNAL(sliderMoved(int)), SLOT(changeVolume(int))); - connect(volumeSlider, SIGNAL(userChanged(int)), SLOT(changeVolume(int))); + connect(volumeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(changeVolume(int))); + connect(volumeSlider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(changeVolume(int))); } void Excellent::shrinkVolumeControl(void) diff --git a/noatun/modules/excellent/userinterface.h b/noatun/modules/excellent/userinterface.h index 588db6e4..7b30bd93 100644 --- a/noatun/modules/excellent/userinterface.h +++ b/noatun/modules/excellent/userinterface.h @@ -54,16 +54,16 @@ Q_OBJECT public: Excellent(); virtual ~Excellent(); - void load(const QString& url); + void load(const TQString& url); protected: - virtual void showEvent(QShowEvent *); - virtual void hideEvent(QHideEvent *); - virtual void closeEvent(QCloseEvent *); - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); - void wheelEvent(QWheelEvent *e); - bool eventFilter(QObject *o, QEvent *e); + virtual void showEvent(TQShowEvent *); + virtual void hideEvent(TQHideEvent *); + virtual void closeEvent(TQCloseEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); + void wheelEvent(TQWheelEvent *e); + bool eventFilter(TQObject *o, TQEvent *e); public slots: void slotPlaying(); @@ -85,17 +85,17 @@ private slots: void changeStatusbar(void); void changeVolume(int); - void handleLengthString(const QString &text); + void handleLengthString(const TQString &text); private: void growVolumeControl(void); void shrinkVolumeControl(void); - QHBox *mainFrame; + TQHBox *mainFrame; KToggleAction *volumeAction, *menubarAction; L33tSlider *volumeSlider, *slider; - QLabel *elapsed, *total; + TQLabel *elapsed, *total; }; #endif diff --git a/noatun/modules/htmlexport/htmlexport.cpp b/noatun/modules/htmlexport/htmlexport.cpp index dc48fd8f..29d00935 100644 --- a/noatun/modules/htmlexport/htmlexport.cpp +++ b/noatun/modules/htmlexport/htmlexport.cpp @@ -1,6 +1,6 @@ #include <klocale.h> -#include <qregexp.h> -#include <qtextcodec.h> +#include <tqregexp.h> +#include <tqtextcodec.h> #include <kaction.h> #include <noatun/stdaction.h> #include "htmlexport.h" @@ -13,12 +13,12 @@ extern "C" } } -HTMLExport::HTMLExport(): QObject(0, "HTMLExport"), Plugin() +HTMLExport::HTMLExport(): TQObject(0, "HTMLExport"), Plugin() { NOATUNPLUGINC(HTMLExport); mAction = new KAction(i18n("&Export Playlist..."), "filesaveas", 0, - this, SLOT(slotExport()), this, "exportlist"); + this, TQT_SLOT(slotExport()), this, "exportlist"); napp->pluginActionMenu()->insert(mAction); new Prefs(this); @@ -36,7 +36,7 @@ void HTMLExport::slotExport() config->setGroup("HTMLExport"); // get output target - KURL url = KFileDialog::getSaveURL(QString::null, + KURL url = KFileDialog::getSaveURL(TQString::null, "text/html", 0, i18n("Export Playlist")); @@ -44,10 +44,10 @@ void HTMLExport::slotExport() // write into tempfile KTempFile temp; temp.setAutoDelete(true); - QFile file(temp.name()); + TQFile file(temp.name()); file.open(IO_WriteOnly); - QTextStream str(&file); - str.setCodec(QTextCodec::codecForName("utf8")); + TQTextStream str(&file); + str.setCodec(TQTextCodec::codecForName("utf8")); str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; str << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" << endl; @@ -132,37 +132,37 @@ void HTMLExport::slotExport() KIO::NetAccess::upload(temp.name(), url, 0); } -QString HTMLExport::htmlEscape(const QString &source) { +TQString HTMLExport::htmlEscape(const TQString &source) { // Escape characters that need to be escaped - QString temp = source; + TQString temp = source; - temp.replace( QRegExp("&"), "&" ); - temp.replace( QRegExp("<"), "<" ); - temp.replace( QRegExp(">"), ">" ); + temp.replace( TQRegExp("&"), "&" ); + temp.replace( TQRegExp("<"), "<" ); + temp.replace( TQRegExp(">"), ">" ); return temp; } -QString HTMLExport::getColorByEntry(QString s) +TQString HTMLExport::getColorByEntry(TQString s) { - QString res; - QString tmp; - QColor c; + TQString res; + TQString tmp; + TQColor c; // init readConfig config->setGroup("HTMLExport"); c = config->readColorEntry( s ); - tmp = QString::number( c.red(), 16); + tmp = TQString::number( c.red(), 16); if (tmp.length()==1) tmp="0"+tmp; res = tmp; - tmp = QString::number( c.green(), 16); + tmp = TQString::number( c.green(), 16); if (tmp.length()==1) tmp="0"+tmp; res += tmp; - tmp = QString::number( c.blue(), 16); + tmp = TQString::number( c.blue(), 16); if (tmp.length()==1) tmp="0"+tmp; res += tmp; @@ -171,7 +171,7 @@ QString HTMLExport::getColorByEntry(QString s) } //////////////////////////////////// Settings //////////////////////////////////// -Prefs::Prefs(QObject *parent) +Prefs::Prefs(TQObject *parent) : CModule(i18n("Playlist Export"), i18n("Colors & Settings for HTML Export"), "html", parent) { @@ -181,26 +181,26 @@ Prefs::Prefs(QObject *parent) // Set default values if ( !config->hasKey( "headColor" ) ) - config->writeEntry( "headColor", QColor( black ) ) ; + config->writeEntry( "headColor", TQColor( black ) ) ; if ( !config->hasKey( "hoverColor" ) ) - config->writeEntry( "hoverColor", QColor( black ) ); + config->writeEntry( "hoverColor", TQColor( black ) ); if ( !config->hasKey( "bgColor" ) ) - config->writeEntry( "bgColor", QColor( white ) ) ; + config->writeEntry( "bgColor", TQColor( white ) ) ; if ( !config->hasKey( "txtColor" ) ) - config->writeEntry( "txtColor", QColor( black ) ); + config->writeEntry( "txtColor", TQColor( black ) ); config->sync(); // Draw Stuff and insert Settings - QVBoxLayout *top = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint() ); - colorBox = new QGroupBox( i18n( "HTML Color Settings" ), this, "colorBox" ); + colorBox = new TQGroupBox( i18n( "HTML Color Settings" ), this, "colorBox" ); - bgcolorLabel = new QGridLayout( colorBox, 2, 5, + bgcolorLabel = new TQGridLayout( colorBox, 2, 5, KDialog::marginHint(), KDialog::spacingHint() ); headColorSelect = new KColorButton( colorBox, "headColorSelect" ); @@ -211,21 +211,21 @@ Prefs::Prefs(QObject *parent) txtColorSelect = new KColorButton( colorBox, "txtColorSelect" ); - txtColorLabel = new QLabel( colorBox, "txtColorLabel" ); + txtColorLabel = new TQLabel( colorBox, "txtColorLabel" ); txtColorLabel->setText( i18n( "Text:" ) ); - txtColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + txtColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); - bgColorLabel = new QLabel( colorBox, "bgColorLabel" ); + bgColorLabel = new TQLabel( colorBox, "bgColorLabel" ); bgColorLabel->setText( i18n( "Background:" ) ); - bgColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + bgColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); - headColorLabel = new QLabel( colorBox, "headColorLabel" ); + headColorLabel = new TQLabel( colorBox, "headColorLabel" ); headColorLabel->setText( i18n( "Heading:" ) ); - headColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + headColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); - hoverColorLabel = new QLabel( colorBox, "hoverColorLabel" ); + hoverColorLabel = new TQLabel( colorBox, "hoverColorLabel" ); hoverColorLabel->setText( i18n( "Link hover:" ) ); - hoverColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + hoverColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); bgcolorLabel->setRowStretch(0, 1); @@ -245,7 +245,7 @@ Prefs::Prefs(QObject *parent) // Set up the Background Image frame - bgPicBox = new QHGroupBox( i18n( "Background Image"), this, "bgPicBox" ); + bgPicBox = new TQHGroupBox( i18n( "Background Image"), this, "bgPicBox" ); // Set up the URL requestor bgPicPath = new KURLRequester ( bgPicBox, "bgPicPath" ); @@ -255,11 +255,11 @@ Prefs::Prefs(QObject *parent) bgPicPath->setMode(KFile::File | KFile::ExistingOnly); bgPicPath->setFilter("image/gif image/jpeg image/gif image/png image/svg+xml image/tiff"); - linkEntries = new QCheckBox( this, "linkEntries" ); + linkEntries = new TQCheckBox( this, "linkEntries" ); linkEntries->setText( i18n( "Hyper&link playlist entries to their URL" ) ); linkEntries->setTristate( false ); - numberEntries = new QCheckBox( this, "numberEntries" ); + numberEntries = new TQCheckBox( this, "numberEntries" ); numberEntries->setText( i18n( "&Number playlist entries" ) ); numberEntries->setTristate( false ); @@ -277,7 +277,7 @@ void Prefs::save() { KConfig *config = KGlobal::config(); - QString bgRealURL = bgPicPath->url(); + TQString bgRealURL = bgPicPath->url(); if (bgRealURL[0] == '/') bgRealURL = "file:" + bgRealURL; diff --git a/noatun/modules/htmlexport/htmlexport.h b/noatun/modules/htmlexport/htmlexport.h index a909a5cb..81047d3d 100644 --- a/noatun/modules/htmlexport/htmlexport.h +++ b/noatun/modules/htmlexport/htmlexport.h @@ -2,16 +2,16 @@ #ifndef _HTMLEXPORT_H_ #define _HTMLEXPORT_H_ -#include <qfile.h> -#include <qtextstream.h> -#include <qlabel.h> -#include <qhgroupbox.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqlabel.h> +#include <tqhgroupbox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <klocale.h> #include <kpopupmenu.h> @@ -31,7 +31,7 @@ class KAction; -class HTMLExport : public QObject, public Plugin +class HTMLExport : public TQObject, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -41,8 +41,8 @@ public: private: - QString htmlEscape(const QString &source); - QString getColorByEntry(QString s); + TQString htmlEscape(const TQString &source); + TQString getColorByEntry(TQString s); KConfig *config; KAction *mAction; @@ -55,30 +55,30 @@ class Prefs : public CModule { Q_OBJECT public: - Prefs(QObject *parent); + Prefs(TQObject *parent); virtual void save(); virtual void reopen(); - QGroupBox* colorBox; + TQGroupBox* colorBox; KColorButton* headColorSelect; KColorButton* hoverColorSelect; KColorButton* bgColorSelect; KColorButton* txtColorSelect; - QLabel* bgColorLabel; - QLabel* txtColorLabel; - QLabel* headColorLabel; - QLabel* hoverColorLabel; + TQLabel* bgColorLabel; + TQLabel* txtColorLabel; + TQLabel* headColorLabel; + TQLabel* hoverColorLabel; - QCheckBox* linkEntries; - QCheckBox* numberEntries; + TQCheckBox* linkEntries; + TQCheckBox* numberEntries; - QGroupBox* bgPicBox; + TQGroupBox* bgPicBox; KURLRequester* bgPicPath; protected: - QGridLayout* bgcolorLabel; + TQGridLayout* bgcolorLabel; signals: diff --git a/noatun/modules/infrared/infrared.cpp b/noatun/modules/infrared/infrared.cpp index 60ea145c..c9b31230 100644 --- a/noatun/modules/infrared/infrared.cpp +++ b/noatun/modules/infrared/infrared.cpp @@ -6,7 +6,7 @@ #include <noatun/app.h> #include <klocale.h> -#include <qtimer.h> +#include <tqtimer.h> #include "infrared.h" #include "lirc.h" @@ -22,18 +22,18 @@ extern "C" InfraRed::InfraRed() - : QObject(), + : TQObject(), Plugin() { NOATUNPLUGINC(InfraRed); m_lirc = new Lirc(this); connect(m_lirc, - SIGNAL(commandReceived(const QString &, const QString &, int)), - SLOT(slotCommand(const QString &, const QString &, int))); + TQT_SIGNAL(commandReceived(const TQString &, const TQString &, int)), + TQT_SLOT(slotCommand(const TQString &, const TQString &, int))); IRPrefs::s_lirc = m_lirc; volume=0; - QTimer::singleShot(0, this, SLOT(start())); + TQTimer::singleShot(0, this, TQT_SLOT(start())); } InfraRed::~InfraRed() @@ -45,7 +45,7 @@ void InfraRed::start() new IRPrefs(this); } -void InfraRed::slotCommand(const QString &remote, const QString &button, int repeat) +void InfraRed::slotCommand(const TQString &remote, const TQString &button, int repeat) { switch (IRPrefs::actionFor(remote, button, repeat)) { diff --git a/noatun/modules/infrared/infrared.h b/noatun/modules/infrared/infrared.h index 37e97735..870efbd5 100644 --- a/noatun/modules/infrared/infrared.h +++ b/noatun/modules/infrared/infrared.h @@ -8,7 +8,7 @@ class NoatunPreferences; class Lirc; -class InfraRed : public QObject, public Plugin +class InfraRed : public TQObject, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -17,7 +17,7 @@ public: ~InfraRed(); private slots: - void slotCommand(const QString &, const QString &, int); + void slotCommand(const TQString &, const TQString &, int); void start(); diff --git a/noatun/modules/infrared/irprefs.cpp b/noatun/modules/infrared/irprefs.cpp index 409fa94e..548fd27d 100644 --- a/noatun/modules/infrared/irprefs.cpp +++ b/noatun/modules/infrared/irprefs.cpp @@ -1,7 +1,7 @@ -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <noatun/app.h> #include <kdialog.h> @@ -17,17 +17,17 @@ class CommandItem : public QListViewItem { public: - CommandItem(QListViewItem *remote, const QString &name, + CommandItem(TQListViewItem *remote, const TQString &name, IRPrefs::Action action, int interval) - : QListViewItem(remote, name, IRPrefs::actionName(action), - interval ? QString().setNum(interval) : QString::null), + : TQListViewItem(remote, name, IRPrefs::actionName(action), + interval ? TQString().setNum(interval) : TQString::null), m_name(remote->text(0) + "::" + name), m_action(action), m_interval(interval) { } - const QString &name() const { return m_name; } + const TQString &name() const { return m_name; } IRPrefs::Action action() const { return m_action; } int interval() const { return m_interval; } void setAction(IRPrefs::Action action) @@ -37,44 +37,44 @@ public: } void setInterval(int interval) { - setText(2, interval ? QString().setNum(interval) : QString::null); + setText(2, interval ? TQString().setNum(interval) : TQString::null); m_interval = interval; } private: - QString m_name; + TQString m_name; IRPrefs::Action m_action; int m_interval; }; Lirc *IRPrefs::s_lirc = 0; bool IRPrefs::s_configRead = false; -QMap<QString, IRPrefs::Command> IRPrefs::s_commands; +TQMap<TQString, IRPrefs::Command> IRPrefs::s_commands; -IRPrefs::IRPrefs(QObject *parent) +IRPrefs::IRPrefs(TQObject *parent) : CModule(i18n("Infrared Control"), i18n("Configure Infrared Commands"), "remote", parent) { - QGridLayout *layout = new QGridLayout(this, 3, 5, KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout *layout = new TQGridLayout(this, 3, 5, KDialog::marginHint(), KDialog::spacingHint()); layout->setColStretch(1, 1); - QLabel *label = new QLabel(i18n("Remote control &commands:"), this); + TQLabel *label = new TQLabel(i18n("Remote control &commands:"), this); layout->addMultiCellWidget(label, 0, 0, 0, 4); label->setBuddy(m_commands = new KListView(this)); layout->addMultiCellWidget(m_commands, 1, 1, 0, 4); - label = new QLabel(i18n("&Action:"), this); + label = new TQLabel(i18n("&Action:"), this); layout->addWidget(label, 2, 0); label->setBuddy(m_action = new KComboBox(this)); m_action->setEnabled(false); layout->addWidget(m_action, 2, 1); - m_repeat = new QCheckBox(i18n("&Repeat"), this); + m_repeat = new TQCheckBox(i18n("&Repeat"), this); m_repeat->setEnabled(false); layout->addWidget(m_repeat, 2, 2); - label = new QLabel(i18n("&Interval:"), this); + label = new TQLabel(i18n("&Interval:"), this); layout->addWidget(label, 2, 3); label->setBuddy(m_interval = new KIntSpinBox(this)); @@ -84,19 +84,19 @@ IRPrefs::IRPrefs(QObject *parent) m_interval->setEnabled(false); layout->addWidget(m_interval, 2, 4); - connect(s_lirc, SIGNAL(remotesRead()), SLOT(reopen())); + connect(s_lirc, TQT_SIGNAL(remotesRead()), TQT_SLOT(reopen())); connect(m_commands, - SIGNAL(selectionChanged(QListViewItem *)), - SLOT(slotCommandSelected(QListViewItem *))); + TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(slotCommandSelected(TQListViewItem *))); connect(m_action, - SIGNAL(activated(int)), - SLOT(slotActionActivated(int))); + TQT_SIGNAL(activated(int)), + TQT_SLOT(slotActionActivated(int))); connect(m_repeat, - SIGNAL(toggled(bool)), - SLOT(slotRepeatToggled(bool))); + TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotRepeatToggled(bool))); connect(m_interval, - SIGNAL(valueChanged(int)), - SLOT(slotIntervalChanged(int))); + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotIntervalChanged(int))); reopen(); } @@ -107,11 +107,11 @@ void IRPrefs::save() KConfigGroupSaver groupSaver(c, "Infrared"); c->writeEntry("CommandCount", s_commands.count()); int i = 1; - for (QMap<QString, Command>::ConstIterator it = s_commands.begin(); it != s_commands.end(); ++it) + for (TQMap<TQString, Command>::ConstIterator it = s_commands.begin(); it != s_commands.end(); ++it) { - c->writePathEntry(QString("Command_%1").arg(i), it.key()); - c->writeEntry(QString("Action_%1").arg(i), (int)((*it).action)); - c->writeEntry(QString("Interval_%1").arg(i), (*it).interval); + c->writePathEntry(TQString("Command_%1").arg(i), it.key()); + c->writeEntry(TQString("Action_%1").arg(i), (int)((*it).action)); + c->writeEntry(TQString("Interval_%1").arg(i), (*it).interval); ++i; } } @@ -120,7 +120,7 @@ void IRPrefs::reopen() { readConfig(); - QStringList remotes = s_lirc->remotes(); + TQStringList remotes = s_lirc->remotes(); m_commands->clear(); while (m_commands->columns()) m_commands->removeColumn(0); if (!remotes.count()) @@ -129,13 +129,13 @@ void IRPrefs::reopen() m_commands->setSorting(-1); if (s_lirc->isConnected()) { - new QListViewItem(m_commands, i18n("You do not have any remote control configured.")); - new QListViewItem(m_commands, i18n("Please make sure lirc is setup correctly.")); + new TQListViewItem(m_commands, i18n("You do not have any remote control configured.")); + new TQListViewItem(m_commands, i18n("Please make sure lirc is setup correctly.")); } else { - new QListViewItem(m_commands, i18n("Connection could not be established.")); - new QListViewItem(m_commands, i18n("Please make sure lirc is setup correctly and lircd is running.")); + new TQListViewItem(m_commands, i18n("Connection could not be established.")); + new TQListViewItem(m_commands, i18n("Please make sure lirc is setup correctly and lircd is running.")); } m_commands->setEnabled(false); return; @@ -145,13 +145,13 @@ void IRPrefs::reopen() m_commands->addColumn(i18n("Action")); m_commands->addColumn(i18n("Interval")); m_commands->setSorting(0); - for (QStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) + for (TQStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) { - QListViewItem *remote = new QListViewItem(m_commands, *it); - const QStringList &buttons = s_lirc->buttons(*it); - for (QStringList::ConstIterator btn = buttons.begin(); btn != buttons.end(); ++btn) + TQListViewItem *remote = new TQListViewItem(m_commands, *it); + const TQStringList &buttons = s_lirc->buttons(*it); + for (TQStringList::ConstIterator btn = buttons.begin(); btn != buttons.end(); ++btn) { - QString key = *it + "::" + *btn; + TQString key = *it + "::" + *btn; if (s_commands.contains(key)) new CommandItem(remote, *btn, s_commands[key].action, s_commands[key].interval); else @@ -163,7 +163,7 @@ void IRPrefs::reopen() m_action->clear(); for (int i = 0; ; ++i) { - QString action = actionName((Action)i); + TQString action = actionName((Action)i); if (action.isNull()) break; if (action.isEmpty()) @@ -175,7 +175,7 @@ void IRPrefs::reopen() } -void IRPrefs::slotCommandSelected(QListViewItem *item) +void IRPrefs::slotCommandSelected(TQListViewItem *item) { CommandItem *cmd = dynamic_cast<CommandItem *>(item); if (cmd) @@ -242,12 +242,12 @@ void IRPrefs::slotIntervalChanged(int value) s_commands[cmd->name()].interval = cmd->interval(); } -const QString IRPrefs::actionName(Action action) +const TQString IRPrefs::actionName(Action action) { switch (action) { case None: - return QString(""); + return TQString(""); case Play: return i18n("Play"); case Stop: @@ -275,7 +275,7 @@ const QString IRPrefs::actionName(Action action) case PreviousSection: return i18n("Previous Section"); } - return QString::null; + return TQString::null; } void IRPrefs::readConfig() @@ -288,14 +288,14 @@ void IRPrefs::readConfig() for (int i = 1; i <= count; ++i) { Command cmd; - cmd.action = (Action)(c->readNumEntry(QString("Action_%1").arg(i))); - cmd.interval = c->readNumEntry(QString("Interval_%1").arg(i)); - s_commands.insert(c->readPathEntry(QString("Command_%1").arg(i)), cmd); + cmd.action = (Action)(c->readNumEntry(TQString("Action_%1").arg(i))); + cmd.interval = c->readNumEntry(TQString("Interval_%1").arg(i)); + s_commands.insert(c->readPathEntry(TQString("Command_%1").arg(i)), cmd); } s_configRead = true; } -IRPrefs::Action IRPrefs::actionFor(const QString &remote, const QString &button, int repeat) +IRPrefs::Action IRPrefs::actionFor(const TQString &remote, const TQString &button, int repeat) { readConfig(); Command cmd = s_commands[remote + "::" + button]; diff --git a/noatun/modules/infrared/irprefs.h b/noatun/modules/infrared/irprefs.h index 7f813ac8..1d7196a9 100644 --- a/noatun/modules/infrared/irprefs.h +++ b/noatun/modules/infrared/irprefs.h @@ -2,7 +2,7 @@ #ifndef _IRPREFS_H_ #define _IRPREFS_H_ -#include <qmap.h> +#include <tqmap.h> #include <noatun/pref.h> class QCheckBox; @@ -24,19 +24,19 @@ public: NextSection, PreviousSection }; - IRPrefs(QObject *parent); + IRPrefs(TQObject *parent); virtual void save(); - static const QString actionName(Action); - static Action actionFor(const QString &, const QString &, int); + static const TQString actionName(Action); + static Action actionFor(const TQString &, const TQString &, int); public slots: static Lirc *s_lirc; private slots: virtual void reopen(); - void slotCommandSelected(QListViewItem *); + void slotCommandSelected(TQListViewItem *); void slotActionActivated(int); void slotRepeatToggled(bool); void slotIntervalChanged(int); @@ -46,7 +46,7 @@ private: KListView *m_commands; KComboBox *m_action; - QCheckBox *m_repeat; + TQCheckBox *m_repeat; KIntSpinBox *m_interval; struct Command @@ -55,7 +55,7 @@ private: int interval; }; static bool s_configRead; - static QMap<QString, Command> s_commands; + static TQMap<TQString, Command> s_commands; }; #endif diff --git a/noatun/modules/infrared/lirc.cpp b/noatun/modules/infrared/lirc.cpp index 857c07e2..657172d5 100644 --- a/noatun/modules/infrared/lirc.cpp +++ b/noatun/modules/infrared/lirc.cpp @@ -4,7 +4,7 @@ #include <sys/socket.h> #include <errno.h> -#include <qsocket.h> +#include <tqsocket.h> #include <kdebug.h> #include <klocale.h> @@ -12,8 +12,8 @@ #include "lirc.h" -Lirc::Lirc(QObject *parent) - : QObject(parent), +Lirc::Lirc(TQObject *parent) + : TQObject(parent), m_socket(0) { int sock = ::socket(PF_UNIX, SOCK_STREAM, 0); @@ -34,7 +34,7 @@ Lirc::Lirc(QObject *parent) m_socket = new QSocket; m_socket->setSocket(sock); - connect(m_socket, SIGNAL(readyRead()), SLOT(slotRead())); + connect(m_socket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotRead())); update(); } @@ -43,9 +43,9 @@ Lirc::~Lirc() delete m_socket; } -const QStringList Lirc::remotes() const +const TQStringList Lirc::remotes() const { - QStringList result; + TQStringList result; for (Remotes::ConstIterator it = m_remotes.begin(); it != m_remotes.end(); ++it) result.append(it.key()); result.sort(); @@ -56,7 +56,7 @@ void Lirc::slotRead() { while (m_socket->bytesAvailable()) { - QString line = readLine(); + TQString line = readLine(); if (line == "BEGIN") { // BEGIN @@ -84,7 +84,7 @@ void Lirc::slotRead() while (!line.isEmpty() && line != "END"); return; } - QStringList remotes; + TQStringList remotes; int count = readLine().toInt(); for (int i = 0; i < count; ++i) remotes.append(readLine()); @@ -92,7 +92,7 @@ void Lirc::slotRead() while (!line.isEmpty() && line != "END"); if (line.isEmpty()) return; // abort on corrupt data - for (QStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) + for (TQStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) sendCommand("LIST " + *it); return; } @@ -105,13 +105,13 @@ void Lirc::slotRead() while (!line.isEmpty() && line != "END"); return; } - QString remote = line.mid(5); - QStringList buttons; + TQString remote = line.mid(5); + TQStringList buttons; int count = readLine().toInt(); for (int i = 0; i < count; ++i) { // <code> <name> - QString btn = readLine(); + TQString btn = readLine(); buttons.append(btn.mid(17)); } m_remotes.insert(remote, buttons); @@ -136,7 +136,7 @@ void Lirc::slotRead() pos = line.find(' '); if (pos < 0) return; - QString btn = line.left(pos); + TQString btn = line.left(pos); line.remove(0, pos + 1); emit commandReceived(line, btn, repeat); @@ -150,22 +150,22 @@ void Lirc::update() sendCommand("LIST"); } -const QString Lirc::readLine() +const TQString Lirc::readLine() { if (!m_socket->bytesAvailable()) - return QString::null; + return TQString::null; - QString line = m_socket->readLine(); + TQString line = m_socket->readLine(); if (line.isEmpty()) - return QString::null; + return TQString::null; line.remove(line.length() - 1, 1); return line; } -void Lirc::sendCommand(const QString &command) +void Lirc::sendCommand(const TQString &command) { - QString cmd = command + "\n"; + TQString cmd = command + "\n"; m_socket->writeBlock(cmd.latin1(), cmd.length()); } diff --git a/noatun/modules/infrared/lirc.h b/noatun/modules/infrared/lirc.h index e5380c5c..de9665fd 100644 --- a/noatun/modules/infrared/lirc.h +++ b/noatun/modules/infrared/lirc.h @@ -2,13 +2,13 @@ #ifndef _LIRC_H_ #define _LIRC_H_ -#include <qobject.h> -#include <qstringlist.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqmap.h> class QSocket; -typedef QMap<QString, QStringList> Remotes; +typedef TQMap<TQString, TQStringList> Remotes; class Lirc : public QObject { @@ -17,7 +17,7 @@ public: /** * Constructor */ - Lirc(QObject *parent); + Lirc(TQObject *parent); /** * Destructor */ @@ -30,12 +30,12 @@ public: /** * The names of the remote configured controls */ - const QStringList remotes() const; + const TQStringList remotes() const; /** * The names of the buttons for the specified * remote control */ - const QStringList buttons(const QString &remote) const + const TQStringList buttons(const TQString &remote) const { return m_remotes[remote]; } @@ -56,18 +56,18 @@ signals: * The repeat counter starts with 0 and increases * every time this signal is emitted. */ - void commandReceived(const QString &, const QString &, int); + void commandReceived(const TQString &, const TQString &, int); private slots: void slotRead(); private: void update(); - const QString readLine(); - void sendCommand(const QString &); + const TQString readLine(); + void sendCommand(const TQString &); private: - QSocket *m_socket; + TQSocket *m_socket; Remotes m_remotes; }; diff --git a/noatun/modules/kaiman/pref.cpp b/noatun/modules/kaiman/pref.cpp index 29ef30d9..5f241bc0 100644 --- a/noatun/modules/kaiman/pref.cpp +++ b/noatun/modules/kaiman/pref.cpp @@ -17,11 +17,11 @@ */ #include <klocale.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klistbox.h> -#include <qdir.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqfileinfo.h> #include <kglobal.h> #include <kdebug.h> #include <kstandarddirs.h> @@ -31,12 +31,12 @@ #include "userinterface.h" -KaimanPrefDlg::KaimanPrefDlg(QObject *parent ) +KaimanPrefDlg::KaimanPrefDlg(TQObject *parent ) : CModule(i18n("Kaiman Skins"), i18n("Skin Selection for the Kaiman Plugin"), "style", parent) { // create widgets - QVBoxLayout *topLayout = new QVBoxLayout( this, 6, 11 ); - QLabel *label = new QLabel( i18n("Kaiman Skins"), this, "label" ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this, 6, 11 ); + TQLabel *label = new TQLabel( i18n("Kaiman Skins"), this, "label" ); topLayout->addWidget( label ); _skinList = new KListBox( this, "skinList" ); @@ -68,15 +68,15 @@ void KaimanPrefDlg::reopen() _skinList->clear(); // fill with available skins KGlobal::dirs()->addResourceType("skins", KStandardDirs::kde_default("data") + "noatun/skins/kaiman/"); - QStringList list = KGlobal::dirs()->resourceDirs("skins"); - for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) + TQStringList list = KGlobal::dirs()->resourceDirs("skins"); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); it++) readSkinDir(*it); // load current config KConfig *config=KGlobal::config(); config->setGroup("Kaiman"); - QString skin = config->readEntry( "SkinResource", Kaiman::DEFAULT_SKIN ); - QListBoxItem *item = _skinList->findItem( skin ); + TQString skin = config->readEntry( "SkinResource", Kaiman::DEFAULT_SKIN ); + TQListBoxItem *item = _skinList->findItem( skin ); if ( item ) _skinList->setCurrentItem( item ); else @@ -84,23 +84,23 @@ void KaimanPrefDlg::reopen() } -void KaimanPrefDlg::setSkin( QString skin ) +void KaimanPrefDlg::setSkin( TQString skin ) { _skinList->setCurrentItem( _skinList->findItem( skin ) ); } -QString KaimanPrefDlg::skin() +TQString KaimanPrefDlg::skin() { return _skinList->currentText(); } -void KaimanPrefDlg::readSkinDir( const QString &dir ) +void KaimanPrefDlg::readSkinDir( const TQString &dir ) { kdDebug() << "readSkinDir " << dir << endl; - QDir directory( dir ); + TQDir directory( dir ); if (!directory.exists()) return; @@ -109,7 +109,7 @@ void KaimanPrefDlg::readSkinDir( const QString &dir ) while ( it.current() ) { kdDebug() << it.current()->absFilePath() << endl; - QFileInfo skindata( it.current()->absFilePath()+"/skindata" ); + TQFileInfo skindata( it.current()->absFilePath()+"/skindata" ); if ( skindata.exists() ) { _skinList->insertItem( it.current()->baseName() ); diff --git a/noatun/modules/kaiman/pref.h b/noatun/modules/kaiman/pref.h index d18200fa..4f473859 100644 --- a/noatun/modules/kaiman/pref.h +++ b/noatun/modules/kaiman/pref.h @@ -28,18 +28,18 @@ class KaimanPrefDlg : public CModule { Q_OBJECT public: - KaimanPrefDlg( QObject *parent ); + KaimanPrefDlg( TQObject *parent ); virtual ~KaimanPrefDlg(); virtual void save(); virtual void reopen(); public slots: - void setSkin( QString skin ); - QString skin(); + void setSkin( TQString skin ); + TQString skin(); private: - void readSkinDir( const QString &dir ); + void readSkinDir( const TQString &dir ); KListBox *_skinList; }; diff --git a/noatun/modules/kaiman/style.cpp b/noatun/modules/kaiman/style.cpp index 0cce6b96..6b700230 100644 --- a/noatun/modules/kaiman/style.cpp +++ b/noatun/modules/kaiman/style.cpp @@ -21,14 +21,14 @@ #include <kapplication.h> #include <kstandarddirs.h> #include <kmessagebox.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qpainter.h> -#include <qdropsite.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqpainter.h> +#include <tqdropsite.h> #include <kdebug.h> #include <klocale.h> #include <kurldrag.h> -#include <qtimer.h> +#include <tqtimer.h> #include <stdlib.h> #include <unistd.h> @@ -42,8 +42,8 @@ const bool KaimanStyleSlider::optionVertical = 1; const bool KaimanStyleSlider::optionReversed = 2; const bool KaimanStyleText::optionExtended = 1; -KaimanStyleElement::KaimanStyleElement(QWidget *parent, const char *name) - : QWidget(parent, name) +KaimanStyleElement::KaimanStyleElement(TQWidget *parent, const char *name) + : TQWidget(parent, name) { // Initialize everything to default values filename = ""; @@ -71,9 +71,9 @@ KaimanStyleElement::~KaimanStyleElement() } -void KaimanStyleElement::loadPixmaps(QString &val_s_filename) +void KaimanStyleElement::loadPixmaps(TQString &val_s_filename) { - QPixmap pixmap; + TQPixmap pixmap; bool i_b_ret = pixmap.load(val_s_filename); pixmapNum = pixmapLines*pixmapColumns; @@ -117,14 +117,14 @@ void KaimanStyleElement::loadPixmaps(QString &val_s_filename) { int w = (x==0) ? firstWidth : width; - QPixmap *part = new QPixmap(w,h,pixmap.depth()); + TQPixmap *part = new TQPixmap(w,h,pixmap.depth()); part->fill(Qt::black); bitBlt(part,0,0,&pixmap,sourcex,sourcey,w,h); pixmaps.insert(i,part); if(pixmap.mask()) { - QBitmap maskpart(w,h); + TQBitmap maskpart(w,h); bitBlt(&maskpart,0,0,pixmap.mask(),sourcex,sourcey,w,h); part->setMask(maskpart); } @@ -141,7 +141,7 @@ void KaimanStyleElement::loadPixmaps(QString &val_s_filename) for ( int i=0; i<pixmapNum; i++ ) { - QPixmap *pm = new QPixmap(10, 10); + TQPixmap *pm = new TQPixmap(10, 10); pm->fill(Qt::black); pixmaps.insert( i, pm ); } @@ -149,7 +149,7 @@ void KaimanStyleElement::loadPixmaps(QString &val_s_filename) if ( dimension.width()==0 ) dimension.setWidth( pixmaps[0]->width() ); if ( dimension.height()==0 ) dimension.setHeight( pixmaps[0]->height() ); - setGeometry( QRect(upperLeft, dimension) ); + setGeometry( TQRect(upperLeft, dimension) ); } void KaimanStyleElement::setPixmap( int num ) @@ -164,27 +164,27 @@ void KaimanStyleElement::setPixmap( int num ) } } -void KaimanStyleElement::paintEvent ( QPaintEvent */*qpe*/ ) +void KaimanStyleElement::paintEvent ( TQPaintEvent */*qpe*/ ) { - QPixmap *pm = pixmaps[_currentPixmap]; + TQPixmap *pm = pixmaps[_currentPixmap]; if ( pm ) bitBlt(this, 0, 0, pm ); else kdDebug() << "Invalid pixmap" << endl; -/* QPainter p( this ); +/* TQPainter p( this ); p.setBrush( NoBrush ); - p.setPen( QColor(255,255,255) ); + p.setPen( TQColor(255,255,255) ); p.drawRect( 0, 0, width(), height() ); p.drawText( 2, 16, name() ); */ } -void KaimanStyleElement::dragEnterEvent( QDragEnterEvent *event ) +void KaimanStyleElement::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode(event) ); } -void KaimanStyleElement::dropEvent( QDropEvent *event ) +void KaimanStyleElement::dropEvent( TQDropEvent *event ) { ((Kaiman*)(parentWidget()->parentWidget()))->doDropEvent(event); } @@ -192,7 +192,7 @@ void KaimanStyleElement::dropEvent( QDropEvent *event ) /***************************************************************************/ -KaimanStyleButton::KaimanStyleButton(QWidget *parent, const char *name) +KaimanStyleButton::KaimanStyleButton(TQWidget *parent, const char *name) : KaimanStyleMasked(parent, name) { i_b_lit = i_b_prelit = i_b_down = false; @@ -210,7 +210,7 @@ KaimanStyleButton::~KaimanStyleButton() { } -void KaimanStyleButton::mousePressEvent(QMouseEvent *qme) +void KaimanStyleButton::mousePressEvent(TQMouseEvent *qme) { // We deactivate prelight, because the user presses the button. // So it is now down, but there is no PrelitDown icon (BTW: would @@ -222,7 +222,7 @@ void KaimanStyleButton::mousePressEvent(QMouseEvent *qme) KaimanStyleMasked::mousePressEvent( qme ); } -void KaimanStyleButton::mouseReleaseEvent(QMouseEvent *qme) +void KaimanStyleButton::mouseReleaseEvent(TQMouseEvent *qme) { releaseMouse (); @@ -237,7 +237,7 @@ void KaimanStyleButton::mouseReleaseEvent(QMouseEvent *qme) /* paint prelight */ -void KaimanStyleButton::enterEvent ( QEvent * e ) +void KaimanStyleButton::enterEvent ( TQEvent * e ) { if ( !down() ) setPrelight(true); @@ -246,7 +246,7 @@ void KaimanStyleButton::enterEvent ( QEvent * e ) } /* unpaint prelight */ -void KaimanStyleButton::leaveEvent ( QEvent * e ) +void KaimanStyleButton::leaveEvent ( TQEvent * e ) { if (!down()) setPrelight(false); @@ -327,7 +327,7 @@ void KaimanStyleButton::updateButtonState() { /***********************************************************************/ -KaimanStyleSlider::KaimanStyleSlider(int min, int max, QWidget *parent, const char *name) +KaimanStyleSlider::KaimanStyleSlider(int min, int max, TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _min = min; @@ -380,7 +380,7 @@ int KaimanStyleSlider::pos2value( int x, int y ) } -void KaimanStyleSlider::mouseMoveEvent(QMouseEvent *qme) +void KaimanStyleSlider::mouseMoveEvent(TQMouseEvent *qme) { KaimanStyleMasked::mouseMoveEvent( qme ); @@ -391,7 +391,7 @@ void KaimanStyleSlider::mouseMoveEvent(QMouseEvent *qme) } } -void KaimanStyleSlider::mousePressEvent(QMouseEvent *qme) +void KaimanStyleSlider::mousePressEvent(TQMouseEvent *qme) { if ( !_down ) { @@ -407,7 +407,7 @@ void KaimanStyleSlider::mousePressEvent(QMouseEvent *qme) } -void KaimanStyleSlider::mouseReleaseEvent(QMouseEvent *qme) +void KaimanStyleSlider::mouseReleaseEvent(TQMouseEvent *qme) { if ( _down ) { @@ -424,13 +424,13 @@ void KaimanStyleSlider::mouseReleaseEvent(QMouseEvent *qme) } -void KaimanStyleSlider::paintEvent(QPaintEvent */*qpe*/) +void KaimanStyleSlider::paintEvent(TQPaintEvent */*qpe*/) { // draw background bitBlt( this, 0, 0, pixmaps[0] ); // draw optional handle - QPixmap *handle; + TQPixmap *handle; if ( _down ) handle = pixmaps[2]; else @@ -460,7 +460,7 @@ void KaimanStyleSlider::paintEvent(QPaintEvent */*qpe*/) } } -void KaimanStyleSlider::enterEvent ( QEvent * e ) +void KaimanStyleSlider::enterEvent ( TQEvent * e ) { if ( !_lit && optionPrelight ) { @@ -471,7 +471,7 @@ void KaimanStyleSlider::enterEvent ( QEvent * e ) KaimanStyleMasked::enterEvent( e ); } -void KaimanStyleSlider::leaveEvent ( QEvent * e ) +void KaimanStyleSlider::leaveEvent ( TQEvent * e ) { if ( _lit ) { @@ -486,7 +486,7 @@ void KaimanStyleSlider::leaveEvent ( QEvent * e ) /***********************************************************************/ -KaimanStyleBackground::KaimanStyleBackground(QWidget *parent, const char *name) +KaimanStyleBackground::KaimanStyleBackground(TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { i_b_move = false; @@ -496,22 +496,22 @@ KaimanStyleBackground::~KaimanStyleBackground() { } -void KaimanStyleBackground::mouseReleaseEvent(QMouseEvent *qme) +void KaimanStyleBackground::mouseReleaseEvent(TQMouseEvent *qme) { i_b_move = false; KaimanStyleMasked::mouseReleaseEvent( qme ); } -void KaimanStyleBackground::mouseMoveEvent(QMouseEvent *qme) +void KaimanStyleBackground::mouseMoveEvent(TQMouseEvent *qme) { - QPoint diff = qme->globalPos() - i_point_lastPos; + TQPoint diff = qme->globalPos() - i_point_lastPos; if ( abs(diff.x()) > 10 || abs(diff.y()) > 10) { // Moving starts only, when passing a drag border i_b_move = true; } if ( i_b_move ) { - QWidget *p = parentWidget()->parentWidget(); + TQWidget *p = parentWidget()->parentWidget(); if ( !p ) p = parentWidget(); p->move( qme->globalPos() - i_point_dragStart ); @@ -520,7 +520,7 @@ void KaimanStyleBackground::mouseMoveEvent(QMouseEvent *qme) KaimanStyleMasked::mouseMoveEvent( qme ); } -void KaimanStyleBackground::mousePressEvent(QMouseEvent *qme) +void KaimanStyleBackground::mousePressEvent(TQMouseEvent *qme) { // On the background we move the shaped toplevel around if (!i_b_move) { @@ -533,7 +533,7 @@ void KaimanStyleBackground::mousePressEvent(QMouseEvent *qme) /***********************************************************************/ -KaimanStyleValue::KaimanStyleValue(int min, int max, QWidget *parent, const char *name) +KaimanStyleValue::KaimanStyleValue(int min, int max, TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _min = min; @@ -571,12 +571,12 @@ void KaimanStyleValue::setValue( int value, int min, int max ) /***********************************************************************/ -KaimanStyleNumber::KaimanStyleNumber(QWidget *parent, const char *name) +KaimanStyleNumber::KaimanStyleNumber(TQWidget *parent, const char *name) : KaimanStyleElement( parent, name ) { //kdDebug(66666) << k_funcinfo << "name = '" << name << "'" << endl; _value = 0; - if (QCString(name) == "In_Rate_Number") + if (TQCString(name) == "In_Rate_Number") digits = 3; else digits = 2; @@ -587,7 +587,7 @@ KaimanStyleNumber::~KaimanStyleNumber() } -void KaimanStyleNumber::loadPixmaps(QString &val_s_filename) +void KaimanStyleNumber::loadPixmaps(TQString &val_s_filename) { KaimanStyleElement::loadPixmaps( val_s_filename ); resize( digits*pixmaps[0]->width(),pixmaps[0]->height() ); @@ -603,7 +603,7 @@ void KaimanStyleNumber::setValue( int value ) } } -void KaimanStyleNumber::paintEvent(QPaintEvent */*qpe*/) +void KaimanStyleNumber::paintEvent(TQPaintEvent */*qpe*/) { // check for overflow int v = _value; @@ -631,22 +631,22 @@ void KaimanStyleNumber::paintEvent(QPaintEvent */*qpe*/) bitBlt(this, x, 0, pixmaps[0] ); } /* - QPainter p( this ); + TQPainter p( this ); p.setBrush( NoBrush ); - p.setPen( QColor(255,255,255) ); + p.setPen( TQColor(255,255,255) ); p.drawRect( 0, 0, width(), height() ); p.drawText( 2, 16, name() );*/ } /***********************************************************************/ -KaimanStyleText::KaimanStyleText(QWidget *parent, const char *name) +KaimanStyleText::KaimanStyleText(TQWidget *parent, const char *name) : KaimanStyleElement( parent, name ) { _pos = 0; - _timer = new QTimer( this ); + _timer = new TQTimer( this ); _delay = 500; - connect( _timer, SIGNAL(timeout()), this, SLOT(timeout()) ); + connect( _timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); } KaimanStyleText::~KaimanStyleText() @@ -654,14 +654,14 @@ KaimanStyleText::~KaimanStyleText() } -void KaimanStyleText::loadPixmaps(QString &val_s_filename) +void KaimanStyleText::loadPixmaps(TQString &val_s_filename) { KaimanStyleElement::loadPixmaps( val_s_filename ); resize( digits*pixmaps[0]->width(), pixmaps[0]->height() ); } -void KaimanStyleText::setValue( QString value ) +void KaimanStyleText::setValue( TQString value ) { if ( value!=_value ) { _pos = 0; @@ -708,7 +708,7 @@ void KaimanStyleText::timeout() } -void KaimanStyleText::paintEvent(QPaintEvent */*qpe*/) +void KaimanStyleText::paintEvent(TQPaintEvent */*qpe*/) { // draw number int p; @@ -718,30 +718,30 @@ void KaimanStyleText::paintEvent(QPaintEvent */*qpe*/) if ( pmNum>=96 ) pmNum = '?' - ' '; if ( pmNum<0 ) pmNum = '?' - ' '; - QPixmap *pm = pixmaps[pmNum]; + TQPixmap *pm = pixmaps[pmNum]; if ( pm ) bitBlt(this, p*pixmaps[0]->width(), 0, pm ); } - QPixmap *pm = pixmaps[0]; + TQPixmap *pm = pixmaps[0]; for ( ; p<digits; p++ ) bitBlt(this, p*pixmaps[0]->width(), 0, pm ); -/* QPainter pnt( this ); +/* TQPainter pnt( this ); pnt.setBrush( NoBrush ); - pnt.setPen( QColor(255,255,255) ); + pnt.setPen( TQColor(255,255,255) ); pnt.drawRect( 0, 0, width(), height() ); pnt.drawText( 2, 16, name() );*/ } /***********************************************************************/ -KaimanStyleAnimation::KaimanStyleAnimation(int delay, QWidget *parent, const char *name) +KaimanStyleAnimation::KaimanStyleAnimation(int delay, TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _delay = delay; _frame = 0; - _timer = new QTimer( this ); - connect( _timer, SIGNAL(timeout()), this, SLOT(timeout()) ); + _timer = new TQTimer( this ); + connect( _timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); } KaimanStyleAnimation::~KaimanStyleAnimation() @@ -774,7 +774,7 @@ void KaimanStyleAnimation::timeout() /***********************************************************************/ -KaimanStyleState::KaimanStyleState(QWidget *parent, const char *name) +KaimanStyleState::KaimanStyleState(TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _value = 0; @@ -790,7 +790,7 @@ void KaimanStyleState::setValue( int value ) setPixmap( _value ); } -void KaimanStyleState::mousePressEvent(QMouseEvent *qme) +void KaimanStyleState::mousePressEvent(TQMouseEvent *qme) { emit clicked(); KaimanStyleMasked::mouseReleaseEvent( qme ); @@ -799,8 +799,8 @@ void KaimanStyleState::mousePressEvent(QMouseEvent *qme) /***********************************************************************/ -KaimanStyle::KaimanStyle( QWidget *parent, const char *name ) - : QWidget( parent, name ) +KaimanStyle::KaimanStyle( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { i_qw_parent = parent; i_eventSemaphore = false; @@ -812,17 +812,17 @@ KaimanStyle::~KaimanStyle() } -int KaimanStyle::parseStyleFile(QString &l_s_tmpName) +int KaimanStyle::parseStyleFile(TQString &l_s_tmpName) { int l_i_ret = false; - QStringList l_s_tokens; + TQStringList l_s_tokens; - QFile l_fd(l_s_tmpName); + TQFile l_fd(l_s_tmpName); if ( l_fd.open(IO_ReadOnly) ) { // file opened successfully - QTextStream l_ts_line( &l_fd ); - QString l_s_textLine, l_s_token; + TQTextStream l_ts_line( &l_fd ); + TQString l_s_textLine, l_s_token; while ( !l_ts_line.eof() ) { // Clear list of tokens (we are going to fill them now) l_s_tokens.clear(); @@ -865,15 +865,15 @@ int KaimanStyle::parseStyleFile(QString &l_s_tmpName) /* This function gets a list of tokens and inserts a new KaimanStyleElement in I_styleElem. */ -void KaimanStyle::interpretTokens(QStringList& ref_s_tokens) +void KaimanStyle::interpretTokens(TQStringList& ref_s_tokens) { if ( ref_s_tokens.count() < 1 ) { // A list with less than 1 item is useless to us return; } - QString l_s_tokenTypes; - const QString &l_s_elem = ref_s_tokens.first(); + TQString l_s_tokenTypes; + const TQString &l_s_elem = ref_s_tokens.first(); bool l_vertPixmaps = false; int l_i_pmIndex[KaimanStyleButton::StateListEND]; for (int i=0; i<KaimanStyleButton::StateListEND; i++) l_i_pmIndex[i]=0; @@ -1027,7 +1027,7 @@ void KaimanStyle::interpretTokens(QStringList& ref_s_tokens) 1) Create a new KaimanStyle*, that is inserted into I_styleElem. 2) Fill the KaimanStyleElement structure, by interpreting the tokens. */ - QStringList::Iterator li_s_tokens = ref_s_tokens.begin(); + TQStringList::Iterator li_s_tokens = ref_s_tokens.begin(); ++ li_s_tokens; // Skip the name of the element // 1) Create a new KaimanStyleElement, that is inserted into I_styleElem. @@ -1140,7 +1140,7 @@ void KaimanStyle::interpretTokens(QStringList& ref_s_tokens) // Take the first item from the l_s_tokenTypes; char l_c_type = (l_s_tokenTypes[0]).latin1(); l_s_tokenTypes = l_s_tokenTypes.mid(1); - QString l_s_token = *li_s_tokens; + TQString l_s_token = *li_s_tokens; switch(l_c_type) { case 'f': // filename @@ -1326,10 +1326,10 @@ void KaimanStyle::interpretTokens(QStringList& ref_s_tokens) } -QString KaimanStyle::getToken(QString &val_s_string, char val_c_separator) +TQString KaimanStyle::getToken(TQString &val_s_string, char val_c_separator) { int l_i_pos; - QString l_s_token; + TQString l_s_token; // Find the first occurrence of the separator l_i_pos = val_s_string.find(val_c_separator, 0, false); @@ -1351,15 +1351,15 @@ QString KaimanStyle::getToken(QString &val_s_string, char val_c_separator) -bool KaimanStyle::loadStyle(const QString &styleName, const QString &descFile) +bool KaimanStyle::loadStyle(const TQString &styleName, const TQString &descFile) { bool l_b_ret = true; int l_i_ret = 0; - QString l_s_tmpName; + TQString l_s_tmpName; i_skinName = styleName; this->i_s_styleName = styleName; - i_s_styleBase = QString("skins/kaiman/") + i_s_styleName + QString("/"); + i_s_styleBase = TQString("skins/kaiman/") + i_s_styleName + TQString("/"); l_s_tmpName = locate("appdata", i_s_styleBase + descFile ); if ( l_s_tmpName.isNull() ) { @@ -1390,14 +1390,14 @@ bool KaimanStyle::loadStyle(const QString &styleName, const QString &descFile) return l_b_ret; } -bool KaimanStyle::eventFilter( QObject *o, QEvent *e ) +bool KaimanStyle::eventFilter( TQObject *o, TQEvent *e ) { /* HACK! HACK! HACK! */ if ( !i_eventSemaphore ) - if ( e->type()==QEvent::MouseMove || e->type()==QEvent::MouseButtonPress || - e->type()==QEvent::MouseButtonRelease ) + if ( e->type()==TQEvent::MouseMove || e->type()==TQEvent::MouseButtonPress || + e->type()==TQEvent::MouseButtonRelease ) { - QMouseEvent *m = (QMouseEvent*)e; + TQMouseEvent *m = (TQMouseEvent*)e; // handle noatun context menu if (m->button()==RightButton) { @@ -1405,37 +1405,37 @@ bool KaimanStyle::eventFilter( QObject *o, QEvent *e ) return true; } - QPoint mousePos( m->x()+static_cast<QWidget *>(o)->x(), - m->y()+static_cast<QWidget *>(o)->y() ); - QWidget *slider = 0; + TQPoint mousePos( m->x()+static_cast<TQWidget *>(o)->x(), + m->y()+static_cast<TQWidget *>(o)->y() ); + TQWidget *slider = 0; /* find slider that is under the mouse position */ - for ( QWidget *s = i_sliders.first(); s!=0; s=i_sliders.next() ) + for ( TQWidget *s = i_sliders.first(); s!=0; s=i_sliders.next() ) { - QRect sliderRect( s->pos(), s->size() ); + TQRect sliderRect( s->pos(), s->size() ); if ( sliderRect.contains(mousePos) ) slider = s; } /* the slider the mouse events instead of the visible widget */ if ( slider ) { - QMouseEvent newMouseEvent( m->type(), mousePos-slider->pos(), + TQMouseEvent newMouseEvent( m->type(), mousePos-slider->pos(), m->globalPos(), m->button(), m->state() ); i_eventSemaphore = true; - bool ret = QApplication::sendEvent( slider, &newMouseEvent ); + bool ret = TQApplication::sendEvent( slider, &newMouseEvent ); i_eventSemaphore = false; return ret; } } - return QWidget::eventFilter( o, e ); // standard event processing + return TQWidget::eventFilter( o, e ); // standard event processing } bool KaimanStyle::loadPixmaps() { - QString l_s_tmpName; - QPixmap *l_pixmap_Background = 0, *l_pixmap_Mask = 0; + TQString l_s_tmpName; + TQPixmap *l_pixmap_Background = 0, *l_pixmap_Mask = 0; KaimanStyleElement *l_kse_elem; for ( uint l_i_elem = 0; l_i_elem<I_styleElem.count(); l_i_elem++) { @@ -1460,9 +1460,9 @@ bool KaimanStyle::loadPixmaps() int l_i_width_Mask = l_pixmap_Mask->width(); int l_i_height_Mask = l_pixmap_Mask->height(); - QImage l_image_MaskOrig = l_pixmap_Mask->convertToImage(); + TQImage l_image_MaskOrig = l_pixmap_Mask->convertToImage(); - QImage l_image_Mask(l_i_width_Mask,l_i_height_Mask, 1, 2, QImage::LittleEndian); + TQImage l_image_Mask(l_i_width_Mask,l_i_height_Mask, 1, 2, TQImage::LittleEndian); l_image_Mask.setColor( 0, 0x00ffffff ); l_image_Mask.setColor( 1, 0 ); l_image_Mask.fill( 0xff ); @@ -1487,7 +1487,7 @@ bool KaimanStyle::loadPixmaps() } -QBitmap* KaimanStyle::Mask() +TQBitmap* KaimanStyle::Mask() { return &i_bitmap_Mask; } @@ -1495,7 +1495,7 @@ QBitmap* KaimanStyle::Mask() KaimanStyleElement* KaimanStyle::find(const char *val_s_elemName) { for (uint i=0; i< I_styleElem.count(); i++) { - if ( I_styleElem[i]->element == QString(val_s_elemName)) { + if ( I_styleElem[i]->element == TQString(val_s_elemName)) { return I_styleElem[i]; } } diff --git a/noatun/modules/kaiman/style.h b/noatun/modules/kaiman/style.h index 4266bc42..1f2bc788 100644 --- a/noatun/modules/kaiman/style.h +++ b/noatun/modules/kaiman/style.h @@ -21,27 +21,27 @@ #ifndef KaimanStyle_H #define KaimanStyle_H -#include <qstring.h> -#include <qwidget.h> -#include <qpixmap.h> -#include <qbitmap.h> -#include <qimage.h> -#include <qevent.h> -#include <qptrvector.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqimage.h> +#include <tqevent.h> +#include <tqptrvector.h> class KaimanStyleElement : public QWidget { Q_OBJECT public: - KaimanStyleElement(QWidget *parent, const char *name=0); + KaimanStyleElement(TQWidget *parent, const char *name=0); ~KaimanStyleElement(); - virtual void loadPixmaps(QString &val_s_filename); + virtual void loadPixmaps(TQString &val_s_filename); - QString element; - QString filename; - QPoint upperLeft; - QSize dimension; + TQString element; + TQString filename; + TQPoint upperLeft; + TQSize dimension; bool options[3]; int digits; @@ -52,15 +52,15 @@ public: int pixmapLines; int pixmapColumns; - QPtrVector<QPixmap> pixmaps; + TQPtrVector<TQPixmap> pixmaps; public slots: void setPixmap( int num ); protected: - void paintEvent(QPaintEvent *qpe); - void dropEvent( QDropEvent *event ); - void dragEnterEvent( QDragEnterEvent *event ); + void paintEvent(TQPaintEvent *qpe); + void dropEvent( TQDropEvent *event ); + void dragEnterEvent( TQDragEnterEvent *event ); int pixmapNum; @@ -73,10 +73,10 @@ class KaimanStyleMasked : public KaimanStyleElement { Q_OBJECT public: - KaimanStyleMasked(QWidget *parent, const char *name=0) + KaimanStyleMasked(TQWidget *parent, const char *name=0) : KaimanStyleElement( parent, name ) {}; - virtual void loadPixmaps(QString &val_s_filename) + virtual void loadPixmaps(TQString &val_s_filename) { KaimanStyleElement::loadPixmaps( val_s_filename ); if(pixmaps[0]->mask()) @@ -89,13 +89,13 @@ class KaimanStyleButton : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleButton(QWidget *parent, const char *name=0); + KaimanStyleButton(TQWidget *parent, const char *name=0); ~KaimanStyleButton(); // Button states. enum { NormalUp=0, NormalDown, LitUp, LitDown, PrelightUp, PrelightLitUp, StateListEND }; - QPtrVector<int> I_pmIndex; + TQPtrVector<int> I_pmIndex; void setLit(bool); void setPrelight(bool); @@ -109,10 +109,10 @@ signals: void clicked(); protected: - void mousePressEvent(QMouseEvent *qme); - void mouseReleaseEvent(QMouseEvent *qme); - void enterEvent(QEvent * ); - void leaveEvent ( QEvent * ); + void mousePressEvent(TQMouseEvent *qme); + void mouseReleaseEvent(TQMouseEvent *qme); + void enterEvent(TQEvent * ); + void leaveEvent ( TQEvent * ); private: int i_i_currentState; @@ -126,7 +126,7 @@ class KaimanStyleSlider : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleSlider(int min, int max, QWidget *parent, const char *name=0); + KaimanStyleSlider(int min, int max, TQWidget *parent, const char *name=0); ~KaimanStyleSlider(); int value() { return _value; }; @@ -144,12 +144,12 @@ signals: void newValueDrop( int value ); protected: - void mouseMoveEvent(QMouseEvent *qme); - void mousePressEvent(QMouseEvent *qme); - void mouseReleaseEvent(QMouseEvent *qme); - void paintEvent(QPaintEvent *qpe); - void enterEvent(QEvent * ); - void leaveEvent ( QEvent * ); + void mouseMoveEvent(TQMouseEvent *qme); + void mousePressEvent(TQMouseEvent *qme); + void mouseReleaseEvent(TQMouseEvent *qme); + void paintEvent(TQPaintEvent *qpe); + void enterEvent(TQEvent * ); + void leaveEvent ( TQEvent * ); int pos2value( int x, int y ); @@ -164,18 +164,18 @@ class KaimanStyleBackground : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleBackground(QWidget *parent, const char *name=0); + KaimanStyleBackground(TQWidget *parent, const char *name=0); ~KaimanStyleBackground(); protected: - void mousePressEvent(QMouseEvent *qme); - void mouseReleaseEvent(QMouseEvent *qme); - void mouseMoveEvent(QMouseEvent *qme); + void mousePressEvent(TQMouseEvent *qme); + void mouseReleaseEvent(TQMouseEvent *qme); + void mouseMoveEvent(TQMouseEvent *qme); private: bool i_b_move; - QPoint i_point_dragStart; - QPoint i_point_lastPos; + TQPoint i_point_dragStart; + TQPoint i_point_lastPos; }; @@ -183,7 +183,7 @@ class KaimanStyleValue : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleValue(int min, int max, QWidget *parent, const char *name=0); + KaimanStyleValue(int min, int max, TQWidget *parent, const char *name=0); ~KaimanStyleValue(); int value() { return _value; }; @@ -201,7 +201,7 @@ class KaimanStyleState : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleState(QWidget *parent, const char *name=0); + KaimanStyleState(TQWidget *parent, const char *name=0); ~KaimanStyleState(); int value() { return _value; }; @@ -213,7 +213,7 @@ signals: void clicked(); protected: - void mousePressEvent(QMouseEvent *qme); + void mousePressEvent(TQMouseEvent *qme); private: int _value; @@ -224,10 +224,10 @@ class KaimanStyleNumber : public KaimanStyleElement { Q_OBJECT public: - KaimanStyleNumber(QWidget *parent, const char *name=0); + KaimanStyleNumber(TQWidget *parent, const char *name=0); ~KaimanStyleNumber(); - virtual void loadPixmaps(QString &val_s_filename); + virtual void loadPixmaps(TQString &val_s_filename); static const bool optionCentered = 1; @@ -237,7 +237,7 @@ public slots: void setValue( int value ); protected: - void paintEvent(QPaintEvent *qpe); + void paintEvent(TQPaintEvent *qpe); private: int _value; @@ -248,33 +248,33 @@ class KaimanStyleText : public KaimanStyleElement { Q_OBJECT public: - KaimanStyleText(QWidget *parent, const char *name=0); + KaimanStyleText(TQWidget *parent, const char *name=0); ~KaimanStyleText(); - virtual void loadPixmaps(QString &val_s_filename); + virtual void loadPixmaps(TQString &val_s_filename); static const bool optionExtended; - QString value() { return _value; }; + TQString value() { return _value; }; void startAnimation( int delay ); void stopAnimation(); public slots: - void setValue( QString value ); + void setValue( TQString value ); protected: - void paintEvent(QPaintEvent *qpe); + void paintEvent(TQPaintEvent *qpe); protected slots: void timeout(); private: - QString _value; + TQString _value; int _pos; int _direction; int _delay; - QTimer *_timer; + TQTimer *_timer; }; @@ -282,7 +282,7 @@ class KaimanStyleAnimation : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleAnimation(int delay, QWidget *parent, const char *name=0); + KaimanStyleAnimation(int delay, TQWidget *parent, const char *name=0); ~KaimanStyleAnimation(); public slots: @@ -295,14 +295,14 @@ protected: private: int _delay,_frame; - QTimer *_timer; + TQTimer *_timer; }; class KaimanStyle : public QWidget { Q_OBJECT public: - KaimanStyle(QWidget *parent, const char *name=0); + KaimanStyle(TQWidget *parent, const char *name=0); ~KaimanStyle(); enum { background, mask, play_Button, stop_Button, pause_Button, prev_Button, next_Button, repeat_Button, shuffle_Button, playlist_Button, mixer_Button, exit_Button, Iconify_Button, Config_Button, Alt_Skin_Button, Minute_Number, Second_Number, in_Rate_Number, in_Hz_Number, song_Number, status_Item, cPU_Number, digit_Large, digit_Small_Default, title, volume_Item, volume_Slider, position_Item, position_Slider }; @@ -313,43 +313,43 @@ public: KaimanStyleElement* find(const char* val_s_elemName); /// Tries to load the given style and returns success (true) or failure (false) - bool loadStyle(const QString &styleName, const QString &descFile="skindata" ); - QString skinName() { return i_skinName; }; + bool loadStyle(const TQString &styleName, const TQString &descFile="skindata" ); + TQString skinName() { return i_skinName; }; /// Returns the mask - QBitmap* Mask(); + TQBitmap* Mask(); - virtual bool eventFilter( QObject *o, QEvent *e ); + virtual bool eventFilter( TQObject *o, TQEvent *e ); private: // Parses the "skindata" file and returns success (true) or failure (false) - int parseStyleFile(QString &l_s_tmpName); - QString getToken(QString &val_s_string, char val_c_separator); - void interpretTokens(QStringList& ref_s_tokens); + int parseStyleFile(TQString &l_s_tmpName); + TQString getToken(TQString &val_s_string, char val_c_separator); + void interpretTokens(TQStringList& ref_s_tokens); bool loadPixmaps(); /// The name of the style, e.g. "k9" - QString i_s_styleName; + TQString i_s_styleName; /// The base directory, where the style is found. For example /// "/opt/kde/share/apps/kaiman/Skins/k9/" or "/opt/kde/share/apps/kaiman/Skins/k9.tgz" - QString i_s_styleBase; + TQString i_s_styleBase; // The mask of the complete style. Used for doing shaped windows - QBitmap i_bitmap_Mask; + TQBitmap i_bitmap_Mask; /// All style elements are stored here. - QPtrVector<KaimanStyleElement> I_styleElem; + TQPtrVector<KaimanStyleElement> I_styleElem; // The parent window. In other words: The container that holds all the KaimanStyleElement's - QWidget* i_qw_parent; + TQWidget* i_qw_parent; - QPtrList<QWidget> i_sliders; + TQPtrList<TQWidget> i_sliders; bool i_eventSemaphore; - QString i_smallFont; - QString i_largeFont; - QString i_skinName; + TQString i_smallFont; + TQString i_largeFont; + TQString i_skinName; }; diff --git a/noatun/modules/kaiman/userinterface.cpp b/noatun/modules/kaiman/userinterface.cpp index 08036a59..b1ae2570 100644 --- a/noatun/modules/kaiman/userinterface.cpp +++ b/noatun/modules/kaiman/userinterface.cpp @@ -30,13 +30,13 @@ #include "userinterface.h" #include "pref.h" -#include <qcursor.h> -#include <qpixmap.h> -#include <qbitmap.h> -#include <qimage.h> -#include <qdropsite.h> -#include <qdragobject.h> -#include <qtimer.h> +#include <tqcursor.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqimage.h> +#include <tqdropsite.h> +#include <tqdragobject.h> +#include <tqtimer.h> #include <kfiledialog.h> #include <kdebug.h> @@ -84,7 +84,7 @@ Kaiman::Kaiman() config->setGroup("Kaiman"); // load skin - QString skinName = config->readEntry( "SkinResource", DEFAULT_SKIN ); + TQString skinName = config->readEntry( "SkinResource", DEFAULT_SKIN ); if ( !changeStyle(skinName, "skindata") ) { @@ -92,22 +92,22 @@ Kaiman::Kaiman() if ( !changeStyle( DEFAULT_SKIN, "skindata" ) ) { KMessageBox::error( this, i18n("Cannot load default skin %1.").arg(DEFAULT_SKIN) ); - QTimer::singleShot( 0, this, SLOT(close()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(close()) ); return; } } // global connects - connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), this, SLOT(show()) ); + connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); - connect( napp->player(), SIGNAL(playing()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(stopped()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(paused()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(timeout()), this, SLOT(timeout())); - connect( napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(loopTypeChange(int))); - connect( napp->player(), SIGNAL(newSongLen(int,int)), this, SLOT(newSongLen(int,int))); - connect( napp->player(), SIGNAL(newSong()), this, SLOT(newSong())); + connect( napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); + connect( napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(loopTypeChange(int))); + connect( napp->player(), TQT_SIGNAL(newSongLen(int,int)), this, TQT_SLOT(newSongLen(int,int))); + connect( napp->player(), TQT_SIGNAL(newSong()), this, TQT_SLOT(newSong())); if( napp->player()->isPlaying() ) newSong(); @@ -123,9 +123,9 @@ Kaiman::~Kaiman() } -bool Kaiman::changeStyle( const QString &style, const QString &desc ) +bool Kaiman::changeStyle( const TQString &style, const TQString &desc ) { - QString ldesc = desc; + TQString ldesc = desc; if ( ldesc.isEmpty() ) ldesc = _altSkin ? "alt_skindata" : "skindata"; @@ -146,7 +146,7 @@ bool Kaiman::changeStyle( const QString &style, const QString &desc ) } -bool Kaiman::loadStyle( const QString &style, const QString &desc ) +bool Kaiman::loadStyle( const TQString &style, const TQString &desc ) { if ( _style ) delete _style; _style = new KaimanStyle(this); @@ -165,7 +165,7 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } KaimanStyleElement* item = _style->find("Background"); - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); if ( item!=0 ) { _style->resize( item->width(), item->height()); @@ -174,64 +174,64 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } item = _style->find("Playlist_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(toggleListView()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView()) ); item = _style->find("Play_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); item = _style->find("Pause_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); item = _style->find("Stop_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(stop()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()) ); item = _style->find("Next_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(forward()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()) ); item = _style->find("Prev_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(back()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()) ); item = _style->find("Exit_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(close()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(close()) ); item = _style->find("Mixer_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(execMixer()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(execMixer()) ); item = _style->find("Iconify_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(showMinimized()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMinimized()) ); item = _style->find("Alt_Skin_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleSkin()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleSkin()) ); item = _style->find("Repeat_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleLoop()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleLoop()) ); item = _style->find("Shuffle_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleShuffle()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleShuffle()) ); item = _style->find("Config_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp, SLOT(preferences()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp, TQT_SLOT(preferences()) ); item = _style->find("Volume_Up_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this,SLOT(volumeUp())); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeUp())); item = _style->find("Volume_Down_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this,SLOT(volumeDown())); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeDown())); KaimanStyleSlider* slider = static_cast<KaimanStyleSlider*>(_style->find("Position_Slider")); if( slider!=0 ) { - connect( slider, SIGNAL(newValueDrag(int)), this, SLOT(seekStart(int)) ); - connect( slider, SIGNAL(newValue(int)), this, SLOT(seekDrag(int)) ); - connect( slider, SIGNAL(newValueDrop(int)), this, SLOT(seekStop(int)) ); + connect( slider, TQT_SIGNAL(newValueDrag(int)), this, TQT_SLOT(seekStart(int)) ); + connect( slider, TQT_SIGNAL(newValue(int)), this, TQT_SLOT(seekDrag(int)) ); + connect( slider, TQT_SIGNAL(newValueDrop(int)), this, TQT_SLOT(seekStop(int)) ); slider->setValue( 0, 0, 1000 ); } slider = static_cast<KaimanStyleSlider*>(_style->find("Volume_Slider")); if ( slider!=0 ) { - connect(slider, SIGNAL(newValue(int)), this, SLOT(setVolume(int))); + connect(slider, TQT_SIGNAL(newValue(int)), this, TQT_SLOT(setVolume(int))); slider->setValue( napp->player()->volume(), 0, 100 ); } @@ -247,25 +247,25 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } -void Kaiman::closeEvent(QCloseEvent*) +void Kaiman::closeEvent(TQCloseEvent*) { unload(); } -void Kaiman::dragEnterEvent( QDragEnterEvent *event ) +void Kaiman::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode(event) ); } -void Kaiman::dropEvent( QDropEvent *event ) +void Kaiman::dropEvent( TQDropEvent *event ) { doDropEvent(event); } -void Kaiman::doDropEvent(QDropEvent *event) +void Kaiman::doDropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -330,18 +330,18 @@ void Kaiman::toggleSkin() { _altSkin = !_altSkin; - QString skinName = _style->skinName(); + TQString skinName = _style->skinName(); - QString oldDesc, newDesc; + TQString oldDesc, newDesc; if ( _altSkin ) { - oldDesc = QString::fromLatin1("skindata"); - newDesc = QString::fromLatin1("alt_skindata"); + oldDesc = TQString::fromLatin1("skindata"); + newDesc = TQString::fromLatin1("alt_skindata"); } else { - newDesc = QString::fromLatin1("skindata"); - oldDesc = QString::fromLatin1("alt_skindata"); + newDesc = TQString::fromLatin1("skindata"); + oldDesc = TQString::fromLatin1("alt_skindata"); } if ( !changeStyle(skinName, newDesc) ) @@ -372,7 +372,7 @@ void Kaiman::volumeDown() void Kaiman::execMixer() { - kapp->startServiceByDesktopName ( QString::fromLatin1("kmix"), QString::null ); + kapp->startServiceByDesktopName ( TQString::fromLatin1("kmix"), TQString::null ); } @@ -424,7 +424,7 @@ void Kaiman::timeout() if ( numItem ) numItem->setValue(item.property("bitrate").toInt()); - QString hzString = item.property("samplerate"); + TQString hzString = item.property("samplerate"); hzString.truncate(2); numItem = static_cast<KaimanStyleNumber*>(_style->find("In_Hz_Number")); @@ -513,7 +513,7 @@ void Kaiman::newSong() KaimanStyleText* titleItem = static_cast<KaimanStyleText*>(_style->find("Title")); if ( titleItem ) { - QString title = i18n("Noatun"); + TQString title = i18n("Noatun"); if ( napp->player()->current() ) { title = napp->player()->current().title(); @@ -546,7 +546,7 @@ void Kaiman::toggleLoop() (int)(Player::Random)); loopMenu->setItemChecked((int)napp->player()->loopStyle(), true); // select current loopstyle in menu - selectedItem = loopMenu->exec(QCursor::pos()); + selectedItem = loopMenu->exec(TQCursor::pos()); if (selectedItem != -1) napp->player()->loop(selectedItem); // set new loopstyle diff --git a/noatun/modules/kaiman/userinterface.h b/noatun/modules/kaiman/userinterface.h index 9df9cb3c..63b4133e 100644 --- a/noatun/modules/kaiman/userinterface.h +++ b/noatun/modules/kaiman/userinterface.h @@ -39,12 +39,12 @@ Q_OBJECT Kaiman(); virtual ~Kaiman(); - bool changeStyle( const QString &style, const QString &desc=QString::null ); + bool changeStyle( const TQString &style, const TQString &desc=TQString::null ); public slots: - void dropEvent( QDropEvent * ); - void doDropEvent( QDropEvent * ); - void dragEnterEvent( QDragEnterEvent * ); - void closeEvent(QCloseEvent*); + void dropEvent( TQDropEvent * ); + void doDropEvent( TQDropEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); + void closeEvent(TQCloseEvent*); protected slots: void seekStart( int ); @@ -73,7 +73,7 @@ Q_OBJECT static Kaiman *kaiman; protected: - bool loadStyle( const QString &style, const QString &desc ); + bool loadStyle( const TQString &style, const TQString &desc ); bool _seeking; diff --git a/noatun/modules/keyz/keyz.cpp b/noatun/modules/keyz/keyz.cpp index 7b32cf98..f35fddc7 100644 --- a/noatun/modules/keyz/keyz.cpp +++ b/noatun/modules/keyz/keyz.cpp @@ -3,12 +3,12 @@ #include <noatun/app.h> #include <noatun/playlist.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kglobalaccel.h> #include <kkeydialog.h> #include <klocale.h> -#include <qclipboard.h> +#include <tqclipboard.h> #include "keyz.h" @@ -22,7 +22,7 @@ extern "C" KGlobalAccel * Keyz::s_accel = 0L; -Keyz::Keyz() : QObject( 0L, "Keyz" ), Plugin(), preMuteVol(0) +Keyz::Keyz() : TQObject( 0L, "Keyz" ), Plugin(), preMuteVol(0) { NOATUNPLUGINC(Keyz); Player *player = napp->player(); @@ -30,58 +30,58 @@ Keyz::Keyz() : QObject( 0L, "Keyz" ), Plugin(), preMuteVol(0) if ( !s_accel ) { s_accel = new KGlobalAccel( this, "noatunglobalaccel" ); - s_accel->insert( "PlayPause", i18n("Play/Pause"), QString::null, + s_accel->insert( "PlayPause", i18n("Play/Pause"), TQString::null, CTRL+ALT+Key_P, KKey::QtWIN+CTRL+Key_P, - player, SLOT( playpause() )); - s_accel->insert( "Stop", i18n("Stop Playing"), QString::null, + player, TQT_SLOT( playpause() )); + s_accel->insert( "Stop", i18n("Stop Playing"), TQString::null, CTRL+ALT+Key_S, KKey::QtWIN+CTRL+Key_S, - player, SLOT( stop() )); - s_accel->insert( "Back", i18n("Back"), QString::null, + player, TQT_SLOT( stop() )); + s_accel->insert( "Back", i18n("Back"), TQString::null, CTRL+ALT+Key_Left, KKey::QtWIN+CTRL+Key_Left, - player, SLOT( back() )); - s_accel->insert( "Forward", i18n("Forward"), QString::null, + player, TQT_SLOT( back() )); + s_accel->insert( "Forward", i18n("Forward"), TQString::null, CTRL+ALT+Key_Right, KKey::QtWIN+CTRL+Key_Right, - player, SLOT( forward() )); - s_accel->insert( "Playlist", i18n("Show/Hide Playlist"), QString::null, + player, TQT_SLOT( forward() )); + s_accel->insert( "Playlist", i18n("Show/Hide Playlist"), TQString::null, CTRL+ALT+Key_L, KKey::QtWIN+CTRL+Key_L, - player, SLOT( toggleListView() )); - s_accel->insert( "OpenFile", i18n("Open File to Play"), QString::null, + player, TQT_SLOT( toggleListView() )); + s_accel->insert( "OpenFile", i18n("Open File to Play"), TQString::null, CTRL+ALT+Key_O, KKey::QtWIN+CTRL+Key_O, - napp, SLOT( fileOpen() )); - s_accel->insert( "Effects", i18n("Effects Configuration"), QString::null, + napp, TQT_SLOT( fileOpen() )); + s_accel->insert( "Effects", i18n("Effects Configuration"), TQString::null, CTRL+ALT+Key_E, KKey::QtWIN+CTRL+Key_E, - napp, SLOT( effectView() )); - s_accel->insert( "Preferences", i18n("Preferences"), QString::null, + napp, TQT_SLOT( effectView() )); + s_accel->insert( "Preferences", i18n("Preferences"), TQString::null, CTRL+ALT+Key_F, KKey::QtWIN+CTRL+Key_F, - napp, SLOT( preferences() )); - s_accel->insert( "VolumeUp", i18n("Volume Up"), QString::null, + napp, TQT_SLOT( preferences() )); + s_accel->insert( "VolumeUp", i18n("Volume Up"), TQString::null, CTRL+ALT+SHIFT+Key_Up, KKey::QtWIN+CTRL+SHIFT+Key_Up, - this, SLOT( slotVolumeUp() )); - s_accel->insert( "VolumeDown", i18n("Volume Down"), QString::null, + this, TQT_SLOT( slotVolumeUp() )); + s_accel->insert( "VolumeDown", i18n("Volume Down"), TQString::null, CTRL+ALT+SHIFT+Key_Down, KKey::QtWIN+CTRL+SHIFT+Key_Down, - this, SLOT( slotVolumeDown() )); - s_accel->insert( "Mute", i18n("Mute"), QString::null, + this, TQT_SLOT( slotVolumeDown() )); + s_accel->insert( "Mute", i18n("Mute"), TQString::null, CTRL+ALT+Key_M, KKey::QtWIN+CTRL+Key_M, - this, SLOT( slotMute() )); - s_accel->insert( "SeekForward", i18n("Seek Forward"), QString::null, + this, TQT_SLOT( slotMute() )); + s_accel->insert( "SeekForward", i18n("Seek Forward"), TQString::null, CTRL+ALT+SHIFT+Key_Right, KKey::QtWIN+CTRL+SHIFT+Key_Right, - this, SLOT( slotForward() )); - s_accel->insert( "SeekBackward", i18n("Seek Backward"), QString::null, + this, TQT_SLOT( slotForward() )); + s_accel->insert( "SeekBackward", i18n("Seek Backward"), TQString::null, CTRL+ALT+SHIFT+Key_Left, KKey::QtWIN+CTRL+SHIFT+Key_Left, - this, SLOT( slotBackward() )); - s_accel->insert( "NextSection", i18n("Next Section"), QString::null, + this, TQT_SLOT( slotBackward() )); + s_accel->insert( "NextSection", i18n("Next Section"), TQString::null, 0, 0, - this, SLOT( slotNextSection() )); - s_accel->insert( "PrevSection", i18n("Previous Section"), QString::null, + this, TQT_SLOT( slotNextSection() )); + s_accel->insert( "PrevSection", i18n("Previous Section"), TQString::null, 0, 0, - this, SLOT( slotPrevSection() )); - s_accel->insert( "CopyTitle", i18n("Copy Song Title to Clipboard"), QString::null, + this, TQT_SLOT( slotPrevSection() )); + s_accel->insert( "CopyTitle", i18n("Copy Song Title to Clipboard"), TQString::null, CTRL+ALT+Key_C, KKey::QtWIN+CTRL+Key_C, - this, SLOT( slotCopyTitle() )); + this, TQT_SLOT( slotCopyTitle() )); - s_accel->insert( "ToggleGUI", i18n("Show/Hide Main Window"), QString::null, + s_accel->insert( "ToggleGUI", i18n("Show/Hide Main Window"), TQString::null, CTRL+ALT+Key_W, KKey::QtWIN+CTRL+Key_W, - napp, SLOT( toggleInterfaces() )); + napp, TQT_SLOT( toggleInterfaces() )); s_accel->readSettings(); s_accel->updateConnections(); @@ -170,11 +170,11 @@ void Keyz::slotMute() /////////////////////////////////////////////////////////////////// -KeyzPrefs::KeyzPrefs( QObject *parent ) : +KeyzPrefs::KeyzPrefs( TQObject *parent ) : CModule( i18n("Keyz"), i18n("Shortcut Configuration"), "key_bindings", parent ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); m_chooser = new KKeyChooser( Keyz::accel(), this ); layout->addWidget( m_chooser ); } diff --git a/noatun/modules/keyz/keyz.h b/noatun/modules/keyz/keyz.h index 929e6c67..e6682531 100644 --- a/noatun/modules/keyz/keyz.h +++ b/noatun/modules/keyz/keyz.h @@ -4,7 +4,7 @@ #include <noatun/pref.h> #include <noatun/plugin.h> -class Keyz : public QObject, public Plugin +class Keyz : public TQObject, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -37,7 +37,7 @@ class KeyzPrefs : public CModule Q_OBJECT public: - KeyzPrefs( QObject *parent ); + KeyzPrefs( TQObject *parent ); virtual void save(); private: diff --git a/noatun/modules/kjofol-skin/helpers.cpp b/noatun/modules/kjofol-skin/helpers.cpp index b38822a6..0a2a9e67 100644 --- a/noatun/modules/kjofol-skin/helpers.cpp +++ b/noatun/modules/kjofol-skin/helpers.cpp @@ -43,9 +43,9 @@ static int isGray(QRgb r) // UPDATE: should work on both little and big endian now (haven't tested that!) // this code is taken from the QT-docu and I hope that this example // is one of the working ones ;) -inline void setPixel1BPP(QImage &image, int x, int y, bool value) +inline void setPixel1BPP(TQImage &image, int x, int y, bool value) { - if ( image.bitOrder() == QImage::LittleEndian ) + if ( image.bitOrder() == TQImage::LittleEndian ) { if (value) *(image.scanLine(y) + (x >> 3)) |= 1 << (x & 7); diff --git a/noatun/modules/kjofol-skin/kjbackground.cpp b/noatun/modules/kjofol-skin/kjbackground.cpp index 83c19ace..1c99b6ff 100644 --- a/noatun/modules/kjofol-skin/kjbackground.cpp +++ b/noatun/modules/kjofol-skin/kjbackground.cpp @@ -12,18 +12,18 @@ KJBackground::KJBackground(KJLoader *parent) : KJWidget(parent) { - QImage ibackground; + TQImage ibackground; mBackground = parent->pixmap(parser()["backgroundimage"][1]); ibackground = parent->image(parser()["backgroundimage"][1]); parent->setMask( getMask(ibackground) ); - parent->setFixedSize ( QSize(mBackground.width(), mBackground.height()) ); + parent->setFixedSize ( TQSize(mBackground.width(), mBackground.height()) ); setRect(0,0,parent->width(),parent->height()); } -void KJBackground::paint(QPainter *painter, const QRect &rect) +void KJBackground::paint(TQPainter *painter, const TQRect &rect) { bitBlt(painter->device(), rect.topLeft(), &mBackground, rect, Qt::CopyROP); } diff --git a/noatun/modules/kjofol-skin/kjbackground.h b/noatun/modules/kjofol-skin/kjbackground.h index 502611c5..d09d22c5 100644 --- a/noatun/modules/kjofol-skin/kjbackground.h +++ b/noatun/modules/kjofol-skin/kjbackground.h @@ -5,17 +5,17 @@ //#include "kjloader.h" class KJLoader; -#include <qpainter.h> +#include <tqpainter.h> class KJBackground : public KJWidget { public: KJBackground(KJLoader *); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &) {return false;} - virtual void mouseRelease(const QPoint &, bool) {} + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &) {return false;} + virtual void mouseRelease(const TQPoint &, bool) {} private: - QPixmap mBackground; + TQPixmap mBackground; }; #endif diff --git a/noatun/modules/kjofol-skin/kjbutton.cpp b/noatun/modules/kjofol-skin/kjbutton.cpp index 403ea61e..d051777e 100644 --- a/noatun/modules/kjofol-skin/kjbutton.cpp +++ b/noatun/modules/kjofol-skin/kjbutton.cpp @@ -16,7 +16,7 @@ #include <noatun/player.h> #include <noatun/vequalizer.h> -#include <qcursor.h> +#include <tqcursor.h> #include <kdebug.h> #include <klocale.h> #include <kpixmap.h> @@ -30,8 +30,8 @@ * KJButton *******************************************/ -KJButton::KJButton(const QStringList &i, KJLoader *parent) - : QObject(0), KJWidget(parent), mTitle(i[0]), mShowPressed(false) +KJButton::KJButton(const TQStringList &i, KJLoader *parent) + : TQObject(0), KJWidget(parent), mTitle(i[0]), mShowPressed(false) { // kdDebug(66666) << k_funcinfo << "new button: " << i[0].latin1() << endl; mPushedPixmap = (i.count() >= 7); @@ -44,18 +44,18 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent) ys=i[4].toInt()-y; // height setRect ( x, y, xs, ys ); - QStringList temp = i; + TQStringList temp = i; // search for selected button-type // can be either BMPx where x is a number representing one // of the background-images // or darken which means just darken the button on click bool gotBack = false; // in case any of these keys is duplicated - for(QStringList::Iterator it = temp.begin(); it != temp.end(); ++it) + for(TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it) { if((*it).contains("bmp")) { - QString pressedTmp = backgroundPressed((*it)); + TQString pressedTmp = backgroundPressed((*it)); if(!pressedTmp.isEmpty()) { mPressed = parent->pixmap(pressedTmp); @@ -68,7 +68,7 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent) // FIXME: what KPixmapEffect causes the desired effect? // intensity is the wrong one KPixmap temp = parent->pixmap(parser()["backgroundimage"][1]); - mPressed = (QPixmap)KPixmapEffect::intensity ( temp, 1.2f ); + mPressed = (TQPixmap)KPixmapEffect::intensity ( temp, 1.2f ); gotBack = true; } if(gotBack) @@ -87,24 +87,24 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent) if (mTitle=="playlistbutton") { mShowPressed = napp->playlist()->listVisible(); - connect( napp->player(), SIGNAL(playlistShown()), this, SLOT(slotPlaylistShown()) ); - connect( napp->player(), SIGNAL(playlistHidden()), this, SLOT(slotPlaylistHidden()) ); + connect( napp->player(), TQT_SIGNAL(playlistShown()), this, TQT_SLOT(slotPlaylistShown()) ); + connect( napp->player(), TQT_SIGNAL(playlistHidden()), this, TQT_SLOT(slotPlaylistHidden()) ); } else if ( mTitle=="equalizeroffbutton") // same goes for EQ buttons { mShowPressed = (!napp->vequalizer()->isEnabled()); - connect( napp->vequalizer(), SIGNAL(enabled(bool)), SLOT(slotEqEnabled(bool))); + connect( napp->vequalizer(), TQT_SIGNAL(enabled(bool)), TQT_SLOT(slotEqEnabled(bool))); } else if (mTitle=="equalizeronbutton") { mShowPressed = napp->vequalizer()->isEnabled(); - connect( napp->vequalizer(), SIGNAL(enabled(bool)), SLOT(slotEqEnabled(bool))); + connect( napp->vequalizer(), TQT_SIGNAL(enabled(bool)), TQT_SLOT(slotEqEnabled(bool))); } } -QString KJButton::tip() +TQString KJButton::tip() { - QString str; + TQString str; if (mTitle=="closebutton") str=i18n("Close"); else if (mTitle=="minimizebutton") @@ -149,13 +149,13 @@ QString KJButton::tip() return str; } -void KJButton::paint(QPainter *, const QRect &) +void KJButton::paint(TQPainter *, const TQRect &) { if (mShowPressed) bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP); } -bool KJButton::mousePress(const QPoint &) +bool KJButton::mousePress(const TQPoint &) { bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP); return true; @@ -191,7 +191,7 @@ void KJButton::slotEqEnabled(bool on) showPressed(!on); } -void KJButton::mouseRelease(const QPoint &, bool in) +void KJButton::mouseRelease(const TQPoint &, bool in) { // repaint with default image (player-background) repaint(false); @@ -233,7 +233,7 @@ void KJButton::mouseRelease(const QPoint &, bool in) loopMenu->insertItem(i18n("&Random"), static_cast<int>(Player::Random)); loopMenu->setItemChecked(static_cast<int>(napp->player()->loopStyle()), true); // select current loopstyle in menu - selectedItem = loopMenu->exec(QCursor::pos()); + selectedItem = loopMenu->exec(TQCursor::pos()); if (selectedItem != -1) napp->player()->loop(selectedItem); // set new loopstyle diff --git a/noatun/modules/kjofol-skin/kjbutton.h b/noatun/modules/kjofol-skin/kjbutton.h index 4af4fcb0..e995c533 100644 --- a/noatun/modules/kjofol-skin/kjbutton.h +++ b/noatun/modules/kjofol-skin/kjbutton.h @@ -2,21 +2,21 @@ #define KJBUTTON_H #include "kjwidget.h" -#include <qobject.h> +#include <tqobject.h> class KJLoader; -class KJButton : public QObject, public KJWidget +class KJButton : public TQObject, public KJWidget { Q_OBJECT public: - KJButton(const QStringList&, KJLoader *); + KJButton(const TQStringList&, KJLoader *); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void showPressed(bool b=true); - virtual QString tip(); + virtual TQString tip(); private slots: void slotPlaylistShown(void); @@ -24,10 +24,10 @@ private slots: void slotEqEnabled(bool on); private: - QPixmap mBackground; + TQPixmap mBackground; bool mPushedPixmap; - QPixmap mPressed; - QString mTitle; + TQPixmap mPressed; + TQString mTitle; bool mShowPressed; }; diff --git a/noatun/modules/kjofol-skin/kjequalizer.cpp b/noatun/modules/kjofol-skin/kjequalizer.cpp index 3f0716e4..51d50e97 100644 --- a/noatun/modules/kjofol-skin/kjequalizer.cpp +++ b/noatun/modules/kjofol-skin/kjequalizer.cpp @@ -8,16 +8,16 @@ #include "kjequalizer.h" #include "kjequalizer.moc" -#include <qpainter.h> -#include <qtimer.h> +#include <tqpainter.h> +#include <tqtimer.h> #include <kdebug.h> #include <kpixmap.h> #include <noatun/vequalizer.h> -KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p) - : QObject(0), KJWidget(p), mBack(0), mView(0), mInterpEq(0) +KJEqualizer::KJEqualizer(const TQStringList &l, KJLoader *p) + : TQObject(0), KJWidget(p), mBack(0), mView(0), mInterpEq(0) { int x=l[1].toInt(); int y=l[2].toInt(); @@ -32,12 +32,12 @@ KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p) // background under equalizer // needed to only blit onto screen ONCE and not for every band - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // buffer for view - mView = new QPixmap ( xs, ys ); + mView = new TQPixmap ( xs, ys ); mBandWidth=parser()["EqualizerBmp"][1].toInt(); mBandHalfHeight=parser()["EqualizerBmp"][2].toInt(); @@ -47,7 +47,7 @@ KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p) kdDebug(66666) << "[KJEqualizer] creating VInterpolation for " << mBands << " bands..." << endl; mInterpEq = new VInterpolation(mBands); // napp->vequalizer()->setBands(mBands); // FIXME: hack because spline sucks :P - connect(napp->vequalizer(), SIGNAL(changed()), this, SLOT(slotUpdateBuffer())); + connect(napp->vequalizer(), TQT_SIGNAL(changed()), this, TQT_SLOT(slotUpdateBuffer())); slotUpdateBuffer(); // fill mView pixmap with valid data } @@ -59,38 +59,38 @@ KJEqualizer::~KJEqualizer(void) delete mBack; } -int KJEqualizer::barNum(const QPoint &pos) const +int KJEqualizer::barNum(const TQPoint &pos) const { int x = pos.x(); x = x / mXSpace; return mInterpEq->bands() * x / mBands; } -int KJEqualizer::level(const QPoint &pos) const +int KJEqualizer::level(const TQPoint &pos) const { int y = ((-pos.y()) + mBandHalfHeight+1) * (200/mBandHalfHeight); return y; } -void KJEqualizer::paint(QPainter *p, const QRect &) +void KJEqualizer::paint(TQPainter *p, const TQRect &) { - QPixmap temp(rect().width(), rect().height()); + TQPixmap temp(rect().width(), rect().height()); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); // draw band sliders into buffer bitBlt( &temp, 0, 0, mView, 0, 0, rect().width(), rect().height(), Qt::CopyROP); // and draw it on screen - bitBlt(p->device(), rect().topLeft(), &temp, QRect(0,0,-1,-1), Qt::CopyROP); + bitBlt(p->device(), rect().topLeft(), &temp, TQRect(0,0,-1,-1), Qt::CopyROP); } void KJEqualizer::slotUpdateBuffer() { // kdDebug(66666) << "[KJEqualizer] slotUpdateBuffer() called." << endl; - QBitmap regionMask( rect().width(), rect().height(), true); // fully transparent mask - QPainter mask( ®ionMask ); + TQBitmap regionMask( rect().width(), rect().height(), true); // fully transparent mask + TQPainter mask( ®ionMask ); - QPoint destX = QPoint(0, 0); + TQPoint destX = TQPoint(0, 0); for (int band=0; band<mBands; band++) { @@ -102,10 +102,10 @@ void KJEqualizer::slotUpdateBuffer() // kdDebug(66666) << "[KJEqualizer] band=" << band << ", level=" << level << ", picNum=" << picNum << " @ xpos=" << xPos << "." << endl; - bitBlt(mView, destX, &mBars, QRect(xPos,0,mBandWidth,rect().height()), Qt::CopyROP); + bitBlt(mView, destX, &mBars, TQRect(xPos,0,mBandWidth,rect().height()), Qt::CopyROP); // make slider opaque in mask so you see something on screen mask.fillRect ( destX.x(), 0, mBandWidth, rect().height(), Qt::color1 ); - destX += QPoint(mXSpace,0); + destX += TQPoint(mXSpace,0); } // for() // whole thingy has been drawn, now set the mask @@ -113,13 +113,13 @@ void KJEqualizer::slotUpdateBuffer() repaint(); } -void KJEqualizer::mouseMove(const QPoint &p, bool in) +void KJEqualizer::mouseMove(const TQPoint &p, bool in) { if (!in) return; mousePress(p); } -bool KJEqualizer::mousePress(const QPoint &p) +bool KJEqualizer::mousePress(const TQPoint &p) { kdDebug(66666) << "[KJEqualizer] setting band " << mBands << "/" << barNum(p)+1 << " to level " << level(p) << endl; VBand b = mInterpEq->band( barNum(p) ); diff --git a/noatun/modules/kjofol-skin/kjequalizer.h b/noatun/modules/kjofol-skin/kjequalizer.h index f3f13bd5..be5535eb 100644 --- a/noatun/modules/kjofol-skin/kjequalizer.h +++ b/noatun/modules/kjofol-skin/kjequalizer.h @@ -6,20 +6,20 @@ class KJLoader; class VInterpolation; -#include <qobject.h> +#include <tqobject.h> -class KJEqualizer : public QObject, public KJWidget +class KJEqualizer : public TQObject, public KJWidget { Q_OBJECT public: - KJEqualizer(const QStringList &, KJLoader *parent); + KJEqualizer(const TQStringList &, KJLoader *parent); ~KJEqualizer(void); - virtual void mouseMove(const QPoint &pos, bool); - virtual bool mousePress(const QPoint&); - virtual void paint(QPainter *p, const QRect &rect); - int barNum(const QPoint &pos) const; - int level(const QPoint &pos) const; + virtual void mouseMove(const TQPoint &pos, bool); + virtual bool mousePress(const TQPoint&); + virtual void paint(TQPainter *p, const TQRect &rect); + int barNum(const TQPoint &pos) const; + int level(const TQPoint &pos) const; public slots: void slotUpdateBuffer(); @@ -30,9 +30,9 @@ private: int mBandWidth; int mBandHalfHeight; - QPixmap mBars; // holds all slider images - QPixmap *mBack; // holds background of EQ for easy repaint - QPixmap *mView; // holds prepared img of all sliders + TQPixmap mBars; // holds all slider images + TQPixmap *mBack; // holds background of EQ for easy repaint + TQPixmap *mView; // holds prepared img of all sliders VInterpolation *mInterpEq; }; diff --git a/noatun/modules/kjofol-skin/kjfont.cpp b/noatun/modules/kjofol-skin/kjfont.cpp index df2abed3..c6b16b77 100644 --- a/noatun/modules/kjofol-skin/kjfont.cpp +++ b/noatun/modules/kjofol-skin/kjfont.cpp @@ -16,16 +16,16 @@ #include <kdebug.h> #include <kglobalsettings.h> -#include <qimage.h> -#include <qpainter.h> +#include <tqimage.h> +#include <tqpainter.h> /******************************************* * KJFont *******************************************/ -KJFont::KJFont(const QString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0) +KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0) { -// kdDebug(66666) << "KJFont::KJFont(const QString &prefix, KJLoader *parent)" << prefix.latin1() << endl; +// kdDebug(66666) << "KJFont::KJFont(const TQString &prefix, KJLoader *parent)" << prefix.latin1() << endl; if (prefix=="timefont") { @@ -86,7 +86,7 @@ KJFont::KJFont(const QString &prefix, KJLoader *parent) : mTextMask(0), mTranspa // define color in font that will be transparent later on if ( mTransparent ) { - QImage ibackground = mText.convertToImage(); + TQImage ibackground = mText.convertToImage(); mTransparentRGB = ibackground.pixel( ibackground.width()-1, ibackground.height()-1 ); // kdDebug(66666) << "color (" << qRed(mTransparentRGB) << "," << qGreen(mTransparentRGB) << "," << qBlue(mTransparentRGB) << ") will be transparent for " << prefix.latin1() << endl; mTextMask = KJWidget::getMask(ibackground,mTransparentRGB); @@ -105,8 +105,8 @@ void KJFont::recalcSysFont(void) mUseSysFont = KJLoader::kjofol->prefs()->useSysFont(); if (!mUseSysFont) return; - sysFont = QFont(KJLoader::kjofol->prefs()->sysFont()); - sysFont.setStyleStrategy( QFont::NoAntialias ); + sysFont = TQFont(KJLoader::kjofol->prefs()->sysFont()); + sysFont.setStyleStrategy( TQFont::NoAntialias ); if ( sysFontMetrics ) delete sysFontMetrics; sysFontColor = KJLoader::kjofol->prefs()->sysFontColor(); @@ -117,7 +117,7 @@ void KJFont::recalcSysFont(void) for(fSize = mHeight; fSize>=4; fSize--) { sysFont.setPixelSize ( fSize ); - sysFontMetrics = new QFontMetrics(sysFont); + sysFontMetrics = new TQFontMetrics(sysFont); // kdDebug(66666) << "wanted fSize=" << fSize << ", metric h=" << sysFontMetrics->height() << endl; // either found a small enough font or found no proper font at all if ( sysFontMetrics->height() <= mHeight || fSize==4 ) @@ -129,7 +129,7 @@ void KJFont::recalcSysFont(void) } } -QPixmap KJFont::draw(const QCString &str, int wide, const QPoint &pos) const +TQPixmap KJFont::draw(const TQCString &str, int wide, const TQPoint &pos) const { if ( mUseSysFont ) return drawSysFont(str,wide,pos); @@ -137,24 +137,24 @@ QPixmap KJFont::draw(const QCString &str, int wide, const QPoint &pos) const return drawPixmapFont(str,wide,pos); } -QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) const +TQPixmap KJFont::drawSysFont(const TQCString &s, int wide, const TQPoint &pos) const { // kdDebug(66666) << k_funcinfo << "BEGIN, s='" << s << "'" << endl; - QPoint to(pos); - QString string(s); + TQPoint to(pos); + TQString string(s); int stringWidth = sysFontMetrics->width( string ); // kdDebug(66666) << "final metrics; w=" << stringWidth << ", h=" << sysFontMetrics->height() << endl; - QPixmap region( + TQPixmap region( (stringWidth > wide ? stringWidth : wide), mHeight); - QPainter rp(®ion); // region painter + TQPainter rp(®ion); // region painter - QBitmap regionMask( + TQBitmap regionMask( (stringWidth > wide ? stringWidth : wide), mHeight, true); // fully transparent mask - QPainter mp(®ionMask); // mask painter + TQPainter mp(®ionMask); // mask painter // kdDebug(66666) << "region; w=" << region.width() << ", h=" << region.height() << endl; @@ -164,7 +164,7 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons { freeSpace = wide - stringWidth; mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); // kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl; } @@ -176,13 +176,13 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons mp.setPen(Qt::color1); mp.drawText(to.x(), to.y(), region.width()-freeSpace, mHeight, Qt::AlignLeft|Qt::AlignTop, string); - to += QPoint(region.width()-freeSpace,0); + to += TQPoint(region.width()-freeSpace,0); // kdDebug(66666) << "text width=" << region.width()-freeSpace << endl; if (freeSpace > 0) { mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); // kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl; } @@ -192,22 +192,22 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons return region; } -QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) const +TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &pos) const { // kdDebug(66666) << k_funcinfo << "BEGIN" << endl; - QPoint to(pos); + TQPoint to(pos); - QCString string = str.lower(); - QPixmap region( + TQCString string = str.lower(); + TQPixmap region( (string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide ? string.length()*mWidth+string.length()*mSpacing : wide), mHeight); - QBitmap regionMask( + TQBitmap regionMask( (string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide ? string.length()*mWidth+string.length()*mSpacing : wide), mHeight, true); // fully transparent mask - QPainter mask( ®ionMask ); + TQPainter mask( ®ionMask ); // kdDebug(66666) << "draw: {" << str << "}" << endl; @@ -217,7 +217,7 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) { freeSpace = wide - string.length()*mWidth+string.length()*mSpacing; mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); } // kdDebug(66666) << k_funcinfo << "pixmap width=" << region.width() << endl; @@ -229,20 +229,20 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) char c = string[charPos]; // the character to be drawn next drawCharacter(®ion, ®ionMask, to, c); - to += QPoint(mWidth, 0); + to += TQPoint(mWidth, 0); // draw according to "spacing" if ( (charPos < string.length()-1) && mSpacing > 0 ) { // make the spacing-area transparent mask.fillRect ( to.x(), 0, mSpacing, mHeight, Qt::color0 ); - to += QPoint ( mSpacing, 0 ); + to += TQPoint ( mSpacing, 0 ); } } if (freeSpace > 0) { mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); } region.setMask( regionMask ); @@ -250,24 +250,24 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) return region; } -void KJFont::drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, char c) const +void KJFont::drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to, char c) const { - QPoint src=charSource(c); + TQPoint src=charSource(c); int x=src.x(); int y=src.y(); int xs=mWidth; int ys=mHeight; - bitBlt(dev, to, &mText, QRect(x,y,xs,ys), Qt::CopyROP); + bitBlt(dev, to, &mText, TQRect(x,y,xs,ys), Qt::CopyROP); // bitBlt mask for transparency if ( mTransparent ) { - bitBlt(devMask, to, &mTextMask, QRect(x,y,xs,ys), Qt::OrROP); + bitBlt(devMask, to, &mTextMask, TQRect(x,y,xs,ys), Qt::OrROP); } else // fill mask { - QPainter tempPainter (devMask); + TQPainter tempPainter (devMask); tempPainter.fillRect ( to.x(), 0, xs,ys, Qt::color1 ); } } @@ -276,14 +276,14 @@ void KJFont::drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, cha #include <string.h> // searches for top/left coordinate of a given character inside the font-pixmap -QPoint KJFont::charSource(char c) const +TQPoint KJFont::charSource(char c) const { for (int i=0; i<3; i++) { const char *pos = strchr(mString[i], c); if (!pos) continue; - return QPoint(mWidth*((int)(pos-mString[i])), mHeight*i); + return TQPoint(mWidth*((int)(pos-mString[i])), mHeight*i); } return charSource(mNullChar); diff --git a/noatun/modules/kjofol-skin/kjfont.h b/noatun/modules/kjofol-skin/kjfont.h index 4ea5319b..a40e7854 100644 --- a/noatun/modules/kjofol-skin/kjfont.h +++ b/noatun/modules/kjofol-skin/kjfont.h @@ -1,21 +1,21 @@ #ifndef KJFONT_H #define KJFONT_H -#include <qstring.h> -#include <qpixmap.h> -#include <qbitmap.h> -#include <qfont.h> +#include <tqstring.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqfont.h> class KJLoader; class KJFont { public: - KJFont(const QString &prefix, KJLoader *parent); + KJFont(const TQString &prefix, KJLoader *parent); // draw the string str to dev at position pos, within rectangle limit in relation to pos - QPixmap draw(const QCString &str, int wide, const QPoint &pt=QPoint(0,0)) const; - QPixmap draw(const QString &str, int wide, const QPoint &pt=QPoint(0,0)) const - { return draw(QCString(str.latin1()), wide, pt); } + TQPixmap draw(const TQCString &str, int wide, const TQPoint &pt=TQPoint(0,0)) const; + TQPixmap draw(const TQString &str, int wide, const TQPoint &pt=TQPoint(0,0)) const + { return draw(TQCString(str.latin1()), wide, pt); } int fontHeight() const {return mHeight;} int fontWidth() const {return mWidth;} @@ -26,24 +26,24 @@ public: void recalcSysFont(void); protected: - QPixmap drawSysFont(const QCString &s, int wide, const QPoint &pos=QPoint(0,0)) const; - QPixmap drawPixmapFont(const QCString &, int, const QPoint &pos=QPoint(0,0)) const; + TQPixmap drawSysFont(const TQCString &s, int wide, const TQPoint &pos=TQPoint(0,0)) const; + TQPixmap drawPixmapFont(const TQCString &, int, const TQPoint &pos=TQPoint(0,0)) const; - void drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, char c) const; - QPoint charSource(char c) const; + void drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to, char c) const; + TQPoint charSource(char c) const; private: - QPixmap mText; - QBitmap mTextMask; + TQPixmap mText; + TQBitmap mTextMask; QRgb mTransparentRGB; // this color will be transparent int mSpacing; int mWidth, mHeight; bool mTransparent; // indicates wether there's transparency const char *mString[3]; char mNullChar; - QFontMetrics *sysFontMetrics; - QFont sysFont; - QColor sysFontColor; + TQFontMetrics *sysFontMetrics; + TQFont sysFont; + TQColor sysFontColor; bool mUseSysFont; }; diff --git a/noatun/modules/kjofol-skin/kjloader.cpp b/noatun/modules/kjofol-skin/kjloader.cpp index 11f96b7a..7a9d70c4 100644 --- a/noatun/modules/kjofol-skin/kjloader.cpp +++ b/noatun/modules/kjofol-skin/kjloader.cpp @@ -41,16 +41,16 @@ #include <stdlib.h> #include <unistd.h> -#include <qdragobject.h> -#include <qimage.h> -#include <qbitmap.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qpainter.h> -#include <qtooltip.h> -#include <qptrvector.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqdragobject.h> +#include <tqimage.h> +#include <tqbitmap.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqpainter.h> +#include <tqtooltip.h> +#include <tqptrvector.h> +#include <tqvbox.h> +#include <tqlabel.h> #include <kaction.h> #include <kdebug.h> @@ -73,19 +73,19 @@ class KJToolTip : public QToolTip { public: KJToolTip(KJLoader *parent) - : QToolTip(parent), mParent(parent) + : TQToolTip(parent), mParent(parent) {} protected: - virtual void maybeTip(const QPoint &p) + virtual void maybeTip(const TQPoint &p) { if ( !mParent->prefs()->displayTooltips() ) return; - QPtrList<KJWidget> things=mParent->widgetsAt(p); + TQPtrList<KJWidget> things=mParent->widgetsAt(p); for (KJWidget *i=things.first(); i!=0; i=things.next()) { - QString string=i->tip(); + TQString string=i->tip(); if (string.length()) { tip(i->rect(), string); @@ -103,7 +103,7 @@ KJLoader *KJLoader::kjofol=0; KJLoader::KJLoader() - : QWidget(0, "NoatunKJLoader", + : TQWidget(0, "NoatunKJLoader", WType_TopLevel | WStyle_NoBorder | WRepaintNoErase ), UserInterface(), moving(false), @@ -132,10 +132,10 @@ KJLoader::KJLoader() subwidgets.setAutoDelete(true); mPrefs = new KJPrefs(this); - connect ( mPrefs, SIGNAL(configChanged()), this, SLOT(readConfig()) ); + connect ( mPrefs, TQT_SIGNAL(configChanged()), this, TQT_SLOT(readConfig()) ); - QString skin = mPrefs->skin(); - if ( QFile(skin).exists() ) + TQString skin = mPrefs->skin(); + if ( TQFile(skin).exists() ) { loadSkin(skin); } @@ -147,22 +147,22 @@ KJLoader::KJLoader() } mHelpMenu = new KHelpMenu(this, kapp->aboutData()); - connect(napp->player(), SIGNAL(timeout()), SLOT(timeUpdate())); - connect(napp->player(), SIGNAL(stopped()), SLOT(timeUpdate())); - connect(napp->player(), SIGNAL(newSong()), SLOT(newSong())); + connect(napp->player(), TQT_SIGNAL(timeout()), TQT_SLOT(timeUpdate())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(timeUpdate())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSong())); - connect(napp, SIGNAL(hideYourself()), SLOT(hide())); - connect(napp, SIGNAL(showYourself()), SLOT(show())); -// KStdAction::quit(napp, SLOT(quit()), actionCollection()); + connect(napp, TQT_SIGNAL(hideYourself()), TQT_SLOT(hide())); + connect(napp, TQT_SIGNAL(showYourself()), TQT_SLOT(show())); +// KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection()); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); // newSong(); } -QPtrList<KJWidget> KJLoader::widgetsAt(const QPoint &pt) const +TQPtrList<KJWidget> KJLoader::widgetsAt(const TQPoint &pt) const { - QPtrList<KJWidget> things; - for ( QPtrListIterator<KJWidget> i(subwidgets); i.current(); ++i ) + TQPtrList<KJWidget> things; + for ( TQPtrListIterator<KJWidget> i(subwidgets); i.current(); ++i ) if ( (*i)->rect().contains(pt) ) things.append((*i)); @@ -184,9 +184,9 @@ void KJLoader::addChild(KJWidget *c) // The BIG one ;) // this methode does all the hard work on loading these weird skins -void KJLoader::loadSkin(const QString &file) +void KJLoader::loadSkin(const TQString &file) { -// kdDebug(66666) << "<KJLoader::loadSkin(const QString &file)>" << endl; +// kdDebug(66666) << "<KJLoader::loadSkin(const TQString &file)>" << endl; // kdDebug(66666) << " file = " << file.latin1() << endl; if ( file == mCurrentSkin ) // we don't load the same skin again @@ -371,12 +371,12 @@ void KJLoader::loadSkin(const QString &file) // I cant believe it, there are skins without a seeker, now THATS stupid :) if (exist("seekregion")) - QTimer::singleShot(0, this, SLOT(loadSeeker())); + TQTimer::singleShot(0, this, TQT_SLOT(loadSeeker())); // all the regular buttons - for (QDictIterator<QStringList> i(*this); i.current(); ++i) + for (TQDictIterator<TQStringList> i(*this); i.current(); ++i) { - QString d=i.currentKey(); + TQString d=i.currentKey(); if(d.contains("button") && !d.startsWith("playlistwindow") && // don't add buttons that belong to the playlistwindow d != "pitchcontrolbutton" && // both already handled above as they aren't buttons but sliders @@ -399,7 +399,7 @@ void KJLoader::loadSkin(const QString &file) if (napp->player()->isPlaying()) newSong(); -// kdDebug(66666) << "</KJLoader::loadSkin(const QString &file)>" << endl; +// kdDebug(66666) << "</KJLoader::loadSkin(const TQString &file)>" << endl; } void KJLoader::loadSeeker() @@ -451,19 +451,19 @@ void KJLoader::minimize() showMinimized(); } -void KJLoader::closeEvent(QCloseEvent*) +void KJLoader::closeEvent(TQCloseEvent*) { -// kdDebug(66666) << "KJLoader::closeEvent(QCloseEvent*)" << endl; +// kdDebug(66666) << "KJLoader::closeEvent(TQCloseEvent*)" << endl; unload(); } -void KJLoader::dragEnterEvent(QDragEnterEvent *event) +void KJLoader::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void KJLoader::dropEvent(QDropEvent *event) +void KJLoader::dropEvent(TQDropEvent *event) { KURL::List urls; if ( KURLDrag::decode(event,urls) ) @@ -473,7 +473,7 @@ void KJLoader::dropEvent(QDropEvent *event) } } -void KJLoader::wheelEvent(QWheelEvent *e) +void KJLoader::wheelEvent(TQWheelEvent *e) { // from QT-Docu: delta() is 120 for one step if (e->state() & ControlButton) napp->player()->setVolume ( napp->player()->volume() + (e->delta()/8) ); // 15% volumechange @@ -487,11 +487,11 @@ void KJLoader::switchToDockmode() // kdDebug(66666) << "KJLoader::switchToDockmode()" << endl; loadSkin( mCurrentDockModeSkin ); - connect(mWin, SIGNAL(activeWindowChanged(WId)), this, SLOT(slotWindowActivate(WId))); - connect(mWin, SIGNAL(windowRemoved(WId)), this, SLOT(slotWindowRemove(WId))); - connect(mWin, SIGNAL(stackingOrderChanged()), this, SLOT(slotStackingChanged())); - connect(mWin, SIGNAL(windowChanged(WId)), this, SLOT(slotWindowChange(WId))); - connect(mWin, SIGNAL(currentDesktopChanged(int)), this, SLOT(slotDesktopChange(int))); + connect(mWin, TQT_SIGNAL(activeWindowChanged(WId)), this, TQT_SLOT(slotWindowActivate(WId))); + connect(mWin, TQT_SIGNAL(windowRemoved(WId)), this, TQT_SLOT(slotWindowRemove(WId))); + connect(mWin, TQT_SIGNAL(stackingOrderChanged()), this, TQT_SLOT(slotStackingChanged())); + connect(mWin, TQT_SIGNAL(windowChanged(WId)), this, TQT_SLOT(slotWindowChange(WId))); + connect(mWin, TQT_SIGNAL(currentDesktopChanged(int)), this, TQT_SLOT(slotDesktopChange(int))); WId activeWin = mWin->activeWindow(); if (activeWin && (activeWin != winId())) @@ -676,7 +676,7 @@ void KJLoader::slotStackingChanged() // We seem to get this signal before the window has been restacked, // so we just schedule a restack. - QTimer::singleShot ( 10, this, SLOT(restack()) ); + TQTimer::singleShot ( 10, this, TQT_SLOT(restack()) ); // kdDebug(66666) << "END slotStackingChanged()" << endl; } @@ -708,45 +708,45 @@ KJLoader::~KJLoader() delete mWin; } -void KJLoader::paintEvent(QPaintEvent *e) +void KJLoader::paintEvent(TQPaintEvent *e) { - QPainter p(this); + TQPainter p(this); for (KJWidget* i=subwidgets.first(); i!=0; i=subwidgets.next()) if (i->rect().intersects(e->rect())) i->paint(&p, e->rect().intersect(i->rect())); -// QWidget::paintEvent(e); +// TQWidget::paintEvent(e); } -void KJLoader::mouseMoveEvent(QMouseEvent *e) +void KJLoader::mouseMoveEvent(TQMouseEvent *e) { if (moving) { - move ( QCursor::pos()-mMousePoint ); + move ( TQCursor::pos()-mMousePoint ); return; } -// QWidget::mouseMoveEvent(e); +// TQWidget::mouseMoveEvent(e); // not on background but on a widget: pass event to subwidget if ( !moving && mClickedIn && subwidgets.findRef(mClickedIn) != -1 ) { mClickedIn->mouseMove ( e->pos()-mClickedIn->rect().topLeft(), - mClickedIn->rect().contains(mapFromGlobal(QCursor::pos())) ); + mClickedIn->rect().contains(mapFromGlobal(TQCursor::pos())) ); } } -void KJLoader::mousePressEvent(QMouseEvent *e) +void KJLoader::mousePressEvent(TQMouseEvent *e) { -// kdDebug(66666) << "KJLoader::mousePressEvent(QMouseEvent *e)" << endl; +// kdDebug(66666) << "KJLoader::mousePressEvent(TQMouseEvent *e)" << endl; -// QWidget::mousePressEvent(e); +// TQWidget::mousePressEvent(e); if ( e->button()==RightButton ) NoatunStdAction::ContextMenu::showContextMenu(); else /* if ( e->button()==LeftButton ) */ { - mMousePoint = mapFromGlobal(QCursor::pos()); + mMousePoint = mapFromGlobal(TQCursor::pos()); // try to find a KJWidget that is here for (KJWidget* i=subwidgets.first(); i!=0; i=subwidgets.next()) if (i->rect().contains(mMousePoint)) @@ -763,18 +763,18 @@ void KJLoader::mousePressEvent(QMouseEvent *e) } } -void KJLoader::mouseReleaseEvent(QMouseEvent */*e*/) +void KJLoader::mouseReleaseEvent(TQMouseEvent */*e*/) { -// kdDebug(66666) << "KJLoader::mouseReleaseEvent(QMouseEvent *e)" << endl; +// kdDebug(66666) << "KJLoader::mouseReleaseEvent(TQMouseEvent *e)" << endl; -// QWidget::mouseReleaseEvent(e); +// TQWidget::mouseReleaseEvent(e); if (!moving && mClickedIn && subwidgets.findRef(mClickedIn)!=-1) { - mClickedIn->mouseRelease(mapFromGlobal(QCursor::pos())- + mClickedIn->mouseRelease(mapFromGlobal(TQCursor::pos())- mClickedIn->rect().topLeft(), mClickedIn->rect().contains( - mapFromGlobal(QCursor::pos()))); + mapFromGlobal(TQCursor::pos()))); mClickedIn=0; } @@ -804,17 +804,17 @@ void KJLoader::readConfig() void KJLoader::showSplash() { - splashScreen = new QLabel( 0L, "SplashScreen", + splashScreen = new TQLabel( 0L, "SplashScreen", WType_TopLevel | WStyle_NoBorder | WRepaintNoErase | WX11BypassWM ); - QPixmap splashPix = pixmap(item("splashscreen")[1]); + TQPixmap splashPix = pixmap(item("splashscreen")[1]); splashScreen->setPixmap( splashPix ); splashScreen->setBackgroundMode ( NoBackground ); splashScreen->setMask( KJWidget::getMask(image(item("splashscreen")[1])) ); - QSize sh = splashScreen->sizeHint(); + TQSize sh = splashScreen->sizeHint(); - QRect desk = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect desk = KGlobalSettings::splashScreenDesktopGeometry(); splashScreen->move (desk.x() + (desk.width() - sh.width())/2, desk.y() + (desk.height() - sh.height())/2 ); @@ -822,7 +822,7 @@ void KJLoader::showSplash() splashScreen->show(); napp->processEvents(); // we want this one time to get the splash actually displayed ASAP - QTimer::singleShot(3000, this, SLOT(hideSplash()) ); + TQTimer::singleShot(3000, this, TQT_SLOT(hideSplash()) ); } void KJLoader::hideSplash() diff --git a/noatun/modules/kjofol-skin/kjloader.h b/noatun/modules/kjofol-skin/kjloader.h index 44b507d6..2510b14d 100644 --- a/noatun/modules/kjofol-skin/kjloader.h +++ b/noatun/modules/kjofol-skin/kjloader.h @@ -13,10 +13,10 @@ #include <noatun/app.h> // system includes -#include <qwidget.h> -#include <qbitmap.h> -#include <qptrlist.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqbitmap.h> +#include <tqptrlist.h> +#include <tqcstring.h> #include <kwinmodule.h> @@ -30,7 +30,7 @@ class KJFont; class KJPrefs; -class KJLoader : public QWidget, public UserInterface, public Parser +class KJLoader : public TQWidget, public UserInterface, public Parser { Q_OBJECT NOATUNPLUGIND @@ -43,30 +43,30 @@ public: public: void minimize(); KHelpMenu *helpMenu() const { return mHelpMenu; } - QStringList &item(const QString &key) { return *Parser::find(key); } + TQStringList &item(const TQString &key) { return *Parser::find(key); } // returns path to currently loaded configfile // can be either a newly loaded one or one of the three below - QString currentSkin() { return mCurrentSkin; } + TQString currentSkin() { return mCurrentSkin; } // returns path to mainskin-configfile - QString currentDefaultSkin() { return mCurrentDefaultSkin; } + TQString currentDefaultSkin() { return mCurrentDefaultSkin; } //returns path to dockmode-configfile if present - QString currentDockModeSkin() { return mCurrentDockModeSkin; } + TQString currentDockModeSkin() { return mCurrentDockModeSkin; } //returns path to winshademode-configfile if present (not supported yet) - QString currentWinshadeModeSkin() { return mCurrentWinshadeModeSkin; } + TQString currentWinshadeModeSkin() { return mCurrentWinshadeModeSkin; } KJPrefs *prefs() const { return mPrefs; } - QPtrList<KJWidget> widgetsAt(const QPoint &pt) const; + TQPtrList<KJWidget> widgetsAt(const TQPoint &pt) const; void removeChild(KJWidget *c); void addChild(KJWidget *c); public slots: - void loadSkin(const QString &file); + void loadSkin(const TQString &file); void readConfig(); void switchToDockmode(); void returnFromDockmode(); @@ -90,15 +90,15 @@ private slots: void hideSplash(); protected: - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void paintEvent(QPaintEvent *e); - virtual void closeEvent(QCloseEvent*e); - virtual void wheelEvent(QWheelEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void paintEvent(TQPaintEvent *e); + virtual void closeEvent(TQCloseEvent*e); + virtual void wheelEvent(TQWheelEvent *e); - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); public: static KJLoader* kjofol; @@ -108,20 +108,20 @@ private: KWinModule *mWin; WId mDockToWin; int mDockPositionX, mDockPositionY, mDockPosition; - QRect mDockWindowRect; + TQRect mDockWindowRect; // ==== end of docking stuff ==== bool moving; - QPoint mMousePoint; - QPtrList<KJWidget> subwidgets; + TQPoint mMousePoint; + TQPtrList<KJWidget> subwidgets; KJWidget *mClickedIn; KHelpMenu *mHelpMenu; KJFont *mText, *mNumbers, *mVolumeFont, *mPitchFont; - QLabel *splashScreen; + TQLabel *splashScreen; KJToolTip *mTooltips; - QString mCurrentSkin; - QString mCurrentDefaultSkin; - QString mCurrentDockModeSkin; - QString mCurrentWinshadeModeSkin; + TQString mCurrentSkin; + TQString mCurrentDefaultSkin; + TQString mCurrentDockModeSkin; + TQString mCurrentWinshadeModeSkin; KJPrefs *mPrefs; }; diff --git a/noatun/modules/kjofol-skin/kjprefs.cpp b/noatun/modules/kjofol-skin/kjprefs.cpp index 0cadc5ac..4231d0ff 100644 --- a/noatun/modules/kjofol-skin/kjprefs.cpp +++ b/noatun/modules/kjofol-skin/kjprefs.cpp @@ -14,19 +14,19 @@ #include "parser.h" // system includes -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qslider.h> -#include <qpixmap.h> -#include <qtabwidget.h> -#include <qtextbrowser.h> -#include <qfileinfo.h> -#include <qstringlist.h> -#include <qregexp.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqslider.h> +#include <tqpixmap.h> +#include <tqtabwidget.h> +#include <tqtextbrowser.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> +#include <tqregexp.h> #include <knuminput.h> #include <kconfig.h> @@ -43,19 +43,19 @@ #include <kfontcombo.h> #include <kcolorcombo.h> -static QString expand(QString s); +static TQString expand(TQString s); -KJPrefs::KJPrefs(QObject* parent) +KJPrefs::KJPrefs(TQObject* parent) : CModule(i18n("K-Jöfol Skins"), i18n("Skin Selection For the K-Jöfol Plugin"), "style", parent) { cfg = KGlobal::config(); - QVBoxLayout *vbox = new QVBoxLayout(this); + TQVBoxLayout *vbox = new TQVBoxLayout(this); vbox->setAutoAdd(true); vbox->setSpacing( 0 ); vbox->setMargin( 0 ); - mTabWidget = new QTabWidget( this, "mTabWidget" ); + mTabWidget = new TQTabWidget( this, "mTabWidget" ); mSkinselectorWidget = new KJSkinselector ( mTabWidget, "mSkinselectorWidget" ); mGuiSettingsWidget = new KJGuiSettings ( mTabWidget, "mGuiSettingsWidget" ); @@ -63,9 +63,9 @@ KJPrefs::KJPrefs(QObject* parent) mTabWidget->insertTab( mSkinselectorWidget, i18n("&Skin Selector") ); mTabWidget->insertTab( mGuiSettingsWidget, i18n("O&ther Settings") ); - connect ( mSkinselectorWidget->mSkins, SIGNAL(activated(const QString&)), SLOT(showPreview(const QString&)) ); - connect ( mSkinselectorWidget->installButton, SIGNAL(clicked()), this, SLOT(installNewSkin()) ); - connect ( mSkinselectorWidget->mRemoveButton, SIGNAL(clicked()), this, SLOT(removeSelectedSkin()) ); + connect ( mSkinselectorWidget->mSkins, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(showPreview(const TQString&)) ); + connect ( mSkinselectorWidget->installButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(installNewSkin()) ); + connect ( mSkinselectorWidget->mRemoveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelectedSkin()) ); reopen(); // fill the skinlist and draw a preview } @@ -88,7 +88,7 @@ void KJPrefs::reopen() // reload config and set stuff in dialog mGuiSettingsWidget->useSysFont->setChecked( cfg->readBoolEntry("Use SysFont", false) ); mGuiSettingsWidget->cmbSysFont->setCurrentFont( cfg->readEntry("SysFont Family", KGlobalSettings::generalFont().family()) ); - QColor tmpColor = QColor(255,255,255); + TQColor tmpColor = TQColor(255,255,255); mGuiSettingsWidget->cmbSysFontColor->setColor( cfg->readColorEntry("SysFont Color", &tmpColor)); @@ -127,18 +127,18 @@ void KJPrefs::reopen() // reload config and set stuff in dialog break; } - QStringList skins; - QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); + TQStringList skins; + TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); // iterate through all paths where Noatun is searching for kjofol-skins for (uint i = 0; i < skinLocations.count(); ++i ) { - QStringList skinDirs = QDir(skinLocations[i]).entryList(); + TQStringList skinDirs = TQDir(skinLocations[i]).entryList(); // iterate trough all dirs (normally, users can fsck every dir-struct *g*) containing a skin for (uint k = 2; k < skinDirs.count(); ++k ) { - QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files ); + TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); // make a list of all .rc-files in a skindir - QStringList rcFiles = skinDirCnt.entryList(); + TQStringList rcFiles = skinDirCnt.entryList(); // iterate trough all those rc.-files in a skindir for (uint j = 0; j < rcFiles.count(); j++ ) { @@ -150,14 +150,14 @@ void KJPrefs::reopen() // reload config and set stuff in dialog skins.sort(); - QString loaded = cfg->readEntry("SkinResource", locate("data", "noatun/skins/kjofol/kjofol/kjofol.rc") ); + TQString loaded = cfg->readEntry("SkinResource", locate("data", "noatun/skins/kjofol/kjofol/kjofol.rc") ); loaded = loaded.mid(loaded.findRev("/")+1); // remove path loaded = loaded.left( loaded.length() - 3 ); // remove ".rc" mSkinselectorWidget->mSkins->clear(); int index = 0; - for (QStringList::Iterator i=skins.begin(); i!=skins.end(); ++i) + for (TQStringList::Iterator i=skins.begin(); i!=skins.end(); ++i) { *i = (*i).left( (*i).length() - 3 ); mSkinselectorWidget->mSkins->insertItem(*i); @@ -174,7 +174,7 @@ void KJPrefs::reopen() // reload config and set stuff in dialog void KJPrefs::save() { // kdDebug(66666) << k_funcinfo << "called." << endl; - QString skin=::expand ( mSkinselectorWidget->mSkins->currentText() ); + TQString skin=::expand ( mSkinselectorWidget->mSkins->currentText() ); // first load skin and then save config to prevent // reloading a broken skin after a crash @@ -206,7 +206,7 @@ void KJPrefs::save() emit configChanged(); } -QString KJPrefs::skin( void ) const +TQString KJPrefs::skin( void ) const { // return full path to currently loaded skin return ::expand( mSkinselectorWidget->mSkins->currentText() ); @@ -312,24 +312,24 @@ void KJPrefs::setUseSysFont( bool mode ) save(); // not sure if that's a good idea or doing saving by hand in here } -QFont KJPrefs::sysFont(void) const +TQFont KJPrefs::sysFont(void) const { - QString family = mGuiSettingsWidget->cmbSysFont->currentFont(); + TQString family = mGuiSettingsWidget->cmbSysFont->currentFont(); // kdDebug(66666) << k_funcinfo << "family=" << family << endl; - return QFont( family ); + return TQFont( family ); } -void KJPrefs::setSysFont(QFont &fnt) +void KJPrefs::setSysFont(TQFont &fnt) { mGuiSettingsWidget->cmbSysFont->setCurrentFont( fnt.family() ); } -QColor KJPrefs::sysFontColor(void) const +TQColor KJPrefs::sysFontColor(void) const { return mGuiSettingsWidget->cmbSysFontColor->color(); } -void KJPrefs::sysFontColor(QColor &c) +void KJPrefs::sysFontColor(TQColor &c) { mGuiSettingsWidget->cmbSysFontColor->setColor( c ); } @@ -345,19 +345,19 @@ bool KJPrefs::displaySplash( void ) const } -void KJPrefs::showPreview(const QString &_skin) +void KJPrefs::showPreview(const TQString &_skin) { Parser p; p.open( ::expand(_skin) ); - QImage image = p.image(p["BackgroundImage"][1]); + TQImage image = p.image(p["BackgroundImage"][1]); if (!image.isNull()) { mPixmap.convertFromImage(image); mPixmap.setMask( KJWidget::getMask(image) ); } else - mPixmap=QPixmap(); + mPixmap=TQPixmap(); mSkinselectorWidget->mPreview->setPixmap(mPixmap); mSkinselectorWidget->mAboutText->setText(p.about()); @@ -406,7 +406,7 @@ void KJPrefs::installNewSkin( void ) // create a dir with name of the skinarchive // path to unpack to: pathToTmp/filename.ext/ - QString tmpUnpackPath = locateLocal("tmp", srcFile.fileName()+"/" ); + TQString tmpUnpackPath = locateLocal("tmp", srcFile.fileName()+"/" ); kdDebug(66666) << "tmpUnpackPath: " << tmpUnpackPath.latin1() << endl; // Our extract-process, TODO: wanna have kio_(un)zip instead :) @@ -429,10 +429,10 @@ void KJPrefs::installNewSkin( void ) return; } - QDir tmpCnt = QDir ( tmpUnpackPath ); - tmpCnt.setFilter ( QDir::Dirs ); + TQDir tmpCnt = TQDir ( tmpUnpackPath ); + tmpCnt.setFilter ( TQDir::Dirs ); - QStringList dirList = tmpCnt.entryList(); + TQStringList dirList = tmpCnt.entryList(); // Iterate trough all subdirs of tmpUnpackPath (including "."!) for ( unsigned int i = 0; i < dirList.count(); i++ ) { @@ -440,8 +440,8 @@ void KJPrefs::installNewSkin( void ) if ( dirList[i] == ".." ) continue; - QDir tmpSubCnt = QDir( tmpUnpackPath + dirList[i], "*.rc;*.RC;*.Rc;*.rC", QDir::Name|QDir::IgnoreCase, QDir::Files ); - kdDebug(66666) << "Searching for *.rc in " << QString(tmpUnpackPath+dirList[i]).latin1() << endl; + TQDir tmpSubCnt = TQDir( tmpUnpackPath + dirList[i], "*.rc;*.RC;*.Rc;*.rC", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); + kdDebug(66666) << "Searching for *.rc in " << TQString(tmpUnpackPath+dirList[i]).latin1() << endl; // oh, no .rc file in current dir, let's go to next dir in list if ( tmpSubCnt.count() == 0 ) @@ -488,7 +488,7 @@ void KJPrefs::installNewSkin( void ) kdDebug(66666) << "src: " << src.path().latin1() << endl; kdDebug(66666) << "dst: " << dst.path().latin1() << endl; KIO::Job *job = KIO::copy(src,dst); - connect ( job, SIGNAL(result(KIO::Job*)), this, SLOT(slotResult(KIO::Job*)) ); + connect ( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotResult(KIO::Job*)) ); skinInstalled = true; } } // END iterate trough dirList @@ -508,43 +508,43 @@ void KJPrefs::installNewSkin( void ) void KJPrefs::removeSelectedSkin( void ) { - QString question = i18n("Are you sure you want to remove %1?\n" + TQString question = i18n("Are you sure you want to remove %1?\n" "This will delete the files installed by this skin "). arg ( mSkinselectorWidget->mSkins->currentText() ); cfg->setGroup("KJofol-Skins"); - QString loadedSkin = cfg->readEntry("SkinResource", "kjofol"); -// kdDebug(66666) << "loaded Skin Name: " << QFileInfo(loadedSkin).baseName().latin1() << endl; + TQString loadedSkin = cfg->readEntry("SkinResource", "kjofol"); +// kdDebug(66666) << "loaded Skin Name: " << TQFileInfo(loadedSkin).baseName().latin1() << endl; int r = KMessageBox::warningContinueCancel ( this, question, i18n("Confirmation"), KStdGuiItem::del() ); if ( r != KMessageBox::Continue ) return; - bool deletingCurrentSkin = ( mSkinselectorWidget->mSkins->currentText() == QFileInfo(loadedSkin).baseName() ); + bool deletingCurrentSkin = ( mSkinselectorWidget->mSkins->currentText() == TQFileInfo(loadedSkin).baseName() ); // Now find the dir to delete !!! - QString dirToDelete = QString (""); - QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); + TQString dirToDelete = TQString (""); + TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); // iterate through all paths where Noatun is searching for kjofol-skins for (uint i = 0; i < skinLocations.count(); ++i ) { - QStringList skinDirs = QDir(skinLocations[i]).entryList(); + TQStringList skinDirs = TQDir(skinLocations[i]).entryList(); // iterate trough all dirs containing a skin for (uint k = 0; k < skinDirs.count(); ++k ) { - QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files ); + TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); // make a list of all .rc-files in a skindir - QStringList rcFiles = skinDirCnt.entryList(); + TQStringList rcFiles = skinDirCnt.entryList(); // iterate trough all those rc.-files in a skindir for (uint j = 0; j < rcFiles.count(); j++ ) { if ( rcFiles[j].left(rcFiles[j].length()-3) == mSkinselectorWidget->mSkins->currentText() ) // found skinname.rc :) { - dirToDelete = QString ( skinLocations[i]+skinDirs[k] ); + dirToDelete = TQString ( skinLocations[i]+skinDirs[k] ); kdDebug(66666) << "FOUND SKIN @ " << dirToDelete.latin1() << endl; } } @@ -555,7 +555,7 @@ void KJPrefs::removeSelectedSkin( void ) { kdDebug(66666) << "Deleting Skindir: " << dirToDelete.latin1() << endl; KIO::Job *job = KIO::del( dirToDelete, false, true ); - connect ( job, SIGNAL(result(KIO::Job*)), this, SLOT(slotResult(KIO::Job*)) ); + connect ( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotResult(KIO::Job*)) ); } int item = -1; @@ -597,51 +597,51 @@ void KJPrefs::slotResult(KIO::Job *job ) // takes name of rc-file without .rc at the end and returns full path to rc-file -static QString expand(QString s) +static TQString expand(TQString s) { // kdDebug(66666) << "expand( "<< s.latin1() << " )" << endl; - QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); + TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); // iterate through all paths where Noatun is searching for kjofol-skins for (uint i = 0; i < skinLocations.count(); ++i ) { - QStringList skinDirs = QDir(skinLocations[i]).entryList(); + TQStringList skinDirs = TQDir(skinLocations[i]).entryList(); // iterate trough all dirs containing a skin for (uint k = 0; k < skinDirs.count(); ++k ) { - QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files ); + TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); // make a list of all .rc-files in a skindir - QStringList rcFiles = skinDirCnt.entryList(); + TQStringList rcFiles = skinDirCnt.entryList(); // iterate trough all those rc.-files in a skindir for (uint j = 0; j < rcFiles.count(); j++ ) { if ( rcFiles[j].left(rcFiles[j].length()-3) == s ) // found $s.rc :) { -// kdDebug(66666) << "expand() found: " << QString(skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]).latin1() << endl; +// kdDebug(66666) << "expand() found: " << TQString(skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]).latin1() << endl; return (skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]); } } } } - return QString(); + return TQString(); } -QString filenameNoCase(const QString &filename, int badNodes) +TQString filenameNoCase(const TQString &filename, int badNodes) { - QStringList names=QStringList::split('/', filename); - QString full; + TQStringList names=TQStringList::split('/', filename); + TQString full; int number=(int)names.count(); - for (QStringList::Iterator i=names.begin(); i!=names.end(); ++i) + for (TQStringList::Iterator i=names.begin(); i!=names.end(); ++i) { full+="/"; if (number<=badNodes) { - QDir d(full); - QStringList files=d.entryList(); - files=files.grep(QRegExp("^"+ (*i) + "$", false)); + TQDir d(full); + TQStringList files=d.entryList(); + files=files.grep(TQRegExp("^"+ (*i) + "$", false)); if (!files.count()) return ""; *i=files.grep(*i, false)[0]; diff --git a/noatun/modules/kjofol-skin/kjprefs.h b/noatun/modules/kjofol-skin/kjprefs.h index ce1725d5..fcd6dc98 100644 --- a/noatun/modules/kjofol-skin/kjprefs.h +++ b/noatun/modules/kjofol-skin/kjprefs.h @@ -6,7 +6,7 @@ #include "kjguisettingswidget.h" // system includes -#include <qwidget.h> +#include <tqwidget.h> #include <noatun/pref.h> #include <kio/job.h> @@ -26,7 +26,7 @@ class KJPrefs : public CModule { Q_OBJECT public: - KJPrefs(QObject* parent); + KJPrefs(TQObject* parent); // Save which Skin is currently selected virtual void save(); @@ -34,7 +34,7 @@ public: // Rebuild the Skinlist virtual void reopen(); - QString skin( void ) const; + TQString skin( void ) const; int minimumPitch( void ) const; int maximumPitch( void ) const; @@ -50,11 +50,11 @@ public: bool useSysFont( void ) const; void setUseSysFont( bool ); - QFont sysFont(void) const; - void setSysFont(QFont&); + TQFont sysFont(void) const; + void setSysFont(TQFont&); - QColor sysFontColor(void) const; - void sysFontColor(QColor &); + TQColor sysFontColor(void) const; + void sysFontColor(TQColor &); bool displayTooltips( void ) const; bool displaySplash( void ) const; @@ -67,7 +67,7 @@ public slots: void removeSelectedSkin ( void ); // Show a preview of "skin" in mPixmap - void showPreview(const QString &skin); + void showPreview(const TQString &skin); // gets called after a KIO-action has finished // KIO is used for installing/removing skins @@ -77,11 +77,11 @@ signals: void configChanged(); private: - QPixmap mPixmap; // preview Pixmap + TQPixmap mPixmap; // preview Pixmap KConfig *cfg; // Dialog-Widgets - QTabWidget *mTabWidget; + TQTabWidget *mTabWidget; KJSkinselector *mSkinselectorWidget; KJGuiSettings *mGuiSettingsWidget; }; @@ -91,6 +91,6 @@ private: * badNodes is the amount of directories/files (at the end) * that aren't known) **/ -QString filenameNoCase(const QString &filename, int badNodes=1); +TQString filenameNoCase(const TQString &filename, int badNodes=1); #endif // KJPREFS_H diff --git a/noatun/modules/kjofol-skin/kjseeker.cpp b/noatun/modules/kjofol-skin/kjseeker.cpp index 41e4db13..b9b441b1 100644 --- a/noatun/modules/kjofol-skin/kjseeker.cpp +++ b/noatun/modules/kjofol-skin/kjseeker.cpp @@ -15,9 +15,9 @@ #include <kdebug.h> -KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) +KJSeeker::KJSeeker(const TQStringList &i, KJLoader *l) : KJWidget(l), g(0) { - QString activeBg = backgroundPressed("bmp1"); + TQString activeBg = backgroundPressed("bmp1"); if(activeBg.isEmpty()) { kdDebug(66666) << k_funcinfo << "No pressed background found for seeker," << @@ -28,7 +28,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) mActive = parent()->image(activeBg); mScale = parent()->image(parser()["seekimage"][1]); - QImage pixmapNoPress = parent()->image(parser()["backgroundimage"][1]); + TQImage pixmapNoPress = parent()->image(parser()["backgroundimage"][1]); // generate transparent mask int x, y, xs, ys; @@ -37,7 +37,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) xs=i[3].toInt()-x; ys=i[4].toInt()-y; setRect(x,y,xs,ys); - QImage transmask(xs, ys, 1, 2, QImage::LittleEndian); + TQImage transmask(xs, ys, 1, 2, TQImage::LittleEndian); #if QT_VERSION < 0x030300 transmask.setColor(0, qRgb(0,0,0)); transmask.setColor(1, qRgb(255,255,255)); @@ -47,8 +47,8 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) #endif // clear the pointers - memset(barmodeImages, 0, 256*sizeof(QImage*)); - memset(barmode, 0, 256*sizeof(QPixmap*)); + memset(barmodeImages, 0, 256*sizeof(TQImage*)); + memset(barmode, 0, 256*sizeof(TQPixmap*)); // Now do the pixel f�king // kdDebug(66666) << "creating Pixmaps for Seeker" << endl; @@ -76,7 +76,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) for(int i=0; i<level; i++) { if (!barmodeImages[i]) - barmodeImages[i]=new QImage(xs,ys, 32); + barmodeImages[i]=new TQImage(xs,ys, 32); QRgb *l=(QRgb*)barmodeImages[i]->scanLine(iy-y); l[ix-x]=inactiveColor; } @@ -84,7 +84,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) do { if (!barmodeImages[level]) - barmodeImages[level]=new QImage(xs,ys, 32); + barmodeImages[level]=new TQImage(xs,ys, 32); QRgb *l=(QRgb*)barmodeImages[level]->scanLine(iy-y); l[ix-x]=activeColor; } while (level++<255); @@ -93,8 +93,8 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) // kdDebug(66666) << "finished creating Pixmaps" << endl; // create the blank one - barmode[0]=new QPixmap(xs, ys); - QPixmap px=parent()->pixmap(parser()["backgroundimage"][1]); + barmode[0]=new TQPixmap(xs, ys); + TQPixmap px=parent()->pixmap(parser()["backgroundimage"][1]); bitBlt(barmode[0], 0, 0, &px, x, y, xs, ys, Qt::CopyROP); px.convertFromImage(transmask); barModeMask=px; @@ -102,11 +102,11 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) // kdDebug(66666) << "END KJSeeker constructor" << endl; } -QPixmap *KJSeeker::toPixmap(int n) +TQPixmap *KJSeeker::toPixmap(int n) { if (!barmodeImages[n]) return barmode[n]; - barmode[n]=new QPixmap( + barmode[n]=new TQPixmap( barmodeImages[n]->width(), barmodeImages[n]->height() ); @@ -129,21 +129,21 @@ KJSeeker::~KJSeeker() } } -void KJSeeker::paint(QPainter *p, const QRect &) +void KJSeeker::paint(TQPainter *p, const TQRect &) { closest(); - QPixmap *pixmap = toPixmap(g); + TQPixmap *pixmap = toPixmap(g); pixmap->setMask(barModeMask); bitBlt(p->device(), rect().topLeft().x(), rect().topLeft().y(), pixmap, 0, 0, rect().width(), rect().height(), Qt::CopyROP); } -bool KJSeeker::mousePress(const QPoint &pos) +bool KJSeeker::mousePress(const TQPoint &pos) { return (isGray(mScale.pixel(rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y()))); } -void KJSeeker::mouseRelease(const QPoint &pos, bool in) +void KJSeeker::mouseRelease(const TQPoint &pos, bool in) { int x = rect().topLeft().x()+pos.x(); int y = rect().topLeft().y()+pos.y(); @@ -185,7 +185,7 @@ void KJSeeker::timeUpdate(int sec) g = sec * 255 / length; //kdDebug(66666) << "sec: " << sec << " len: " << length << " g: " << g << endl; - QPainter p(parent()); + TQPainter p(parent()); paint(&p, rect()); } diff --git a/noatun/modules/kjofol-skin/kjseeker.h b/noatun/modules/kjofol-skin/kjseeker.h index 78fea6fb..048d5127 100644 --- a/noatun/modules/kjofol-skin/kjseeker.h +++ b/noatun/modules/kjofol-skin/kjseeker.h @@ -5,32 +5,32 @@ //#include "kjloader.h" class KJLoader; -#include <qpainter.h> +#include <tqpainter.h> class KJSeeker : public KJWidget { public: - KJSeeker(const QStringList &i, KJLoader *); + KJSeeker(const TQStringList &i, KJLoader *); ~KJSeeker(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); void timeUpdate(int mille); void closest(); private: - QPixmap *toPixmap(int n); + TQPixmap *toPixmap(int n); private: - QImage mScale; - QImage mActive; - QPixmap *barmode[256]; - QImage *barmodeImages[256]; - QBitmap barModeMask; + TQImage mScale; + TQImage mActive; + TQPixmap *barmode[256]; + TQImage *barmodeImages[256]; + TQBitmap barModeMask; int g; }; diff --git a/noatun/modules/kjofol-skin/kjsliders.cpp b/noatun/modules/kjofol-skin/kjsliders.cpp index 8cadd04f..7b884853 100644 --- a/noatun/modules/kjofol-skin/kjsliders.cpp +++ b/noatun/modules/kjofol-skin/kjsliders.cpp @@ -32,7 +32,7 @@ * KJVolumeBar *******************************************/ -KJVolumeBar::KJVolumeBar(const QStringList &i, KJLoader *p) +KJVolumeBar::KJVolumeBar(const TQStringList &i, KJLoader *p) : KJWidget(p), mVolume(0), mText(0) { int x, y, xs, ys; @@ -48,18 +48,18 @@ KJVolumeBar::KJVolumeBar(const QStringList &i, KJLoader *p) mSlider = parent()->pixmap(parser()["volumecontrolimage"][1]); } -QString KJVolumeBar::tip() +TQString KJVolumeBar::tip() { return i18n("Volume"); } -void KJVolumeBar::paint(QPainter *p, const QRect &) +void KJVolumeBar::paint(TQPainter *p, const TQRect &) { // kdDebug(66666) << "x: " << rect().x() << " y: " << rect().y() << endl; // kdDebug(66666) << "vol x: " << rect().x()+(mVolume*rect().width())/100 << endl; // center of that slider-pixmap -// QPoint hotSpot = QPoint( mSlider.width()/2, mSlider.height()/2 ); +// TQPoint hotSpot = TQPoint( mSlider.width()/2, mSlider.height()/2 ); // draw our background bitBlt( @@ -89,7 +89,7 @@ void KJVolumeBar::paint(QPainter *p, const QRect &) mText->repaint(); } -bool KJVolumeBar::mousePress(const QPoint &pos) +bool KJVolumeBar::mousePress(const TQPoint &pos) { mVolume = (pos.x()*100) / rect().width(); // kdDebug(66666) << "volume: " << mVolume << endl; @@ -98,11 +98,11 @@ bool KJVolumeBar::mousePress(const QPoint &pos) return true; } -void KJVolumeBar::mouseRelease(const QPoint &, bool) +void KJVolumeBar::mouseRelease(const TQPoint &, bool) { } -void KJVolumeBar::mouseMove(const QPoint &pos, bool in) +void KJVolumeBar::mouseMove(const TQPoint &pos, bool in) { if (!in) return; @@ -120,7 +120,7 @@ void KJVolumeBar::timeUpdate(int) * KJVolumeBMP *******************************************/ -KJVolumeBMP::KJVolumeBMP(const QStringList &i, KJLoader *p) +KJVolumeBMP::KJVolumeBMP(const TQStringList &i, KJLoader *p) : KJWidget(p), mVolume(0), mOldVolume(0), mText(0) { int x, y, xs, ys; @@ -138,20 +138,20 @@ KJVolumeBMP::KJVolumeBMP(const QStringList &i, KJLoader *p) timeUpdate(0); } -QString KJVolumeBMP::tip() +TQString KJVolumeBMP::tip() { return i18n("Volume"); } -void KJVolumeBMP::paint(QPainter *p, const QRect &) +void KJVolumeBMP::paint(TQPainter *p, const TQRect &) { - QRect from(mVolume*mCount/100*mWidth, 0, mWidth, mImages.height()); + TQRect from(mVolume*mCount/100*mWidth, 0, mWidth, mImages.height()); bitBlt(p->device(), rect().topLeft(), &mImages, from, Qt::CopyROP); if (mText) mText->repaint(); } -bool KJVolumeBMP::mousePress(const QPoint &pos) +bool KJVolumeBMP::mousePress(const TQPoint &pos) { QRgb color = mPos.pixel ( rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y() ); @@ -169,10 +169,10 @@ bool KJVolumeBMP::mousePress(const QPoint &pos) return true; } -void KJVolumeBMP::mouseRelease(const QPoint &, bool) +void KJVolumeBMP::mouseRelease(const TQPoint &, bool) {} -void KJVolumeBMP::mouseMove(const QPoint &pos, bool in) +void KJVolumeBMP::mouseMove(const TQPoint &pos, bool in) { if (!in) return; mousePress(pos); @@ -195,7 +195,7 @@ void KJVolumeBMP::timeUpdate(int) * KJPitchBMP *******************************************/ -KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p) +KJPitchBMP::KJPitchBMP(const TQStringList &i, KJLoader *p) : KJWidget(p), mText(0) { int x = i[1].toInt(); @@ -212,7 +212,7 @@ KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p) mPos = parent()->image(parser()["pitchcontrolimageposition"][1]); // makes all pixels with rgb(255,0,255) transparent - QImage ibackground; + TQImage ibackground; ibackground = parent()->image(parser()["pitchcontrolimage"][1]); mImages.setMask( getMask(ibackground) ); @@ -239,16 +239,16 @@ KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p) mText->repaint(); } -QString KJPitchBMP::tip() +TQString KJPitchBMP::tip() { return i18n("Pitch"); } -void KJPitchBMP::paint(QPainter *p, const QRect &) +void KJPitchBMP::paint(TQPainter *p, const TQRect &) { float xPos = (int)((mCurrentPitch-mMinPitch)*100.0) * mCount / (int)((mMaxPitch-mMinPitch)*100.0) * mWidth; - QRect from( (int)xPos, 0, mWidth, mImages.height()); + TQRect from( (int)xPos, 0, mWidth, mImages.height()); bitBlt(p->device(), rect().topLeft(), &mImages, from, Qt::CopyROP); @@ -256,7 +256,7 @@ void KJPitchBMP::paint(QPainter *p, const QRect &) mText->repaint(); } -bool KJPitchBMP::mousePress(const QPoint &pos) +bool KJPitchBMP::mousePress(const TQPoint &pos) { QRgb color = mPos.pixel ( rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y() ); @@ -273,10 +273,10 @@ bool KJPitchBMP::mousePress(const QPoint &pos) return true; } -void KJPitchBMP::mouseRelease(const QPoint &, bool) +void KJPitchBMP::mouseRelease(const TQPoint &, bool) {} -void KJPitchBMP::mouseMove(const QPoint &pos, bool in) +void KJPitchBMP::mouseMove(const TQPoint &pos, bool in) { if (!in) return; mousePress(pos); diff --git a/noatun/modules/kjofol-skin/kjsliders.h b/noatun/modules/kjofol-skin/kjsliders.h index 94f10934..bd3c3324 100644 --- a/noatun/modules/kjofol-skin/kjsliders.h +++ b/noatun/modules/kjofol-skin/kjsliders.h @@ -2,7 +2,7 @@ #define KJSLIDERS_H #include "kjwidget.h" -#include <qpainter.h> +#include <tqpainter.h> class KJLoader; class KJPitchText; @@ -12,21 +12,21 @@ class KJVolumeText; class KJVolumeBMP : public KJWidget { public: - KJVolumeBMP(const QStringList &, KJLoader *parent); + KJVolumeBMP(const TQStringList &, KJLoader *parent); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void timeUpdate(int); - virtual void mouseMove(const QPoint &pos, bool); + virtual void mouseMove(const TQPoint &pos, bool); - virtual QString tip(); + virtual TQString tip(); void setText(KJVolumeText *t) { mText=t; } private: - QPixmap mImages; - QImage mPos; + TQPixmap mImages; + TQImage mPos; int mVolume, mOldVolume; int mWidth, mCount; KJVolumeText *mText; @@ -36,21 +36,21 @@ private: class KJVolumeBar : public KJWidget { public: - KJVolumeBar(const QStringList &, KJLoader *parent); + KJVolumeBar(const TQStringList &, KJLoader *parent); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void timeUpdate(int); - virtual void mouseMove(const QPoint &pos, bool); + virtual void mouseMove(const TQPoint &pos, bool); - virtual QString tip(); + virtual TQString tip(); void setText(KJVolumeText *t) { mText=t; } private: - QPixmap mSlider; - QPixmap mBack; + TQPixmap mSlider; + TQPixmap mBack; int mVolume; KJVolumeText *mText; }; @@ -59,23 +59,23 @@ private: class KJPitchBMP : public KJWidget { public: - KJPitchBMP(const QStringList &, KJLoader *parent); + KJPitchBMP(const TQStringList &, KJLoader *parent); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void timeUpdate(int); virtual void newFile(); - virtual void mouseMove(const QPoint &pos, bool); + virtual void mouseMove(const TQPoint &pos, bool); virtual void readConfig(); - virtual QString tip(); + virtual TQString tip(); void setText(KJPitchText *t) { mText=t; } private: - QPixmap mImages; - QImage mPos; + TQPixmap mImages; + TQImage mPos; int mWidth, mCount; float mCurrentPitch; float mOldPitch; diff --git a/noatun/modules/kjofol-skin/kjtextdisplay.cpp b/noatun/modules/kjofol-skin/kjtextdisplay.cpp index 89f92526..c1a17139 100644 --- a/noatun/modules/kjofol-skin/kjtextdisplay.cpp +++ b/noatun/modules/kjofol-skin/kjtextdisplay.cpp @@ -35,8 +35,8 @@ * KJFilename *******************************************/ -KJFilename::KJFilename(const QStringList &l, KJLoader *p) - : QObject(0), KJWidget(p), mBack(0) +KJFilename::KJFilename(const TQStringList &l, KJLoader *p) + : TQObject(0), KJWidget(p), mBack(0) { int x = l[1].toInt(); int y = l[2].toInt(); @@ -50,8 +50,8 @@ KJFilename::KJFilename(const QStringList &l, KJLoader *p) ys = textFont().fontHeight(); // background under filename-scroller - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -72,9 +72,9 @@ KJFilename::~KJFilename() delete mBack; } -void KJFilename::paint(QPainter *p, const QRect &) +void KJFilename::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -82,17 +82,17 @@ void KJFilename::paint(QPainter *p, const QRect &) bitBlt( &temp, 0, 0, &mView, 0, 0, rect().width(), rect().height(), Qt::CopyROP); // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0,-1,-1), Qt::CopyROP); + TQRect(0,0,-1,-1), Qt::CopyROP); } -void KJFilename::timerEvent(QTimerEvent *) +void KJFilename::timerEvent(TQTimerEvent *) { int height = mView.height(); int width = mView.width(); - QBitmap cycleMask ( mDistance, height ); // temporary-space for moving parts of the mask - QPixmap cycle ( mDistance, height ); // temporary-space for moving parts of the pixmap - QBitmap newMask ( *mView.mask() ); // save old mask + TQBitmap cycleMask ( mDistance, height ); // temporary-space for moving parts of the mask + TQPixmap cycle ( mDistance, height ); // temporary-space for moving parts of the pixmap + TQBitmap newMask ( *mView.mask() ); // save old mask // copy mask like the same way we're doing it with the pixmap // a mask does not get copied on a bitblt automatically, we have to do @@ -111,12 +111,12 @@ void KJFilename::timerEvent(QTimerEvent *) repaint(); } -bool KJFilename::mousePress(const QPoint &) +bool KJFilename::mousePress(const TQPoint &) { return true; } -void KJFilename::mouseRelease(const QPoint &, bool in) +void KJFilename::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -145,7 +145,7 @@ void KJFilename::readConfig() mLastTitle=""; // invalidate title so it gets repainted on next timeUpdate() } -void KJFilename::prepareString(const QCString &str) +void KJFilename::prepareString(const TQCString &str) { killTimers(); // i.e. stop timers @@ -159,19 +159,19 @@ void KJFilename::timeUpdate(int) if ( !napp->player()->current() ) // just for safety return; - QCString title = QCString( napp->player()->current().title().local8Bit() ); + TQCString title = TQCString( napp->player()->current().title().local8Bit() ); if ( title == mLastTitle ) return; mLastTitle = title; - QCString timestring = napp->player()->lengthString().local8Bit(); + TQCString timestring = napp->player()->lengthString().local8Bit(); timestring = timestring.mid(timestring.find('/')+1); prepareString ( title + " (" + timestring + ") "); } -QString KJFilename::tip() +TQString KJFilename::tip() { if ( !napp->player()->current() ) // just for safety return i18n("Filename"); @@ -184,7 +184,7 @@ QString KJFilename::tip() * KJTime *******************************************/ -KJTime::KJTime(const QStringList &l, KJLoader *p) +KJTime::KJTime(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { int x = l[1].toInt(); @@ -204,8 +204,8 @@ KJTime::KJTime(const QStringList &l, KJLoader *p) xs = maxNeededWidth; // background under time-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -220,10 +220,10 @@ KJTime::~KJTime() delete mBack; } -void KJTime::paint(QPainter *p, const QRect &) +void KJTime::paint(TQPainter *p, const TQRect &) { -// kdDebug(66666) << "KJTime::paint(QPainter *p, const QRect &)" << endl; - QPixmap temp ( rect().width(), rect().height() ); +// kdDebug(66666) << "KJTime::paint(TQPainter *p, const TQRect &)" << endl; + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -232,15 +232,15 @@ void KJTime::paint(QPainter *p, const QRect &) // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0, rect().width(), rect().height()), Qt::CopyROP); + TQRect(0,0, rect().width(), rect().height()), Qt::CopyROP); } -bool KJTime::mousePress(const QPoint &) +bool KJTime::mousePress(const TQPoint &) { return true; } -void KJTime::mouseRelease(const QPoint &, bool in) +void KJTime::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -258,10 +258,10 @@ void KJTime::readConfig() mLastTime=""; // invalidate time so it gets repainted on next timeUpdate() } -QString KJTime::lengthString ( void ) +TQString KJTime::lengthString ( void ) { int pos = 0; - QString posString; + TQString posString; int secs = 0, seconds = 0, minutes = 0, @@ -316,9 +316,9 @@ void KJTime::timeUpdate(int) // kdDebug(66666) << "END KJTime::timeUpdate(int)" << endl; } -void KJTime::prepareString(const QCString &str) +void KJTime::prepareString(const TQCString &str) { -// kdDebug(66666) << "START KJTime::prepareString(const QCString &str)" << endl; +// kdDebug(66666) << "START KJTime::prepareString(const TQCString &str)" << endl; if ( str == mLastTime ) return; @@ -326,10 +326,10 @@ void KJTime::prepareString(const QCString &str) mTime = timeFont().draw(str, rect().width()); repaint(); -// kdDebug(66666) << "END KJTime::prepareString(const QCString &str)" << endl; +// kdDebug(66666) << "END KJTime::prepareString(const TQCString &str)" << endl; } -QString KJTime::tip() +TQString KJTime::tip() { if ( countDown ) return i18n("Play time left"); @@ -342,7 +342,7 @@ QString KJTime::tip() * KJVolumeText *******************************************/ -KJVolumeText::KJVolumeText(const QStringList &l, KJLoader *p) +KJVolumeText::KJVolumeText(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { int x=l[1].toInt(); @@ -362,8 +362,8 @@ KJVolumeText::KJVolumeText(const QStringList &l, KJLoader *p) xs = tempWidth; // background under volumetext-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -376,9 +376,9 @@ KJVolumeText::~KJVolumeText() delete mBack; } -void KJVolumeText::paint(QPainter *p, const QRect &) +void KJVolumeText::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -387,10 +387,10 @@ void KJVolumeText::paint(QPainter *p, const QRect &) // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0,-1,-1), Qt::CopyROP); + TQRect(0,0,-1,-1), Qt::CopyROP); } -bool KJVolumeText::mousePress(const QPoint &) +bool KJVolumeText::mousePress(const TQPoint &) { return false; } @@ -403,7 +403,7 @@ void KJVolumeText::readConfig() void KJVolumeText::timeUpdate(int) { - QCString volume; + TQCString volume; if (!napp->player()->current()) return; @@ -413,7 +413,7 @@ void KJVolumeText::timeUpdate(int) prepareString(volume); } -void KJVolumeText::prepareString(const QCString &str) +void KJVolumeText::prepareString(const TQCString &str) { if ( str == mLastVolume ) return; @@ -424,7 +424,7 @@ void KJVolumeText::prepareString(const QCString &str) repaint(); } -QString KJVolumeText::tip() +TQString KJVolumeText::tip() { return i18n("Volume"); } @@ -434,7 +434,7 @@ QString KJVolumeText::tip() * KJPitchText *******************************************/ -KJPitchText::KJPitchText(const QStringList &l, KJLoader *p) +KJPitchText::KJPitchText(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { int x = l[1].toInt(); @@ -452,8 +452,8 @@ KJPitchText::KJPitchText(const QStringList &l, KJLoader *p) xs = tempWidth; // background under time-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -467,24 +467,24 @@ KJPitchText::~KJPitchText() } -void KJPitchText::paint(QPainter *p, const QRect &) +void KJPitchText::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); // draw time-display into buffer bitBlt( &temp, 0, 0, &mSpeed, 0, 0, rect().width(), rect().height(), Qt::CopyROP); // and draw it on screen - bitBlt(p->device(), rect().topLeft(), &temp, QRect(0,0,-1,-1), Qt::CopyROP); + bitBlt(p->device(), rect().topLeft(), &temp, TQRect(0,0,-1,-1), Qt::CopyROP); } -bool KJPitchText::mousePress(const QPoint &) +bool KJPitchText::mousePress(const TQPoint &) { return true; } -void KJPitchText::mouseRelease(const QPoint &, bool in) +void KJPitchText::mouseRelease(const TQPoint &, bool in) { if (!in) return; @@ -506,7 +506,7 @@ void KJPitchText::readConfig() void KJPitchText::timeUpdate(int) { - QCString speed; + TQCString speed; if (!napp->player()->current()) return; @@ -521,7 +521,7 @@ void KJPitchText::timeUpdate(int) prepareString ( speed ); } -void KJPitchText::prepareString(const QCString &str) +void KJPitchText::prepareString(const TQCString &str) { if ( str == mLastPitch ) return; @@ -532,7 +532,7 @@ void KJPitchText::prepareString(const QCString &str) repaint(); } -QString KJPitchText::tip() +TQString KJPitchText::tip() { return i18n("Pitch"); } @@ -542,7 +542,7 @@ QString KJPitchText::tip() * KJFileInfo *******************************************/ -KJFileInfo::KJFileInfo(const QStringList &l, KJLoader *p) +KJFileInfo::KJFileInfo(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { mInfoType = l[0]; // type of info-display @@ -564,8 +564,8 @@ KJFileInfo::KJFileInfo(const QStringList &l, KJLoader *p) xs = maxNeededWidth; // background under info-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -578,9 +578,9 @@ KJFileInfo::~KJFileInfo() delete mBack; } -void KJFileInfo::paint(QPainter *p, const QRect &) +void KJFileInfo::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -589,10 +589,10 @@ void KJFileInfo::paint(QPainter *p, const QRect &) // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0, rect().width(), rect().height()), Qt::CopyROP); + TQRect(0,0, rect().width(), rect().height()), Qt::CopyROP); } -bool KJFileInfo::mousePress(const QPoint &) +bool KJFileInfo::mousePress(const TQPoint &) { return false; } @@ -609,7 +609,7 @@ void KJFileInfo::timeUpdate(int) return; const PlaylistItem &item = napp->player()->current(); - QString prop; + TQString prop; if ( mInfoType == "mp3khzwindow" ) { @@ -628,7 +628,7 @@ void KJFileInfo::timeUpdate(int) prepareString( prop.latin1() ); } -void KJFileInfo::prepareString(const QCString &str) +void KJFileInfo::prepareString(const TQCString &str) { if ( str == mLastTime ) return; @@ -637,14 +637,14 @@ void KJFileInfo::prepareString(const QCString &str) repaint(); } -QString KJFileInfo::tip() +TQString KJFileInfo::tip() { if ( mInfoType == "mp3khzwindow" ) return i18n("Sample rate in kHz"); else if ( mInfoType == "mp3kbpswindow" ) return i18n("Bitrate in kbps"); - return QString(); + return TQString(); } #include "kjtextdisplay.moc" diff --git a/noatun/modules/kjofol-skin/kjtextdisplay.h b/noatun/modules/kjofol-skin/kjtextdisplay.h index 11098b0c..893efac0 100644 --- a/noatun/modules/kjofol-skin/kjtextdisplay.h +++ b/noatun/modules/kjofol-skin/kjtextdisplay.h @@ -6,35 +6,35 @@ class KJLoader; class KPixmap; //#include "kjloader.h" -#include <qobject.h> -#include <qpainter.h> +#include <tqobject.h> +#include <tqpainter.h> -class KJFilename : public QObject, public KJWidget +class KJFilename : public TQObject, public KJWidget { Q_OBJECT public: - KJFilename(const QStringList &, KJLoader *parent); + KJFilename(const TQStringList &, KJLoader *parent); ~KJFilename(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &, bool in); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &, bool in); // virtual void newFile(); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &str); - virtual QString tip(); + void prepareString(const TQCString &str); + virtual TQString tip(); - virtual void timerEvent(QTimerEvent *); + virtual void timerEvent(TQTimerEvent *); private: - QCString mLastTitle; + TQCString mLastTitle; int mDistance; int mTimerUpdates; int mWidth; int mTickerPos; - QPixmap mView; + TQPixmap mView; KPixmap *mBack; }; @@ -42,29 +42,29 @@ private: class KJTime : public KJWidget { public: - KJTime(const QStringList &, KJLoader *parent); + KJTime(const TQStringList &, KJLoader *parent); ~KJTime(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &, bool in); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &, bool in); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); // enum countModes { Up=0, Down }; private: - QCString mLastTime; + TQCString mLastTime; int mWidth; bool countDown; - QPixmap mTime; + TQPixmap mTime; KPixmap *mBack; private: - QString lengthString ( void ); + TQString lengthString ( void ); }; @@ -72,21 +72,21 @@ private: class KJVolumeText : public KJWidget { public: - KJVolumeText(const QStringList &, KJLoader *parent); + KJVolumeText(const TQStringList &, KJLoader *parent); ~KJVolumeText(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); private: - QCString mLastVolume; + TQCString mLastVolume; int mWidth; - QPixmap mVolume; + TQPixmap mVolume; KPixmap *mBack; }; @@ -94,22 +94,22 @@ private: class KJPitchText : public KJWidget { public: - KJPitchText(const QStringList &, KJLoader *parent); + KJPitchText(const TQStringList &, KJLoader *parent); ~KJPitchText(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &, bool in); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &, bool in); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); private: - QCString mLastPitch; + TQCString mLastPitch; int mWidth; - QPixmap mSpeed; + TQPixmap mSpeed; KPixmap *mBack; }; @@ -117,22 +117,22 @@ private: class KJFileInfo : public KJWidget { public: - KJFileInfo(const QStringList &, KJLoader *parent); + KJFileInfo(const TQStringList &, KJLoader *parent); ~KJFileInfo(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); private: - QCString mLastTime; - QString mInfoType; + TQCString mLastTime; + TQString mInfoType; int mWidth; - QPixmap mTime; + TQPixmap mTime; KPixmap *mBack; }; diff --git a/noatun/modules/kjofol-skin/kjvis.cpp b/noatun/modules/kjofol-skin/kjvis.cpp index 71246089..3bd40f00 100644 --- a/noatun/modules/kjofol-skin/kjvis.cpp +++ b/noatun/modules/kjofol-skin/kjvis.cpp @@ -13,8 +13,8 @@ #include <math.h> //qt includes -#include <qpainter.h> -#include <qsize.h> +#include <tqpainter.h> +#include <tqsize.h> //kde includes #include <kdebug.h> @@ -35,7 +35,7 @@ void KJVisScope::swapScope(Visuals newOne) { //kdDebug(66666) << k_funcinfo << endl; - QStringList line = parent()->item("analyzerwindow"); + TQStringList line = parent()->item("analyzerwindow"); KJLoader *p=parent(); p->removeChild(this); delete this; @@ -66,7 +66,7 @@ void KJVisScope::swapScope(Visuals newOne) * KJNullScope *******************************************/ -KJNullScope::KJNullScope(const QStringList &l, KJLoader *parent) +KJNullScope::KJNullScope(const TQStringList &l, KJLoader *parent) : KJVisScope(parent) { int x = l[1].toInt(); @@ -75,25 +75,25 @@ KJNullScope::KJNullScope(const QStringList &l, KJLoader *parent) int ys = l[4].toInt() - y; // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect ( x, y, xs, ys ); repaint(); } -void KJNullScope::paint(QPainter *p, const QRect &) +void KJNullScope::paint(TQPainter *p, const TQRect &) { // just redraw the background - bitBlt ( p->device(), rect().topLeft(), mBack, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mBack, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJNullScope::mousePress(const QPoint &) +bool KJNullScope::mousePress(const TQPoint &) { return true; } -void KJNullScope::mouseRelease(const QPoint &, bool in) +void KJNullScope::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -118,7 +118,7 @@ void KJNullScope::readConfig() * KJFFT - Analyzer like visualization, mono *************************************************/ -KJFFT::KJFFT(const QStringList &l, KJLoader *parent) +KJFFT::KJFFT(const TQStringList &l, KJLoader *parent) : KJVisScope(parent), MonoFFTScope(50), mGradient(0) { int x = l[1].toInt(); @@ -131,7 +131,7 @@ KJFFT::KJFFT(const QStringList &l, KJLoader *parent) if ( parent->exist("analyzercolor") ) { - QStringList &col = parser()["analyzercolor"]; + TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); } else // TODO: what should be default colors for Vis? @@ -140,15 +140,15 @@ KJFFT::KJFFT(const QStringList &l, KJLoader *parent) } // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); - mAnalyzer = new KPixmap ( QSize(xs,ys) ); + mAnalyzer = new KPixmap ( TQSize(xs,ys) ); bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // create a gradient for the bars going from 30% lighter to 30% darker than mColor - mGradient = new KPixmap ( QSize(xs,ys) ); + mGradient = new KPixmap ( TQSize(xs,ys) ); KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF), mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient ); @@ -170,8 +170,8 @@ void KJFFT::scopeEvent(float *d, int size) int x = 0; int h = rect().height(); - QBitmap mGradientMask ( rect().width(), h, true ); - QPainter mask( &mGradientMask ); + TQBitmap mGradientMask ( rect().width(), h, true ); + TQPainter mask( &mGradientMask ); float *start = d ; float *end = d + size /*- 1*/; @@ -206,20 +206,20 @@ void KJFFT::scopeEvent(float *d, int size) repaint(); } -void KJFFT::paint(QPainter *p, const QRect &) +void KJFFT::paint(TQPainter *p, const TQRect &) { // put that thing on screen if ( !napp->player()->isStopped() ) - bitBlt ( p->device(), rect().topLeft(), mAnalyzer, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJFFT::mousePress(const QPoint &) +bool KJFFT::mousePress(const TQPoint &) { return true; } -void KJFFT::mouseRelease(const QPoint &, bool in) +void KJFFT::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -250,7 +250,7 @@ void KJFFT::readConfig() * KJStereoFFT - Analyzer like visualization, stereo *************************************************/ -KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent) +KJStereoFFT::KJStereoFFT(const TQStringList &l, KJLoader *parent) : KJVisScope(parent), StereoFFTScope(50), mGradient(0) { //kdDebug(66666) << k_funcinfo << endl; @@ -265,7 +265,7 @@ KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent) if ( parent->exist("analyzercolor") ) { - QStringList &col = parser()["analyzercolor"]; + TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); } else // TODO: what should be default colors for Vis? @@ -274,15 +274,15 @@ KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent) } // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); - mAnalyzer = new KPixmap ( QSize(xs,ys) ); + mAnalyzer = new KPixmap ( TQSize(xs,ys) ); bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // create a gradient for the bars going from 30% lighter to 30% darker than mColor - mGradient = new KPixmap ( QSize(xs,ys) ); + mGradient = new KPixmap ( TQSize(xs,ys) ); KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF), mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient ); @@ -304,8 +304,8 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) unsigned int h = rect().height(); int hh = (int)(rect().height()/2); - QBitmap mGradientMask ( rect().width(), h, true ); - QPainter mask( &mGradientMask ); + TQBitmap mGradientMask ( rect().width(), h, true ); + TQPainter mask( &mGradientMask ); float *start = left; float *end = left + len; @@ -359,19 +359,19 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) repaint(); } -void KJStereoFFT::paint(QPainter *p, const QRect &) +void KJStereoFFT::paint(TQPainter *p, const TQRect &) { // put that thing on screen if ( !napp->player()->isStopped() ) - bitBlt ( p->device(), rect().topLeft(), mAnalyzer, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJStereoFFT::mousePress(const QPoint &) +bool KJStereoFFT::mousePress(const TQPoint &) { return true; } -void KJStereoFFT::mouseRelease(const QPoint &, bool in) +void KJStereoFFT::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -399,7 +399,7 @@ void KJStereoFFT::readConfig() * KJScope - oscilloscope like visualization *************************************************/ -KJScope::KJScope(const QStringList &l, KJLoader *parent) +KJScope::KJScope(const TQStringList &l, KJLoader *parent) : KJVisScope(parent), MonoScope(50)/*, blurnum(0), mOsci(0)*/ { int x=l[1].toInt(); @@ -413,22 +413,22 @@ KJScope::KJScope(const QStringList &l, KJLoader *parent) if ( parent->exist("analyzercolor") ) { - QStringList &col = parser()["analyzercolor"]; + TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); } else // FIXME: what should be default colors for Vis? mColor.setRgb ( 255, 255, 255 ); // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); - mOsci = new KPixmap ( QSize(xs,ys) ); + mOsci = new KPixmap ( TQSize(xs,ys) ); bitBlt( mOsci, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // create a gradient - mGradient = new KPixmap ( QSize(xs,ys) ); + mGradient = new KPixmap ( TQSize(xs,ys) ); KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF), mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient ); @@ -459,7 +459,7 @@ void KJScope::scopeEvent(float *d, int size) int heightHalf = rect().height()/2 /* -1 */; int x = 0; - QPainter tempP( mOsci ); + TQPainter tempP( mOsci ); if ( blurnum == 3 ) { // clear whole Vis @@ -487,12 +487,12 @@ void KJScope::scopeEvent(float *d, int size) // tempP.drawLine(x, heightHalf, x, heightHalf+amp); if ( amp > 0 ) { - bitBlt ( tempP.device(), QPoint(x,heightHalf), mGradient, QRect(x,heightHalf,1,amp), Qt::CopyROP ); + bitBlt ( tempP.device(), TQPoint(x,heightHalf), mGradient, TQRect(x,heightHalf,1,amp), Qt::CopyROP ); } else { amp = -amp; - bitBlt ( tempP.device(), QPoint(x,heightHalf-amp), mGradient, QRect(x,(heightHalf-amp),1,amp), Qt::CopyROP ); + bitBlt ( tempP.device(), TQPoint(x,heightHalf-amp), mGradient, TQRect(x,(heightHalf-amp),1,amp), Qt::CopyROP ); } x++; } @@ -500,18 +500,18 @@ void KJScope::scopeEvent(float *d, int size) repaint(); } -void KJScope::paint(QPainter *p, const QRect &) +void KJScope::paint(TQPainter *p, const TQRect &) { // put that thing on screen - bitBlt ( p->device(), rect().topLeft(), mOsci, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mOsci, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJScope::mousePress(const QPoint &) +bool KJScope::mousePress(const TQPoint &) { return true; } -void KJScope::mouseRelease(const QPoint &, bool in) +void KJScope::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; diff --git a/noatun/modules/kjofol-skin/kjvis.h b/noatun/modules/kjofol-skin/kjvis.h index d2a43700..a05103d8 100644 --- a/noatun/modules/kjofol-skin/kjvis.h +++ b/noatun/modules/kjofol-skin/kjvis.h @@ -19,10 +19,10 @@ public: class KJNullScope : public KJVisScope { public: - KJNullScope(const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + KJNullScope(const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: @@ -35,16 +35,16 @@ private: class KJFFT : public KJVisScope, public MonoFFTScope { public: - KJFFT(const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); + KJFFT(const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); virtual void scopeEvent(float *d, int size); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: - QColor mColor; + TQColor mColor; KPixmap *mGradient; KPixmap *mBack; KPixmap *mAnalyzer; @@ -57,16 +57,16 @@ private: class KJStereoFFT : public KJVisScope, public StereoFFTScope { public: - KJStereoFFT(const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); + KJStereoFFT(const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); virtual void scopeEvent(float *left, float *right, int len); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: - QColor mColor; + TQColor mColor; KPixmap *mGradient; KPixmap *mBack; KPixmap *mAnalyzer; @@ -79,16 +79,16 @@ private: class KJScope : public KJVisScope, public MonoScope { public: - KJScope ( const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); + KJScope ( const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); virtual void scopeEvent(float *d, int size); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: - QColor mColor; + TQColor mColor; KPixmap *mGradient; KPixmap *mBack; KPixmap *mOsci; diff --git a/noatun/modules/kjofol-skin/kjwidget.cpp b/noatun/modules/kjofol-skin/kjwidget.cpp index e7b6a4d1..b46fb651 100644 --- a/noatun/modules/kjofol-skin/kjwidget.cpp +++ b/noatun/modules/kjofol-skin/kjwidget.cpp @@ -12,15 +12,15 @@ // ugly static functions and stuff #include "helpers.cpp" -#include <qpainter.h> +#include <tqpainter.h> KJWidget::KJWidget(KJLoader *p) : mParent(p) { } -QBitmap KJWidget::getMask(const QImage &_rect, register QRgb transparent) +TQBitmap KJWidget::getMask(const TQImage &_rect, register QRgb transparent) { - QImage result(_rect.width(), _rect.height(), 1,2, QImage::LittleEndian); + TQImage result(_rect.width(), _rect.height(), 1,2, TQImage::LittleEndian); #if QT_VERSION < 0x030300 result.setColor(0, qRgb(0,0,0)); //TODO: maybe use Qt::color0 and Qt::color1 result.setColor(1, qRgb(255,255,255)); @@ -34,36 +34,36 @@ QBitmap KJWidget::getMask(const QImage &_rect, register QRgb transparent) for(int width=0; width<_rect.width(); width++) setPixel1BPP(result, width, height, _rect.pixel(width, height)!=transparent); } - QBitmap bm; + TQBitmap bm; bm.convertFromImage(result); return bm; } -void KJWidget::repaint(bool me, const QRect &r, bool clear) +void KJWidget::repaint(bool me, const TQRect &r, bool clear) { - QPainter p(parent()); + TQPainter p(parent()); if (me) paint(&p, r.isValid() ? r : rect()); else parent()->repaint(r.isValid() ? r : rect(), clear); } -const QString &KJWidget::backgroundPressed(const QString &bmp) const +const TQString &KJWidget::backgroundPressed(const TQString &bmp) const { if(bmp.isEmpty()) // play safe { -// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning QString::null!" << endl; - return QString::null; +// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning TQString::null!" << endl; + return TQString::null; } // kdDebug(66666) << k_funcinfo << "Returning pressed pixmap for '" << bmp.latin1() << "'" << endl; // make absolutely sure the wanted backgroundimagepressedX line is there - QStringList item = parser()["backgroundimagepressed"+QString::number(bmp.mid(3).toInt())]; + TQStringList item = parser()["backgroundimagepressed"+TQString::number(bmp.mid(3).toInt())]; if(item.count() < 2) { // kdDebug(66666) << k_funcinfo << "backgroundimagepressed doesn't have enough keys in its line!" << endl; - return QString::null; + return TQString::null; } else return item[1]; diff --git a/noatun/modules/kjofol-skin/kjwidget.h b/noatun/modules/kjofol-skin/kjwidget.h index cc7ddf53..3f63671b 100644 --- a/noatun/modules/kjofol-skin/kjwidget.h +++ b/noatun/modules/kjofol-skin/kjwidget.h @@ -9,14 +9,14 @@ public: KJWidget(KJLoader *); virtual ~KJWidget() {}; // called when the widget should paint - virtual void paint(QPainter *, const QRect &) {}; + virtual void paint(TQPainter *, const TQRect &) {}; // called to receive the rect this widget is in - virtual QRect rect() const { return mRect; } + virtual TQRect rect() const { return mRect; } // called when pressed in this widget - virtual bool mousePress(const QPoint &) {return false; } + virtual bool mousePress(const TQPoint &) {return false; } // called when the mouse is released after clicked in this widget - virtual void mouseRelease(const QPoint &, bool){} - virtual void mouseMove(const QPoint &, bool) {} + virtual void mouseRelease(const TQPoint &, bool){} + virtual void mouseMove(const TQPoint &, bool) {} // called with the current time (mille) virtual void timeUpdate(int) {} // called when a new song is playing, player() is ready with it too @@ -26,15 +26,15 @@ public: // called when the mouse is moved while clicked in this widget // repaint myself - virtual void repaint(bool me=true, const QRect &rect=QRect(), bool clear=false); + virtual void repaint(bool me=true, const TQRect &rect=TQRect(), bool clear=false); - virtual QString tip() { return 0; } + virtual TQString tip() { return 0; } public: - static QBitmap getMask(const QImage &color, register QRgb=qRgb(255,0,255)); + static TQBitmap getMask(const TQImage &color, register QRgb=qRgb(255,0,255)); protected: - const QString &backgroundPressed(const QString &bmp) const; + const TQString &backgroundPressed(const TQString &bmp) const; KJLoader *parent() const {return mParent;} KJLoader &parser() const {return *mParent;} @@ -43,11 +43,11 @@ protected: KJFont &volumeFont() const {return *mParent->mVolumeFont;} KJFont &pitchFont() const {return *mParent->mPitchFont;} - void setRect(const QRect& rect) {mRect=rect;} - void setRect(int x, int y, int xs, int ys) {mRect=QRect(x,y,xs,ys);} + void setRect(const TQRect& rect) {mRect=rect;} + void setRect(int x, int y, int xs, int ys) {mRect=TQRect(x,y,xs,ys);} private: KJLoader *mParent; - QRect mRect; + TQRect mRect; }; #endif diff --git a/noatun/modules/kjofol-skin/parser.cpp b/noatun/modules/kjofol-skin/parser.cpp index df5fdc40..aae5b12e 100644 --- a/noatun/modules/kjofol-skin/parser.cpp +++ b/noatun/modules/kjofol-skin/parser.cpp @@ -10,14 +10,14 @@ #include "kjprefs.h" // system includes -#include <qtextstream.h> -#include <qimage.h> -#include <qfile.h> +#include <tqtextstream.h> +#include <tqimage.h> +#include <tqfile.h> #include <kdebug.h> #include <kmimemagic.h> #include <kurl.h> -Parser::Parser() : QDict<QStringList>(17,false) +Parser::Parser() : TQDict<TQStringList>(17,false) { mSkinAbout=""; mImageCache.setAutoDelete(true); @@ -29,27 +29,27 @@ void Parser::conserveMemory() mImageCache.clear(); } -void Parser::open(const QString &file) +void Parser::open(const TQString &file) { clear(); mImageCache.clear(); mSkinAbout=""; mDir=KURL(file).directory(); - QFile f(file); + TQFile f(file); if ( !f.exists() ) return; f.open(IO_ReadOnly); f.at(0); - QTextStream stream(&f); + TQTextStream stream(&f); while (!stream.eof()) { - QString line=stream.readLine(); + TQString line=stream.readLine(); line=line.simplifyWhiteSpace(); if ((!line.length()) || line[0]=='#') continue; - QStringList *l=new QStringList(QStringList::split(" ", (line.lower()))); - QString first=l->first(); + TQStringList *l=new TQStringList(TQStringList::split(" ", (line.lower()))); + TQString first=l->first(); // special handling for about-texts as the key "about" can appear multiple // times and thus does not fit into qdict. @@ -67,17 +67,17 @@ void Parser::open(const QString &file) } } -QString Parser::fileItem(const QString &i) const +TQString Parser::fileItem(const TQString &i) const { return dir()+'/'+i; } -QString Parser::dir() const +TQString Parser::dir() const { return mDir; } -Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const +Parser::ImagePixmap* Parser::getPair(const TQString &filenameOld) const { // is it in there? ImagePixmap *pair; @@ -87,9 +87,9 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const return pair; } - QString filename=fileItem(filenameOld); + TQString filename=fileItem(filenameOld); - QImage image; + TQImage image; // Determine file-format trough mimetype (no stupid .ext test) KMimeMagicResult * result = KMimeMagic::self()->findFileType( filename ); @@ -97,7 +97,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const if ( result->mimeType() == "image/png" ) { // image = NoatunApp::readPNG(filenameNoCase(filename)); - QImageIO iio; + TQImageIO iio; iio.setFileName( filenameNoCase(filename) ); // forget about gamma-value, fix for broken PNGs iio.setGamma( 0.00000001 ); @@ -113,12 +113,12 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const } else { - image = QImage(filenameNoCase(filename)); + image = TQImage(filenameNoCase(filename)); } //add to the cache - QPixmap pixmap; - pixmap.convertFromImage(image, QPixmap::AutoColor|QPixmap::ThresholdDither|QPixmap::AvoidDither); + TQPixmap pixmap; + pixmap.convertFromImage(image, TQPixmap::AutoColor|TQPixmap::ThresholdDither|TQPixmap::AvoidDither); pair = new Parser::ImagePixmap; pair->mImage = image; pair->mPixmap = pixmap; @@ -126,7 +126,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const return pair; } -bool Parser::exist(const QString &i) const +bool Parser::exist(const TQString &i) const { return (bool)find(i); } diff --git a/noatun/modules/kjofol-skin/parser.h b/noatun/modules/kjofol-skin/parser.h index 97e20d99..3f691253 100644 --- a/noatun/modules/kjofol-skin/parser.h +++ b/noatun/modules/kjofol-skin/parser.h @@ -2,48 +2,48 @@ #define PARSER_H // system includes -#include <qstringlist.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qdict.h> +#include <tqstringlist.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqdict.h> -class Parser : public QDict<QStringList> +class Parser : public TQDict<TQStringList> { class ImagePixmap { public: ImagePixmap() : mImage(0), mPixmap(0) {} ~ImagePixmap() {} - QImage mImage; - QPixmap mPixmap; + TQImage mImage; + TQPixmap mPixmap; }; public: Parser(); void conserveMemory(); - void open(const QString &file); + void open(const TQString &file); - QString dir() const; - QPixmap pixmap(const QString &pixmap) const + TQString dir() const; + TQPixmap pixmap(const TQString &pixmap) const { return getPair(pixmap)->mPixmap; } - QImage image(const QString &image) const + TQImage image(const TQString &image) const { return getPair(image)->mImage; } - QString about() const { return mSkinAbout; }; + TQString about() const { return mSkinAbout; }; - QString fileItem(const QString &file) const; + TQString fileItem(const TQString &file) const; - bool exist(const QString &i) const; + bool exist(const TQString &i) const; public: - QStringList& operator[](const QString &l) { return *find(l);} + TQStringList& operator[](const TQString &l) { return *find(l);} private: - ImagePixmap *getPair(const QString &i) const; + ImagePixmap *getPair(const TQString &i) const; private: - mutable QDict<ImagePixmap> mImageCache; - QString mDir; - QString mSkinAbout; + mutable TQDict<ImagePixmap> mImageCache; + TQString mDir; + TQString mSkinAbout; }; #endif // PARSER_H diff --git a/noatun/modules/marquis/marquis.cpp b/noatun/modules/marquis/marquis.cpp index 29ca7364..15a298c3 100644 --- a/noatun/modules/marquis/marquis.cpp +++ b/noatun/modules/marquis/marquis.cpp @@ -78,9 +78,9 @@ Marquis::Marquis() // for testing: uncomment this and use // dcop `dcop | grep noatun` Marquis activateAction dynamicRestore // and dynamicSave accordingly. -// (void) new KAction("Restore", 0, this, SLOT( dynamicRestore() ), actionCollection(), "dynamicRestore" ); -// (void) new KAction("Save", 0, this, SLOT( dynamicSave() ), actionCollection(), "dynamicSave" ); - connect( napp, SIGNAL( saveYourself() ), SLOT( dynamicSave() )); +// (void) new KAction("Restore", 0, this, TQT_SLOT( dynamicRestore() ), actionCollection(), "dynamicRestore" ); +// (void) new KAction("Save", 0, this, TQT_SLOT( dynamicSave() ), actionCollection(), "dynamicSave" ); + connect( napp, TQT_SIGNAL( saveYourself() ), TQT_SLOT( dynamicSave() )); } Marquis::~Marquis() @@ -93,7 +93,7 @@ void Marquis::restore(void) dynamicRestore(); } -// unload every window, and save the config as QStringList of those loaded +// unload every window, and save the config as TQStringList of those loaded void Marquis::saveSessionConfig(KConfig *c) { kdDebug(66666) << k_funcinfo << endl; @@ -107,20 +107,20 @@ void Marquis::saveSessionConfig(KConfig *c) if ( !player->current().isNull() ) { KURL songURL = player->current().url(); - songURL.setPass( QString::null ); // don't save passwords + songURL.setPass( TQString::null ); // don't save passwords c->writePathEntry("Current Song", songURL.url()); } else - c->writePathEntry("Current Song", QString::null); + c->writePathEntry("Current Song", TQString::null); c->writeEntry("Current Position", player->getTime()); c->writeEntry("PlayStatus", getPlayStatus( player )); // borrowed from Plugin config dialog - QStringList specList; + TQStringList specList; - QValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); - for( QValueList<NoatunLibraryInfo>::Iterator i = loaded.begin(); i != loaded.end(); ++i) + TQValueList<NoatunLibraryInfo> loaded = napp->libraryLoader()->loaded(); + for( TQValueList<NoatunLibraryInfo>::Iterator i = loaded.begin(); i != loaded.end(); ++i) { if(!specList.contains((*i).specfile) && napp->libraryLoader()->isLoaded((*i).specfile) @@ -139,7 +139,7 @@ void Marquis::readSessionConfig(KConfig *c) { Player *player = napp->player(); - c->setGroup(QString::null); + c->setGroup(TQString::null); // First set volume, then load modules, some module could start // playback and that would be with 100% volume! @@ -147,10 +147,10 @@ void Marquis::readSessionConfig(KConfig *c) //player->setVolume( 0 ); player->loop( c->readNumEntry("Loop Style", (int) Player::None) ); - QStringList list = c->readListEntry("Loaded Plugins"); + TQStringList list = c->readListEntry("Loaded Plugins"); /* kdDebug(66666) << "Marquis::readSessionConfig()" << endl; - for(QStringList::ConstIterator i=list.begin(); i!=list.end(); ++i) + for(TQStringList::ConstIterator i=list.begin(); i!=list.end(); ++i) kdDebug(66666) << *i << endl; kdDebug(66666) << "Marquis::readSessionConfig() there we go" << endl; */ diff --git a/noatun/modules/metatag/edit.cpp b/noatun/modules/metatag/edit.cpp index d5ccb0c4..beb0fd0d 100644 --- a/noatun/modules/metatag/edit.cpp +++ b/noatun/modules/metatag/edit.cpp @@ -1,44 +1,44 @@ #include <klocale.h> -#include <qlayout.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qlabel.h> -#include <qptrlist.h> +#include <tqlabel.h> +#include <tqptrlist.h> #include <kmimetype.h> #include <kicontheme.h> -#include <qtooltip.h> +#include <tqtooltip.h> #include <kstringvalidator.h> -#include <qspinbox.h> -#include <qhbox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qcombobox.h> -#include <qpushbutton.h> +#include <tqspinbox.h> +#include <tqhbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> #include <kdialogbase.h> #include <kdebug.h> #include <kseparator.h> #include <kfilemetainfo.h> -#include <qvalidator.h> +#include <tqvalidator.h> #include "metatag.h" #include "edit.h" Editor::Editor() -: KDialogBase((QWidget*)0L, 0, false, i18n("Tag Editor"), Ok | Cancel) +: KDialogBase((TQWidget*)0L, 0, false, i18n("Tag Editor"), Ok | Cancel) { mMainWidget = makeMainWidget(); // mMainWidget->setMinimumWidth(325); - mGrid = new QGridLayout(mMainWidget, 1, 1, 0, spacingHint(), "Editor::mGrid"); + mGrid = new TQGridLayout(mMainWidget, 1, 1, 0, spacingHint(), "Editor::mGrid"); mGrid->setColStretch(1, 1); mGrid->setColStretch(2, 1); - QHBox *heading = new QHBox(mMainWidget, "Editor::heading"); + TQHBox *heading = new TQHBox(mMainWidget, "Editor::heading"); heading->setSpacing(4); - mFileIcon = new QLabel(heading); + mFileIcon = new TQLabel(heading); mFileIcon->setAlignment(AlignVCenter | AlignLeft); - mFile = new QLabel(heading); + mFile = new TQLabel(heading); mFile->setAlignment(AlignVCenter | AlignLeft); heading->setStretchFactor(mFile, 2); mGrid->addMultiCellWidget(heading, 0, 0, 0, 2); @@ -49,8 +49,8 @@ Editor::Editor() mControls.setAutoDelete(true); mNextRow = 2; - connect(this, SIGNAL(closeClicked()), SLOT(delayedDestruct())); - connect(this, SIGNAL(okClicked()), SLOT(save())); + connect(this, TQT_SIGNAL(closeClicked()), TQT_SLOT(delayedDestruct())); + connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(save())); enableButtonSeparator(true); setFixedHeight(sizeHint().height()); @@ -65,12 +65,12 @@ void Editor::open(const PlaylistItem & file) mDirty = false; mFile->setText("<nobr><b>" + file.url().fileName(false) + "</b></nobr>"); - QToolTip::add(mFile, file.url().prettyURL()); + TQToolTip::add(mFile, file.url().prettyURL()); mFileIcon-> setPixmap(KMimeType::pixmapForURL(file.url(), 0, KIcon::Small)); if (file.url().isLocalFile()) { - QFileInfo file_info(file.file()); + TQFileInfo file_info(file.file()); mFileWritable = file_info.isWritable(); } else { @@ -81,13 +81,13 @@ void Editor::open(const PlaylistItem & file) if ( !file_meta_info.isValid() ) // go ahead people, nothing to see here return; - mControls.append(createControl(file_meta_info, i18n("&Title"), "Title", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("&Artist"), "Artist", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("A&lbum"), "Album", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("&Date"), "Date", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("T&rack"), "Tracknumber", QVariant::UInt, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("&Genre"), "Genre", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("Co&mment"), "Comment", QVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Title"), "Title", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Artist"), "Artist", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("A&lbum"), "Album", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Date"), "Date", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("T&rack"), "Tracknumber", TQVariant::UInt, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Genre"), "Genre", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("Co&mment"), "Comment", TQVariant::String, false, mMainWidget)); } void Editor::save() @@ -116,20 +116,20 @@ void Editor::save() } void Editor::saveControl(KFileMetaInfo& meta_info, const MetaWidget &meta_widget) { - QVariant value; + TQVariant value; const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( meta_info.mimeType() ); if (!meta_widget.widget->isEnabled()) return; - if (meta_widget.widget->inherits("QSpinBox")) - value = static_cast<QSpinBox *>(meta_widget.widget)->value(); - else if (meta_widget.widget->inherits("QComboBox")) - value = static_cast<QComboBox *>(meta_widget.widget)->currentText(); - else if (meta_widget.widget->inherits("QLineEdit")) - value = static_cast<QLineEdit *>(meta_widget.widget)->text(); + if (meta_widget.widget->inherits("TQSpinBox")) + value = static_cast<TQSpinBox *>(meta_widget.widget)->value(); + else if (meta_widget.widget->inherits("TQComboBox")) + value = static_cast<TQComboBox *>(meta_widget.widget)->currentText(); + else if (meta_widget.widget->inherits("TQLineEdit")) + value = static_cast<TQLineEdit *>(meta_widget.widget)->text(); - QString group = keyGroup(meta_info, meta_widget.key); + TQString group = keyGroup(meta_info, meta_widget.key); if (group.isNull()) { kdWarning() << "Cannot find group for " << meta_widget.key << endl; @@ -158,13 +158,13 @@ void Editor::saveControl(KFileMetaInfo& meta_info, const MetaWidget &meta_widget kdWarning() << "Cannot save " << meta_widget.key << " as required type." << endl; } -MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label, const QString &key, QVariant::Type default_type, bool optional, QWidget *parent) { - QLabel *tmp_label = 0L; +MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const TQString &label, const TQString &key, TQVariant::Type default_type, bool optional, TQWidget *parent) { + TQLabel *tmp_label = 0L; KFileMetaInfoItem info_item = meta_info.item(key); - QVariant::Type type; + TQVariant::Type type; MetaWidget *meta_widget = 0L; - QValidator *validator = 0L; - QString groupName = keyGroup(meta_info, key); + TQValidator *validator = 0L; + TQString groupName = keyGroup(meta_info, key); bool known_key = ((!groupName.isNull()) && meta_info.group(groupName).contains(key)); bool addable = keyAddable(meta_info, key); const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( meta_info.mimeType() ); @@ -188,9 +188,9 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label meta_widget = new MetaWidget; meta_widget->key = key; - if ((type == QVariant::Int) || (type == QVariant::UInt)) { + if ((type == TQVariant::Int) || (type == TQVariant::UInt)) { // We're an int, make a spin box - QSpinBox *box = new QSpinBox(parent); + TQSpinBox *box = new TQSpinBox(parent); // Well, normally metatag doesn't care that much about suffixes // and prefixes, but this is just too easy. @@ -204,10 +204,10 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label box->setValidator(validator); // Is it an integer validator - if (validator->inherits("QIntValidator")) { - QIntValidator *int_validator = static_cast<QIntValidator *>(validator); + if (validator->inherits("TQIntValidator")) { + TQIntValidator *int_validator = static_cast<TQIntValidator *>(validator); - // FIXME: Why the -hell- doesn't QSpinBox::setValidator() do this?? + // FIXME: Why the -hell- doesn't TQSpinBox::setValidator() do this?? box->setMinValue(int_validator->bottom()); box->setMaxValue(int_validator->top()); } @@ -215,18 +215,18 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label box->setValue(info_item.value().toInt()); - connect(box, SIGNAL(valueChanged(int)), this, SLOT(modified())); + connect(box, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(modified())); meta_widget->widget = box; } else { - // We're not an int, make a KLineEdit/QComboBox, depending on our validator + // We're not an int, make a KLineEdit/TQComboBox, depending on our validator bool combo_box = false; if (validator) combo_box = validator->isA("KStringListValidator"); if (combo_box) { - QComboBox *combo = new QComboBox(parent); + TQComboBox *combo = new TQComboBox(parent); combo->clear(); combo->insertStringList(static_cast< @@ -234,7 +234,7 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label >(validator)->stringList()); combo->setCurrentText(info_item.value().toString()); - connect(combo, SIGNAL(activated(int)), this, SLOT(modified())); + connect(combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(modified())); meta_widget->widget = combo; } @@ -244,7 +244,7 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label edit = new KLineEdit(parent); edit->setText(info_item.value().toString()); edit->setValidator(validator); - connect(edit, SIGNAL(textChanged(const QString &)), this, SLOT(modified())); + connect(edit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(modified())); meta_widget->widget = edit; } @@ -258,7 +258,7 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label mGrid->addMultiCellWidget(meta_widget->widget, mNextRow, mNextRow, 1, 2); // Add our label. This is the easy part - tmp_label = new QLabel(meta_widget->widget, label + ":", parent); + tmp_label = new TQLabel(meta_widget->widget, label + ":", parent); mGrid->addWidget(tmp_label, mNextRow, 0); @@ -267,25 +267,25 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label return meta_widget; } -QString Editor::keyGroup(const KFileMetaInfo& i, QString key) { +TQString Editor::keyGroup(const KFileMetaInfo& i, TQString key) { const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( i.mimeType() ); - QStringList groups = info->supportedGroups(); + TQStringList groups = info->supportedGroups(); - for (QStringList::Iterator it = groups.begin();it != groups.end();++it) { + for (TQStringList::Iterator it = groups.begin();it != groups.end();++it) { if (info->groupInfo(*it)->itemInfo(key)) { return *it; } } - return QString::null; + return TQString::null; } -bool Editor::keyAddable(const KFileMetaInfo &i, QString key) { +bool Editor::keyAddable(const KFileMetaInfo &i, TQString key) { const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( i.mimeType() ); - QStringList groups = info->supportedGroups(); + TQStringList groups = info->supportedGroups(); kdDebug(66666) << "Testing if " << key << " is addable" << endl; - for (QStringList::Iterator it = groups.begin();it != groups.end();++it) { + for (TQStringList::Iterator it = groups.begin();it != groups.end();++it) { if (info->groupInfo(*it)->supportsVariableKeys()) { kdDebug(66666) << "Group " << *it << " supports variable keys" << endl; return true; diff --git a/noatun/modules/metatag/edit.h b/noatun/modules/metatag/edit.h index d6b0ab9c..ad928ff0 100644 --- a/noatun/modules/metatag/edit.h +++ b/noatun/modules/metatag/edit.h @@ -3,16 +3,16 @@ #include <kdialogbase.h> #include <noatun/playlist.h> -#include <qptrlist.h> -#include <qvariant.h> +#include <tqptrlist.h> +#include <tqvariant.h> class KFileMetaInfo; class KFileMetaInfoItem; class QGridLayout; struct MetaWidget { - QWidget *widget; - QString key; + TQWidget *widget; + TQString key; }; class Editor:public KDialogBase { @@ -31,23 +31,23 @@ class Editor:public KDialogBase { void modified(); protected: - bool keyAddable(const KFileMetaInfo &, QString); - QString keyGroup(const KFileMetaInfo &, QString); + bool keyAddable(const KFileMetaInfo &, TQString); + TQString keyGroup(const KFileMetaInfo &, TQString); void saveControl(KFileMetaInfo& meta_info, const MetaWidget&); - MetaWidget *createControl(KFileMetaInfo& meta_info, const QString &label, const QString &key, QVariant::Type default_type, bool optional, QWidget *parent); + MetaWidget *createControl(KFileMetaInfo& meta_info, const TQString &label, const TQString &key, TQVariant::Type default_type, bool optional, TQWidget *parent); - QPtrList<MetaWidget> mControls; + TQPtrList<MetaWidget> mControls; - QWidget *mMainWidget; - QGridLayout *mGrid; + TQWidget *mMainWidget; + TQGridLayout *mGrid; int mNextRow; bool mFileWritable; bool mDirty; - QLabel *mFile; - QLabel *mFileIcon; + TQLabel *mFile; + TQLabel *mFileIcon; const char *filename; PlaylistItem item; }; diff --git a/noatun/modules/metatag/metatag.cpp b/noatun/modules/metatag/metatag.cpp index d0531092..1ec54cbf 100644 --- a/noatun/modules/metatag/metatag.cpp +++ b/noatun/modules/metatag/metatag.cpp @@ -7,10 +7,10 @@ #include <noatun/app.h> #include <noatun/stdaction.h> -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqregexp.h> #include <klocale.h> #include <kaction.h> @@ -32,7 +32,7 @@ extern "C" MetaTagLoader::MetaTagLoader():Plugin() { - mAction = new KAction(i18n("&Tag Editor..."), "edit", 0, this, SLOT(editTag()), this, "edittag"); + mAction = new KAction(i18n("&Tag Editor..."), "edit", 0, this, TQT_SLOT(editTag()), this, "edittag"); napp->pluginActionMenu()->insert(mAction); } @@ -52,8 +52,8 @@ void MetaTagLoader::editTag() e->open(i); e->show(); - connect(e, SIGNAL(saved(PlaylistItem &)), - SLOT(update(PlaylistItem &))); + connect(e, TQT_SIGNAL(saved(PlaylistItem &)), + TQT_SLOT(update(PlaylistItem &))); } bool MetaTagLoader::update(PlaylistItem & item) @@ -94,7 +94,7 @@ bool MetaTagLoader::update(PlaylistItem & item) return true; } -bool MetaTagLoader::setProperty(KFileMetaInfo &info, PlaylistItem &item, const QString &key, const QString &property) +bool MetaTagLoader::setProperty(KFileMetaInfo &info, PlaylistItem &item, const TQString &key, const TQString &property) { KFileMetaInfoItem info_item = info.item(key); diff --git a/noatun/modules/metatag/metatag.h b/noatun/modules/metatag/metatag.h index ff5c277f..4559edaf 100644 --- a/noatun/modules/metatag/metatag.h +++ b/noatun/modules/metatag/metatag.h @@ -6,12 +6,12 @@ #include <noatun/pref.h> #include <noatuntags/tags.h> -#include <qobject.h> +#include <tqobject.h> class KFileMetaInfo; class KAction; -class MetaTagLoader:public QObject, public Tags, public Plugin { +class MetaTagLoader:public TQObject, public Tags, public Plugin { Q_OBJECT public: MetaTagLoader(); @@ -22,7 +22,7 @@ class MetaTagLoader:public QObject, public Tags, public Plugin { void editTag(); private: - bool setProperty(KFileMetaInfo &info, PlaylistItem &item, const QString &key, const QString &property); + bool setProperty(KFileMetaInfo &info, PlaylistItem &item, const TQString &key, const TQString &property); int menuID; KAction *mAction; }; diff --git a/noatun/modules/monoscope/monoscope.cpp b/noatun/modules/monoscope/monoscope.cpp index 5ab63ecc..758d3950 100644 --- a/noatun/modules/monoscope/monoscope.cpp +++ b/noatun/modules/monoscope/monoscope.cpp @@ -2,7 +2,7 @@ #include <noatun/player.h> #include <noatun/app.h> #include <math.h> -#include <qpainter.h> +#include <tqpainter.h> #include <kactionclasses.h> #include <noatun/stdaction.h> #include <klocale.h> @@ -15,7 +15,7 @@ extern "C" } } -Monoscope::Monoscope() : QWidget(0,0,WRepaintNoErase), MonoScope(30), Plugin() +Monoscope::Monoscope() : TQWidget(0,0,WRepaintNoErase), MonoScope(30), Plugin() { NOATUNPLUGINC(Monoscope); @@ -27,7 +27,7 @@ Monoscope::Monoscope() : QWidget(0,0,WRepaintNoErase), MonoScope(30), Plugin() setCaption(i18n("Monoscope")); show(); resizeEvent(0); - repaint(0,0, QWidget::width(), height(), false); + repaint(0,0, TQWidget::width(), height(), false); resizeEvent(0); setBackgroundColor(mLowColor); } @@ -41,7 +41,7 @@ Monoscope::~Monoscope() void Monoscope::init() { mAction = new KToggleAction(i18n("Toggle Monoscope"), 0, 0, - this, SLOT(toggle()), this, "togglemonoscope"); + this, TQT_SLOT(toggle()), this, "togglemonoscope"); mAction->setChecked(!isHidden()); napp->pluginActionMenu()->insert(mAction); } @@ -54,12 +54,12 @@ void Monoscope::toggle(void) hide(); } -void Monoscope::closeEvent(QCloseEvent *) +void Monoscope::closeEvent(TQCloseEvent *) { hide(); } -void Monoscope::resizeEvent(QResizeEvent *) +void Monoscope::resizeEvent(TQResizeEvent *) { setSamples(width()); } @@ -79,9 +79,9 @@ void Monoscope::scopeEvent(float *d, int size) int heightHalf=viewHeight/4; int y=viewHeight/2; // reduce flicker - QPixmap buffer(viewWidth, viewHeight, -1, QPixmap::BestOptim); + TQPixmap buffer(viewWidth, viewHeight, -1, TQPixmap::BestOptim); buffer.fill(mLowColor); - QPainter p(&buffer); + TQPainter p(&buffer); p.setPen(mHighColor); repaint(rect()); diff --git a/noatun/modules/monoscope/monoscope.h b/noatun/modules/monoscope/monoscope.h index 37031a4b..0f9ddcff 100644 --- a/noatun/modules/monoscope/monoscope.h +++ b/noatun/modules/monoscope/monoscope.h @@ -5,7 +5,7 @@ class KToggleAction; -class Monoscope : public QWidget, public MonoScope, public Plugin +class Monoscope : public TQWidget, public MonoScope, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -20,10 +20,10 @@ public slots: void toggle(void); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); virtual void scopeEvent(float *data, int bands); - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); private: QRgb mHighColor, mLowColor; diff --git a/noatun/modules/net/net.cpp b/noatun/modules/net/net.cpp index 5e3ba707..f5898c71 100644 --- a/noatun/modules/net/net.cpp +++ b/noatun/modules/net/net.cpp @@ -11,10 +11,10 @@ extern "C" } -Net::Net() : QServerSocket(7539, 10), Plugin() +Net::Net() : TQServerSocket(7539, 10), Plugin() { mFDs.setAutoDelete(true); - connect(napp->player(), SIGNAL(newSong()), SLOT(newSong())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSong())); } Net::~Net() @@ -24,7 +24,7 @@ Net::~Net() void Net::newConnection(int fd) { - QSocket *s=new QSocket; + TQSocket *s=new QSocket; s->setSocket(fd); mFDs.append(s); } @@ -34,9 +34,9 @@ void Net::newSong() if (!napp->player()->current()) return; - for (QSocket *i=mFDs.first(); i!=0; i=mFDs.next()) + for (TQSocket *i=mFDs.first(); i!=0; i=mFDs.next()) { - QCString line; + TQCString line; line=napp->player()->current().title().latin1(); line+='\n'; ::write(i->socket(), (const void*)line.data(), line.length()); @@ -45,7 +45,7 @@ void Net::newSong() void Net::closed() { - for (QSocket *i=mFDs.first(); i!=0; i=mFDs.next()) + for (TQSocket *i=mFDs.first(); i!=0; i=mFDs.next()) { if (sender()==i) mFDs.removeRef(i); diff --git a/noatun/modules/net/net.h b/noatun/modules/net/net.h index 7d0fcb11..41c07438 100644 --- a/noatun/modules/net/net.h +++ b/noatun/modules/net/net.h @@ -3,11 +3,11 @@ #include <noatun/player.h> #include <noatun/plugin.h> -#include <qserversocket.h> -#include <qsocket.h> +#include <tqserversocket.h> +#include <tqsocket.h> #include <unistd.h> -class Net : public QServerSocket, public Plugin +class Net : public TQServerSocket, public Plugin { Q_OBJECT @@ -24,7 +24,7 @@ protected: virtual void newConnection(int socket); private: - QPtrList<QSocket> mFDs; + TQPtrList<TQSocket> mFDs; }; #endif diff --git a/noatun/modules/noatunui/userinterface.cpp b/noatun/modules/noatunui/userinterface.cpp index c13d4d6d..0302efe6 100644 --- a/noatun/modules/noatunui/userinterface.cpp +++ b/noatun/modules/noatunui/userinterface.cpp @@ -12,12 +12,12 @@ #include <noatun/controls.h> #include <noatun/effects.h> -#include <qpushbutton.h> -#include <qdragobject.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qobjectlist.h> -#include <qobjectdict.h> +#include <tqpushbutton.h> +#include <tqdragobject.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqobjectlist.h> +#include <tqobjectdict.h> #include <kpopupmenu.h> #include <kstatusbar.h> @@ -28,55 +28,55 @@ #include <kfiledialog.h> #include <kconfig.h> -MilkChocolate::MilkChocolate() : QWidget(0,"NoatunUI"), UserInterface() +MilkChocolate::MilkChocolate() : TQWidget(0,"NoatunUI"), UserInterface() { setAcceptDrops(true); static const int buttonSize=32; { // The buttons - mBack=new QPushButton(this); + mBack=new TQPushButton(this); mBack->setFixedSize(buttonSize,buttonSize); mBack->setPixmap(BarIcon("noatunback")); - connect(mBack, SIGNAL(clicked()), napp->player(), SLOT(back())); - QToolTip::add(mBack,i18n("Back")); + connect(mBack, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back())); + TQToolTip::add(mBack,i18n("Back")); - mStop=new QPushButton(this); + mStop=new TQPushButton(this); mStop->setFixedSize(buttonSize,buttonSize); mStop->setPixmap(BarIcon("noatunstop")); - connect(mStop, SIGNAL(clicked()), napp->player(), SLOT(stop())); - QToolTip::add(mStop, i18n("Stop")); + connect(mStop, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop())); + TQToolTip::add(mStop, i18n("Stop")); - mPlay=new QPushButton(this); + mPlay=new TQPushButton(this); mPlay->setToggleButton(true); mPlay->setFixedSize(buttonSize,buttonSize); mPlay->setPixmap(BarIcon("noatunplay")); - connect(mPlay, SIGNAL(clicked()), napp->player(), SLOT(playpause())); - QToolTip::add(mPlay, i18n("Play")); + connect(mPlay, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause())); + TQToolTip::add(mPlay, i18n("Play")); - mForward=new QPushButton(this); + mForward=new TQPushButton(this); mForward->setFixedSize(buttonSize,buttonSize); mForward->setPixmap(BarIcon("noatunforward")); - connect(mForward, SIGNAL(clicked()), napp->player(), SLOT(forward())); - QToolTip::add(mForward, i18n("Forward")); + connect(mForward, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward())); + TQToolTip::add(mForward, i18n("Forward")); - mPlaylist=new QPushButton(this); + mPlaylist=new TQPushButton(this); mPlaylist->setToggleButton(true); mPlaylist->setFixedSize(buttonSize,buttonSize); mPlaylist->setPixmap(BarIcon("noatunplaylist")); - connect(mPlaylist, SIGNAL(clicked()), napp->player(), SLOT(toggleListView())); - QToolTip::add(mPlaylist, i18n("Playlist")); + connect(mPlaylist, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView())); + TQToolTip::add(mPlaylist, i18n("Playlist")); - mLoop=new QPushButton(this); + mLoop=new TQPushButton(this); mLoop->setFixedSize(buttonSize,buttonSize); mLoop->setPixmap(BarIcon("noatunloopnone")); - connect(mLoop, SIGNAL(clicked()), napp->player(), SLOT(loop())); - QToolTip::add(mLoop, i18n("Change loop style")); + connect(mLoop, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(loop())); + TQToolTip::add(mLoop, i18n("Change loop style")); - mPopup=new QPushButton(this); + mPopup=new TQPushButton(this); mPopup->setFixedSize(buttonSize,buttonSize); mPopup->setPixmap(BarIcon("noatun")); - connect(mPopup, SIGNAL(clicked()), SLOT(popup())); -// QToolTip::add(mRemoveCurrent, i18n("Remove current file from playlist")); + connect(mPopup, TQT_SIGNAL(clicked()), TQT_SLOT(popup())); +// TQToolTip::add(mRemoveCurrent, i18n("Remove current file from playlist")); } @@ -87,7 +87,7 @@ MilkChocolate::MilkChocolate() : QWidget(0,"NoatunUI"), UserInterface() mStatusBar=new KStatusBar(this); - QGridLayout *l=new QGridLayout(this); + TQGridLayout *l=new TQGridLayout(this); l->addWidget(mBack,0,0); l->addWidget(mStop,0,1); l->addWidget(mPlay,0,2); @@ -104,35 +104,35 @@ MilkChocolate::MilkChocolate() : QWidget(0,"NoatunUI"), UserInterface() statusBar()->message(i18n("No File Loaded")); statusBar()->insertItem("--:--/--:--", 1, 0, true); - connect(napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect(napp, SIGNAL(showYourself()), this, SLOT(show()) ); + connect(napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect(napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlaying())); - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPaused())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlaying())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPaused())); napp->player()->handleButtons(); - connect(napp->player(), SIGNAL(timeout()), this, SLOT(slotTimeout())); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(changeLoopType(int))); + connect(napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(changeLoopType(int))); // if(seeker()) { /* This skipToWrapper is needed to pass milliseconds to Player() as everybody * below the GUI is based on milliseconds instead of some unprecise thingy * like seconds or mille */ - connect(seeker(), SIGNAL(userChanged(int)), this, SLOT(skipToWrapper(int))); - connect(this, SIGNAL(skipTo(int)), napp->player(), SLOT(skipTo(int))); - connect(seeker(), SIGNAL(sliderMoved(int)), SLOT(sliderMoved(int))); + connect(seeker(), TQT_SIGNAL(userChanged(int)), this, TQT_SLOT(skipToWrapper(int))); + connect(this, TQT_SIGNAL(skipTo(int)), napp->player(), TQT_SLOT(skipTo(int))); + connect(seeker(), TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(sliderMoved(int))); } - connect(mVolume, SIGNAL(sliderMoved(int)), napp->player(), SLOT(setVolume(int))); - connect(mVolume, SIGNAL(userChanged(int)), napp->player(), SLOT(setVolume(int))); + connect(mVolume, TQT_SIGNAL(sliderMoved(int)), napp->player(), TQT_SLOT(setVolume(int))); + connect(mVolume, TQT_SIGNAL(userChanged(int)), napp->player(), TQT_SLOT(setVolume(int))); - connect(napp->player(), SIGNAL(playlistShown()), SLOT(playlistShown())); - connect(napp->player(), SIGNAL(playlistHidden()), SLOT(playlistHidden())); + connect(napp->player(), TQT_SIGNAL(playlistShown()), TQT_SLOT(playlistShown())); + connect(napp->player(), TQT_SIGNAL(playlistHidden()), TQT_SLOT(playlistHidden())); // Event Filter for the RMB - for (QPtrListIterator<QObject> i(*children()); i.current(); ++i) + for (TQPtrListIterator<TQObject> i(*children()); i.current(); ++i) (*i)->installEventFilter(this); setCaption("Noatun"); @@ -150,23 +150,23 @@ MilkChocolate::~MilkChocolate() // delete prefDlg; } -void MilkChocolate::closeEvent(QCloseEvent*) +void MilkChocolate::closeEvent(TQCloseEvent*) { unload(); } -void MilkChocolate::showEvent(QShowEvent*e) +void MilkChocolate::showEvent(TQShowEvent*e) { - QWidget::showEvent(e); + TQWidget::showEvent(e); } -void MilkChocolate::dragEnterEvent(QDragEnterEvent *event) +void MilkChocolate::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void MilkChocolate::dropEvent(QDropEvent *event) +void MilkChocolate::dropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -176,14 +176,14 @@ void MilkChocolate::dropEvent(QDropEvent *event) } } -void MilkChocolate::mouseReleaseEvent(QMouseEvent *e) +void MilkChocolate::mouseReleaseEvent(TQMouseEvent *e) { - QWidget::mouseReleaseEvent(e); + TQWidget::mouseReleaseEvent(e); if (e->button()!=RightButton) return; NoatunStdAction::ContextMenu::showContextMenu(); } -void MilkChocolate::changeStatusbar(const QString& text, const QString &text2) +void MilkChocolate::changeStatusbar(const TQString& text, const TQString &text2) { if (!text2.isNull()) statusBar()->changeItem(text2, 1); @@ -191,7 +191,7 @@ void MilkChocolate::changeStatusbar(const QString& text, const QString &text2) statusBar()->message(!text.isNull() ? text : napp->player()->current().title()); } -void MilkChocolate::changeCaption(const QString& text) +void MilkChocolate::changeCaption(const TQString& text) { setCaption(text); } @@ -205,7 +205,7 @@ void MilkChocolate::popup() void MilkChocolate::slotPlaying() { -// connect(kwinmodule, SIGNAL(windowAdded(WId)), view, SLOT(attemptReparent(WId))); +// connect(kwinmodule, TQT_SIGNAL(windowAdded(WId)), view, TQT_SLOT(attemptReparent(WId))); changeStatusbar(napp->player()->current().title(), napp->player()->lengthString()); mPlay->setOn(true); mStop->setEnabled(true); @@ -278,21 +278,21 @@ void MilkChocolate::changeLoopType(int t) } -bool MilkChocolate::eventFilter(QObject *o, QEvent *e) +bool MilkChocolate::eventFilter(TQObject *o, TQEvent *e) { - if ((e->type() == QEvent::MouseButtonRelease) - && ((static_cast<QMouseEvent*>(e))->button()==RightButton)) + if ((e->type() == TQEvent::MouseButtonRelease) + && ((static_cast<TQMouseEvent*>(e))->button()==RightButton)) { - mouseReleaseEvent(static_cast<QMouseEvent*>(e)); + mouseReleaseEvent(static_cast<TQMouseEvent*>(e)); return true; } - if (e->type() == QEvent::Wheel) + if (e->type() == TQEvent::Wheel) { - wheelEvent(static_cast<QWheelEvent*>(e)); + wheelEvent(static_cast<TQWheelEvent*>(e)); return true; } - return QWidget::eventFilter(o, e); + return TQWidget::eventFilter(o, e); } void MilkChocolate::playlistShown() @@ -305,7 +305,7 @@ void MilkChocolate::playlistHidden() mPlaylist->setOn(false); } -void MilkChocolate::wheelEvent(QWheelEvent *e) +void MilkChocolate::wheelEvent(TQWheelEvent *e) { int delta=e->delta(); mVolume->setValue(mVolume->value()+(delta/120)); diff --git a/noatun/modules/noatunui/userinterface.h b/noatun/modules/noatunui/userinterface.h index 94dc9c44..1df5b160 100644 --- a/noatun/modules/noatunui/userinterface.h +++ b/noatun/modules/noatunui/userinterface.h @@ -21,25 +21,25 @@ class KStatusBar; * @author Charles Samuels <[email protected]> * @version 0.1 */ -class MilkChocolate : public QWidget, public UserInterface +class MilkChocolate : public TQWidget, public UserInterface { Q_OBJECT public: MilkChocolate(); virtual ~MilkChocolate(); - void load(const QString& url); + void load(const TQString& url); protected: - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); - virtual void closeEvent(QCloseEvent*); - virtual void showEvent(QShowEvent*e); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual bool eventFilter(QObject*, QEvent*); - virtual void wheelEvent(QWheelEvent *e); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); + virtual void closeEvent(TQCloseEvent*); + virtual void showEvent(TQShowEvent*e); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual bool eventFilter(TQObject*, TQEvent*); + virtual void wheelEvent(TQWheelEvent *e); protected: - QSlider *seeker() const { return mSeeker; } + TQSlider *seeker() const { return mSeeker; } KStatusBar *statusBar() const { return mStatusBar; } public slots: @@ -59,13 +59,13 @@ signals: void skipTo( int ); // emitted by skipToWrapper() private slots: - void changeStatusbar(const QString& text, const QString &text2=0); - void changeCaption(const QString& text); + void changeStatusbar(const TQString& text, const TQString &text2=0); + void changeCaption(const TQString& text); void popup(); private: - QPushButton *mBack, *mStop, *mPlay, *mForward, *mPlaylist, *mPopup, *mLoop; - QSlider *mSeeker, *mVolume; + TQPushButton *mBack, *mStop, *mPlay, *mForward, *mPlaylist, *mPopup, *mLoop; + TQSlider *mSeeker, *mVolume; KStatusBar *mStatusBar; }; diff --git a/noatun/modules/simple/propertiesdialog.ui.h b/noatun/modules/simple/propertiesdialog.ui.h index a712d776..ef6f14f9 100644 --- a/noatun/modules/simple/propertiesdialog.ui.h +++ b/noatun/modules/simple/propertiesdialog.ui.h @@ -16,22 +16,22 @@ void PropertiesDialog::setPlayObject( PlaylistItem pi, Arts::PlayObject po ) if (!po.isNull()) { Arts::poCapabilities ncaps = po.capabilities(); - QCheckListItem *item; + TQCheckListItem *item; descriptionLabel->setText( po.description().c_str() ); // Determine capabilities - if (!(item = (QCheckListItem *)capsList->findItem( "capSeek", 0 ))) + if (!(item = (TQCheckListItem *)capsList->findItem( "capSeek", 0 ))) { - item = new QCheckListItem( capsList, "capSeek", - QCheckListItem::CheckBox ); + item = new TQCheckListItem( capsList, "capSeek", + TQCheckListItem::CheckBox ); } item->setOn( (ncaps & Arts::capSeek) ); - if (!(item = (QCheckListItem *)capsList->findItem( "capPause", 0 ))) + if (!(item = (TQCheckListItem *)capsList->findItem( "capPause", 0 ))) { - item = new QCheckListItem( capsList, "capPause", - QCheckListItem::CheckBox ); + item = new TQCheckListItem( capsList, "capPause", + TQCheckListItem::CheckBox ); } item->setOn( (ncaps & Arts::capPause) ); diff --git a/noatun/modules/simple/userinterface.cpp b/noatun/modules/simple/userinterface.cpp index 6e7b486f..685b2467 100644 --- a/noatun/modules/simple/userinterface.cpp +++ b/noatun/modules/simple/userinterface.cpp @@ -30,14 +30,14 @@ #include <kstdguiitem.h> #include <kurl.h> -#include <qaccel.h> -#include <qdragobject.h> -#include <qhbox.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qstrlist.h> -#include <qtooltip.h> -#include <qvbox.h> +#include <tqaccel.h> +#include <tqdragobject.h> +#include <tqhbox.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqstrlist.h> +#include <tqtooltip.h> +#include <tqvbox.h> #include "userinterface.h" @@ -63,14 +63,14 @@ SimpleUI::SimpleUI() setupGUI( StatusBar|Create, "simpleui.rc" ); - connect( napp->player(), SIGNAL(playing()), SLOT(slotPlaying()) ); - connect( napp->player(), SIGNAL(stopped()), SLOT(slotStopped()) ); - connect( napp->player(), SIGNAL(paused()), SLOT(slotPaused()) ); - connect( napp->player(), SIGNAL(timeout()), SLOT(slotTimeout()) ); - connect( napp->player(), SIGNAL(newSong()), SLOT(slotChanged()) ); - connect( napp->player(), SIGNAL(volumeChanged(int)), SLOT(slotVolumeChanged(int)) ); - connect( napp, SIGNAL(hideYourself()), SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), SLOT(show()) ); + connect( napp->player(), TQT_SIGNAL(playing()), TQT_SLOT(slotPlaying()) ); + connect( napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(slotStopped()) ); + connect( napp->player(), TQT_SIGNAL(paused()), TQT_SLOT(slotPaused()) ); + connect( napp->player(), TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()) ); + connect( napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(slotChanged()) ); + connect( napp->player(), TQT_SIGNAL(volumeChanged(int)), TQT_SLOT(slotVolumeChanged(int)) ); + connect( napp, TQT_SIGNAL(hideYourself()), TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), TQT_SLOT(show()) ); napp->player()->handleButtons(); @@ -85,7 +85,7 @@ SimpleUI::SimpleUI() // Load configuration KConfig &config = *KGlobal::config(); config.setGroup( "Simple" ); - QString str = config.readEntry( "View", "NormalSize" ); + TQString str = config.readEntry( "View", "NormalSize" ); if (str == "HalfSize") video->setHalfSize(); @@ -107,7 +107,7 @@ SimpleUI::~SimpleUI() KConfig &config = *KGlobal::config(); saveMainWindowSettings( &config, "Simple" ); config.setGroup( "Simple" ); - QString str; + TQString str; if (video->isHalfSize()) str = "HalfSize"; @@ -126,10 +126,10 @@ SimpleUI::~SimpleUI() void SimpleUI::setupActions() { - KStdAction::open( napp, SLOT(fileOpen()), actionCollection(), "_file_open" ); - new KAction( i18n("&Properties"), 0, propertiesDialog, SLOT(show()), + KStdAction::open( napp, TQT_SLOT(fileOpen()), actionCollection(), "_file_open" ); + new KAction( i18n("&Properties"), 0, propertiesDialog, TQT_SLOT(show()), actionCollection(), "_file_properties" ); - KStdAction::quit( napp, SLOT(quit()), actionCollection(), "_file_quit"); + KStdAction::quit( napp, TQT_SLOT(quit()), actionCollection(), "_file_quit"); NoatunStdAction::playlist( actionCollection(), "view_playlist" ); actionCollection()->insert(video->action( "half_size" )); @@ -139,14 +139,14 @@ void SimpleUI::setupActions() actionCollection()->insert(napp->pluginActionMenu()); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection()); - statusbarAction = KStdAction::showStatusbar(this, SLOT(showStatusbar()), + statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(showStatusbar()), actionCollection()); NoatunStdAction::effects( actionCollection(), "effects" ); NoatunStdAction::equalizer( actionCollection(), "equalizer" ); NoatunStdAction::loop( actionCollection(), "loop_style" ); - KStdAction::preferences( napp, SLOT(preferences()), actionCollection() ); + KStdAction::preferences( napp, TQT_SLOT(preferences()), actionCollection() ); } void SimpleUI::showMenubar() @@ -168,89 +168,89 @@ void SimpleUI::showStatusbar() void SimpleUI::setupCentralWidget() { - QVBox *npWidget = new QVBox( this ); + TQVBox *npWidget = new TQVBox( this ); npWidget->setMargin( 0 ); npWidget->setSpacing( 0 ); - positionLabel = new QLabel( statusBar() ); + positionLabel = new TQLabel( statusBar() ); positionLabel->setAlignment( AlignVCenter | AlignCenter ); positionLabel->setFixedSize( fontMetrics().size( 0, " 00:00/00:00 " ) ); statusBar()->addWidget( positionLabel, 0, true ); video = new VideoFrame( npWidget ); - connect( video, SIGNAL(adaptSize(int,int)), - SLOT(slotAdaptSize(int,int)) ); - connect( video, SIGNAL(rightButtonPressed(const QPoint &)), - SLOT(slotContextMenu(const QPoint &)) ); + connect( video, TQT_SIGNAL(adaptSize(int,int)), + TQT_SLOT(slotAdaptSize(int,int)) ); + connect( video, TQT_SIGNAL(rightButtonPressed(const TQPoint &)), + TQT_SLOT(slotContextMenu(const TQPoint &)) ); - QHBox *ctlFrame = new QHBox( npWidget ); + TQHBox *ctlFrame = new TQHBox( npWidget ); ctlFrame->setFixedHeight( 38 ); - ctlFrame->setFrameShape( QFrame::StyledPanel ); - ctlFrame->setFrameShadow( QFrame::Raised ); + ctlFrame->setFrameShape( TQFrame::StyledPanel ); + ctlFrame->setFrameShadow( TQFrame::Raised ); ctlFrame->setMargin( 6 ); ctlFrame->setSpacing( 6 ); - QPushButton *backButton = new QPushButton( ctlFrame ); + TQPushButton *backButton = new TQPushButton( ctlFrame ); backButton->setFixedSize( 24, 24 ); - backButton->setPixmap( QPixmap( back_xpm ) ); - QToolTip::add( backButton, i18n("Back") ); - connect( backButton, SIGNAL(clicked()), napp->player(), SLOT(back()) ); + backButton->setPixmap( TQPixmap( back_xpm ) ); + TQToolTip::add( backButton, i18n("Back") ); + connect( backButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()) ); - stopButton = new QPushButton( ctlFrame ); + stopButton = new TQPushButton( ctlFrame ); stopButton->setFixedSize( 24, 24 ); - stopButton->setPixmap( QPixmap( stop_xpm ) ); - QToolTip::add( stopButton, i18n("Stop") ); - connect( stopButton, SIGNAL(clicked()), napp->player(), SLOT(stop()) ); + stopButton->setPixmap( TQPixmap( stop_xpm ) ); + TQToolTip::add( stopButton, i18n("Stop") ); + connect( stopButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()) ); - playButton = new QPushButton( ctlFrame ); + playButton = new TQPushButton( ctlFrame ); playButton->setFixedSize( 24, 24 ); - playButton->setPixmap( QPixmap( play_xpm ) ); - QToolTip::add( playButton, i18n("Play / Pause") ); - connect( playButton, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); + TQToolTip::add( playButton, i18n("Play / Pause") ); + connect( playButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); - QPushButton *forwButton = new QPushButton( ctlFrame ); + TQPushButton *forwButton = new TQPushButton( ctlFrame ); forwButton->setFixedSize( 24, 24 ); - forwButton->setPixmap( QPixmap( forward_xpm ) ); - QToolTip::add( forwButton, i18n("Forward") ); - connect( forwButton, SIGNAL(clicked()), napp->player(), SLOT(forward()) ); + forwButton->setPixmap( TQPixmap( forward_xpm ) ); + TQToolTip::add( forwButton, i18n("Forward") ); + connect( forwButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()) ); slider = new L33tSlider( 0, 1000, 10, 0, L33tSlider::Horizontal, ctlFrame ); slider->setFixedHeight( 24 ); slider->setMinimumWidth( 100 ); - slider->setTickmarks( QSlider::NoMarks ); - connect( slider, SIGNAL(userChanged(int)), SLOT(slotSkipTo(int)) ); - connect( slider, SIGNAL(sliderMoved(int)), SLOT(slotSliderMoved(int)) ); + slider->setTickmarks( TQSlider::NoMarks ); + connect( slider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(slotSkipTo(int)) ); + connect( slider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(slotSliderMoved(int)) ); - QPushButton *playlistButton = new QPushButton( ctlFrame ); + TQPushButton *playlistButton = new TQPushButton( ctlFrame ); playlistButton->setFixedSize( 24, 24 ); - playlistButton->setPixmap( QPixmap( playlist_xpm ) ); - QToolTip::add( playlistButton, i18n("Playlist") ); - connect( playlistButton, SIGNAL(clicked()), napp->player(), SLOT(toggleListView()) ); + playlistButton->setPixmap( TQPixmap( playlist_xpm ) ); + TQToolTip::add( playlistButton, i18n("Playlist") ); + connect( playlistButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView()) ); - volumeButton = new QPushButton( ctlFrame ); + volumeButton = new TQPushButton( ctlFrame ); volumeButton->setFixedSize( 24, 24 ); - volumeButton->setPixmap( QPixmap( volume_xpm ) ); - QToolTip::add( volumeButton, i18n("Volume") ); + volumeButton->setPixmap( TQPixmap( volume_xpm ) ); + TQToolTip::add( volumeButton, i18n("Volume") ); - volumeFrame = new QVBox( this, "Volume", WStyle_Customize | WType_Popup ); - volumeFrame->setFrameStyle( QFrame::PopupPanel ); + volumeFrame = new TQVBox( this, "Volume", WStyle_Customize | WType_Popup ); + volumeFrame->setFrameStyle( TQFrame::PopupPanel ); volumeFrame->setMargin( 4 ); - volumeLabel = new QLabel( volumeFrame ); + volumeLabel = new TQLabel( volumeFrame ); volumeLabel->setText( "100%" ); volumeLabel->setAlignment( AlignCenter ); volumeLabel->setFixedSize( volumeLabel->sizeHint() ); - QHBox *volumeSubFrame = new QHBox( volumeFrame ); + TQHBox *volumeSubFrame = new TQHBox( volumeFrame ); volumeSlider = new L33tSlider( 0, 100, 10, 0, Vertical, volumeSubFrame ); volumeSlider->setValue( 100 - napp->player()->volume() ); volumeSlider->setFixedSize( volumeSlider->sizeHint() ); volumeFrame->resize( volumeFrame->sizeHint() ); - connect( volumeSlider, SIGNAL(sliderMoved(int)), SLOT(slotVolumeSliderMoved(int)) ); - connect( volumeSlider, SIGNAL(userChanged(int)), SLOT(slotVolumeSliderMoved(int)) ); - connect( volumeButton, SIGNAL(clicked()), SLOT(slotVolumeFrame()) ); + connect( volumeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(slotVolumeSliderMoved(int)) ); + connect( volumeSlider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(slotVolumeSliderMoved(int)) ); + connect( volumeButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotVolumeFrame()) ); setCentralWidget( npWidget ); @@ -261,17 +261,17 @@ void SimpleUI::setupCentralWidget() propertiesDialog->resize( 375, 285 ); } -void SimpleUI::closeEvent( QCloseEvent * ) +void SimpleUI::closeEvent( TQCloseEvent * ) { unload(); } -void SimpleUI::dragEnterEvent( QDragEnterEvent *event ) +void SimpleUI::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode( event ) ); } -void SimpleUI::dropEvent( QDropEvent *event ) +void SimpleUI::dropEvent( TQDropEvent *event ) { KURL::List uri; if (KURLDrag::decode( event, uri )) @@ -285,7 +285,7 @@ void SimpleUI::slotAdaptSize( int width, int height ) void SimpleUI::slotPlaying() { - playButton->setPixmap( QPixmap( pause_xpm ) ); + playButton->setPixmap( TQPixmap( pause_xpm ) ); stopButton->setEnabled( true ); slider->setEnabled( true ); @@ -295,7 +295,7 @@ void SimpleUI::slotPlaying() void SimpleUI::slotStopped() { - playButton->setPixmap( QPixmap( play_xpm ) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); stopButton->setEnabled( false ); slider->setEnabled( false ); slider->setValue( 0 ); @@ -305,7 +305,7 @@ void SimpleUI::slotStopped() void SimpleUI::slotPaused() { - playButton->setPixmap( QPixmap( play_xpm ) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); slider->setEnabled( true ); } @@ -330,7 +330,7 @@ void SimpleUI::slotChanged() napp->player()->engine()->playObject() ); } -void SimpleUI::slotContextMenu( const QPoint &pos ) +void SimpleUI::slotContextMenu( const TQPoint &pos ) { contextMenu->exec( pos ); } @@ -343,7 +343,7 @@ void SimpleUI::slotSliderMoved( int sec ) void SimpleUI::slotVolumeChanged( int volume ) { - volumeLabel->setText( QString::number( volume ) + "%" ); + volumeLabel->setText( TQString::number( volume ) + "%" ); volumeSlider->setValue( 100 - volume ); } @@ -358,8 +358,8 @@ void SimpleUI::slotVolumeFrame() int x = (volumeButton->width() - volumeFrame->width()) / 2; int y = -(volumeFrame->height() + 5); - QPoint point( volumeButton->mapToGlobal( QPoint( x, y ) ) ); - QRect deskRect = KGlobalSettings::desktopGeometry( point ); + TQPoint point( volumeButton->mapToGlobal( TQPoint( x, y ) ) ); + TQRect deskRect = KGlobalSettings::desktopGeometry( point ); bool bottom = (point.y() + volumeFrame->height()) > (deskRect.y() + deskRect.height()); bool right = (point.x() + volumeFrame->width()) > (deskRect.x() + deskRect.width()); diff --git a/noatun/modules/simple/userinterface.h b/noatun/modules/simple/userinterface.h index c545fd2c..e3a84f84 100644 --- a/noatun/modules/simple/userinterface.h +++ b/noatun/modules/simple/userinterface.h @@ -17,11 +17,11 @@ #include <kaction.h> #include <kmainwindow.h> #include <kmedia2.h> -#include <qevent.h> -#include <qlabel.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qvbox.h> +#include <tqevent.h> +#include <tqlabel.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqvbox.h> #include "propertiesdialog.h" @@ -37,9 +37,9 @@ protected: void setupActions(); void setupCentralWidget(); - virtual void closeEvent( QCloseEvent * ); - virtual void dragEnterEvent( QDragEnterEvent *event ); - virtual void dropEvent( QDropEvent *event ); + virtual void closeEvent( TQCloseEvent * ); + virtual void dragEnterEvent( TQDragEnterEvent *event ); + virtual void dropEvent( TQDropEvent *event ); public slots: void slotAdaptSize( int width, int height ); @@ -49,7 +49,7 @@ public slots: void slotTimeout(); void slotSkipTo( int sec ); void slotChanged(); - void slotContextMenu( const QPoint &pos ); + void slotContextMenu( const TQPoint &pos ); private slots: void slotSliderMoved( int sec ); @@ -61,13 +61,13 @@ private slots: private: PropertiesDialog *propertiesDialog; - QPopupMenu *contextMenu; - QPushButton *stopButton; - QPushButton *playButton; - QPushButton *volumeButton; - QVBox *volumeFrame; - QLabel *volumeLabel; - QLabel *positionLabel; + TQPopupMenu *contextMenu; + TQPushButton *stopButton; + TQPushButton *playButton; + TQPushButton *volumeButton; + TQVBox *volumeFrame; + TQLabel *volumeLabel; + TQLabel *positionLabel; VideoFrame *video; L33tSlider *volumeSlider; L33tSlider *slider; diff --git a/noatun/modules/splitplaylist/find.cpp b/noatun/modules/splitplaylist/find.cpp index b6e196d9..5d378a79 100644 --- a/noatun/modules/splitplaylist/find.cpp +++ b/noatun/modules/splitplaylist/find.cpp @@ -1,17 +1,17 @@ #include "find.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kcombobox.h> -#include <qpushbutton.h> -#include <qcheckbox.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> #include <klocale.h> -Finder::Finder(QWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"find")) +Finder::Finder(TQWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"find")) { - QWidget *mainWidget = new QWidget(this); + TQWidget *mainWidget = new TQWidget(this); mainWidget->setMinimumWidth(320); setMainWidget(mainWidget); - QGridLayout *layout=new QGridLayout(mainWidget); + TQGridLayout *layout=new TQGridLayout(mainWidget); layout->setSpacing(KDialog::spacingHint()); mText=new KHistoryCombo(mainWidget); @@ -19,22 +19,22 @@ Finder::Finder(QWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Cl mText->setFocus(); - mRegexp=new QCheckBox(i18n("&Regular expression"), mainWidget); - mBackwards=new QCheckBox(i18n("Find &backwards"), mainWidget); + mRegexp=new TQCheckBox(i18n("&Regular expression"), mainWidget); + mBackwards=new TQCheckBox(i18n("Find &backwards"), mainWidget); layout->addMultiCellWidget(mText, 0, 0, 0, 1); layout->addWidget(mRegexp, 1, 0); layout->addWidget(mBackwards, 1, 1); - connect(this, SIGNAL(user1Clicked()), SLOT(clicked())); + connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(clicked())); - connect(mText, SIGNAL(activated(int)), SLOT(clicked())); - connect(mText, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &))); + connect(mText, TQT_SIGNAL(activated(int)), TQT_SLOT(clicked())); + connect(mText, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged(const TQString &))); enableButton(User1, false); } -void Finder::textChanged(const QString &text) { +void Finder::textChanged(const TQString &text) { enableButton(User1, !text.isEmpty()); } @@ -54,7 +54,7 @@ void Finder::clicked() emit search(this); } -QString Finder::string() const +TQString Finder::string() const { return mText->currentText(); } diff --git a/noatun/modules/splitplaylist/find.h b/noatun/modules/splitplaylist/find.h index a4791339..752bc8dd 100644 --- a/noatun/modules/splitplaylist/find.h +++ b/noatun/modules/splitplaylist/find.h @@ -11,22 +11,22 @@ class Finder : public KDialogBase { Q_OBJECT public: - Finder(QWidget *parent); + Finder(TQWidget *parent); bool regexp() const; bool isForward() const; - QString string() const; + TQString string() const; signals: void search(Finder *); public slots: - void textChanged(const QString &); + void textChanged(const TQString &); void clicked(); private: KHistoryCombo *mText; - QCheckBox *mRegexp, *mBackwards; + TQCheckBox *mRegexp, *mBackwards; }; #endif diff --git a/noatun/modules/splitplaylist/playlist.cpp b/noatun/modules/splitplaylist/playlist.cpp index 57d6fb48..d0ded140 100644 --- a/noatun/modules/splitplaylist/playlist.cpp +++ b/noatun/modules/splitplaylist/playlist.cpp @@ -20,9 +20,9 @@ SplitPlaylist::SplitPlaylist() void SplitPlaylist::init() { view=new View(this); // 195 - connect(view->listView(), SIGNAL(executed(QListViewItem*)), SLOT(listItemSelected(QListViewItem*))); - connect(view, SIGNAL(shown()), SIGNAL(listShown())); - connect(view, SIGNAL(hidden()), SIGNAL(listHidden())); + connect(view->listView(), TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(listItemSelected(TQListViewItem*))); + connect(view, TQT_SIGNAL(shown()), TQT_SIGNAL(listShown())); + connect(view, TQT_SIGNAL(hidden()), TQT_SIGNAL(listHidden())); view->init(); // 1000 } @@ -112,7 +112,7 @@ PlaylistItem SplitPlaylist::previous() List *list = view->listView(); // check if the item still exists (hackitude: 50%) bool found=false; - for (QListViewItem *i = list->firstChild(); i; i = i->nextSibling()) + for (TQListViewItem *i = list->firstChild(); i; i = i->nextSibling()) { if (i == static_cast<SafeListViewItem*>(randomPrevious.data())) { @@ -215,15 +215,15 @@ void SplitPlaylist::setCurrent(const PlaylistItem &i, bool emitC) // remove the old icon SafeListViewItem *now=static_cast<SafeListViewItem*>(current().data()); if (now) - now->setPixmap(0, QPixmap()); + now->setPixmap(0, TQPixmap()); - QRect rect(view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data()))); + TQRect rect(view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data()))); rect.setWidth(view->listView()->viewport()->width()); currentItem=i; view->listView()->viewport()->repaint(rect,true); view->listView()->ensureItemVisible(static_cast<SafeListViewItem*>(current().data())); - QRect currentRect= view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data())); + TQRect currentRect= view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data())); view->listView()->viewport()->repaint(currentRect); now=static_cast<SafeListViewItem*>(current().data()); @@ -240,7 +240,7 @@ void SplitPlaylist::remove(const PlaylistItem &) // delete i; } -void SplitPlaylist::listItemSelected(QListViewItem *i) +void SplitPlaylist::listItemSelected(TQListViewItem *i) { setCurrent(PlaylistItem(static_cast<SafeListViewItem*>(i)), false); emit playCurrent(); @@ -253,8 +253,8 @@ void SplitPlaylist::randomize() view->setSorting(false); List *lview = view->listView(); // eeeeevil :) - QPtrList<void> list; - QPtrList<QListViewItem> items; + TQPtrList<void> list; + TQPtrList<TQListViewItem> items; for(int i = 0; i < lview->childCount(); i++) { list.append( (void*) i ); diff --git a/noatun/modules/splitplaylist/playlist.h b/noatun/modules/splitplaylist/playlist.h index 04cb648d..204d97c2 100644 --- a/noatun/modules/splitplaylist/playlist.h +++ b/noatun/modules/splitplaylist/playlist.h @@ -10,8 +10,8 @@ class PlaylistItem PlaylistItem(const KURL &u=0); virtual ~PlaylistItem(); - QString title() const; - virtual void setTitle(const QString &t); + TQString title() const; + virtual void setTitle(const TQString &t); KURL url() const; virtual void setUrl(const KURL &u); @@ -77,7 +77,7 @@ public slots: void setCurrent(const PlaylistItem &, bool emitC); void setCurrent(const PlaylistItem &); - void listItemSelected(QListViewItem*); + void listItemSelected(TQListViewItem*); void randomize(); @@ -90,7 +90,7 @@ signals: private: bool mExiting; // HACK HACK HACK HACK!!! View *view; -// QRect currentRect; +// TQRect currentRect; static SplitPlaylist *Self; }; diff --git a/noatun/modules/splitplaylist/view.cpp b/noatun/modules/splitplaylist/view.cpp index 7f5584f9..8df38afd 100644 --- a/noatun/modules/splitplaylist/view.cpp +++ b/noatun/modules/splitplaylist/view.cpp @@ -10,13 +10,13 @@ // Abandon All Hope, Ye Who Enter Here -#include <qdragobject.h> -#include <qheader.h> -#include <qlayout.h> -#include <qmap.h> -#include <qregexp.h> -#include <qtextstream.h> -#include <qpainter.h> +#include <tqdragobject.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqmap.h> +#include <tqregexp.h> +#include <tqtextstream.h> +#include <tqpainter.h> #include <kaction.h> #include <kdebug.h> @@ -43,8 +43,8 @@ #define SPL SplitPlaylist::SPL() -SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, const KURL &text) - : QCheckListItem(parent,0, QCheckListItem::CheckBox), PlaylistItemData(), removed(false) +SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text) + : TQCheckListItem(parent,0, TQCheckListItem::CheckBox), PlaylistItemData(), removed(false) { addRef(); setUrl(text); @@ -65,8 +65,8 @@ SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, cons PlaylistItemData::added(); } -SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, const QMap<QString,QString> &props) - : QCheckListItem(parent, 0, QCheckListItem::CheckBox), removed(false) +SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap<TQString,TQString> &props) + : TQCheckListItem(parent, 0, TQCheckListItem::CheckBox), removed(false) { addRef(); @@ -75,10 +75,10 @@ SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, cons // A version of setProperty that assumes a key is unique, // and doesn't call modified for every new key. // Ugly, but this function is a very hot path on playlist loading - for (QMap<QString,QString>::ConstIterator i=props.begin(); i!=props.end(); ++i ) + for (TQMap<TQString,TQString>::ConstIterator i=props.begin(); i!=props.end(); ++i ) { - QString n = i.key(); - QString val = i.data(); + TQString n = i.key(); + TQString val = i.data(); if (n=="enabled") { @@ -109,12 +109,12 @@ SafeListViewItem::~SafeListViewItem() remove(); } -QString SafeListViewItem::file() const +TQString SafeListViewItem::file() const { return localFilename(); } -static void pad(QString &str) +static void pad(TQString &str) { int len=str.length(); int at = 0; @@ -123,11 +123,11 @@ static void pad(QString &str) static const int paddingsize=12; // not static for reason - const QChar chars[paddingsize] = + const TQChar chars[paddingsize] = { - QChar('0'), QChar('0'), QChar('0'), QChar('0'), - QChar('0'), QChar('0'), QChar('0'), QChar('0'), - QChar('0'), QChar('0'), QChar('0'), QChar('0') + TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'), + TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'), + TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0') }; for (int i=0; i < len; i++) @@ -155,19 +155,19 @@ static void pad(QString &str) } } -int SafeListViewItem::compare(QListViewItem * i, int col, bool) const +int SafeListViewItem::compare(TQListViewItem * i, int col, bool) const { - QString text1 = text(col); - QString text2 = i->text(col); + TQString text1 = text(col); + TQString text2 = i->text(col); pad(text1); pad(text2); return text1.compare(text2); } -QString SafeListViewItem::property(const QString &n, const QString &def) const +TQString SafeListViewItem::property(const TQString &n, const TQString &def) const { - for (QValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) + for (TQValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) { if ((*i).key==n) return (*i).value; @@ -180,7 +180,7 @@ QString SafeListViewItem::property(const QString &n, const QString &def) const return def; } -void SafeListViewItem::setProperty(const QString &n, const QString &val) +void SafeListViewItem::setProperty(const TQString &n, const TQString &val) { if (n=="enabled") { @@ -201,7 +201,7 @@ void SafeListViewItem::setProperty(const QString &n, const QString &val) modified(); } -void SafeListViewItem::clearProperty(const QString &n) +void SafeListViewItem::clearProperty(const TQString &n) { if (n=="enabled") { @@ -210,7 +210,7 @@ void SafeListViewItem::clearProperty(const QString &n) return; } - for (QValueList<Property>::Iterator i=mProperties.begin(); i != mProperties.end(); ++i) + for (TQValueList<Property>::Iterator i=mProperties.begin(); i != mProperties.end(); ++i) { if ((*i).key==n) { @@ -221,18 +221,18 @@ void SafeListViewItem::clearProperty(const QString &n) } } -QStringList SafeListViewItem::properties() const +TQStringList SafeListViewItem::properties() const { - QStringList list; - for (QValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) + TQStringList list; + for (TQValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) list += (*i).key; list += "enabled"; return list; } -bool SafeListViewItem::isProperty(const QString &n) const +bool SafeListViewItem::isProperty(const TQString &n) const { - for (QValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) + for (TQValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) { if ((*i).key==n) return true; @@ -243,7 +243,7 @@ bool SafeListViewItem::isProperty(const QString &n) const void SafeListViewItem::downloaded(int percent) { if (!removed) - setText(1, QString::number(percent)+'%'); + setText(1, TQString::number(percent)+'%'); } void SafeListViewItem::downloadTimeout() @@ -285,25 +285,25 @@ void SafeListViewItem::stateChange(bool s) // if you uncheck this, uncheck thet others that // are selected too - QPtrList<QListViewItem> list=SPL->view->listView()->selectedItems(); + TQPtrList<TQListViewItem> list=SPL->view->listView()->selectedItems(); // but not if I'm not selected if (list.containsRef(this)) - for (QListViewItem *i=list.first(); i != 0; i=list.next()) - static_cast<QCheckListItem*>(i)->setOn(s); + for (TQListViewItem *i=list.first(); i != 0; i=list.next()) + static_cast<TQCheckListItem*>(i)->setOn(s); else - QCheckListItem::stateChange(s); + TQCheckListItem::stateChange(s); } -void SafeListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void SafeListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { - QCheckListItem::paintCell(p, cg, column, width, align); + TQCheckListItem::paintCell(p, cg, column, width, align); if (SPL->current() == this) { p->save(); p->setRasterOp(XorROP); - p->fillRect(0, 0, width, height(), QColor(255,255,255)); + p->fillRect(0, 0, width, height(), TQColor(255,255,255)); p->restore(); } @@ -354,11 +354,11 @@ List::List(View *parent) setDropVisualizer(true); setDragEnabled(true); setItemsMovable(true); - setSelectionMode(QListView::Extended); - connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*)), SLOT(dropEvent(QDropEvent*, QListViewItem*))); - connect(this, SIGNAL(moved()), SLOT(move())); - connect(this, SIGNAL(aboutToMove()), parent, SLOT(setNoSorting())); - connect(this, SIGNAL(deleteCurrentItem()), parent, SLOT(deleteSelected())); + setSelectionMode(TQListView::Extended); + connect(this, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), TQT_SLOT(dropEvent(TQDropEvent*, TQListViewItem*))); + connect(this, TQT_SIGNAL(moved()), TQT_SLOT(move())); + connect(this, TQT_SIGNAL(aboutToMove()), parent, TQT_SLOT(setNoSorting())); + connect(this, TQT_SIGNAL(deleteCurrentItem()), parent, TQT_SLOT(deleteSelected())); } List::~List() @@ -370,12 +370,12 @@ void List::move() emit modified(); } -bool List::acceptDrag(QDropEvent *event) const +bool List::acceptDrag(TQDropEvent *event) const { return KURLDrag::canDecode(event) || KListView::acceptDrag(event); } -void List::dropEvent(QDropEvent *event, QListViewItem *after) +void List::dropEvent(TQDropEvent *event, TQListViewItem *after) { static_cast<View*>(parent())->setNoSorting(); KURL::List textlist; @@ -390,7 +390,7 @@ void List::dropEvent(QDropEvent *event, QListViewItem *after) emit modified(); } -void List::keyPressEvent(QKeyEvent *e) +void List::keyPressEvent(TQKeyEvent *e) { if (e->key()==Key_Enter || e->key()==Key_Return) { @@ -425,18 +425,18 @@ class NoatunSaver : public PlaylistSaver List *mList; SafeListViewItem *after, *mFirst; public: - NoatunSaver(List *l, QListViewItem *after=0) + NoatunSaver(List *l, TQListViewItem *after=0) : mList(l) { this->after = static_cast<SafeListViewItem*>(after); mFirst = 0; } - QListViewItem *getAfter() { return after; } - QListViewItem *getFirst() { return mFirst; } + TQListViewItem *getAfter() { return after; } + TQListViewItem *getFirst() { return mFirst; } protected: - virtual void readItem(const QMap<QString,QString> &properties) + virtual void readItem(const TQMap<TQString,TQString> &properties) { after = new SafeListViewItem(mList, after, properties); if (mFirst==0) @@ -474,10 +474,10 @@ bool View::saveToURL(const KURL &url) void View::exportTo(const KURL &url) { - QString local(napp->tempSaveName(url.path())); - QFile saver(local); + TQString local(napp->tempSaveName(url.path())); + TQFile saver(local); saver.open(IO_ReadWrite | IO_Truncate); - QTextStream t(&saver); + TQTextStream t(&saver); // navigate the list for (SafeListViewItem *i=static_cast<SafeListViewItem*>(listView()->firstChild()); i != 0; i=static_cast<SafeListViewItem*>(i->itemBelow())) @@ -495,7 +495,7 @@ void View::exportTo(const KURL &url) saver.remove(); } -QListViewItem *List::openGlobal(const KURL &u, QListViewItem *after) +TQListViewItem *List::openGlobal(const KURL &u, TQListViewItem *after) { clear(); NoatunSaver saver(this, after); @@ -505,7 +505,7 @@ QListViewItem *List::openGlobal(const KURL &u, QListViewItem *after) } // for m3u files -QListViewItem *List::importGlobal(const KURL &u, QListViewItem *after) +TQListViewItem *List::importGlobal(const KURL &u, TQListViewItem *after) { NoatunSaver saver(this, after); if (!saver.metalist(u)) @@ -524,7 +524,7 @@ QListViewItem *List::importGlobal(const KURL &u, QListViewItem *after) return saver.getAfter(); } -QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after) +TQListViewItem *List::addFile(const KURL& url, bool play, TQListViewItem *after) { // when a new item is added, we don't want to sort anymore SPL->view->setNoSorting(); @@ -536,7 +536,7 @@ QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after) ) { // a playlist is requested - QListViewItem *i = importGlobal(url, after); + TQListViewItem *i = importGlobal(url, after); if (play) SPL->listItemSelected(i); return i; @@ -552,7 +552,7 @@ QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after) } else { - QListViewItem *i = new SafeListViewItem(this, after, url); + TQListViewItem *i = new SafeListViewItem(this, after, url); if (play) SPL->listItemSelected(i); return i; @@ -569,22 +569,22 @@ void List::addNextPendingDirectory() currentJobURL= *pendingIt; listJob= KIO::listRecursive(currentJobURL, false,false); connect( - listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)), - SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&)) + listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)), + TQT_SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&)) ); connect( - listJob, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *)) + listJob, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *)) ); connect( - listJob, SIGNAL(redirection(KIO::Job *, const KURL &)), - SLOT(slotRedirection(KIO::Job *, const KURL &)) + listJob, TQT_SIGNAL(redirection(KIO::Job *, const KURL &)), + TQT_SLOT(slotRedirection(KIO::Job *, const KURL &)) ); pendingAddDirectories.remove(pendingIt); } } -void List::addDirectoryRecursive(const KURL &dir, QListViewItem *after) +void List::addDirectoryRecursive(const KURL &dir, TQListViewItem *after) { if (!after) after=lastItem(); recursiveAddAfter= after; @@ -602,7 +602,7 @@ void List::slotResult(KIO::Job *job) void List::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries) { - QMap<QString,KURL> __list; // temp list to sort entries + TQMap<TQString,KURL> __list; // temp list to sort entries KIO::UDSEntryListConstIterator it = entries.begin(); KIO::UDSEntryListConstIterator end = entries.end(); @@ -619,7 +619,7 @@ void List::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries) if (!file.isDir()) __list.insert(file.url().path(), file.url()); } - QMap<QString,KURL>::Iterator __it; + TQMap<TQString,KURL>::Iterator __it; for( __it = __list.begin(); __it != __list.end(); ++__it ) { recursiveAddAfter= addFile(__it.data(), false, recursiveAddAfter); @@ -638,25 +638,25 @@ View::View(SplitPlaylist *) { list=new List(this); setCentralWidget(list); - connect(list, SIGNAL(modified(void)), this, SLOT(setModified(void)) ); + connect(list, TQT_SIGNAL(modified(void)), this, TQT_SLOT(setModified(void)) ); // connect the click on the header with sorting - connect(list->header(),SIGNAL(clicked(int)),this,SLOT(headerClicked(int)) ); + connect(list->header(),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(headerClicked(int)) ); - mOpen=new KAction(i18n("Add &Files..."), "queue", 0, this, SLOT(addFiles()), actionCollection(), "add_files"); - (void) new KAction(i18n("Add Fol&ders..."), "folder", 0, this, SLOT(addDirectory()), actionCollection(), "add_dir"); - mDelete=new KAction(i18n("Delete"), "editdelete", Key_Delete, this, SLOT(deleteSelected()), actionCollection(), "delete"); + mOpen=new KAction(i18n("Add &Files..."), "queue", 0, this, TQT_SLOT(addFiles()), actionCollection(), "add_files"); + (void) new KAction(i18n("Add Fol&ders..."), "folder", 0, this, TQT_SLOT(addDirectory()), actionCollection(), "add_dir"); + mDelete=new KAction(i18n("Delete"), "editdelete", Key_Delete, this, TQT_SLOT(deleteSelected()), actionCollection(), "delete"); - mClose=KStdAction::close(this, SLOT(close()), actionCollection()); - mFind=KStdAction::find(this, SLOT(find()), actionCollection()); + mClose=KStdAction::close(this, TQT_SLOT(close()), actionCollection()); + mFind=KStdAction::find(this, TQT_SLOT(find()), actionCollection()); - (void) KStdAction::configureToolbars(this, SLOT(configureToolBars()), actionCollection()); - mOpenNew=KStdAction::openNew(this, SLOT(openNew()), actionCollection()); - mOpenpl=KStdAction::open(this, SLOT(open()), actionCollection()); - mSave=KStdAction::save(this, SLOT(save()), actionCollection()); - mSaveAs=KStdAction::saveAs(this, SLOT(saveAs()), actionCollection()); + (void) KStdAction::configureToolbars(this, TQT_SLOT(configureToolBars()), actionCollection()); + mOpenNew=KStdAction::openNew(this, TQT_SLOT(openNew()), actionCollection()); + mOpenpl=KStdAction::open(this, TQT_SLOT(open()), actionCollection()); + mSave=KStdAction::save(this, TQT_SLOT(save()), actionCollection()); + mSaveAs=KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection()); - (void) new KAction(i18n("Shuffle"), "misc", 0, SPL, SLOT( randomize() ), actionCollection(), "shuffle"); - (void) new KAction(i18n("Clear"), "editclear", 0, list, SLOT( clear() ), actionCollection(), "clear"); + (void) new KAction(i18n("Shuffle"), "misc", 0, SPL, TQT_SLOT( randomize() ), actionCollection(), "shuffle"); + (void) new KAction(i18n("Clear"), "editclear", 0, list, TQT_SLOT( clear() ), actionCollection(), "clear"); createGUI("splui.rc"); @@ -669,10 +669,10 @@ View::View(SplitPlaylist *) void View::find() { mFinder->show(); - connect(mFinder, SIGNAL(search(Finder*)), SLOT(findIt(Finder*))); + connect(mFinder, TQT_SIGNAL(search(Finder*)), TQT_SLOT(findIt(Finder*))); } -static bool testWord(QListViewItem *i, const QString &finder) +static bool testWord(TQListViewItem *i, const TQString &finder) { PlaylistItemData *item=static_cast<SafeListViewItem*>(i); if (item->title().find(finder, 0, false) >=0) @@ -688,7 +688,7 @@ static bool testWord(QListViewItem *i, const QString &finder) return false; } -static bool testWord(QListViewItem *i, const QRegExp &finder) +static bool testWord(TQListViewItem *i, const TQRegExp &finder) { PlaylistItemData *item=static_cast<SafeListViewItem*>(i); if (item->title().find(finder) >=0) @@ -706,7 +706,7 @@ static bool testWord(QListViewItem *i, const QRegExp &finder) void View::findIt(Finder *f) { - QListViewItem *search=list->currentItem(); + TQListViewItem *search=list->currentItem(); if (list->currentItem()) { @@ -728,7 +728,7 @@ void View::findIt(Finder *f) { if (f->regexp()) { - if (testWord(search, QRegExp(f->string(), false))) + if (testWord(search, TQRegExp(f->string(), false))) break; } else @@ -746,12 +746,12 @@ void View::findIt(Finder *f) { if (f->isForward()) { - if (KMessageBox::questionYesNo(this, i18n("End of playlist reached. Continue searching from beginning?"),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) + if (KMessageBox::questionYesNo(this, i18n("End of playlist reached. Continue searching from beginning?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) search=list->firstChild(); } else { - if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) + if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) search=list->lastChild(); } } @@ -760,8 +760,8 @@ void View::findIt(Finder *f) if (search) { { // select none - QPtrList<QListViewItem> sel=list->selectedItems(); - for (QListViewItem *i=sel.first(); i!=0; i=sel.next()) + TQPtrList<TQListViewItem> sel=list->selectedItems(); + for (TQListViewItem *i=sel.first(); i!=0; i=sel.next()) list->setSelected(i, false); } list->setSelected(search, true); @@ -781,7 +781,7 @@ View::~View() void View::init() { // see if we are importing an old-style list - bool importing= ! QFile(napp->dirs()->saveLocation("data", "noatun/") + "splitplaylist.xml").exists(); + bool importing= ! TQFile(napp->dirs()->saveLocation("data", "noatun/") + "splitplaylist.xml").exists(); if (importing) { @@ -802,7 +802,7 @@ void View::init() // this has to come after openGlobal, since openGlobal emits modified() setModified(config.readBoolEntry("modified", false)); - QString path = config.readPathEntry("file"); + TQString path = config.readPathEntry("file"); // don't call setPath with an empty path, that would make the url "valid" if ( !path.isEmpty() ) mPlaylistFile.setPath(path); @@ -860,18 +860,18 @@ void List::clear() { SPL->setCurrent(0); - QListView::clear(); + TQListView::clear(); } void View::deleteSelected() { - QPtrList<QListViewItem> items(list->selectedItems()); + TQPtrList<TQListViewItem> items(list->selectedItems()); bool stopped=false; // noatun shouldn't play files for now - QListViewItem *afterLast=0; + TQListViewItem *afterLast=0; - for (QPtrListIterator<QListViewItem> it(items); it.current(); ++it) + for (TQPtrListIterator<TQListViewItem> it(items); it.current(); ++it) { SafeListViewItem *i = static_cast<SafeListViewItem*>(*it); if (!stopped && SPL->current() == i) @@ -895,7 +895,7 @@ void View::addFiles() { KURL::List files=KFileDialog::getOpenURLs(":mediadir", napp->mimeTypes(), this, i18n("Select File to Play")); - QListViewItem *last = list->lastItem(); + TQListViewItem *last = list->lastItem(); for(KURL::List::Iterator it=files.begin(); it!=files.end(); ++it) last = addFile(KURL(*it), false); @@ -904,7 +904,7 @@ void View::addFiles() void View::addDirectory() { - QString file=KFileDialog::getExistingDirectory(0, this, i18n("Select Folder")); + TQString file=KFileDialog::getExistingDirectory(0, this, i18n("Select Folder")); if (!file) return; KURL url; @@ -914,17 +914,17 @@ void View::addDirectory() setModified(true); } -void View::closeEvent(QCloseEvent*) +void View::closeEvent(TQCloseEvent*) { hide(); } -void View::showEvent(QShowEvent *) +void View::showEvent(TQShowEvent *) { emit shown(); } -void View::hideEvent(QHideEvent *) +void View::hideEvent(TQHideEvent *) { emit hidden(); } @@ -964,7 +964,7 @@ void View::configureToolBars() { saveMainWindowSettings(KGlobal::config(), "SPL Window"); KEditToolbar dlg(actionCollection(), "splui.rc"); - connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(newToolBarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolBarConfig())); dlg.exec(); } diff --git a/noatun/modules/splitplaylist/view.h b/noatun/modules/splitplaylist/view.h index 18dc917a..785608fd 100644 --- a/noatun/modules/splitplaylist/view.h +++ b/noatun/modules/splitplaylist/view.h @@ -1,12 +1,12 @@ #ifndef VIEW_H #define VIEW_H -#include <qevent.h> -#include <qptrlist.h> +#include <tqevent.h> +#include <tqptrlist.h> #include <klistview.h> #include <kmainwindow.h> -#include <qrect.h> -#include <qdict.h> +#include <tqrect.h> +#include <tqdict.h> #include <kio/global.h> #include <noatun/downloader.h> @@ -21,19 +21,19 @@ class SafeListViewItem , public DownloadItem { public: - SafeListViewItem(QListView *parent, QListViewItem *after, const KURL &text); - SafeListViewItem(QListView *parent, QListViewItem *after, const QMap<QString,QString> &properties); + SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text); + SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap<TQString,TQString> &properties); virtual ~SafeListViewItem(); - virtual QString property(const QString &, const QString & = 0) const; - virtual void setProperty(const QString &, const QString &); - virtual void clearProperty(const QString &); - virtual QStringList properties() const; - virtual bool isProperty(const QString &) const; + virtual TQString property(const TQString &, const TQString & = 0) const; + virtual void setProperty(const TQString &, const TQString &); + virtual void clearProperty(const TQString &); + virtual TQStringList properties() const; + virtual bool isProperty(const TQString &) const; - virtual QString file() const; + virtual TQString file() const; - int compare(QListViewItem * i, int col, bool ascending) const; + int compare(TQListViewItem * i, int col, bool ascending) const; virtual void remove(); protected: @@ -43,15 +43,15 @@ protected: virtual void modified(); virtual void stateChange(bool s); - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); private: struct Property { - QString key; - QString value; + TQString key; + TQString value; }; - QValueList<Property> mProperties; + TQValueList<Property> mProperties; bool removed; }; @@ -62,10 +62,10 @@ friend class View; public: List(View *parent); virtual ~List(); - QListViewItem *openGlobal(const KURL&, QListViewItem * =0); - QListViewItem *importGlobal(const KURL&, QListViewItem * =0); - QListViewItem *addFile(const KURL&, bool play=false, QListViewItem * =0); - void addDirectoryRecursive(const KURL &dir, QListViewItem *after= 0); + TQListViewItem *openGlobal(const KURL&, TQListViewItem * =0); + TQListViewItem *importGlobal(const KURL&, TQListViewItem * =0); + TQListViewItem *addFile(const KURL&, bool play=false, TQListViewItem * =0); + void addDirectoryRecursive(const KURL &dir, TQListViewItem *after= 0); public slots: virtual void clear(); @@ -75,15 +75,15 @@ signals: void deleteCurrentItem(); protected: - virtual bool acceptDrag(QDropEvent *event) const; - virtual void keyPressEvent(QKeyEvent *e); + virtual bool acceptDrag(TQDropEvent *event) const; + virtual void keyPressEvent(TQKeyEvent *e); protected slots: - virtual void dropEvent(QDropEvent *event, QListViewItem *after); + virtual void dropEvent(TQDropEvent *event, TQListViewItem *after); void move(); protected: - QListViewItem *recursiveAddAfter; + TQListViewItem *recursiveAddAfter; protected slots: // used when adding directories via KIO::listRecursive @@ -111,7 +111,7 @@ public: void init(); virtual ~View(); List *listView() const { return list; } - QListViewItem *addFile(const KURL &u, bool play=false) + TQListViewItem *addFile(const KURL &u, bool play=false) { return list->addFile(u, play, list->lastItem()); } @@ -143,9 +143,9 @@ protected: void exportTo(const KURL &); void setModified(bool); - virtual void closeEvent(QCloseEvent*e); - virtual void showEvent(QShowEvent *); - virtual void hideEvent(QHideEvent *); + virtual void closeEvent(TQCloseEvent*e); + virtual void showEvent(TQShowEvent *); + virtual void hideEvent(TQHideEvent *); signals: void hidden(); diff --git a/noatun/modules/systray/cmodule.cpp b/noatun/modules/systray/cmodule.cpp index 4adf7e44..c0e04fd3 100644 --- a/noatun/modules/systray/cmodule.cpp +++ b/noatun/modules/systray/cmodule.cpp @@ -30,25 +30,25 @@ #include <kdebug.h> //#include <kglobal.h> #include <klocale.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qspinbox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> #include <noatun/app.h> #include <noatun/pluginloader.h> #include <fixx11h.h> -YHModule::YHModule(QObject *_parent) +YHModule::YHModule(TQObject *_parent) : CModule(i18n("System Tray Icon"), i18n("Configure System Tray Icon"), "bottom", _parent) { - QVBoxLayout *top = new QVBoxLayout(this); + TQVBoxLayout *top = new TQVBoxLayout(this); mWidget = new YHConfigWidget(this); top->addWidget(mWidget); @@ -58,9 +58,9 @@ YHModule::YHModule(QObject *_parent) mWidget->cmbModifier->insertItem(i18n("Ctrl"), YHConfig::Ctrl); mWidget->cmbModifier->setCurrentItem(YHConfig::None); - connect(mWidget->chkUsePopup, SIGNAL(toggled(bool)), this, SLOT(slotUsePopupToggled(bool))); - connect(mWidget->cmbModifier, SIGNAL(activated(int)), this, SLOT(slotModifierActivated(int))); - connect(mWidget->grpMwheel, SIGNAL(clicked(int)), this, SLOT(slotMwheelClicked(int))); + connect(mWidget->chkUsePopup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotUsePopupToggled(bool))); + connect(mWidget->cmbModifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotModifierActivated(int))); + connect(mWidget->grpMwheel, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotMwheelClicked(int))); reopen(); } diff --git a/noatun/modules/systray/cmodule.h b/noatun/modules/systray/cmodule.h index fecc70e3..fd9cae2c 100644 --- a/noatun/modules/systray/cmodule.h +++ b/noatun/modules/systray/cmodule.h @@ -26,7 +26,7 @@ #ifndef CMODULE_H #define CMODULE_H -#include <qmap.h> +#include <tqmap.h> #include <noatun/pref.h> class YHConfigWidget; @@ -35,7 +35,7 @@ class YHModule : public CModule { Q_OBJECT public: - YHModule(QObject *_parent); + YHModule(TQObject *_parent); virtual void save(); virtual void reopen(); @@ -44,7 +44,7 @@ Q_OBJECT private: YHConfigWidget *mWidget; - QMap<int, int> mActionMap; + TQMap<int, int> mActionMap; private slots: void slotUsePopupToggled(bool on); diff --git a/noatun/modules/systray/kitsystemtray.cpp b/noatun/modules/systray/kitsystemtray.cpp index 5847d7da..8e42a3ed 100644 --- a/noatun/modules/systray/kitsystemtray.cpp +++ b/noatun/modules/systray/kitsystemtray.cpp @@ -33,7 +33,7 @@ #include <noatun/app.h> #include <noatun/player.h> -#include <qdragobject.h> +#include <tqdragobject.h> #include "kitsystemtray.h" #include <kmainwindow.h> @@ -44,26 +44,26 @@ #include <fixx11h.h> -KitSystemTray::KitSystemTray(const QString &contextMenu, KMainWindow *parent, const char *name) +KitSystemTray::KitSystemTray(const TQString &contextMenu, KMainWindow *parent, const char *name) : KSystemTray(parent, name) { setAlignment(AlignHCenter | AlignVCenter); menu = (KPopupMenu *)parent->guiFactory()->container(contextMenu, parent); - menu->insertTitle(SmallIcon("noatun"), QString::null, 0, 0); + menu->insertTitle(SmallIcon("noatun"), TQString::null, 0, 0); setAcceptDrops(true); } -void KitSystemTray::changeTitle(const QPixmap &pixmap, const QString &title) +void KitSystemTray::changeTitle(const TQPixmap &pixmap, const TQString &title) { menu->changeTitle(0, pixmap, title); } -void KitSystemTray::showEvent(QShowEvent *) +void KitSystemTray::showEvent(TQShowEvent *) { // empty } -void KitSystemTray::mousePressEvent(QMouseEvent *event) +void KitSystemTray::mousePressEvent(TQMouseEvent *event) { switch(event->button()) { @@ -82,12 +82,12 @@ void KitSystemTray::mousePressEvent(QMouseEvent *event) } } -void KitSystemTray::dragEnterEvent(QDragEnterEvent * event) +void KitSystemTray::dragEnterEvent(TQDragEnterEvent * event) { event->accept(KURLDrag::canDecode(event)); // accept uri drops only } -void KitSystemTray::dropEvent(QDropEvent * event) +void KitSystemTray::dropEvent(TQDropEvent * event) { KURL::List uris; if (KURLDrag::decode(event, uris)) @@ -98,7 +98,7 @@ void KitSystemTray::dropEvent(QDropEvent * event) } } -void KitSystemTray::wheelEvent(QWheelEvent *event) +void KitSystemTray::wheelEvent(TQWheelEvent *event) { YHConfig *c = YHConfig::self(); diff --git a/noatun/modules/systray/kitsystemtray.h b/noatun/modules/systray/kitsystemtray.h index 2f640adb..d697ca95 100644 --- a/noatun/modules/systray/kitsystemtray.h +++ b/noatun/modules/systray/kitsystemtray.h @@ -39,14 +39,14 @@ class KitSystemTray : public KSystemTray Q_OBJECT public: - KitSystemTray(const QString &contextMenu, KMainWindow *parent, const char *name = 0); - void changeTitle(const QPixmap &, const QString &); + KitSystemTray(const TQString &contextMenu, KMainWindow *parent, const char *name = 0); + void changeTitle(const TQPixmap &, const TQString &); protected: - virtual void showEvent(QShowEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); - virtual void wheelEvent(QWheelEvent *e); + virtual void showEvent(TQShowEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); + virtual void wheelEvent(TQWheelEvent *e); KPopupMenu *menu; }; diff --git a/noatun/modules/systray/systray.cpp b/noatun/modules/systray/systray.cpp index c93080ca..2493bdbc 100644 --- a/noatun/modules/systray/systray.cpp +++ b/noatun/modules/systray/systray.cpp @@ -40,21 +40,21 @@ #include <kaction.h> #include <kconfig.h> -#include <qfile.h> +#include <tqfile.h> #include <kglobal.h> #include <kiconloader.h> #include <klocale.h> #include <kpassivepopup.h> #include <kpixmapeffect.h> #include <kstdaction.h> -#include <qbitmap.h> -#include <qhbox.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qvbox.h> - -#include <qimage.h> +#include <tqbitmap.h> +#include <tqhbox.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqvbox.h> + +#include <tqimage.h> #include <kurl.h> #include <kio/netaccess.h> #include <kdebug.h> @@ -72,15 +72,15 @@ const int COVER_MAXH = 128; class PassivePopup : public KPassivePopup { public: - PassivePopup(QWidget *parent = 0, const char *name = 0) : KPassivePopup(parent, name) {} + PassivePopup(TQWidget *parent = 0, const char *name = 0) : KPassivePopup(parent, name) {} protected: - virtual void enterEvent(QEvent *) + virtual void enterEvent(TQEvent *) { setTimeout(3000000); // Make timeout damn near infinite } - virtual void leaveEvent(QEvent *) + virtual void leaveEvent(TQEvent *) { setTimeout(250); // Close quickly } @@ -100,9 +100,9 @@ NoatunSystray::NoatunSystray() : KMainWindow(0, "NoatunSystray"), Plugin(), removeCover(); // make sure any old temp cover is gone - KStdAction::quit(napp, SLOT(quit()), actionCollection()); - KStdAction::open(napp, SLOT(fileOpen()), actionCollection()); - KStdAction::preferences(napp, SLOT(preferences()), actionCollection()); + KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection()); + KStdAction::open(napp, TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::preferences(napp, TQT_SLOT(preferences()), actionCollection()); NoatunStdAction::back(actionCollection(), "back"); NoatunStdAction::stop(actionCollection(), "stop"); NoatunStdAction::playpause(actionCollection(), "play"); @@ -117,18 +117,18 @@ NoatunSystray::NoatunSystray() : KMainWindow(0, "NoatunSystray"), Plugin(), mTray = new KitSystemTray("tray", this); mTray->show(); - trayBase = renderIcon(BASEICON, QString::null); + trayBase = renderIcon(BASEICON, TQString::null); trayStatus = renderIcon(BASEICON, "player_stop"); mTray->changeTitle(*trayBase, i18n("Noatun")); showingTrayStatus = false; - mBlinkTimer = new QTimer(this); - connect(mBlinkTimer, SIGNAL(timeout()), this, SLOT(slotBlinkTimer())); + mBlinkTimer = new TQTimer(this); + connect(mBlinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBlinkTimer())); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlayPause())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPlayPause())); - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlayPause())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPlayPause())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); //napp->player()->handleButtons(); } @@ -146,7 +146,7 @@ NoatunSystray::~NoatunSystray() void NoatunSystray::init() { YHModule *cmod = new YHModule(this); - connect(cmod, SIGNAL(saved()), this, SLOT(slotLoadSettings())); + connect(cmod, TQT_SIGNAL(saved()), this, TQT_SLOT(slotLoadSettings())); slotLoadSettings(); } @@ -165,9 +165,9 @@ void NoatunSystray::slotLoadSettings() if(c->tip()) - QToolTip::add(mTray, tipText); + TQToolTip::add(mTray, tipText); else - QToolTip::remove(mTray); + TQToolTip::remove(mTray); if (!c->passivePopupCovers()) removeCover(); @@ -184,7 +184,7 @@ void NoatunSystray::slotLoadSettings() } -void NoatunSystray::closeEvent(QCloseEvent*) +void NoatunSystray::closeEvent(TQCloseEvent*) { //kdDebug(66666) << k_funcinfo << "Called." << endl; disconnect(napp->player(), 0, 0, 0); @@ -194,7 +194,7 @@ void NoatunSystray::closeEvent(QCloseEvent*) void NoatunSystray::slotPlayPause() { - QString status; + TQString status; if(napp->player()->isPaused()) { @@ -208,26 +208,26 @@ void NoatunSystray::slotPlayPause() } const PlaylistItem item = napp->player()->current(); - QString s; + TQString s; if(!item.isProperty("title")) { // No metadata - s = QString("<nobr>%1</nobr>").arg(item.title()); + s = TQString("<nobr>%1</nobr>").arg(item.title()); } else { - s = QString("<h2><nobr>%1</nobr></h2>").arg(item.property("title")); + s = TQString("<h2><nobr>%1</nobr></h2>").arg(item.property("title")); if(item.isProperty("author")) - s += QString("<nobr>%1</nobr><br>").arg(item.property("author")); + s += TQString("<nobr>%1</nobr><br>").arg(item.property("author")); if(item.isProperty("album")) { if(item.isProperty("date")) - s += QString("<nobr>%1 (%2)</nobr><br>").arg(item.property("album")).arg(item.property("date")); + s += TQString("<nobr>%1 (%2)</nobr><br>").arg(item.property("album")).arg(item.property("date")); else - s += QString("<nobr>%1</nobr><br>").arg(item.property("album")); + s += TQString("<nobr>%1</nobr><br>").arg(item.property("album")); } } @@ -235,18 +235,18 @@ void NoatunSystray::slotPlayPause() if (YHConfig::self()->passivePopupCovers()) updateCover(); - if(YHConfig::self()->passivePopupCovers() && QFile::exists(tmpCoverPath)) + if(YHConfig::self()->passivePopupCovers() && TQFile::exists(tmpCoverPath)) { // QT always adds an empty line after the table so we add en empty line before the // table to get equal spacing on top and bottom - setTipText(QString("<qt><br><table cellspacing=0 cellpadding=0><tr>" \ + setTipText(TQString("<qt><br><table cellspacing=0 cellpadding=0><tr>" \ "<td align=center valign=center><h4><nobr>%1</nobr></h4>%2</td>" \ "<td valign=center><img src='%3'></td>" \ "</qt></tr></table>").arg(status).arg(s).arg(tmpCoverPath)); } else { - setTipText(QString("<qt><center><h4><nobr>%1</nobr></h4>%2</center></qt>").arg(status).arg(s)); + setTipText(TQString("<qt><center><h4><nobr>%1</nobr></h4>%2</center></qt>").arg(status).arg(s)); } } @@ -256,12 +256,12 @@ void NoatunSystray::slotStopped() if(!napp->player()->current()) return; changeTray("player_stop"); - setTipText(QString("<qt><nobr><h4>%1</h4></nobr></qt>").arg(i18n("Noatun - Stopped"))); + setTipText(TQString("<qt><nobr><h4>%1</h4></nobr></qt>").arg(i18n("Noatun - Stopped"))); } -void NoatunSystray::changeTray(const QString &pm) +void NoatunSystray::changeTray(const TQString &pm) { delete trayStatus; trayStatus = renderIcon(BASEICON, pm); @@ -297,19 +297,19 @@ void NoatunSystray::slotBlinkTimer() void NoatunSystray::updateCover() { //kdDebug(66666) << k_funcinfo << endl; - QString dir = napp->player()->current().url().directory(); - QString cover; + TQString dir = napp->player()->current().url().directory(); + TQString cover; // TODO: Maybe make these filenames configurable? - if(QFile::exists(dir + "/folder.png")) + if(TQFile::exists(dir + "/folder.png")) cover = dir + "/folder.png"; - else if(QFile::exists(dir + "/.folder.png")) + else if(TQFile::exists(dir + "/.folder.png")) cover = dir + "/.folder.png"; - else if(QFile::exists(dir + "/cover.png")) + else if(TQFile::exists(dir + "/cover.png")) cover = dir + "/cover.png"; - else if(QFile::exists(dir + "/cover.jpg")) + else if(TQFile::exists(dir + "/cover.jpg")) cover = dir + "/cover.jpg"; - else if(QFile::exists(dir + "/cover.jpeg")) + else if(TQFile::exists(dir + "/cover.jpeg")) cover = dir + "/cover.jpeg"; else // no cover { @@ -318,9 +318,9 @@ void NoatunSystray::updateCover() return; } - QString title = napp->player()->current().title(); + TQString title = napp->player()->current().title(); - QImage previmg; + TQImage previmg; previmg.load(tmpCoverPath); if(previmg.text("Title") != title) @@ -328,13 +328,13 @@ void NoatunSystray::updateCover() /*kdDebug(66666) << k_funcinfo << "Creating new temp cover for '" << cover << "'" << endl;*/ - QImage src; - QImage tmpimg; + TQImage src; + TQImage tmpimg; if(src.load(cover)) { if(src.width() >= COVER_MAXW || src.height() >= COVER_MAXH) - tmpimg = src.scale(COVER_MAXW, COVER_MAXH, QImage::ScaleMin); + tmpimg = src.scale(COVER_MAXW, COVER_MAXH, TQImage::ScaleMin); else tmpimg = src; @@ -351,12 +351,12 @@ void NoatunSystray::updateCover() void NoatunSystray::removeCover() { - if(QFile::exists(tmpCoverPath)) + if(TQFile::exists(tmpCoverPath)) KIO::NetAccess::del(KURL(tmpCoverPath), this); } -void NoatunSystray::setTipText(const QString& text) +void NoatunSystray::setTipText(const TQString& text) { if(text == tipText) // save the planet, save cpu cycles ;) return; @@ -364,10 +364,10 @@ void NoatunSystray::setTipText(const QString& text) YHConfig *c = YHConfig::self(); if(c->passivePopup()) - QTimer::singleShot(0, this, SLOT(showPassivePopup())); + TQTimer::singleShot(0, this, TQT_SLOT(showPassivePopup())); if(c->tip()) - QToolTip::add(mTray, tipText); + TQToolTip::add(mTray, tipText); } @@ -379,12 +379,12 @@ void NoatunSystray::showPassivePopup() return; } - mPassivePopup->reparent(0L, QPoint(0,0)); + mPassivePopup->reparent(0L, TQPoint(0,0)); if (YHConfig::self()->passivePopupButtons() && !napp->player()->isStopped()) { - QVBox *widget = mPassivePopup->standardView(QString::null, tipText, QPixmap()); - QHBox *box = new QHBox(mPassivePopup, "popupbox"); + TQVBox *widget = mPassivePopup->standardView(TQString::null, tipText, TQPixmap()); + TQHBox *box = new TQHBox(mPassivePopup, "popupbox"); box->setSpacing(8); @@ -394,52 +394,52 @@ void NoatunSystray::showPassivePopup() NETRect frame, win; ni.kdeGeometry(frame, win); - QRect bounds = KGlobalSettings::desktopGeometry(QPoint(win.pos.x, win.pos.y)); + TQRect bounds = KGlobalSettings::desktopGeometry(TQPoint(win.pos.x, win.pos.y)); if(win.pos.x < bounds.center().x()) { // Buttons to the left - QVBox *buttonBox = new QVBox(box); + TQVBox *buttonBox = new TQVBox(box); buttonBox->setSpacing(3); - QPushButton *forwardButton = new QPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); + TQPushButton *forwardButton = new TQPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); forwardButton->setFlat(true); - connect(forwardButton, SIGNAL(clicked()), action("forward"), SLOT(activate())); + connect(forwardButton, TQT_SIGNAL(clicked()), action("forward"), TQT_SLOT(activate())); - QPushButton *backButton = new QPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); + TQPushButton *backButton = new TQPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); backButton->setFlat(true); - connect(backButton, SIGNAL(clicked()), action("back"), SLOT(activate())); + connect(backButton, TQT_SIGNAL(clicked()), action("back"), TQT_SLOT(activate())); - QFrame *line = new QFrame(box); - line->setFrameShape(QFrame::VLine); + TQFrame *line = new TQFrame(box); + line->setFrameShape(TQFrame::VLine); - widget->reparent(box, QPoint(0, 0)); + widget->reparent(box, TQPoint(0, 0)); } else { // Buttons to the right - widget->reparent(box, QPoint(0, 0)); + widget->reparent(box, TQPoint(0, 0)); - QFrame *line = new QFrame(box); - line->setFrameShape(QFrame::VLine); + TQFrame *line = new TQFrame(box); + line->setFrameShape(TQFrame::VLine); - QVBox *buttonBox = new QVBox(box); + TQVBox *buttonBox = new TQVBox(box); buttonBox->setSpacing(3); - QPushButton *forwardButton = new QPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); + TQPushButton *forwardButton = new TQPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); forwardButton->setFlat(true); - connect(forwardButton, SIGNAL(clicked()), action("forward"), SLOT(activate())); + connect(forwardButton, TQT_SIGNAL(clicked()), action("forward"), TQT_SLOT(activate())); - QPushButton *backButton = new QPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); + TQPushButton *backButton = new TQPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); backButton->setFlat(true); - connect(backButton, SIGNAL(clicked()), action("back"), SLOT(activate())); + connect(backButton, TQT_SIGNAL(clicked()), action("back"), TQT_SLOT(activate())); } mPassivePopup->setView(box); } else { - mPassivePopup->setView(QString::null, tipText); + mPassivePopup->setView(TQString::null, tipText); } mPassivePopup->setTimeout(YHConfig::self()->passivePopupTimeout()*1000); @@ -447,17 +447,17 @@ void NoatunSystray::showPassivePopup() } -QPixmap *NoatunSystray::renderIcon(const QString& baseIcon, const QString &overlayIcon) const +TQPixmap *NoatunSystray::renderIcon(const TQString& baseIcon, const TQString &overlayIcon) const { - QPixmap *base = new QPixmap(KSystemTray::loadIcon(baseIcon)); + TQPixmap *base = new TQPixmap(KSystemTray::loadIcon(baseIcon)); if(!(overlayIcon.isNull())) // otherwise leave the base as-is { - QPixmap overlay = KSystemTray::loadIcon(overlayIcon); + TQPixmap overlay = KSystemTray::loadIcon(overlayIcon); if(!overlay.isNull()) { // draw the overlay on top of it - QPainter p(base); + TQPainter p(base); p.drawPixmap(0, 0, overlay); } } diff --git a/noatun/modules/systray/systray.h b/noatun/modules/systray/systray.h index f602c4e3..aa723eb5 100644 --- a/noatun/modules/systray/systray.h +++ b/noatun/modules/systray/systray.h @@ -30,7 +30,7 @@ #include <noatun/plugin.h> #include <noatun/app.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kmainwindow.h> @@ -47,34 +47,34 @@ public: virtual void init(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); public slots: void slotPlayPause(); void slotStopped(); private slots: - void changeTray(const QString &); + void changeTray(const TQString &); void slotLoadSettings(); void slotBlinkTimer(); void showPassivePopup(); - QPixmap *renderIcon(const QString &, const QString &) const; + TQPixmap *renderIcon(const TQString &, const TQString &) const; private: - void setTipText(const QString&); + void setTipText(const TQString&); void updateCover(); void removeCover(); private: KitSystemTray *mTray; - QTimer *mBlinkTimer; - QPixmap *trayStatus; - QPixmap *trayBase; + TQTimer *mBlinkTimer; + TQPixmap *trayStatus; + TQPixmap *trayBase; PassivePopup *mPassivePopup; bool showingTrayStatus; - QString tipText; - QString tmpCoverPath; + TQString tipText; + TQString tmpCoverPath; }; #endif diff --git a/noatun/modules/voiceprint/prefs.cpp b/noatun/modules/voiceprint/prefs.cpp index 48998680..230c542f 100644 --- a/noatun/modules/voiceprint/prefs.cpp +++ b/noatun/modules/voiceprint/prefs.cpp @@ -3,33 +3,33 @@ #include <klocale.h> #include <kglobal.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kcolorbutton.h> #include <kconfig.h> -Prefs::Prefs(QObject* parent) +Prefs::Prefs(TQObject* parent) : CModule(i18n("Voiceprint"), i18n("Options for the Voiceprint Visualization"), "xapp", parent) { - QVBoxLayout *king=new QVBoxLayout(this); - QHBoxLayout *minor; + QVBoxLayout *king=new TQVBoxLayout(this); + TQHBoxLayout *minor; - QLabel *label; + TQLabel *label; mForeground=new KColorButton(this); - label=new QLabel(mForeground, i18n("&Foreground color:"), this); - minor=new QHBoxLayout(king); + label=new TQLabel(mForeground, i18n("&Foreground color:"), this); + minor=new TQHBoxLayout(king); minor->addWidget(label); minor->addWidget(mForeground); mBackground=new KColorButton(this); - label=new QLabel(mBackground, i18n("&Background color:"), this); - minor=new QHBoxLayout(king); + label=new TQLabel(mBackground, i18n("&Background color:"), this); + minor=new TQHBoxLayout(king); minor->addWidget(label); minor->addWidget(mBackground); mLine=new KColorButton(this); - label=new QLabel(mForeground, i18n("&Sweep color:"), this); - minor=new QHBoxLayout(king); + label=new TQLabel(mForeground, i18n("&Sweep color:"), this); + minor=new TQHBoxLayout(king); minor->addWidget(label); minor->addWidget(mLine); @@ -40,8 +40,8 @@ void Prefs::reopen() { KConfig *config=KGlobal::config(); config->setGroup("VoicePrint"); - QColor black(0, 0, 0); - QColor blue(0, 0, 222); + TQColor black(0, 0, 0); + TQColor blue(0, 0, 222); mBackground->setColor(config->readColorEntry("Background", &black)); mForeground->setColor(config->readColorEntry("Foreground", &blue)); mLine->setColor(config->readColorEntry("Line", &black)); diff --git a/noatun/modules/voiceprint/prefs.h b/noatun/modules/voiceprint/prefs.h index 6541b4de..65f4cf3d 100644 --- a/noatun/modules/voiceprint/prefs.h +++ b/noatun/modules/voiceprint/prefs.h @@ -1,7 +1,7 @@ #ifndef PREFS_H #define PREFS_H -#include <qwidget.h> +#include <tqwidget.h> #include <noatun/pref.h> class KColorButton; @@ -10,7 +10,7 @@ class Prefs : public CModule { Q_OBJECT public: - Prefs(QObject* parent); + Prefs(TQObject* parent); virtual void save(); virtual void reopen(); diff --git a/noatun/modules/voiceprint/voiceprint.cpp b/noatun/modules/voiceprint/voiceprint.cpp index 4f6c7aea..0a82a1ab 100644 --- a/noatun/modules/voiceprint/voiceprint.cpp +++ b/noatun/modules/voiceprint/voiceprint.cpp @@ -2,7 +2,7 @@ #include <noatun/player.h> #include <noatun/app.h> #include <math.h> -#include <qpainter.h> +#include <tqpainter.h> #include "prefs.h" #include <klocale.h> #include <stdio.h> @@ -17,7 +17,7 @@ extern "C" VoicePrint *VoicePrint::voicePrint=0; -VoicePrint::VoicePrint() : QWidget(0,0,WRepaintNoErase), MonoFFTScope(50), Plugin() +VoicePrint::VoicePrint() : TQWidget(0,0,WRepaintNoErase), MonoFFTScope(50), Plugin() { voicePrint=this; mOffset=0; @@ -41,7 +41,7 @@ void VoicePrint::init() resizeEvent(0); } -void VoicePrint::setColors(const QColor &bg, const QColor &fg, const QColor &l) +void VoicePrint::setColors(const TQColor &bg, const TQColor &fg, const TQColor &l) { mProgress=l; mLowColor=bg.rgb(); @@ -49,17 +49,17 @@ void VoicePrint::setColors(const QColor &bg, const QColor &fg, const QColor &l) setBackgroundColor(mLowColor); } -void VoicePrint::closeEvent(QCloseEvent *) +void VoicePrint::closeEvent(TQCloseEvent *) { unload(); } -void VoicePrint::resizeEvent(QResizeEvent *) +void VoicePrint::resizeEvent(TQResizeEvent *) { mOffset=0; mBuffer.resize(size()); - QPainter paint(&mBuffer); - paint.fillRect(QRect(0,0, QWidget::width(), height()), QColor(mLowColor)); + TQPainter paint(&mBuffer); + paint.fillRect(TQRect(0,0, TQWidget::width(), height()), TQColor(mLowColor)); setBands(magic(height()/mSegmentWidth)); } @@ -78,7 +78,7 @@ inline static QRgb averageByIntensity(QRgb bgcolor, QRgb fgcolor, int octet) #undef COLOR -void VoicePrint::paintEvent(QPaintEvent *e) +void VoicePrint::paintEvent(TQPaintEvent *e) { bitBlt(this, e->rect().topLeft(), &mBuffer, e->rect(), Qt::CopyROP); } @@ -88,7 +88,7 @@ void VoicePrint::scopeEvent(float *data, int bands) // save cpu if(isHidden()) return; - QPainter paint(&mBuffer); + TQPainter paint(&mBuffer); // each square has a width of mSegmentWidth float brightness = float(bands * mSegmentWidth); for (int i=0; i<bands ; i++) @@ -100,14 +100,14 @@ void VoicePrint::scopeEvent(float *data, int bands) if (band>255) band=255; else if (band<0) band=0; - QColor area(averageByIntensity(mLowColor, mHighColor, band)); + TQColor area(averageByIntensity(mLowColor, mHighColor, band)); int bandTop=i*height()/bands, bandBottom=(i+1)*height()/bands; paint.fillRect(mOffset, bandTop, mSegmentWidth,bandBottom-bandTop,area); } int newOffset = mOffset+mSegmentWidth; - if (newOffset>QWidget::width()) newOffset=0; + if (newOffset>TQWidget::width()) newOffset=0; paint.fillRect(newOffset, 0, mSegmentWidth, height(), mProgress); // redraw changes with the minimum amount of work diff --git a/noatun/modules/voiceprint/voiceprint.h b/noatun/modules/voiceprint/voiceprint.h index ab5af69d..4d78909a 100644 --- a/noatun/modules/voiceprint/voiceprint.h +++ b/noatun/modules/voiceprint/voiceprint.h @@ -3,7 +3,7 @@ #include <noatun/plugin.h> -class VoicePrint : public QWidget, public MonoFFTScope, public Plugin +class VoicePrint : public TQWidget, public MonoFFTScope, public Plugin { Q_OBJECT @@ -11,21 +11,21 @@ public: VoicePrint(); virtual ~VoicePrint(); - void setColors(const QColor &bg, const QColor &fg, const QColor &l); + void setColors(const TQColor &bg, const TQColor &fg, const TQColor &l); void init(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); virtual void scopeEvent(float *data, int bands); - virtual void resizeEvent(QResizeEvent *); - virtual void paintEvent(QPaintEvent *); + virtual void resizeEvent(TQResizeEvent *); + virtual void paintEvent(TQPaintEvent *); public: static VoicePrint* voicePrint; private: - QColor mProgress; - QPixmap mBuffer; + TQColor mProgress; + TQPixmap mBuffer; QRgb mLowColor, mHighColor; int mOffset, mSegmentWidth; }; diff --git a/noatun/modules/winskin/fileInfo.cpp b/noatun/modules/winskin/fileInfo.cpp index 69f93215..6e721cd9 100644 --- a/noatun/modules/winskin/fileInfo.cpp +++ b/noatun/modules/winskin/fileInfo.cpp @@ -1,14 +1,14 @@ #include <noatun/app.h> #include <noatun/playlist.h> -#include <qstring.h> +#include <tqstring.h> #include <kfilemetainfo.h> #include "fileInfo.h" fileInfo::fileInfo(const PlaylistItem &item) { - QString prop; + TQString prop; prop = item.property("bitrate"); if (prop.isNull()) diff --git a/noatun/modules/winskin/guiSpectrumAnalyser.cpp b/noatun/modules/winskin/guiSpectrumAnalyser.cpp index d015e5da..583266e0 100644 --- a/noatun/modules/winskin/guiSpectrumAnalyser.cpp +++ b/noatun/modules/winskin/guiSpectrumAnalyser.cpp @@ -12,9 +12,9 @@ #include <klocale.h> -#include <qcolor.h> -#include <qpopupmenu.h> -#include <qpainter.h> +#include <tqcolor.h> +#include <tqpopupmenu.h> +#include <tqpainter.h> #include <kconfig.h> #include "waColor.h" @@ -28,11 +28,11 @@ GuiSpectrumAnalyser::GuiSpectrumAnalyser() : WaWidget(_WA_MAPPING_ANALYSER) { - connect(WaSkinModel::instance(), SIGNAL(skinChanged()), this, SLOT(pixmapChange())); + connect(WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), this, TQT_SLOT(pixmapChange())); - contextMenu = new QPopupMenu(this); - visualizationMenu = new QPopupMenu(); - analyserMenu = new QPopupMenu(); + contextMenu = new TQPopupMenu(this); + visualizationMenu = new TQPopupMenu(); + analyserMenu = new TQPopupMenu(); contextMenu->insertItem(i18n("Visualization Mode"), visualizationMenu); contextMenu->insertItem(i18n("Analyzer Mode"), analyserMenu); @@ -40,13 +40,13 @@ GuiSpectrumAnalyser::GuiSpectrumAnalyser() visualizationMenu->insertItem(i18n("Analyzer"), (int)MODE_ANALYSER); visualizationMenu->insertItem(i18n("Disabled"), (int)MODE_DISABLED); visualizationMenu->setCheckable(true); - connect(visualizationMenu, SIGNAL(activated(int)), this, SLOT(setVisualizationMode(int))); + connect(visualizationMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setVisualizationMode(int))); analyserMenu->insertItem(i18n("Normal"), (int)MODE_NORMAL); analyserMenu->insertItem(i18n("Fire"), (int)MODE_FIRE); analyserMenu->insertItem(i18n("Vertical Lines"), (int)MODE_VERTICAL_LINES); analyserMenu->setCheckable(true); - connect(analyserMenu, SIGNAL(activated(int)), this, SLOT(setAnalyserMode(int))); + connect(analyserMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setAnalyserMode(int))); analyserCache = NULL; winSkinVis = NULL; @@ -70,7 +70,7 @@ GuiSpectrumAnalyser::~GuiSpectrumAnalyser() delete analyserCache; } -void GuiSpectrumAnalyser::mousePressEvent ( QMouseEvent *e ) +void GuiSpectrumAnalyser::mousePressEvent ( TQMouseEvent *e ) { if (e->button() == LeftButton) { if (visualization_mode == MODE_DISABLED) @@ -79,7 +79,7 @@ void GuiSpectrumAnalyser::mousePressEvent ( QMouseEvent *e ) setVisualizationMode(MODE_DISABLED); } else if (e->button() == RightButton) { - contextMenu->popup(mapToGlobal(QPoint(e->x(), e->y()))); + contextMenu->popup(mapToGlobal(TQPoint(e->x(), e->y()))); } } @@ -139,7 +139,7 @@ void GuiSpectrumAnalyser::setVisualizationMode(int mode) if (!winSkinVis) { winSkinVis=new WinSkinVis(this,"WinSkinVis"); - connect(winSkinVis,SIGNAL(doRepaint()),this,SLOT(updatePeaks())); + connect(winSkinVis,TQT_SIGNAL(doRepaint()),this,TQT_SLOT(updatePeaks())); } } else @@ -160,20 +160,20 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() // The analyser cache is a 34x16 pixmap containing all the bits needed // to quickly draw the spectrum analyser - analyserCache = new QPixmap(34, 16); - QPainter p(analyserCache); + analyserCache = new TQPixmap(34, 16); + TQPainter p(analyserCache); for (unsigned int x = 0;x < 17;x++) { if (x != 16) { - p.setPen(QPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); p.drawLine(x * 2, 0, x * 2, 16 - x - 1); } for (unsigned int y = 0; y < (16 - x);y++) { if (y % 2) - p.setPen(QPen(colorScheme->skinColors[INDEX_GRID_COLOR])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_GRID_COLOR])); else - p.setPen(QPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); p.drawPoint((x * 2) + 1, y); } @@ -184,13 +184,13 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() switch (analyser_mode) { case MODE_FIRE: for (unsigned int y = (16 - x); y < 16; y++) { - p.setPen(QPen(colorScheme->skinColors[INDEX_SPEC_BASE + (y - (16 - x))])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_SPEC_BASE + (y - (16 - x))])); p.drawPoint((x * 2), y); p.drawPoint((x * 2) + 1, y); } break; case MODE_VERTICAL_LINES: - p.setPen(QPen(colorScheme->skinColors[INDEX_SPEC_BASE + (16 - x)])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_SPEC_BASE + (16 - x)])); p.drawLine((x * 2), (15 - x), (x * 2), 15); p.drawLine((x * 2) + 1, (15 - x), (x * 2) + 1, 15); break; @@ -198,7 +198,7 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() // Fall through default: for (unsigned int y = (16 - x); y < 16; y++) { - p.setPen(QPen(colorScheme->skinColors[INDEX_SPEC_BASE + y])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_SPEC_BASE + y])); p.drawPoint((x * 2), y); p.drawPoint((x * 2) + 1, y); } @@ -207,7 +207,7 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() } } -void GuiSpectrumAnalyser::paintEvent (QPaintEvent *) +void GuiSpectrumAnalyser::paintEvent (TQPaintEvent *) { if (visualization_mode == MODE_DISABLED) paintBackground(); diff --git a/noatun/modules/winskin/guiSpectrumAnalyser.h b/noatun/modules/winskin/guiSpectrumAnalyser.h index ecef8d37..e2dd3431 100644 --- a/noatun/modules/winskin/guiSpectrumAnalyser.h +++ b/noatun/modules/winskin/guiSpectrumAnalyser.h @@ -34,7 +34,7 @@ class GuiSpectrumAnalyser : public WaWidget { GuiSpectrumAnalyser(); ~GuiSpectrumAnalyser(); - void mousePressEvent(QMouseEvent * mouseEvent); + void mousePressEvent(TQMouseEvent * mouseEvent); public slots: void pauseVisualization(); @@ -48,18 +48,18 @@ class GuiSpectrumAnalyser : public WaWidget { void setAnalyserMode(int); private: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); - QPopupMenu *contextMenu; - QPopupMenu *visualizationMenu; - QPopupMenu *analyserMenu; + TQPopupMenu *contextMenu; + TQPopupMenu *visualizationMenu; + TQPopupMenu *analyserMenu; void freshenAnalyserCache(); int visualization_mode; int analyser_mode; - QPixmap *analyserCache; + TQPixmap *analyserCache; WinSkinVis *winSkinVis; }; #endif diff --git a/noatun/modules/winskin/skinMap.h b/noatun/modules/winskin/skinMap.h index f67f1557..1b9f8530 100644 --- a/noatun/modules/winskin/skinMap.h +++ b/noatun/modules/winskin/skinMap.h @@ -16,7 +16,7 @@ #ifndef _SKINMAP_H #define _SKINMAP_H -#include <qpixmap.h> +#include <tqpixmap.h> typedef struct { int x; diff --git a/noatun/modules/winskin/waBalanceSlider.cpp b/noatun/modules/winskin/waBalanceSlider.cpp index 1ac1b562..cb6b0f19 100644 --- a/noatun/modules/winskin/waBalanceSlider.cpp +++ b/noatun/modules/winskin/waBalanceSlider.cpp @@ -38,10 +38,10 @@ void WaBalanceSlider::buildGui() ws->setValue(0); - connect(ws, SIGNAL(valueChanged(int)), this, - SIGNAL(balanceSetValue(int))); - connect(ws, SIGNAL(sliderPressed()), SIGNAL(sliderPressed())); - connect(ws, SIGNAL(sliderReleased()), SIGNAL(sliderReleased())); + connect(ws, TQT_SIGNAL(valueChanged(int)), this, + TQT_SIGNAL(balanceSetValue(int))); + connect(ws, TQT_SIGNAL(sliderPressed()), TQT_SIGNAL(sliderPressed())); + connect(ws, TQT_SIGNAL(sliderReleased()), TQT_SIGNAL(sliderReleased())); } diff --git a/noatun/modules/winskin/waButton.cpp b/noatun/modules/winskin/waButton.cpp index cac0275a..da113c87 100644 --- a/noatun/modules/winskin/waButton.cpp +++ b/noatun/modules/winskin/waButton.cpp @@ -10,7 +10,7 @@ */ -#include <qbitmap.h> +#include <tqbitmap.h> #include "waButton.h" @@ -44,12 +44,12 @@ void WaButton::setPixmapDownSelected(int pixId) { nDownIdSelected=pixId; } -void WaButton::paintEvent(QPaintEvent *) { +void WaButton::paintEvent(TQPaintEvent *) { paintPixmap(getPixmapId()); } -void WaButton::mousePressEvent(QMouseEvent* e) { +void WaButton::mousePressEvent(TQMouseEvent* e) { if (e->button() != LeftButton) { // We can't deal with it, but maybe the widget can do something clever WaWidget::mousePressEvent(e); @@ -60,7 +60,7 @@ void WaButton::mousePressEvent(QMouseEvent* e) { } } -void WaButton::mouseReleaseEvent(QMouseEvent* e) { +void WaButton::mouseReleaseEvent(TQMouseEvent* e) { if (!pressed) { // We're not pressed, so just pass along the mouse event, it's not ours WaWidget::mouseReleaseEvent(e); diff --git a/noatun/modules/winskin/waButton.h b/noatun/modules/winskin/waButton.h index 50947216..bfaf43ff 100644 --- a/noatun/modules/winskin/waButton.h +++ b/noatun/modules/winskin/waButton.h @@ -16,7 +16,7 @@ #ifndef __WABUTTON_H #define __WABUTTON_H -#include <qpainter.h> +#include <tqpainter.h> #include "waWidget.h" class WaButton : public WaWidget { @@ -37,18 +37,18 @@ class WaButton : public WaWidget { bool togglable() const { return _togglable; } int getPixmapId(); - void paintEvent(QPaintEvent*); + void paintEvent(TQPaintEvent*); private: - void mousePressEvent (QMouseEvent* e); - void mouseReleaseEvent (QMouseEvent* e); + void mousePressEvent (TQMouseEvent* e); + void mouseReleaseEvent (TQMouseEvent* e); int nUpId; int nDownId; int nDownIdSelected; int nUpIdSelected; - QPoint currentLocation; + TQPoint currentLocation; bool _toggled; bool _togglable; diff --git a/noatun/modules/winskin/waClutterbar.cpp b/noatun/modules/winskin/waClutterbar.cpp index 6ceb7d04..f4370e87 100644 --- a/noatun/modules/winskin/waClutterbar.cpp +++ b/noatun/modules/winskin/waClutterbar.cpp @@ -6,6 +6,6 @@ WaClutterbar::WaClutterbar() : WaWidget(_WA_MAPPING_CLUTTERBAR) { WaClutterbar::~WaClutterbar() { } -void WaClutterbar::paintEvent(QPaintEvent *) { +void WaClutterbar::paintEvent(TQPaintEvent *) { paintPixmap(_WA_SKIN_CLUTTERBAR_DISABLED); } diff --git a/noatun/modules/winskin/waClutterbar.h b/noatun/modules/winskin/waClutterbar.h index 69339c37..5a96993a 100644 --- a/noatun/modules/winskin/waClutterbar.h +++ b/noatun/modules/winskin/waClutterbar.h @@ -1,7 +1,7 @@ #ifndef __WACLUTTERBAR_H #define __WACLUTTERBAR_H -#include <qpainter.h> +#include <tqpainter.h> #include "waWidget.h" class WaClutterbar : public WaWidget { @@ -12,7 +12,7 @@ class WaClutterbar : public WaWidget { ~WaClutterbar(); public slots: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); }; #endif diff --git a/noatun/modules/winskin/waColor.cpp b/noatun/modules/winskin/waColor.cpp index e06b38bc..43fa5154 100644 --- a/noatun/modules/winskin/waColor.cpp +++ b/noatun/modules/winskin/waColor.cpp @@ -1,11 +1,11 @@ #include <fstream> -#include <qfile.h> +#include <tqfile.h> #include "waColor.h" WaColor *colorScheme = NULL; -WaColor::WaColor(QString filename) { +WaColor::WaColor(TQString filename) { int r, g, b; char comma; @@ -38,7 +38,7 @@ WaColor::WaColor(QString filename) { return; } - std::ifstream viscolor(QFile::encodeName(filename)); + std::ifstream viscolor(TQFile::encodeName(filename)); if (!viscolor) return; diff --git a/noatun/modules/winskin/waColor.h b/noatun/modules/winskin/waColor.h index a0e18484..e029b70b 100644 --- a/noatun/modules/winskin/waColor.h +++ b/noatun/modules/winskin/waColor.h @@ -3,8 +3,8 @@ #ifndef WACOLOR_H #define WACOLOR_H -#include <qcolor.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqstring.h> #define INDEX_BACKGROUND_COLOR 0 #define INDEX_GRID_COLOR 1 @@ -14,10 +14,10 @@ class WaColor { public: - WaColor(QString filename); + WaColor(TQString filename); ~WaColor(); - QColor skinColors[24]; + TQColor skinColors[24]; }; extern WaColor *colorScheme; diff --git a/noatun/modules/winskin/waDigit.cpp b/noatun/modules/winskin/waDigit.cpp index b775d7cf..15a3ae46 100644 --- a/noatun/modules/winskin/waDigit.cpp +++ b/noatun/modules/winskin/waDigit.cpp @@ -34,7 +34,7 @@ WaDigit::~WaDigit() config->writeEntry("timeReversed", reverse_time); } -void WaDigit::paintEvent(QPaintEvent *) +void WaDigit::paintEvent(TQPaintEvent *) { paintBackground(); @@ -49,7 +49,7 @@ void WaDigit::paintEvent(QPaintEvent *) int x = waSkinModel->getMapGeometry(mapping).x(); int y = waSkinModel->getMapGeometry(mapping).y(); - QRect mapRect; + TQRect mapRect; // We expect strings either in the form "xx:yy", or "-xx:yy" // If the string length is 6, we have it in the form of "-xx:yy" @@ -77,7 +77,7 @@ void WaDigit::paintEvent(QPaintEvent *) waSkinModel->getDigit(time[4], this, mapRect.x() - x, mapRect.y() - y); } -void WaDigit::mousePressEvent(QMouseEvent* e) { +void WaDigit::mousePressEvent(TQMouseEvent* e) { if (e->button() == LeftButton) { reverse_time = !reverse_time; emit digitsClicked(); diff --git a/noatun/modules/winskin/waDigit.h b/noatun/modules/winskin/waDigit.h index cefbfeb3..cee5da1d 100644 --- a/noatun/modules/winskin/waDigit.h +++ b/noatun/modules/winskin/waDigit.h @@ -16,7 +16,7 @@ #ifndef __WADIGIT_H #define __WADIGIT_H -#include <qpainter.h> +#include <tqpainter.h> #include "waWidget.h" @@ -27,20 +27,20 @@ class WaDigit : public WaWidget { WaDigit(); ~WaDigit(); - void setTime(QString time) { timeString = time; update(); } - QString time() const { return timeString; } + void setTime(TQString time) { timeString = time; update(); } + TQString time() const { return timeString; } bool timeReversed() const { return reverse_time; } public slots: - void paintEvent(QPaintEvent * paintEvent); + void paintEvent(TQPaintEvent * paintEvent); private: - void mousePressEvent(QMouseEvent* e); + void mousePressEvent(TQMouseEvent* e); bool reverse_time; WaSkinModel *waSkinModel; - QString timeString; + TQString timeString; signals: void digitsClicked(); diff --git a/noatun/modules/winskin/waIndicator.cpp b/noatun/modules/winskin/waIndicator.cpp index 9c5efa84..1c6a64cc 100644 --- a/noatun/modules/winskin/waIndicator.cpp +++ b/noatun/modules/winskin/waIndicator.cpp @@ -25,7 +25,7 @@ WaIndicator::~WaIndicator() { } -void WaIndicator::paintEvent(QPaintEvent *) +void WaIndicator::paintEvent(TQPaintEvent *) { paintPixmap( _state ? _enabled_mapping : _disabled_mapping ); } diff --git a/noatun/modules/winskin/waIndicator.h b/noatun/modules/winskin/waIndicator.h index f367fe84..b4d37482 100644 --- a/noatun/modules/winskin/waIndicator.h +++ b/noatun/modules/winskin/waIndicator.h @@ -16,7 +16,7 @@ #ifndef __WAINDICATOR_H #define __WAINDICATOR_H -#include <qpainter.h> +#include <tqpainter.h> #include "waWidget.h" @@ -31,7 +31,7 @@ class WaIndicator : public WaWidget { bool state() const { return _state; } public slots: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); private: int _enabled_mapping; diff --git a/noatun/modules/winskin/waInfo.cpp b/noatun/modules/winskin/waInfo.cpp index c735a8e4..d64191da 100644 --- a/noatun/modules/winskin/waInfo.cpp +++ b/noatun/modules/winskin/waInfo.cpp @@ -12,8 +12,8 @@ */ -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include <stdlib.h> @@ -25,18 +25,18 @@ WaInfo::WaInfo() : WaWidget(_WA_MAPPING_INFO) { - connect(WaSkinModel::instance(), SIGNAL(skinChanged()), - this, SLOT(pixmapChange())); + connect(WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), + this, TQT_SLOT(pixmapChange())); - completePixmap = new QPixmap(); + completePixmap = new TQPixmap(); - QSize size = sizeHint(); + TQSize size = sizeHint(); completePixmap->resize(size.width(), size.height()); xGrabbedPos = -1; - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(timeEvent())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeEvent())); } WaInfo::~WaInfo() @@ -65,7 +65,7 @@ void WaInfo::scrollerSetup() xScrollPos = 0; xScrollDirection = 0; timer->stop(); - QSize size = sizeHint(); + TQSize size = sizeHint(); if (completePixmap->width() > size.width()) { xScrollDirection = 1; @@ -77,9 +77,9 @@ void WaInfo::scrollerSetup() } } -void WaInfo::paintEvent(QPaintEvent *) +void WaInfo::paintEvent(TQPaintEvent *) { - QSize size = sizeHint(); + TQSize size = sizeHint(); if (completePixmap->width() <= size.width()) { bitBlt(this, 0, 0, completePixmap); @@ -105,7 +105,7 @@ void WaInfo::paintEvent(QPaintEvent *) } -void WaInfo::setText(QString song) +void WaInfo::setText(TQString song) { if (_text != song) { _text = song; @@ -113,7 +113,7 @@ void WaInfo::setText(QString song) } } -QString WaInfo::text() const +TQString WaInfo::text() const { return _text; } @@ -127,7 +127,7 @@ void WaInfo::pixmapChange() int x = 0; int n=infoString ? strlen(infoString) : 0; - QSize size = sizeHint(); + TQSize size = sizeHint(); completePixmap->resize(QMAX(n * _WA_TEXT_WIDTH, size.width()), _WA_TEXT_HEIGHT); @@ -149,12 +149,12 @@ void WaInfo::pixmapChange() update(); } -void WaInfo::mousePressEvent (QMouseEvent *e) { +void WaInfo::mousePressEvent (TQMouseEvent *e) { if (e->button() == LeftButton) xGrabbedPos = (e->x() + xScrollPos) % completePixmap->width(); } -void WaInfo::mouseMoveEvent (QMouseEvent * e) { +void WaInfo::mouseMoveEvent (TQMouseEvent * e) { xScrollPos = -e->x() + xGrabbedPos; if (xScrollPos < 0) @@ -165,7 +165,7 @@ void WaInfo::mouseMoveEvent (QMouseEvent * e) { update(); } -void WaInfo::mouseReleaseEvent (QMouseEvent *) { +void WaInfo::mouseReleaseEvent (TQMouseEvent *) { xGrabbedPos = -1; } diff --git a/noatun/modules/winskin/waInfo.h b/noatun/modules/winskin/waInfo.h index 513ff3cc..32d310e4 100644 --- a/noatun/modules/winskin/waInfo.h +++ b/noatun/modules/winskin/waInfo.h @@ -16,8 +16,8 @@ #ifndef __WAINFO_H #define __WAINFO_H -#include <qpainter.h> -#include <qtimer.h> +#include <tqpainter.h> +#include <tqtimer.h> #include "waWidget.h" @@ -28,20 +28,20 @@ class WaInfo : public WaWidget { WaInfo(); ~WaInfo(); - void setText(QString song); - QString text() const; + void setText(TQString song); + TQString text() const; void scrollerSetup(); protected: - void paintEvent(QPaintEvent * paintEvent); + void paintEvent(TQPaintEvent * paintEvent); - void mousePressEvent (QMouseEvent * e); - void mouseMoveEvent (QMouseEvent * e); - void mouseReleaseEvent (QMouseEvent * e); + void mousePressEvent (TQMouseEvent * e); + void mouseMoveEvent (TQMouseEvent * e); + void mouseReleaseEvent (TQMouseEvent * e); - QPixmap *completePixmap; - QString _text; - QTimer *timer; + TQPixmap *completePixmap; + TQString _text; + TQTimer *timer; int xScrollPos; int xScrollDirection; int xGrabbedPos; diff --git a/noatun/modules/winskin/waJumpSlider.cpp b/noatun/modules/winskin/waJumpSlider.cpp index 51633300..b8750dc1 100644 --- a/noatun/modules/winskin/waJumpSlider.cpp +++ b/noatun/modules/winskin/waJumpSlider.cpp @@ -30,9 +30,9 @@ void WaJumpSlider::buildGui() ws->setRange(0, 100); ws->setValue(0); - connect(ws, SIGNAL(sliderPressed()), this, SIGNAL(sliderPressed())); - connect(ws, SIGNAL(sliderReleased()), this, SLOT(releasedSlider())); - connect(ws, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int))); + connect(ws, TQT_SIGNAL(sliderPressed()), this, TQT_SIGNAL(sliderPressed())); + connect(ws, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(releasedSlider())); + connect(ws, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(valueChanged(int))); } void WaJumpSlider::setJumpRange(int val) @@ -63,11 +63,11 @@ void WaJumpSlider::releasedSlider() { emit(sliderReleased()); } -void WaJumpSlider::showEvent (QShowEvent *) { +void WaJumpSlider::showEvent (TQShowEvent *) { ws->show(); } -void WaJumpSlider::hideEvent (QHideEvent *) { +void WaJumpSlider::hideEvent (TQHideEvent *) { ws->hide(); } diff --git a/noatun/modules/winskin/waJumpSlider.h b/noatun/modules/winskin/waJumpSlider.h index 12c07808..e8a48b1f 100644 --- a/noatun/modules/winskin/waJumpSlider.h +++ b/noatun/modules/winskin/waJumpSlider.h @@ -35,8 +35,8 @@ class WaJumpSlider : public WaWidget { protected: WaSlider *ws; - void showEvent (QShowEvent *); - void hideEvent (QHideEvent *); + void showEvent (TQShowEvent *); + void hideEvent (TQHideEvent *); private slots: void releasedSlider(); diff --git a/noatun/modules/winskin/waLabel.cpp b/noatun/modules/winskin/waLabel.cpp index 8f3ddb60..54b7513b 100644 --- a/noatun/modules/winskin/waLabel.cpp +++ b/noatun/modules/winskin/waLabel.cpp @@ -11,20 +11,20 @@ */ -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include "waLabel.h" #include "waSkinModel.h" WaLabel::WaLabel(int mapping) : WaWidget(mapping) { - connect(WaSkinModel::instance(), SIGNAL(skinChanged()), - this, SLOT(pixmapChange())); + connect(WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), + this, TQT_SLOT(pixmapChange())); - completePixmap = new QPixmap(); + completePixmap = new TQPixmap(); - QSize size = sizeHint(); + TQSize size = sizeHint(); completePixmap->resize(size.width(), size.height()); } @@ -34,12 +34,12 @@ WaLabel::~WaLabel() delete completePixmap; } -void WaLabel::paintEvent(QPaintEvent *) +void WaLabel::paintEvent(TQPaintEvent *) { bitBlt(this, 0, 0, completePixmap); } -void WaLabel::setText(const QString &new_text) +void WaLabel::setText(const TQString &new_text) { int width = WaSkinModel::instance()->getMapGeometry(mapping).width(); diff --git a/noatun/modules/winskin/waLabel.h b/noatun/modules/winskin/waLabel.h index f1470902..ce7ad771 100644 --- a/noatun/modules/winskin/waLabel.h +++ b/noatun/modules/winskin/waLabel.h @@ -13,7 +13,7 @@ #ifndef __WABPS_H #define __WABPS_H -#include <qpainter.h> +#include <tqpainter.h> #include "waWidget.h" class WaLabel : public WaWidget { @@ -23,14 +23,14 @@ class WaLabel : public WaWidget { WaLabel(int mapping); ~WaLabel(); - void setText(const QString &text); - QString text() const { return _text; } + void setText(const TQString &text); + TQString text() const { return _text; } private: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); - QPixmap *completePixmap; - QString _text; + TQPixmap *completePixmap; + TQString _text; private slots: diff --git a/noatun/modules/winskin/waMain.cpp b/noatun/modules/winskin/waMain.cpp index a5bb7fdc..f66b8535 100644 --- a/noatun/modules/winskin/waMain.cpp +++ b/noatun/modules/winskin/waMain.cpp @@ -6,7 +6,7 @@ WaMain::WaMain() : WaWidget(_WA_MAPPING_MAIN) { WaMain::~WaMain() { } -void WaMain::paintEvent(QPaintEvent *) { +void WaMain::paintEvent(TQPaintEvent *) { paintPixmap(_WA_SKIN_MAIN); } diff --git a/noatun/modules/winskin/waMain.h b/noatun/modules/winskin/waMain.h index 06bcfe5d..fbc47a64 100644 --- a/noatun/modules/winskin/waMain.h +++ b/noatun/modules/winskin/waMain.h @@ -10,7 +10,7 @@ public: ~WaMain(); protected: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); }; #endif diff --git a/noatun/modules/winskin/waRegion.cpp b/noatun/modules/winskin/waRegion.cpp index ab4d2e57..06f6851e 100644 --- a/noatun/modules/winskin/waRegion.cpp +++ b/noatun/modules/winskin/waRegion.cpp @@ -11,9 +11,9 @@ */ #include <ksimpleconfig.h> -#include <qbitmap.h> -#include <qpainter.h> -#include <qregexp.h> +#include <tqbitmap.h> +#include <tqpainter.h> +#include <tqregexp.h> #include "waSkinModel.h" #include "waSkins.h" @@ -26,7 +26,7 @@ WaRegion *windowRegion = NULL; const char *pointListNames[] = {"PointList", "pointlist", "Pointlist", "pointList", "POINTLIST", 0}; const char *numPointsNames[] = {"NumPoints", "numpoints", "Numpoints", "numPoints", "NUMPOINTS", 0}; -WaRegion::WaRegion(QString filename) { +WaRegion::WaRegion(TQString filename) { // Load the region file, which happens to be in KConfig format KSimpleConfig regionFile(filename, true); @@ -35,19 +35,19 @@ WaRegion::WaRegion(QString filename) { shade_mask = 0; // Make the new bitmaps, default window size - window_mask = new QBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_MAIN).size(), true); - shade_mask = new QBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_TITLE).size(), true); + window_mask = new TQBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_MAIN).size(), true); + shade_mask = new TQBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_TITLE).size(), true); // Load the normal window mask data regionFile.setGroup("Normal"); - QValueList<int> num_points; + TQValueList<int> num_points; for (int x = 0;numPointsNames[x];x++) { if (regionFile.hasKey(numPointsNames[x])) num_points = parseList(regionFile.readEntry(numPointsNames[x])); } - QValueList<int> point_list; + TQValueList<int> point_list; for (int x = 0;pointListNames[x];x++) { if (regionFile.hasKey(pointListNames[x])) point_list = parseList(regionFile.readEntry(pointListNames[x])); @@ -71,27 +71,27 @@ WaRegion::~WaRegion() { delete shade_mask; } -void WaRegion::buildPixmap(const QValueList<int> &num_points_list, const QValueList<int> &points_list, QBitmap *dest) { +void WaRegion::buildPixmap(const TQValueList<int> &num_points_list, const TQValueList<int> &points_list, TQBitmap *dest) { if (!num_points_list.count()) { dest->fill(Qt::color1); return; } - QValueList<int>::const_iterator points = points_list.begin(); + TQValueList<int>::const_iterator points = points_list.begin(); - QPainter p(dest); + TQPainter p(dest); // Coordinates in REGION.TXT can go one pixel beyond the window size - QBitmap bm(dest->width()+1,dest->height()+1,true); - QPainter bmp(&bm); + TQBitmap bm(dest->width()+1,dest->height()+1,true); + TQPainter bmp(&bm); bmp.setBrush(Qt::color1); bmp.setPen(Qt::NoPen); // The polygon border itself should not be part of the visible window // Go over each "region" in the file - for (QValueList<int>::const_iterator num_points = num_points_list.begin();num_points != num_points_list.end();num_points++) { + for (TQValueList<int>::const_iterator num_points = num_points_list.begin();num_points != num_points_list.end();num_points++) { // Make a new point array - QPointArray point_array(*num_points); + TQPointArray point_array(*num_points); // Populate it for (int i = 0;i < *num_points;i++) { @@ -112,14 +112,14 @@ void WaRegion::buildPixmap(const QValueList<int> &num_points_list, const QValueL // The winamp list format is absolutely insane, it will accept either // commas or whitespace as the delimiter. This function deals with // that. -QValueList<int> WaRegion::parseList(const QString &list) const { - QValueList<int> temp_list; +TQValueList<int> WaRegion::parseList(const TQString &list) const { + TQValueList<int> temp_list; if (list.isEmpty()) return temp_list; - QStringList open=QStringList::split(QRegExp("[,\\s]+"), list); - for (QStringList::Iterator i=open.begin(); i != open.end(); ++i) + TQStringList open=TQStringList::split(TQRegExp("[,\\s]+"), list); + for (TQStringList::Iterator i=open.begin(); i != open.end(); ++i) temp_list.append((*i).toInt()); return temp_list; diff --git a/noatun/modules/winskin/waRegion.h b/noatun/modules/winskin/waRegion.h index 853909c1..66c7c811 100644 --- a/noatun/modules/winskin/waRegion.h +++ b/noatun/modules/winskin/waRegion.h @@ -1,23 +1,23 @@ #ifndef WAREGION_H #define WAREGION_H -#include <qcolor.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqstring.h> class WaRegion { public: - WaRegion(QString filename); + WaRegion(TQString filename); ~WaRegion(); - const QBitmap *mainWindowMask() const { return window_mask; } - const QBitmap *mainWindowShadeMask() const { return shade_mask; } + const TQBitmap *mainWindowMask() const { return window_mask; } + const TQBitmap *mainWindowShadeMask() const { return shade_mask; } private: - QValueList<int> parseList(const QString &list) const; - void buildPixmap(const QValueList<int> &num_points, const QValueList<int> &point_list, QBitmap *dest); + TQValueList<int> parseList(const TQString &list) const; + void buildPixmap(const TQValueList<int> &num_points, const TQValueList<int> &point_list, TQBitmap *dest); - QBitmap *window_mask; - QBitmap *shade_mask; + TQBitmap *window_mask; + TQBitmap *shade_mask; }; extern WaRegion *windowRegion; diff --git a/noatun/modules/winskin/waSkin.cpp b/noatun/modules/winskin/waSkin.cpp index 7d95047d..d7b443ee 100644 --- a/noatun/modules/winskin/waSkin.cpp +++ b/noatun/modules/winskin/waSkin.cpp @@ -12,7 +12,7 @@ */ #include <kconfig.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kglobal.h> #include <klocale.h> #include <kiconloader.h> @@ -21,7 +21,7 @@ #include <kurldrag.h> #include <kstdaction.h> #include <kaction.h> -#include <qdragobject.h> +#include <tqdragobject.h> #include <kstandarddirs.h> #include <kwin.h> #include <time.h> @@ -57,7 +57,7 @@ WaSkin *_waskin_instance = NULL; -WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() +WaSkin::WaSkin() : TQWidget(0, "NoatunWinampSkin"), UserInterface() { mJumpPressed = false; mVolumePressed = false; @@ -83,22 +83,22 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() title_shaded = false; // These slots make Young Hickory love us - connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), this, SLOT(show()) ); - - connect(napp->player(), SIGNAL(playlistShown()), this, - SLOT(playlistShown())); - connect(napp->player(), SIGNAL(playlistHidden()), this, - SLOT(playlistHidden())); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, - SLOT(loopChange(int))); - connect(napp->player(), SIGNAL(newSong()), this, SLOT(newSong())); - - connect(napp->player(), SIGNAL(timeout()), this, SLOT(timetick())); + connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); + + connect(napp->player(), TQT_SIGNAL(playlistShown()), this, + TQT_SLOT(playlistShown())); + connect(napp->player(), TQT_SIGNAL(playlistHidden()), this, + TQT_SLOT(playlistHidden())); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, + TQT_SLOT(loopChange(int))); + connect(napp->player(), TQT_SIGNAL(newSong()), this, TQT_SLOT(newSong())); + + connect(napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(timetick())); KConfig *config=KGlobal::config(); config->setGroup("Winskin"); - QString skin = config->readEntry("CurrentSkin", WaSkin::defaultSkin()); + TQString skin = config->readEntry("CurrentSkin", WaSkin::defaultSkin()); loadSkin(skin); @@ -106,13 +106,13 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() setIcon(SmallIcon("noatun")); - QObject::connect(waTitleBar, SIGNAL(shaded()), this, SLOT(shadeEvent())); + TQObject::connect(waTitleBar, TQT_SIGNAL(shaded()), this, TQT_SLOT(shadeEvent())); // connect to players signals - so we can update our display if someone else // changes settings... - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlaying())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPaused())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlaying())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPaused())); napp->player()->handleButtons(); @@ -126,7 +126,7 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() newSong(); // HACK: We won't get focus events otherwise - setFocusPolicy(QWidget::ClickFocus); + setFocusPolicy(TQWidget::ClickFocus); show(); } @@ -138,7 +138,7 @@ WaSkin::~WaSkin() waSkinManager = 0L; } -void WaSkin::loadSkin(QString newSkinDir) +void WaSkin::loadSkin(TQString newSkinDir) { waSkinManager->loadSkin(newSkinDir); @@ -154,9 +154,9 @@ void WaSkin::loadSkin(QString newSkinDir) } } -QSize WaSkin::sizeHint() const +TQSize WaSkin::sizeHint() const { - QRect temp_rect; + TQRect temp_rect; temp_rect = waSkinModel->getGeometry(_WA_SKIN_MAIN); @@ -180,22 +180,22 @@ void WaSkin::createButtons() menu = new WaButton(_WA_MAPPING_TITLE_MENU); menu->setPixmapUp(_WA_SKIN_TITLE_MENU_NORM); menu->setPixmapDown(_WA_SKIN_TITLE_MENU_PRES); - connect(menu, SIGNAL(clicked()), this, SLOT(menuEvent())); + connect(menu, TQT_SIGNAL(clicked()), this, TQT_SLOT(menuEvent())); minimize = new WaButton(_WA_MAPPING_TITLE_MIN); minimize->setPixmapUp(_WA_SKIN_TITLE_MIN_NORM); minimize->setPixmapDown(_WA_SKIN_TITLE_MIN_PRES); - connect(minimize, SIGNAL(clicked()), this, SLOT(minimizeEvent())); + connect(minimize, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimizeEvent())); titleshade = new WaButton(_WA_MAPPING_TITLE_SHADE); titleshade->setPixmapUp(_WA_SKIN_TITLE_SHADE_NORM); titleshade->setPixmapDown(_WA_SKIN_TITLE_SHADE_PRES); - connect(titleshade, SIGNAL(clicked()), this, SLOT(shadeEvent())); + connect(titleshade, TQT_SIGNAL(clicked()), this, TQT_SLOT(shadeEvent())); close = new WaButton(_WA_MAPPING_TITLE_CLOSE); close->setPixmapUp(_WA_SKIN_TITLE_CLOSE_NORM); close->setPixmapDown(_WA_SKIN_TITLE_CLOSE_PRES); - connect(close, SIGNAL(clicked()), this, SLOT(doClose())); + connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(doClose())); shuffle->setTogglable(true); shuffle->show(); @@ -203,44 +203,44 @@ void WaSkin::createButtons() repeat->setTogglable(true); playlist->setTogglable(true); - connect(shuffle, SIGNAL(toggleEvent(bool)), - this, SLOT(shuffleClickedEvent(bool))); + connect(shuffle, TQT_SIGNAL(toggleEvent(bool)), + this, TQT_SLOT(shuffleClickedEvent(bool))); - connect(repeat, SIGNAL(toggleEvent(bool)), - this, SLOT(repeatClickedEvent(bool))); + connect(repeat, TQT_SIGNAL(toggleEvent(bool)), + this, TQT_SLOT(repeatClickedEvent(bool))); - connect(playlist, SIGNAL(toggleEvent(bool)), - this, SLOT(playlistClickedEvent(bool))); + connect(playlist, TQT_SIGNAL(toggleEvent(bool)), + this, TQT_SLOT(playlistClickedEvent(bool))); - connect(eq, SIGNAL(clicked()), - this, SLOT(eqClickedEvent())); + connect(eq, TQT_SIGNAL(clicked()), + this, TQT_SLOT(eqClickedEvent())); prev->setPixmapUp(_WA_SKIN_CBUTTONS_PREV_NORM); prev->setPixmapDown(_WA_SKIN_CBUTTONS_PREV_PRES); - connect(prev, SIGNAL(clicked()), napp->player(), SLOT(back())); + connect(prev, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back())); play->setPixmapUp(_WA_SKIN_CBUTTONS_PLAY_NORM); play->setPixmapDown(_WA_SKIN_CBUTTONS_PLAY_PRES); - connect(play, SIGNAL(clicked()), this, SLOT(playCurrentEvent())); + connect(play, TQT_SIGNAL(clicked()), this, TQT_SLOT(playCurrentEvent())); pause->setPixmapUp(_WA_SKIN_CBUTTONS_PAUSE_NORM); pause->setPixmapDown(_WA_SKIN_CBUTTONS_PAUSE_PRES); - connect(pause, SIGNAL(clicked()), this, SLOT(playPauseEvent())); + connect(pause, TQT_SIGNAL(clicked()), this, TQT_SLOT(playPauseEvent())); stop->setPixmapUp(_WA_SKIN_CBUTTONS_STOP_NORM); stop->setPixmapDown(_WA_SKIN_CBUTTONS_STOP_PRES); - connect(stop, SIGNAL(clicked()), napp->player(), SLOT(stop())); + connect(stop, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop())); next->setPixmapUp(_WA_SKIN_CBUTTONS_NEXT_NORM); next->setPixmapDown(_WA_SKIN_CBUTTONS_NEXT_PRES); - connect(next, SIGNAL(clicked()), napp->player(), SLOT(forward())); + connect(next, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward())); eject->setPixmapUp(_WA_SKIN_CBUTTONS_EJECT_NORM); eject->setPixmapDown(_WA_SKIN_CBUTTONS_EJECT_PRESS); - connect(eject, SIGNAL(clicked()), napp, SLOT(fileOpen())); + connect(eject, TQT_SIGNAL(clicked()), napp, TQT_SLOT(fileOpen())); shuffle->setPixmapUp(_WA_SKIN_SHUFREP_SHUFFLE_NOT_SET_NORM); shuffle->setPixmapDown(_WA_SKIN_SHUFREP_SHUFFLE_NOT_SET_PRES); @@ -280,25 +280,25 @@ void WaSkin::createHighLevelElements() waVolumeSlider = new WaVolumeSlider(); waVolumeSlider->buildGui(); - connect(waVolumeSlider, SIGNAL(volumeSetValue(int)), - this, SLOT(volumeSetValue(int))); - connect(waVolumeSlider, SIGNAL(sliderPressed()), - this, SLOT(volumeSliderPressed())); - connect(waVolumeSlider, SIGNAL(sliderReleased()), - this, SLOT(volumeSliderReleased())); + connect(waVolumeSlider, TQT_SIGNAL(volumeSetValue(int)), + this, TQT_SLOT(volumeSetValue(int))); + connect(waVolumeSlider, TQT_SIGNAL(sliderPressed()), + this, TQT_SLOT(volumeSliderPressed())); + connect(waVolumeSlider, TQT_SIGNAL(sliderReleased()), + this, TQT_SLOT(volumeSliderReleased())); waBalanceSlider = new WaBalanceSlider(); waBalanceSlider->buildGui(); - connect(waBalanceSlider, SIGNAL(balanceSetValue(int)), - this, SLOT(balanceSetValue(int))); - connect(waBalanceSlider, SIGNAL(sliderPressed()), - this, SLOT(balanceSliderPressed())); - connect(waBalanceSlider, SIGNAL(sliderReleased()), - this, SLOT(balanceSliderReleased())); + connect(waBalanceSlider, TQT_SIGNAL(balanceSetValue(int)), + this, TQT_SLOT(balanceSetValue(int))); + connect(waBalanceSlider, TQT_SIGNAL(sliderPressed()), + this, TQT_SLOT(balanceSliderPressed())); + connect(waBalanceSlider, TQT_SIGNAL(sliderReleased()), + this, TQT_SLOT(balanceSliderReleased())); waDigit = new WaDigit(); - connect(waDigit, SIGNAL(digitsClicked()), this, SLOT(digitsClicked())); + connect(waDigit, TQT_SIGNAL(digitsClicked()), this, TQT_SLOT(digitsClicked())); waBPS = new WaLabel(_WA_MAPPING_BPS); waFreq = new WaLabel(_WA_MAPPING_FREQ); @@ -310,13 +310,13 @@ void WaSkin::createHighLevelElements() waStereo = new WaIndicator(_WA_MAPPING_MONOSTER_STEREO, _WA_SKIN_MONOSTER_STEREO_TRUE, _WA_SKIN_MONOSTER_STEREO_FALSE); waMono = new WaIndicator(_WA_MAPPING_MONOSTER_MONO, _WA_SKIN_MONOSTER_MONO_TRUE, _WA_SKIN_MONOSTER_MONO_FALSE); - connect(waJumpSlider, SIGNAL(jump(int)), this, SLOT(jump(int))); - connect(waJumpSlider, SIGNAL(sliderPressed()), - this, SLOT(jumpSliderPressed())); - connect(waJumpSlider, SIGNAL(sliderReleased()), - this, SLOT(jumpSliderReleased())); - connect(waJumpSlider, SIGNAL(valueChanged(int)), - this, SLOT(jumpValueChanged(int))); + connect(waJumpSlider, TQT_SIGNAL(jump(int)), this, TQT_SLOT(jump(int))); + connect(waJumpSlider, TQT_SIGNAL(sliderPressed()), + this, TQT_SLOT(jumpSliderPressed())); + connect(waJumpSlider, TQT_SIGNAL(sliderReleased()), + this, TQT_SLOT(jumpSliderReleased())); + connect(waJumpSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(jumpValueChanged(int))); } @@ -352,7 +352,7 @@ void WaSkin::unshade() { title_shaded = false; } -void WaSkin::focusOutEvent( QFocusEvent * ) { +void WaSkin::focusOutEvent( TQFocusEvent * ) { menu->setPixmapUp(_WA_SKIN_TITLE_MENU_INACTIVE); menu->update(); @@ -368,7 +368,7 @@ void WaSkin::focusOutEvent( QFocusEvent * ) { waTitleBar->setState(false); } -void WaSkin::focusInEvent( QFocusEvent * ) { +void WaSkin::focusInEvent( TQFocusEvent * ) { menu->setPixmapUp(_WA_SKIN_TITLE_MENU_NORM); menu->update(); @@ -384,7 +384,7 @@ void WaSkin::focusInEvent( QFocusEvent * ) { waTitleBar->setState(true); } -void WaSkin::wheelEvent(QWheelEvent *e) { +void WaSkin::wheelEvent(TQWheelEvent *e) { // Get the current volume int newVolume = napp->player()->volume(); @@ -448,7 +448,7 @@ void WaSkin::jumpSliderReleased() void WaSkin::jumpValueChanged(int val) { if (mJumpPressed && !napp->player()->isStopped()) { - QString timeStr = i18n("Seek to: %1/%2 (%3%)"). + TQString timeStr = i18n("Seek to: %1/%2 (%3%)"). arg(getTimeString(val * 1000)). arg(getTimeString(napp->player()->getLength())). arg((val * 1000 * 100) / napp->player()->getLength()); @@ -456,15 +456,15 @@ void WaSkin::jumpValueChanged(int val) } } -QString WaSkin::getTitleString() { +TQString WaSkin::getTitleString() { int length; - QString title = ""; + TQString title = ""; if (!napp->playlist()->current()) { title = "Noatun "; - title += QString::number(NOATUN_MAJOR) + "."; - title += QString::number(NOATUN_MINOR) + "."; - title += QString::number(NOATUN_PATCHLEVEL); + title += TQString::number(NOATUN_MAJOR) + "."; + title += TQString::number(NOATUN_MINOR) + "."; + title += TQString::number(NOATUN_PATCHLEVEL); } else { length = napp->playlist()->current().length(); @@ -483,9 +483,9 @@ QString WaSkin::getTitleString() { return title; } -QString WaSkin::getTimeString(int milliseconds, bool truncate) { +TQString WaSkin::getTimeString(int milliseconds, bool truncate) { int seconds = abs(milliseconds / 1000); - QString ret = ""; + TQString ret = ""; // Do we need to convert to hours:minutes instead of minutes:seconds? if (truncate && (abs(seconds) >= (100 * 60))) @@ -498,7 +498,7 @@ QString WaSkin::getTimeString(int milliseconds, bool truncate) { } void WaSkin::menuEvent() { - NoatunStdAction::ContextMenu::showContextMenu(mapToGlobal(QPoint(0, 14))); + NoatunStdAction::ContextMenu::showContextMenu(mapToGlobal(TQPoint(0, 14))); } void WaSkin::minimizeEvent() { @@ -518,16 +518,16 @@ void WaSkin::doUnload() { } void WaSkin::doClose() { - QTimer::singleShot(0, this, SLOT(doUnload())); + TQTimer::singleShot(0, this, TQT_SLOT(doUnload())); } -void WaSkin::dragEnterEvent(QDragEnterEvent * event) +void WaSkin::dragEnterEvent(TQDragEnterEvent * event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void WaSkin::dropEvent(QDropEvent * event) +void WaSkin::dropEvent(TQDropEvent * event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -690,12 +690,12 @@ void WaSkin::slotPlaying() if (!info.bps()) waBPS->setText(""); else - waBPS->setText(QString::number(info.bps())); + waBPS->setText(TQString::number(info.bps())); if (!info.KHz()) waFreq->setText(""); else - waFreq->setText(QString::number(info.KHz() / 1000)); + waFreq->setText(TQString::number(info.KHz() / 1000)); setChannels(info.channelCount()); guiSpectrumAnalyser->resumeVisualization(); @@ -736,7 +736,7 @@ void WaSkin::slotPaused() waStatus->setStatus(STATUS_PAUSED); } -void WaSkin::keyPressEvent(QKeyEvent *e) { +void WaSkin::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { case Key_Up: napp->player()->setVolume(napp->player()->volume() + 5); @@ -793,7 +793,7 @@ void WaSkin::keyPressEvent(QKeyEvent *e) { } } -QString WaSkin::defaultSkin() { +TQString WaSkin::defaultSkin() { return "Winamp"; } diff --git a/noatun/modules/winskin/waSkin.h b/noatun/modules/winskin/waSkin.h index 7a2db9e1..947ce81e 100644 --- a/noatun/modules/winskin/waSkin.h +++ b/noatun/modules/winskin/waSkin.h @@ -19,7 +19,7 @@ #include <noatun/plugin.h> #include <noatun/app.h> #include <noatun/player.h> -#include <qwidget.h> +#include <tqwidget.h> // Use forward declarations so we compile in a finite time class WaSkinModel; @@ -44,7 +44,7 @@ class GuiSpectrumAnalyser; class WaSkin; extern WaSkin *_waskin_instance; -class WaSkin : public QWidget, public UserInterface { +class WaSkin : public TQWidget, public UserInterface { Q_OBJECT NOATUNPLUGIND WaSkinModel *waSkinModel; @@ -56,12 +56,12 @@ class WaSkin : public QWidget, public UserInterface { int getSkinId(); - void loadSkin(QString skinDir); + void loadSkin(TQString skinDir); void setChannels(int val); - QSize sizeHint() const; + TQSize sizeHint() const; - static QString defaultSkin(); + static TQString defaultSkin(); static WaSkin *instance() { return _waskin_instance; } public slots: @@ -117,21 +117,21 @@ class WaSkin : public QWidget, public UserInterface { void createButtons(); void createHighLevelElements(); - void keyPressEvent(QKeyEvent *); + void keyPressEvent(TQKeyEvent *); void shade(); void unshade(); - QString getTitleString(); - QString getTimeString(int milliseconds, bool truncate = false); + TQString getTitleString(); + TQString getTimeString(int milliseconds, bool truncate = false); - void focusOutEvent ( QFocusEvent * ); - void focusInEvent ( QFocusEvent * ); + void focusOutEvent ( TQFocusEvent * ); + void focusInEvent ( TQFocusEvent * ); - void dragEnterEvent(QDragEnterEvent * event); - void dropEvent(QDropEvent * event); + void dragEnterEvent(TQDragEnterEvent * event); + void dropEvent(TQDropEvent * event); - void wheelEvent(QWheelEvent *e); + void wheelEvent(TQWheelEvent *e); WaButton *prev; WaButton *play; diff --git a/noatun/modules/winskin/waSkinManager.cpp b/noatun/modules/winskin/waSkinManager.cpp index 5cde117b..cb5b0e2a 100644 --- a/noatun/modules/winskin/waSkinManager.cpp +++ b/noatun/modules/winskin/waSkinManager.cpp @@ -1,8 +1,8 @@ #include <kglobal.h> -#include <qfileinfo.h> -#include <qregexp.h> +#include <tqfileinfo.h> +#include <tqregexp.h> #include <kstandarddirs.h> -#include <qdir.h> +#include <tqdir.h> #include <kdebug.h> #include <kmimetype.h> #include <kio/job.h> @@ -19,21 +19,21 @@ WaSkinManager::WaSkinManager() : DCOPObject("WaSkinManager") { WaSkinManager::~WaSkinManager() { } -QStringList WaSkinManager::availableSkins() { - QStringList skinDirs = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp"); - QStringList skin_list; +TQStringList WaSkinManager::availableSkins() { + TQStringList skinDirs = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp"); + TQStringList skin_list; // This loop adds them all to our skin list for(unsigned int x = 0;x < skinDirs.count();x++) { - QDir skinQDir(skinDirs[x]); + TQDir skinQDir(skinDirs[x]); // We only want directories, although there shouldn't be anything else - skinQDir.setFilter( QDir::Dirs ); + skinQDir.setFilter( TQDir::Dirs ); // I guess name is as good as any - skinQDir.setSorting( QDir::Name ); + skinQDir.setSorting( TQDir::Name ); for (unsigned int y = 0;y < skinQDir.count();y++) { - QStringList skins = skinQDir.entryList(QDir::Dirs, QDir::Name); + TQStringList skins = skinQDir.entryList(TQDir::Dirs, TQDir::Name); // We really don't care for '.' and '..' if (skinQDir[y][0] != (char)'.') { @@ -46,16 +46,16 @@ QStringList WaSkinManager::availableSkins() { return skin_list; } -QString WaSkinManager::currentSkin() { +TQString WaSkinManager::currentSkin() { return mCurrentSkin; } -QString WaSkinManager::defaultSkin() { +TQString WaSkinManager::defaultSkin() { return "Winamp"; } -bool WaSkinManager::loadSkin(QString skinName) { - QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); +bool WaSkinManager::loadSkin(TQString skinName) { + TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); if (!skins.count()) mCurrentSkin = defaultSkin(); @@ -65,15 +65,15 @@ bool WaSkinManager::loadSkin(QString skinName) { return _waskinmodel_instance->load(skins[0]); } -bool WaSkinManager::installSkin(QString _url) { - QString location = KGlobal::dirs()->saveLocation("data", "noatun/skins/winamp"); +bool WaSkinManager::installSkin(TQString _url) { + TQString location = KGlobal::dirs()->saveLocation("data", "noatun/skins/winamp"); KURL url(_url); - QString mimetype = KMimeType::findByURL(_url)->name(); + TQString mimetype = KMimeType::findByURL(_url)->name(); if (mimetype == "inode/directory") { KIO::Job *job = KIO::copy(url, location, !url.isLocalFile()); - connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList())); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList())); return true; } else if ((mimetype == "interface/x-winamp-skin") || (mimetype == "application/x-zip")) @@ -81,10 +81,10 @@ bool WaSkinManager::installSkin(QString _url) { if (!url.isLocalFile()) return false; - QString base_path; - base_path = location + "/" + QFileInfo(url.path()).baseName().replace(QRegExp("_"), " "); + TQString base_path; + base_path = location + "/" + TQFileInfo(url.path()).baseName().replace(TQRegExp("_"), " "); KIO::Job *job = KIO::copy("zip:" + url.path(), base_path); - connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList())); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList())); return true; } @@ -92,30 +92,30 @@ bool WaSkinManager::installSkin(QString _url) { return false; } -bool WaSkinManager::removeSkin(QString skinName) { +bool WaSkinManager::removeSkin(TQString skinName) { if (!skinRemovable(skinName)) return false; - QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); + TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); KIO::Job *job = KIO::del(KURL(skins[0]), false, false); - connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList())); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList())); return true; } -bool WaSkinManager::skinRemovable(QString skinName) { - QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); +bool WaSkinManager::skinRemovable(TQString skinName) { + TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); if (!skins.count()) return false; - QFileInfo info(skins[0]); + TQFileInfo info(skins[0]); return info.isWritable(); } -QStringList WaSkinManager::skinMimeTypes() { - QStringList temp; +TQStringList WaSkinManager::skinMimeTypes() { + TQStringList temp; temp.append("interface/x-winamp-skin"); temp.append("application/x-zip"); diff --git a/noatun/modules/winskin/waSkinManager.h b/noatun/modules/winskin/waSkinManager.h index 17b21daf..360826b1 100644 --- a/noatun/modules/winskin/waSkinManager.h +++ b/noatun/modules/winskin/waSkinManager.h @@ -2,12 +2,12 @@ #define _WASKINMANAGER_H #include <dcopobject.h> -#include <qobject.h> -#include <qstringlist.h> -#include <qstring.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqstring.h> +#include <tqmap.h> -class WaSkinManager : public QObject, public DCOPObject { +class WaSkinManager : public TQObject, public DCOPObject { Q_OBJECT K_DCOP @@ -16,24 +16,24 @@ public: ~WaSkinManager(); k_dcop: - QStringList availableSkins(); - QString currentSkin(); - bool loadSkin(QString skinName); + TQStringList availableSkins(); + TQString currentSkin(); + bool loadSkin(TQString skinName); - QString defaultSkin(); + TQString defaultSkin(); - bool installSkin(QString url); + bool installSkin(TQString url); - bool skinRemovable(QString skinName); - bool removeSkin(QString skinName); + bool skinRemovable(TQString skinName); + bool removeSkin(TQString skinName); - QStringList skinMimeTypes(); + TQStringList skinMimeTypes(); signals: void updateSkinList(); private: - QString mCurrentSkin; + TQString mCurrentSkin; }; #endif diff --git a/noatun/modules/winskin/waSkinModel.cpp b/noatun/modules/winskin/waSkinModel.cpp index ff53b4e6..bbe20a39 100644 --- a/noatun/modules/winskin/waSkinModel.cpp +++ b/noatun/modules/winskin/waSkinModel.cpp @@ -13,9 +13,9 @@ #include <config.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qbitmap.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqbitmap.h> #include <kdebug.h> #include <kstandarddirs.h> @@ -39,7 +39,7 @@ int digit_height; struct WaPixmapEntry { const char *filename; - QPixmap *pixmap; + TQPixmap *pixmap; }; WaPixmapEntry waPixmapEntries[11] = { @@ -74,15 +74,15 @@ WaSkinModel::~WaSkinModel() delete colorScheme; } -bool WaSkinModel::load(QString skinDir) +bool WaSkinModel::load(TQString skinDir) { bool success = true; - QDir dir(skinDir); + TQDir dir(skinDir); if (findFile(dir, "main.bmp").isEmpty()) { // Ack, our skin dir doesn't exist, fall back to the default - dir = QDir(KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + WaSkin::defaultSkin())[0]); + dir = TQDir(KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + WaSkin::defaultSkin())[0]); success = false; } @@ -105,27 +105,27 @@ bool WaSkinModel::load(QString skinDir) // Filename -must- be lowercase, which is an nice optimization, since // this is a private API, and all our filenames are internally lowercase // anyway -QString WaSkinModel::findFile(const QDir &dir, const QString &filename) { - QFileInfo fileInfo; - QString ret = ""; +TQString WaSkinModel::findFile(const TQDir &dir, const TQString &filename) { + TQFileInfo fileInfo; + TQString ret = ""; - QStringList strList = dir.entryList(); + TQStringList strList = dir.entryList(); - for (QStringList::iterator file = strList.begin(); file != strList.end(); file++) { - QFileInfo fileInfo(*file); + for (TQStringList::iterator file = strList.begin(); file != strList.end(); file++) { + TQFileInfo fileInfo(*file); if (fileInfo.isDir()) continue; if (fileInfo.filePath().lower() == filename) - return dir.absPath() + "/" + QString(fileInfo.filePath()); + return dir.absPath() + "/" + TQString(fileInfo.filePath()); } return ""; } -void WaSkinModel::loadColors(const QDir &dir) { - QString colorFile = findFile(dir, "viscolor.txt"); +void WaSkinModel::loadColors(const TQDir &dir) { + TQString colorFile = findFile(dir, "viscolor.txt"); if (colorScheme) { delete colorScheme; @@ -134,8 +134,8 @@ void WaSkinModel::loadColors(const QDir &dir) { colorScheme = new WaColor(colorFile); } -void WaSkinModel::loadRegion(const QDir &dir) { - QString regionFile = findFile(dir, "region.txt"); +void WaSkinModel::loadRegion(const TQDir &dir) { + TQString regionFile = findFile(dir, "region.txt"); if (windowRegion) { delete windowRegion; @@ -145,12 +145,12 @@ void WaSkinModel::loadRegion(const QDir &dir) { windowRegion = new WaRegion(regionFile); } -int WaSkinModel::getPixmap(const QDir &dir, QString fname, - QPixmap *target) +int WaSkinModel::getPixmap(const TQDir &dir, TQString fname, + TQPixmap *target) { - QFileInfo fileInfo; - QStringList strList = dir.entryList(); - QString abspath; + TQFileInfo fileInfo; + TQStringList strList = dir.entryList(); + TQString abspath; abspath = findFile(dir, fname); @@ -161,46 +161,46 @@ int WaSkinModel::getPixmap(const QDir &dir, QString fname, // now the filename mapping 1.8x -> 2.0 if (fname == "volume.bmp") - return WaSkinModel::getPixmap(dir, QString("volbar.bmp"), target); + return WaSkinModel::getPixmap(dir, TQString("volbar.bmp"), target); if (fname == "numbers.bmp") - return WaSkinModel::getPixmap(dir, QString("nums_ex.bmp"), target); + return WaSkinModel::getPixmap(dir, TQString("nums_ex.bmp"), target); // Even 2.x themes can omit BALANCE, in which case we use VOLUME if (fname == "balance.bmp") - return WaSkinModel::getPixmap(dir, QString("volume.bmp"), target); + return WaSkinModel::getPixmap(dir, TQString("volume.bmp"), target); return false; } -QRect WaSkinModel::getGeometry(int id) { +TQRect WaSkinModel::getGeometry(int id) { if ( (id < 0) || (id >= _WA_SKIN_ENTRIES) ) { kdDebug() << "Array index out of range. WaSkinModel::getGeometry"<<endl; exit(-1); } - return QRect(mapFromFile[id].x, mapFromFile[id].y, + return TQRect(mapFromFile[id].x, mapFromFile[id].y, mapFromFile[id].width, mapFromFile[id].height); } -QRect WaSkinModel::getMapGeometry(int id) { +TQRect WaSkinModel::getMapGeometry(int id) { if ( (id < 0) || (id >= _WA_MAPPING_ENTRIES) ) { kdDebug() << "Array index out of range. WaSkinModel::getMapGeometry"<<endl; exit(-1); } - return QRect(mapToGui[id].x, mapToGui[id].y, + return TQRect(mapToGui[id].x, mapToGui[id].y, mapToGui[id].width, mapToGui[id].height); } -void WaSkinModel::bltTo(int id, QPaintDevice *dest, int x, int y) { +void WaSkinModel::bltTo(int id, TQPaintDevice *dest, int x, int y) { bitBlt(dest, x, y, waPixmapEntries[mapFromFile[id].fileId].pixmap, mapFromFile[id].x, mapFromFile[id].y, mapFromFile[id].width, mapFromFile[id].height); } -void WaSkinModel::bltTo(int id, QPaintDevice *dest, int x, int y, int argument) { +void WaSkinModel::bltTo(int id, TQPaintDevice *dest, int x, int y, int argument) { if (id == _WA_SKIN_VOLUME_BAR) { - QPixmap *pix = waPixmapEntries[_WA_FILE_VOLUME].pixmap; + TQPixmap *pix = waPixmapEntries[_WA_FILE_VOLUME].pixmap; int nBar = int((float)argument * 27.0 / 100.0); bitBlt(dest, x, y, pix, 0, 15 * nBar, 68, 13); @@ -209,7 +209,7 @@ void WaSkinModel::bltTo(int id, QPaintDevice *dest, int x, int y, int argument) } if (id == _WA_SKIN_BALANCE_BAR) { - QPixmap *pix = waPixmapEntries[_WA_FILE_BALANCE].pixmap; + TQPixmap *pix = waPixmapEntries[_WA_FILE_BALANCE].pixmap; argument = abs(argument); @@ -222,7 +222,7 @@ void WaSkinModel::bltTo(int id, QPaintDevice *dest, int x, int y, int argument) bltTo(id, dest, x, y); } -void WaSkinModel::getDigit(char number, QPaintDevice *dest, int x, int y) { +void WaSkinModel::getDigit(char number, TQPaintDevice *dest, int x, int y) { if (number=='-') { bltTo(_WA_SKIN_NUMBERS_MINUS, dest, x, y); return; @@ -235,7 +235,7 @@ void WaSkinModel::getDigit(char number, QPaintDevice *dest, int x, int y) { } // number - QPixmap *pix = waPixmapEntries[mapFromFile[_WA_SKIN_NUMBERS].fileId].pixmap; + TQPixmap *pix = waPixmapEntries[mapFromFile[_WA_SKIN_NUMBERS].fileId].pixmap; // ordinary number: int index = number - '0'; @@ -247,8 +247,8 @@ void WaSkinModel::getDigit(char number, QPaintDevice *dest, int x, int y) { return; } -void WaSkinModel::getText(char text, QPaintDevice * dest, int x, int y) { - QPixmap *pix = waPixmapEntries[_WA_FILE_TEXT].pixmap; +void WaSkinModel::getText(char text, TQPaintDevice * dest, int x, int y) { + TQPixmap *pix = waPixmapEntries[_WA_FILE_TEXT].pixmap; text = deaccent(text); @@ -378,11 +378,11 @@ void WaSkinModel::getText(char text, QPaintDevice * dest, int x, int y) { bitBlt(dest, x, y,pix,(10*5),12,5,6); } -void WaSkinModel::paintBackgroundTo(int mapping, QPaintDevice *dest, int x, int y) +void WaSkinModel::paintBackgroundTo(int mapping, TQPaintDevice *dest, int x, int y) { - QPixmap *pix = waPixmapEntries[mapFromFile[_WA_SKIN_MAIN].fileId].pixmap; - QRect main_rect = getGeometry(_WA_SKIN_MAIN); - QRect dest_rect = getMapGeometry(mapping); + TQPixmap *pix = waPixmapEntries[mapFromFile[_WA_SKIN_MAIN].fileId].pixmap; + TQRect main_rect = getGeometry(_WA_SKIN_MAIN); + TQRect dest_rect = getMapGeometry(mapping); int source_x = main_rect.x() + dest_rect.x() + x; int source_y = main_rect.y() + dest_rect.y() + y; @@ -418,38 +418,38 @@ void WaSkinModel::resetSkinModel() { } -QChar WaSkinModel::deaccent(QChar input) { - if (QString("�").contains(input)) +TQChar WaSkinModel::deaccent(TQChar input) { + if (TQString("�").contains(input)) return 'A'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'E'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'I'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'O'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'U'; if (input == '�') return 'Y'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'a'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'e'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'i'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'o'; - if (QString("��").contains(input)) + if (TQString("��").contains(input)) return 'u'; return input; diff --git a/noatun/modules/winskin/waSkinModel.h b/noatun/modules/winskin/waSkinModel.h index 9447f8ae..bc3e83c1 100644 --- a/noatun/modules/winskin/waSkinModel.h +++ b/noatun/modules/winskin/waSkinModel.h @@ -13,9 +13,9 @@ #ifndef __WASKINMODEL_H #define __WASKINMODEL_H -#include <qstring.h> -#include <qobject.h> -#include <qdir.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqdir.h> #include "waSkins.h" @@ -25,25 +25,25 @@ class QChar; class WaSkinModel; extern WaSkinModel *_waskinmodel_instance; -class WaSkinModel : public QObject { +class WaSkinModel : public TQObject { Q_OBJECT public: WaSkinModel(); ~WaSkinModel(); - void getDigit(char number, QPaintDevice *dest, int x, int y); - void getText(char text, QPaintDevice *dest, int x, int y); + void getDigit(char number, TQPaintDevice *dest, int x, int y); + void getText(char text, TQPaintDevice *dest, int x, int y); - void bltTo(int id, QPaintDevice *dest, int x, int y); - void bltTo(int id, QPaintDevice *dest, int x, int y, int argument); + void bltTo(int id, TQPaintDevice *dest, int x, int y); + void bltTo(int id, TQPaintDevice *dest, int x, int y, int argument); - void paintBackgroundTo(int mapping, QPaintDevice *dest, int x, int y); + void paintBackgroundTo(int mapping, TQPaintDevice *dest, int x, int y); - QRect getGeometry(int id); - QRect getMapGeometry(int id); + TQRect getGeometry(int id); + TQRect getMapGeometry(int id); - bool load(QString skinDir); + bool load(TQString skinDir); void setSkinModel(skin_models new_model); static WaSkinModel *instance() { return _waskinmodel_instance; } @@ -51,12 +51,12 @@ class WaSkinModel : public QObject { private: void resetSkinModel(); - QString findFile(const QDir &dir, const QString &filename); - QChar deaccent(QChar input); + TQString findFile(const TQDir &dir, const TQString &filename); + TQChar deaccent(TQChar input); - int getPixmap(const QDir &dir, QString fname, QPixmap * target); - void loadColors(const QDir &dir); - void loadRegion(const QDir &dir); + int getPixmap(const TQDir &dir, TQString fname, TQPixmap * target); + void loadColors(const TQDir &dir); + void loadRegion(const TQDir &dir); signals: void skinChanged(); diff --git a/noatun/modules/winskin/waSlider.cpp b/noatun/modules/winskin/waSlider.cpp index 4fff1b0d..99e52402 100644 --- a/noatun/modules/winskin/waSlider.cpp +++ b/noatun/modules/winskin/waSlider.cpp @@ -44,7 +44,7 @@ void WaSlider::setPixmapSliderBar(int pixId) update(); } -void WaSlider::paintEvent(QPaintEvent *) +void WaSlider::paintEvent(TQPaintEvent *) { // POSBAR.BMP does not have full height in all Winamp skins // Paint background before painting slider to be on the safe side @@ -58,7 +58,7 @@ void WaSlider::paintEvent(QPaintEvent *) } -void WaSlider::mouseMoveEvent(QMouseEvent * e) +void WaSlider::mouseMoveEvent(TQMouseEvent * e) { if (lDragging == false) { WaWidget::mouseMoveEvent(e); @@ -70,7 +70,7 @@ void WaSlider::mouseMoveEvent(QMouseEvent * e) if (newX < 0) newX = 0; - QSize size = sizeHint(); + TQSize size = sizeHint(); int maxX = size.width() - slider_width; @@ -101,7 +101,7 @@ void WaSlider::updateSliderPos(int value) update(); } -void WaSlider::mousePressEvent(QMouseEvent *e) { +void WaSlider::mousePressEvent(TQMouseEvent *e) { if (e->button() != LeftButton && e->button() != MidButton) { WaWidget::mousePressEvent(e); return; @@ -127,7 +127,7 @@ void WaSlider::mousePressEvent(QMouseEvent *e) { emit(sliderPressed()); } -void WaSlider::mouseReleaseEvent(QMouseEvent *e) +void WaSlider::mouseReleaseEvent(TQMouseEvent *e) { if (!lDragging) { WaWidget::mouseReleaseEvent(e); @@ -143,7 +143,7 @@ void WaSlider::mouseReleaseEvent(QMouseEvent *e) int WaSlider::pixel2Value(int xpos) { - QSize size = sizeHint(); + TQSize size = sizeHint(); int min = abs(minValue); int max = abs(maxValue); @@ -158,7 +158,7 @@ int WaSlider::pixel2Value(int xpos) int WaSlider::value2Pixel(int value) { - QSize size = sizeHint(); + TQSize size = sizeHint(); float min = (float) minValue; float max = (float) maxValue; float fmin = min; diff --git a/noatun/modules/winskin/waSlider.h b/noatun/modules/winskin/waSlider.h index 0003afd2..47630a6c 100644 --- a/noatun/modules/winskin/waSlider.h +++ b/noatun/modules/winskin/waSlider.h @@ -16,7 +16,7 @@ #ifndef __WASLIDER_H #define __WASLIDER_H -#include <qpainter.h> +#include <tqpainter.h> #include "waWidget.h" #include "waButton.h" @@ -44,7 +44,7 @@ class WaSlider : public WaWidget { void setPixmapSliderBar(int pixId); private: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); int pixel2Value(int xpos); int value2Pixel(int value); @@ -60,16 +60,16 @@ class WaSlider : public WaWidget { int sliderBarMapId; bool lDragging; - QPoint pressPoint; + TQPoint pressPoint; int currentValue; int minValue; int maxValue; - void mousePressEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseMoveEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); private slots: void updateSliderPos(int value); diff --git a/noatun/modules/winskin/waStatus.cpp b/noatun/modules/winskin/waStatus.cpp index e028b7f0..861e8677 100644 --- a/noatun/modules/winskin/waStatus.cpp +++ b/noatun/modules/winskin/waStatus.cpp @@ -23,7 +23,7 @@ WaStatus::~WaStatus() { } -void WaStatus::paintEvent(QPaintEvent *) +void WaStatus::paintEvent(TQPaintEvent *) { if (_status == STATUS_PLAYING) { paintPixmap(_WA_SKIN_PLAYPAUS_WORK_INDICATOR); diff --git a/noatun/modules/winskin/waStatus.h b/noatun/modules/winskin/waStatus.h index a3fe1bc8..e67054df 100644 --- a/noatun/modules/winskin/waStatus.h +++ b/noatun/modules/winskin/waStatus.h @@ -16,7 +16,7 @@ #ifndef __WASTATUS_H #define __WASTATUS_H -#include <qpainter.h> +#include <tqpainter.h> #include "waWidget.h" @@ -33,7 +33,7 @@ class WaStatus : public WaWidget { status_enum status() const { return _status; } private: - void paintEvent(QPaintEvent * paintEvent); + void paintEvent(TQPaintEvent * paintEvent); status_enum _status; }; diff --git a/noatun/modules/winskin/waTitleBar.cpp b/noatun/modules/winskin/waTitleBar.cpp index 82b603f5..bba7386e 100644 --- a/noatun/modules/winskin/waTitleBar.cpp +++ b/noatun/modules/winskin/waTitleBar.cpp @@ -12,8 +12,8 @@ */ -#include <qwidget.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpixmap.h> #include "waTitleBar.h" #include "waSkinModel.h" @@ -32,7 +32,7 @@ WaTitleBar::~WaTitleBar() { } -void WaTitleBar::mousePressEvent(QMouseEvent * e) +void WaTitleBar::mousePressEvent(TQMouseEvent * e) { if (e->button() != RightButton) { if (!moving) { @@ -49,11 +49,11 @@ void WaTitleBar::mousePressEvent(QMouseEvent * e) WaWidget::mousePressEvent(e); } -void WaTitleBar::mouseDoubleClickEvent(QMouseEvent *) { +void WaTitleBar::mouseDoubleClickEvent(TQMouseEvent *) { emit(shaded()); } -void WaTitleBar::mouseReleaseEvent(QMouseEvent * e) +void WaTitleBar::mouseReleaseEvent(TQMouseEvent * e) { if (e->button() != RightButton) { moving = false; @@ -64,9 +64,9 @@ void WaTitleBar::mouseReleaseEvent(QMouseEvent * e) WaWidget::mouseReleaseEvent(e); } -void WaTitleBar::mouseMoveEvent(QMouseEvent * e) +void WaTitleBar::mouseMoveEvent(TQMouseEvent * e) { - QPoint diff = e->globalPos() - mLastPos; + TQPoint diff = e->globalPos() - mLastPos; if (abs(diff.x()) > 10 || abs(diff.y()) > 10) { // Moving starts only, when passing a drag border moving = true; diff --git a/noatun/modules/winskin/waTitleBar.h b/noatun/modules/winskin/waTitleBar.h index 4e001394..30bfe29a 100644 --- a/noatun/modules/winskin/waTitleBar.h +++ b/noatun/modules/winskin/waTitleBar.h @@ -16,7 +16,7 @@ #ifndef __WATITLEBAR_H #define __WATITLEBAR_H -#include <qpainter.h> +#include <tqpainter.h> #include "waIndicator.h" @@ -35,14 +35,14 @@ class WaTitleBar : public WaIndicator { ~WaTitleBar(); private: - void mouseDoubleClickEvent (QMouseEvent * e); - void mousePressEvent(QMouseEvent * e); - void mouseReleaseEvent(QMouseEvent * e); - void mouseMoveEvent(QMouseEvent * e); + void mouseDoubleClickEvent (TQMouseEvent * e); + void mousePressEvent(TQMouseEvent * e); + void mouseReleaseEvent(TQMouseEvent * e); + void mouseMoveEvent(TQMouseEvent * e); bool moving; - QPoint mLastPos; - QPoint mDragStart; + TQPoint mLastPos; + TQPoint mDragStart; signals: void shaded(); diff --git a/noatun/modules/winskin/waVolumeSlider.cpp b/noatun/modules/winskin/waVolumeSlider.cpp index d0a934d7..f61e22f1 100644 --- a/noatun/modules/winskin/waVolumeSlider.cpp +++ b/noatun/modules/winskin/waVolumeSlider.cpp @@ -33,10 +33,10 @@ void WaVolumeSlider::buildGui() ws->setPixmapSliderButtonDown(_WA_SKIN_VOLUME_SLIDER_PRES); ws->setPixmapSliderBar(_WA_SKIN_VOLUME_BAR); - connect(ws, SIGNAL(valueChanged(int)), this, - SIGNAL(volumeSetValue(int))); - connect(ws, SIGNAL(sliderPressed()), SIGNAL(sliderPressed())); - connect(ws, SIGNAL(sliderReleased()), SIGNAL(sliderReleased())); + connect(ws, TQT_SIGNAL(valueChanged(int)), this, + TQT_SIGNAL(volumeSetValue(int))); + connect(ws, TQT_SIGNAL(sliderPressed()), TQT_SIGNAL(sliderPressed())); + connect(ws, TQT_SIGNAL(sliderReleased()), TQT_SIGNAL(sliderReleased())); } void WaVolumeSlider::setVolumeValue(int val) diff --git a/noatun/modules/winskin/waWidget.cpp b/noatun/modules/winskin/waWidget.cpp index ffe2d3b4..a93537b9 100644 --- a/noatun/modules/winskin/waWidget.cpp +++ b/noatun/modules/winskin/waWidget.cpp @@ -3,10 +3,10 @@ #include "noatun/stdaction.h" #include "waSkin.h" -WaWidget::WaWidget(int _mapping) : QWidget(WaSkin::instance()) { +WaWidget::WaWidget(int _mapping) : TQWidget(WaSkin::instance()) { mapping = _mapping; setBackgroundMode(NoBackground); - connect (WaSkinModel::instance(), SIGNAL(skinChanged()), this, SLOT(skinChanged())); + connect (WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), this, TQT_SLOT(skinChanged())); } WaWidget::~WaWidget() { @@ -41,11 +41,11 @@ void WaWidget::paintPixmap(int pixmap_mapping, int argument, int x, int y) { WaSkinModel::instance()->paintBackgroundTo(mapping, this, x, y); } -QSize WaWidget::sizeHint() { +TQSize WaWidget::sizeHint() { return WaSkinModel::instance()->getMapGeometry(mapping).size(); } -void WaWidget::mousePressEvent(QMouseEvent *e) { +void WaWidget::mousePressEvent(TQMouseEvent *e) { if (e->button() == RightButton) NoatunStdAction::ContextMenu::showContextMenu(); } diff --git a/noatun/modules/winskin/waWidget.h b/noatun/modules/winskin/waWidget.h index f2a41c82..076d0a5c 100644 --- a/noatun/modules/winskin/waWidget.h +++ b/noatun/modules/winskin/waWidget.h @@ -1,16 +1,16 @@ #ifndef _WAWIDGET_H #define _WAWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include "waSkinModel.h" -class WaWidget : public QWidget { +class WaWidget : public TQWidget { Q_OBJECT public: WaWidget(int mapping); virtual ~WaWidget(); - QSize sizeHint(); + TQSize sizeHint(); void paintPixmap(int wa_mapping); void paintPixmap(int wa_mapping, int number); @@ -21,7 +21,7 @@ public: void paintBackground() { WaSkinModel::instance()->paintBackgroundTo(mapping, this, 0, 0); } protected: - void mousePressEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *); int mapping; private slots: diff --git a/noatun/modules/winskin/winSkinConfig.cpp b/noatun/modules/winskin/winSkinConfig.cpp index 649fd1fe..07352c7b 100644 --- a/noatun/modules/winskin/winSkinConfig.cpp +++ b/noatun/modules/winskin/winSkinConfig.cpp @@ -1,77 +1,77 @@ #include <noatun/pref.h> #include <klocale.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpixmap.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpixmap.h> #include <kglobal.h> #include <kconfig.h> -#include <qslider.h> -#include <qframe.h> -#include <qstringlist.h> +#include <tqslider.h> +#include <tqframe.h> +#include <tqstringlist.h> #include <kfile.h> #include <kfiledialog.h> #include <kmessagebox.h> #include <kstandarddirs.h> #include <kurlrequester.h> #include <kurlrequesterdlg.h> -#include <qdir.h> +#include <tqdir.h> #include "waSkin.h" #include "waInfo.h" #include "waSkinManager.h" #include "winSkinConfig.h" -WinSkinConfig::WinSkinConfig(QWidget * parent, WaSkinManager *waSkinManager) : +WinSkinConfig::WinSkinConfig(TQWidget * parent, WaSkinManager *waSkinManager) : CModule(i18n("Winskin"), i18n("Skin Selection for the Winskin Plugin"), "style", parent) { // Make a token horizontal layout box - vbox = new QVBoxLayout(this); + vbox = new TQVBoxLayout(this); vbox->setSpacing( 6 ); vbox->setMargin( 0 ); // Add a simple list of skins, populated in WinSkinConfig::reopen() - skin_list = new QListBox(this, "skin_list"); + skin_list = new TQListBox(this, "skin_list"); vbox->addWidget(skin_list); - QHBoxLayout* hbox = new QHBoxLayout( 0, 6, 6 ); + TQHBoxLayout* hbox = new TQHBoxLayout( 0, 6, 6 ); - QPushButton* buttonInstall = new QPushButton( i18n("&Install New Skin..."), this ); + TQPushButton* buttonInstall = new TQPushButton( i18n("&Install New Skin..."), this ); hbox->addWidget(buttonInstall); - buttonRemove = new QPushButton( i18n("&Remove Skin"), this ); + buttonRemove = new TQPushButton( i18n("&Remove Skin"), this ); buttonRemove->setEnabled(false); hbox->addWidget(buttonRemove); vbox->addLayout(hbox); - connect( skin_list, SIGNAL(highlighted(const QString &)), this, SLOT(selected())); - connect( buttonInstall, SIGNAL(clicked()), this, SLOT(install())); - connect( buttonRemove, SIGNAL(clicked()), this, SLOT(remove())); - connect(waSkinManager, SIGNAL(updateSkinList()), this, SLOT(reopen())); + connect( skin_list, TQT_SIGNAL(highlighted(const TQString &)), this, TQT_SLOT(selected())); + connect( buttonInstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(install())); + connect( buttonRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(remove())); + connect(waSkinManager, TQT_SIGNAL(updateSkinList()), this, TQT_SLOT(reopen())); mWaSkinManager = waSkinManager; - QGroupBox *settingsBox = new QGroupBox( 1, Vertical, i18n("Settings"), this ); + TQGroupBox *settingsBox = new TQGroupBox( 1, Vertical, i18n("Settings"), this ); vbox->addWidget(settingsBox); - QHBox *box = new QHBox(settingsBox); - QLabel *label = new QLabel(i18n("T&itle scrolling speed:"), box); - new QLabel(i18n("None"), box); + TQHBox *box = new TQHBox(settingsBox); + TQLabel *label = new TQLabel(i18n("T&itle scrolling speed:"), box); + new TQLabel(i18n("None"), box); - scrollSpeed = new QSlider(box); + scrollSpeed = new TQSlider(box); label->setBuddy(scrollSpeed); - scrollSpeed->setMinimumSize( QSize( 80, 0 ) ); + scrollSpeed->setMinimumSize( TQSize( 80, 0 ) ); scrollSpeed->setMinValue( 0 ); scrollSpeed->setMaxValue( 50 ); scrollSpeed->setPageStep( 1 ); - scrollSpeed->setOrientation( QSlider::Horizontal ); - scrollSpeed->setTickmarks( QSlider::NoMarks ); + scrollSpeed->setOrientation( TQSlider::Horizontal ); + scrollSpeed->setTickmarks( TQSlider::NoMarks ); - label = new QLabel(i18n("Fast"), box); + label = new TQLabel(i18n("Fast"), box); reopen(); } @@ -99,7 +99,7 @@ void WinSkinConfig::reopen() { skin_list->clear(); // Get a list of skins - QStringList skins = mWaSkinManager->availableSkins(); + TQStringList skins = mWaSkinManager->availableSkins(); // This loop adds them all to our skin list for(unsigned int x = 0;x < skins.count();x++) { @@ -108,10 +108,10 @@ void WinSkinConfig::reopen() { } // Figure out our current skin - QString orig_skin = mWaSkinManager->currentSkin(); + TQString orig_skin = mWaSkinManager->currentSkin(); // Where is that skin in our big-list-o-skins? - QListBoxItem *item = skin_list->findItem(orig_skin); + TQListBoxItem *item = skin_list->findItem(orig_skin); if (item) { // Aha, found it... make it the currently selected skin @@ -135,14 +135,14 @@ void WinSkinConfig::selected() void WinSkinConfig::install() { - QString url; + TQString url; // Ask the user for directory containing a skin - KURLRequesterDlg* udlg = new KURLRequesterDlg( QString::null, this, "udlg", true ); + KURLRequesterDlg* udlg = new KURLRequesterDlg( TQString::null, this, "udlg", true ); udlg->urlRequester()->setFilter(mWaSkinManager->skinMimeTypes().join(" ")); udlg->urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly ); - if( udlg->exec() == QDialog::Accepted ) { + if( udlg->exec() == TQDialog::Accepted ) { url = udlg->urlRequester()->url(); mWaSkinManager->installSkin( url ); } @@ -163,7 +163,7 @@ void WinSkinConfig::remove() // Ask the user first if( KMessageBox::warningContinueCancel( this, - i18n("<qt>Are you sure you want to remove the <b>%1</b> skin?</qt>").arg( skin_list->currentText() ), QString::null, KStdGuiItem::del() ) + i18n("<qt>Are you sure you want to remove the <b>%1</b> skin?</qt>").arg( skin_list->currentText() ), TQString::null, KStdGuiItem::del() ) == KMessageBox::Continue ) { mWaSkinManager->removeSkin( skin_list->currentText() ); diff --git a/noatun/modules/winskin/winSkinConfig.h b/noatun/modules/winskin/winSkinConfig.h index 22dca884..0aabb1f5 100644 --- a/noatun/modules/winskin/winSkinConfig.h +++ b/noatun/modules/winskin/winSkinConfig.h @@ -2,7 +2,7 @@ #define __WINSKINCONFIG_H #include <noatun/pref.h> -#include <qwidget.h> +#include <tqwidget.h> class QVBoxLayout; class WaSkinManager; @@ -11,7 +11,7 @@ class QSlider; class WinSkinConfig:public CModule { Q_OBJECT public: - WinSkinConfig(QWidget * parent, WaSkinManager *waManager); + WinSkinConfig(TQWidget * parent, WaSkinManager *waManager); void save(); @@ -25,11 +25,11 @@ class WinSkinConfig:public CModule { private: WaSkinManager *mWaSkinManager; - QListBox *skin_list; - QString orig_skin; - QVBoxLayout *vbox; - QPushButton *buttonRemove; - QSlider *scrollSpeed; + TQListBox *skin_list; + TQString orig_skin; + TQVBoxLayout *vbox; + TQPushButton *buttonRemove; + TQSlider *scrollSpeed; }; #endif diff --git a/noatun/modules/winskin/winSkinVis.cpp b/noatun/modules/winskin/winSkinVis.cpp index f9937981..8ec025d2 100644 --- a/noatun/modules/winskin/winSkinVis.cpp +++ b/noatun/modules/winskin/winSkinVis.cpp @@ -17,8 +17,8 @@ #define __BANDS 75 #define __SPAHEIGHT 15 -WinSkinVis::WinSkinVis(QObject *parent, const char *name): - QObject(parent,name),Visualization(50) { +WinSkinVis::WinSkinVis(TQObject *parent, const char *name): + TQObject(parent,name),Visualization(50) { m_currentPeaks=new float[__BANDS]; diff --git a/noatun/modules/winskin/winSkinVis.h b/noatun/modules/winskin/winSkinVis.h index 7d139d0c..51c33205 100644 --- a/noatun/modules/winskin/winSkinVis.h +++ b/noatun/modules/winskin/winSkinVis.h @@ -14,7 +14,7 @@ #ifndef __WINSKINVIS_H #define __WINSKINVIS_H -#include <qobject.h> +#include <tqobject.h> // These are needed for the Visualisation class #include <soundserver.h> @@ -23,11 +23,11 @@ #include "vis/winskinvis.h" -class WinSkinVis : public QObject, public Visualization { +class WinSkinVis : public TQObject, public Visualization { Q_OBJECT public: - WinSkinVis(QObject* parent,const char* name); + WinSkinVis(TQObject* parent,const char* name); ~WinSkinVis(); /** diff --git a/noatun/noatun20update.cpp b/noatun/noatun20update.cpp index e6a611f0..8ab0bbdb 100644 --- a/noatun/noatun20update.cpp +++ b/noatun/noatun20update.cpp @@ -1,8 +1,8 @@ // Convert Noatun 1.2 plugins that no longer exist to their closest 2.0 // counterparts. -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> #ifndef stdin extern "C" FILE *stdin; @@ -14,26 +14,26 @@ extern "C" FILE *stdout; int main(int, char **) { - QFile qin, qout; + TQFile qin, qout; qin.open(IO_ReadOnly, stdin); qout.open(IO_WriteOnly, stdout); - QString text = qin.readAll(); + TQString text = qin.readAll(); // tag loaders bool tagloaders = text.contains("id3tag.plugin") || text.contains("oggtag.plugin") || text.contains("luckytag.plugin"); - text.replace(QRegExp("id3tag\\.plugin"), ""); - text.replace(QRegExp("oggtag\\.plugin"), ""); - text.replace(QRegExp("luckytag\\.plugin"), ""); + text.replace(TQRegExp("id3tag\\.plugin"), ""); + text.replace(TQRegExp("oggtag\\.plugin"), ""); + text.replace(TQRegExp("luckytag\\.plugin"), ""); - if(tagloaders) text.replace(QRegExp("Modules="), "Modules=metatag.plugin,"); + if(tagloaders) text.replace(TQRegExp("Modules="), "Modules=metatag.plugin,"); // playlists - text.replace(QRegExp("tron\\.plugin"), "splitplaylist.plugin"); - text.replace(QRegExp("liszt\\.plugin"), "splitplaylist.plugin"); + text.replace(TQRegExp("tron\\.plugin"), "splitplaylist.plugin"); + text.replace(TQRegExp("liszt\\.plugin"), "splitplaylist.plugin"); qout.writeBlock(text.local8Bit()); |