From b1057f437bf65300831a0ccb45b920787c6b318d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 06:00:15 +0000 Subject: TQt4 port kdemultimedia This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun/modules/noatunui/userinterface.cpp | 22 +++++++++++----------- noatun/modules/noatunui/userinterface.h | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'noatun/modules/noatunui') diff --git a/noatun/modules/noatunui/userinterface.cpp b/noatun/modules/noatunui/userinterface.cpp index 0302efe6..3afd3698 100644 --- a/noatun/modules/noatunui/userinterface.cpp +++ b/noatun/modules/noatunui/userinterface.cpp @@ -80,9 +80,9 @@ MilkChocolate::MilkChocolate() : TQWidget(0,"NoatunUI"), UserInterface() } - mVolume=new L33tSlider(0,100,10,0, Horizontal, this); + mVolume=new L33tSlider(0,100,10,0,Qt::Horizontal, this); mVolume->setValue(napp->player()->volume()); - mSeeker=new L33tSlider(0,1000,10,0, Horizontal, this); + mSeeker=new L33tSlider(0,1000,10,0,Qt::Horizontal, this); mStatusBar=new KStatusBar(this); @@ -92,7 +92,7 @@ MilkChocolate::MilkChocolate() : TQWidget(0,"NoatunUI"), UserInterface() l->addWidget(mStop,0,1); l->addWidget(mPlay,0,2); l->addWidget(mForward,0,3); - l->addWidget(mPlaylist,0,4, Qt::AlignLeft); + l->addWidget(mPlaylist,0,4, TQt::AlignLeft); l->addWidget(mLoop,0,5); l->addWidget(mPopup,0,6); l->addColSpacing(4, buttonSize+8); @@ -132,7 +132,7 @@ MilkChocolate::MilkChocolate() : TQWidget(0,"NoatunUI"), UserInterface() connect(napp->player(), TQT_SIGNAL(playlistHidden()), TQT_SLOT(playlistHidden())); // Event Filter for the RMB - for (TQPtrListIterator i(*children()); i.current(); ++i) + for (TQPtrListIterator i(childrenListObject()); i.current(); ++i) (*i)->installEventFilter(this); setCaption("Noatun"); @@ -140,7 +140,7 @@ MilkChocolate::MilkChocolate() : TQWidget(0,"NoatunUI"), UserInterface() show(); // What it is now, stay, stay.. roll over, good boy! - setFixedSize(minimumSize()); + setFixedSize(tqminimumSize()); } MilkChocolate::~MilkChocolate() @@ -179,7 +179,7 @@ void MilkChocolate::dropEvent(TQDropEvent *event) void MilkChocolate::mouseReleaseEvent(TQMouseEvent *e) { TQWidget::mouseReleaseEvent(e); - if (e->button()!=RightButton) return; + if (e->button()!=Qt::RightButton) return; NoatunStdAction::ContextMenu::showContextMenu(); } @@ -199,13 +199,13 @@ void MilkChocolate::changeCaption(const TQString& text) void MilkChocolate::popup() { NoatunStdAction::ContextMenu::showContextMenu( - mapToGlobal(mPopup->geometry().bottomLeft()) + mapToGlobal(mPopup->tqgeometry().bottomLeft()) ); } void MilkChocolate::slotPlaying() { -// connect(kwinmodule, TQT_SIGNAL(windowAdded(WId)), view, TQT_SLOT(attemptReparent(WId))); +// connect(kwinmodule, TQT_SIGNAL(windowAdded(WId)), view, TQT_SLOT(attemptRetqparent(WId))); changeStatusbar(napp->player()->current().title(), napp->player()->lengthString()); mPlay->setOn(true); mStop->setEnabled(true); @@ -281,15 +281,15 @@ void MilkChocolate::changeLoopType(int t) bool MilkChocolate::eventFilter(TQObject *o, TQEvent *e) { if ((e->type() == TQEvent::MouseButtonRelease) - && ((static_cast(e))->button()==RightButton)) + && ((TQT_TQMOUSEEVENT(e))->button()==Qt::RightButton)) { - mouseReleaseEvent(static_cast(e)); + mouseReleaseEvent(TQT_TQMOUSEEVENT(e)); return true; } if (e->type() == TQEvent::Wheel) { - wheelEvent(static_cast(e)); + wheelEvent(TQT_TQWHEELEVENT(e)); return true; } return TQWidget::eventFilter(o, e); diff --git a/noatun/modules/noatunui/userinterface.h b/noatun/modules/noatunui/userinterface.h index d20b2536..77bf2222 100644 --- a/noatun/modules/noatunui/userinterface.h +++ b/noatun/modules/noatunui/userinterface.h @@ -24,6 +24,7 @@ class KStatusBar; class MilkChocolate : public TQWidget, public UserInterface { Q_OBJECT + TQ_OBJECT public: MilkChocolate(); virtual ~MilkChocolate(); -- cgit v1.2.1