diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/modules/excellent | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/excellent')
-rw-r--r-- | noatun/modules/excellent/userinterface.cpp | 92 | ||||
-rw-r--r-- | noatun/modules/excellent/userinterface.h | 22 |
2 files changed, 57 insertions, 57 deletions
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 |