summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/kjofol-skin/kjloader.cpp')
-rw-r--r--noatun/modules/kjofol-skin/kjloader.cpp132
1 files changed, 66 insertions, 66 deletions
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()