diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /noatun-plugins/charlatan/userinterface.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/charlatan/userinterface.cpp')
-rw-r--r-- | noatun-plugins/charlatan/userinterface.cpp | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/noatun-plugins/charlatan/userinterface.cpp b/noatun-plugins/charlatan/userinterface.cpp index e15a686..b9bb4c1 100644 --- a/noatun-plugins/charlatan/userinterface.cpp +++ b/noatun-plugins/charlatan/userinterface.cpp @@ -27,12 +27,12 @@ #include <noatun/controls.h> #include <noatun/effects.h> -#include <qaccel.h> -#include <qtoolbutton.h> -#include <qdragobject.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qframe.h> +#include <tqaccel.h> +#include <tqtoolbutton.h> +#include <tqdragobject.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqframe.h> #include <kurldrag.h> #include <kstatusbar.h> #include <kglobal.h> @@ -64,43 +64,43 @@ Charlatan::Charlatan() { setAcceptDrops(true); - showingVolumeTimer_ = new QTimer(this); + showingVolumeTimer_ = new TQTimer(this); connect ( showingVolumeTimer_, - SIGNAL(timeout()), - SLOT(slotStopShowingVolume()) + TQT_SIGNAL(timeout()), + TQT_SLOT(slotStopShowingVolume()) ); - playListToggleButton_ = new QToolButton(this); - previousButton_ = new QToolButton(this); - nextButton_ = new QToolButton(this); - stopButton_ = new QToolButton(this); - restartButton_ = new QToolButton(this); - playButton_ = new QToolButton(this); + playListToggleButton_ = new TQToolButton(this); + previousButton_ = new TQToolButton(this); + nextButton_ = new TQToolButton(this); + stopButton_ = new TQToolButton(this); + restartButton_ = new TQToolButton(this); + playButton_ = new TQToolButton(this); seekSlider_ = new Seeker(this); - positionLabel_ = new QLabel(this); + positionLabel_ = new TQLabel(this); titleLabel_ = new ScrollingLabel(i18n("No File Loaded"), this); - playListToggleButton_ ->setPixmap(QPixmap((const char **)px_playlist)); - previousButton_ ->setPixmap(QPixmap((const char **)px_previous)); - nextButton_ ->setPixmap(QPixmap((const char **)px_next)); - stopButton_ ->setPixmap(QPixmap((const char **)px_stop)); - restartButton_ ->setPixmap(QPixmap((const char **)px_restart)); - playButton_ ->setPixmap(QPixmap((const char **)px_play1)); + playListToggleButton_ ->setPixmap(TQPixmap((const char **)px_playlist)); + previousButton_ ->setPixmap(TQPixmap((const char **)px_previous)); + nextButton_ ->setPixmap(TQPixmap((const char **)px_next)); + stopButton_ ->setPixmap(TQPixmap((const char **)px_stop)); + restartButton_ ->setPixmap(TQPixmap((const char **)px_restart)); + playButton_ ->setPixmap(TQPixmap((const char **)px_play1)); playListToggleButton_ ->setToggleButton(true); - QVBoxLayout * mainLayout = new QVBoxLayout(this); + TQVBoxLayout * mainLayout = new TQVBoxLayout(this); mainLayout->addWidget(titleLabel_); mainLayout->addSpacing(2); - QHBoxLayout * positionLayout = new QHBoxLayout(mainLayout); + TQHBoxLayout * positionLayout = new TQHBoxLayout(mainLayout); positionLayout->addWidget(seekSlider_); positionLayout->addSpacing(2); @@ -108,7 +108,7 @@ Charlatan::Charlatan() mainLayout->addSpacing(2); - QHBoxLayout * buttonLayout = new QHBoxLayout(mainLayout); + TQHBoxLayout * buttonLayout = new TQHBoxLayout(mainLayout); buttonLayout->addWidget(playListToggleButton_); buttonLayout->addWidget(previousButton_); @@ -130,68 +130,68 @@ Charlatan::Charlatan() connect ( playListToggleButton_, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), napp->player(), - SLOT(toggleListView()) + TQT_SLOT(toggleListView()) ); connect ( previousButton_, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), napp->player(), - SLOT(back()) + TQT_SLOT(back()) ); connect ( nextButton_, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), napp->player(), - SLOT(forward()) + TQT_SLOT(forward()) ); connect ( stopButton_, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), napp->player(), - SLOT(stop()) + TQT_SLOT(stop()) ); - connect(restartButton_, SIGNAL(clicked()), SLOT(slotRestart())); + connect(restartButton_, TQT_SIGNAL(clicked()), TQT_SLOT(slotRestart())); connect ( playButton_, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), napp->player(), - SLOT(playpause()) + TQT_SLOT(playpause()) ); - connect(napp, SIGNAL(hideYourself()), SLOT(hide())); - connect(napp, SIGNAL(showYourself()), SLOT(show())); + connect(napp, TQT_SIGNAL(hideYourself()), TQT_SLOT(hide())); + connect(napp, TQT_SIGNAL(showYourself()), TQT_SLOT(show())); - connect(napp->player(), SIGNAL(playlistShown()), SLOT(slotPlayListShown())); - connect(napp->player(), SIGNAL(playlistHidden()), SLOT(slotPlayListHidden())); - connect(napp->player(), SIGNAL(playing()), SLOT(slotPlaying())); - connect(napp->player(), SIGNAL(stopped()), SLOT(slotStopped())); - connect(napp->player(), SIGNAL(paused()), SLOT(slotPaused())); + connect(napp->player(), TQT_SIGNAL(playlistShown()), TQT_SLOT(slotPlayListShown())); + connect(napp->player(), TQT_SIGNAL(playlistHidden()), TQT_SLOT(slotPlayListHidden())); + 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(), SIGNAL(timeout()), SLOT(slotTimeout())); + connect(napp->player(), TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); connect ( napp->player(), - SIGNAL(volumeChanged(int)), - SLOT(slotVolumeChanged(int)) + TQT_SIGNAL(volumeChanged(int)), + TQT_SLOT(slotVolumeChanged(int)) ); connect ( new CharlatanConfigModule(this), - SIGNAL(saved()), - SLOT(slotConfigChanged()) + TQT_SIGNAL(saved()), + TQT_SLOT(slotConfigChanged()) ); setCaption(i18n("Noatun")); @@ -201,10 +201,10 @@ Charlatan::Charlatan() loadConfig(); - // Using QAccel, because I don't want any strings associated or + // Using TQAccel, because I don't want any strings associated or // configurability. - QAccel * a = new QAccel(this, "Accelerators"); + TQAccel * a = new TQAccel(this, "Accelerators"); int accelPlay = a->insertItem(Key_Space); int accelNext = a->insertItem(Key_H); @@ -213,12 +213,12 @@ Charlatan::Charlatan() int accelRstt = a->insertItem(Key_Return); int accelQuit = a->insertItem(Key_Q); - a->connectItem(accelPlay, napp->player(), SLOT(playpause())); - a->connectItem(accelNext, napp->player(), SLOT(forward())); - a->connectItem(accelPrev, napp->player(), SLOT(back())); - a->connectItem(accelStop, napp->player(), SLOT(stop())); - a->connectItem(accelRstt, this, SLOT(slotRestart())); - a->connectItem(accelQuit, napp, SLOT(quit())); + a->connectItem(accelPlay, napp->player(), TQT_SLOT(playpause())); + a->connectItem(accelNext, napp->player(), TQT_SLOT(forward())); + a->connectItem(accelPrev, napp->player(), TQT_SLOT(back())); + a->connectItem(accelStop, napp->player(), TQT_SLOT(stop())); + a->connectItem(accelRstt, this, TQT_SLOT(slotRestart())); + a->connectItem(accelQuit, napp, TQT_SLOT(quit())); show(); @@ -230,17 +230,17 @@ Charlatan::~Charlatan() // Empty. } -void Charlatan::closeEvent(QCloseEvent *) +void Charlatan::closeEvent(TQCloseEvent *) { unload(); } -void Charlatan::dragEnterEvent(QDragEnterEvent *event) +void Charlatan::dragEnterEvent(TQDragEnterEvent *event) { event->accept(KURLDrag::canDecode(event)); } -void Charlatan::dropEvent(QDropEvent *event) +void Charlatan::dropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -251,9 +251,9 @@ void Charlatan::dropEvent(QDropEvent *event) } -void Charlatan::setTitleText(const QString & s) +void Charlatan::setTitleText(const TQString & s) { - QString titleText; + TQString titleText; if (!s.isNull()) { @@ -295,7 +295,7 @@ void Charlatan::slotPlaying() playButton_->setOn(true); stopButton_->setEnabled(true); - playButton_->setPixmap(QPixmap((const char **)px_pause)); + playButton_->setPixmap(TQPixmap((const char **)px_pause)); } void Charlatan::slotStopped() @@ -304,7 +304,7 @@ void Charlatan::slotStopped() stopButton_->setEnabled(false); playButton_->setOn(false); - playButton_->setPixmap(QPixmap((const char **)px_play1)); + playButton_->setPixmap(TQPixmap((const char **)px_play1)); } void Charlatan::slotPaused() @@ -313,15 +313,15 @@ void Charlatan::slotPaused() stopButton_->setEnabled(true); playButton_->setOn(false); - playButton_->setPixmap(QPixmap((const char **)px_play1)); + playButton_->setPixmap(TQPixmap((const char **)px_play1)); } -bool Charlatan::eventFilter(QObject *o, QEvent *e) +bool Charlatan::eventFilter(TQObject *o, TQEvent *e) { switch (e->type()) { - case QEvent::Wheel: - wheelEvent(static_cast<QWheelEvent*>(e)); + case TQEvent::Wheel: + wheelEvent(static_cast<TQWheelEvent*>(e)); return true; break; @@ -329,7 +329,7 @@ bool Charlatan::eventFilter(QObject *o, QEvent *e) break; } - return QWidget::eventFilter(o, e); + return TQWidget::eventFilter(o, e); } void Charlatan::slotPlayListShown() @@ -342,7 +342,7 @@ void Charlatan::slotPlayListHidden() playListToggleButton_->setOn(false); } -void Charlatan::mousePressEvent(QMouseEvent * e) +void Charlatan::mousePressEvent(TQMouseEvent * e) { if (e->button() == RightButton) { @@ -350,10 +350,10 @@ void Charlatan::mousePressEvent(QMouseEvent * e) return; } - return QWidget::mousePressEvent(e); + return TQWidget::mousePressEvent(e); } -void Charlatan::wheelEvent(QWheelEvent * e) +void Charlatan::wheelEvent(TQWheelEvent * e) { int newVolume = napp->player()->volume() + (e->delta() / 120) * 4; napp->player()->setVolume(newVolume); @@ -366,7 +366,7 @@ void Charlatan::slotConfigChanged() void Charlatan::slotVolumeChanged(int i) { - QString message(i18n("Volume: %1").arg(i)); + TQString message(i18n("Volume: %1").arg(i)); showingVolumeTimer_->start(2000, true); titleLabel_->setText(message); @@ -386,7 +386,7 @@ void Charlatan::slotTimeout() setTitleText(); - QString lengthText(napp->player()->lengthString()); + TQString lengthText(napp->player()->lengthString()); if (positionLabel_->text() != lengthText) positionLabel_->setText(lengthText); |