diff options
Diffstat (limited to 'languages/cpp/app_templates/noatunui')
-rw-r--r-- | languages/cpp/app_templates/noatunui/plugin_impl.cpp | 120 | ||||
-rw-r--r-- | languages/cpp/app_templates/noatunui/plugin_impl.h | 28 |
2 files changed, 74 insertions, 74 deletions
diff --git a/languages/cpp/app_templates/noatunui/plugin_impl.cpp b/languages/cpp/app_templates/noatunui/plugin_impl.cpp index 1b5eea45..7f4cda15 100644 --- a/languages/cpp/app_templates/noatunui/plugin_impl.cpp +++ b/languages/cpp/app_templates/noatunui/plugin_impl.cpp @@ -9,12 +9,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> @@ -25,53 +25,53 @@ //#include <kfiledialog.h> //#include <kconfig.h> -%{APPNAME}UI::%{APPNAME}UI() : QWidget(0,"%{APPNAME}UI"), UserInterface() +%{APPNAME}UI::%{APPNAME}UI() : TQWidget(0,"%{APPNAME}UI"), UserInterface() { setAcceptDrops(true); static const int buttonSize=32; - 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())); + connect(mPopup, TQT_SIGNAL(clicked()), TQT_SLOT(popup())); mVolume=new L33tSlider(0,100,10,0, Horizontal, this); @@ -81,7 +81,7 @@ 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); @@ -98,33 +98,33 @@ 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))); /* 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"); @@ -140,23 +140,23 @@ /** save settings here */ } -void %{APPNAME}UI::closeEvent(QCloseEvent*) +void %{APPNAME}UI::closeEvent(TQCloseEvent*) { unload(); } -void %{APPNAME}UI::showEvent(QShowEvent*e) +void %{APPNAME}UI::showEvent(TQShowEvent*e) { - QWidget::showEvent(e); + TQWidget::showEvent(e); } -void %{APPNAME}UI::dragEnterEvent(QDragEnterEvent *event) +void %{APPNAME}UI::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void %{APPNAME}UI::dropEvent(QDropEvent *event) +void %{APPNAME}UI::dropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -166,14 +166,14 @@ void %{APPNAME}UI::dropEvent(QDropEvent *event) } } -void %{APPNAME}UI::mouseReleaseEvent(QMouseEvent *e) +void %{APPNAME}UI::mouseReleaseEvent(TQMouseEvent *e) { - QWidget::mouseReleaseEvent(e); + TQWidget::mouseReleaseEvent(e); if (e->button()!=RightButton) return; NoatunStdAction::ContextMenu::showContextMenu(); } -void %{APPNAME}UI::changeStatusbar(const QString& text, const QString &text2) +void %{APPNAME}UI::changeStatusbar(const TQString& text, const TQString &text2) { if (!text2.isNull()) statusBar()->changeItem(text2, 1); @@ -181,7 +181,7 @@ void %{APPNAME}UI::changeStatusbar(const QString& text, const QString &text2) statusBar()->message(!text.isNull() ? text : napp->player()->current().title()); } -void %{APPNAME}UI::changeCaption(const QString& text) +void %{APPNAME}UI::changeCaption(const TQString& text) { setCaption(text); } @@ -265,21 +265,21 @@ void %{APPNAME}UI::changeLoopType(int t) } } -bool %{APPNAME}UI::eventFilter(QObject *o, QEvent *e) +bool %{APPNAME}UI::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 %{APPNAME}UI::playlistShown() @@ -292,7 +292,7 @@ void %{APPNAME}UI::playlistHidden() mPlaylist->setOn(false); } -void %{APPNAME}UI::wheelEvent(QWheelEvent *e) +void %{APPNAME}UI::wheelEvent(TQWheelEvent *e) { int delta=e->delta(); mVolume->setValue(mVolume->value()+(delta/120)); diff --git a/languages/cpp/app_templates/noatunui/plugin_impl.h b/languages/cpp/app_templates/noatunui/plugin_impl.h index 970246d4..e918f925 100644 --- a/languages/cpp/app_templates/noatunui/plugin_impl.h +++ b/languages/cpp/app_templates/noatunui/plugin_impl.h @@ -23,27 +23,27 @@ class KStatusBar; * @version 0.1 * Note: You can user _every_ widget for implementing your userinterface. */ -class %{APPNAME}UI : public QWidget, public UserInterface +class %{APPNAME}UI : public TQWidget, public UserInterface { Q_OBJECT public: %{APPNAME}UI(); virtual ~%{APPNAME}UI(); - 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 dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); + virtual void closeEvent(TQCloseEvent*); + virtual void showEvent(TQShowEvent*e); /** RMB -> context menu */ - virtual void mouseReleaseEvent(QMouseEvent *); - virtual bool eventFilter(QObject*, QEvent*); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual bool eventFilter(TQObject*, TQEvent*); /** volume control */ - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); protected: - QSlider *seeker() const { return mSeeker; } + TQSlider *seeker() const { return mSeeker; } KStatusBar *statusBar() const { return mStatusBar; } public slots: @@ -64,13 +64,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; }; |