summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjbutton.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/modules/kjofol-skin/kjbutton.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
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
Diffstat (limited to 'noatun/modules/kjofol-skin/kjbutton.cpp')
-rw-r--r--noatun/modules/kjofol-skin/kjbutton.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/noatun/modules/kjofol-skin/kjbutton.cpp b/noatun/modules/kjofol-skin/kjbutton.cpp
index d051777e..7dbd9d99 100644
--- a/noatun/modules/kjofol-skin/kjbutton.cpp
+++ b/noatun/modules/kjofol-skin/kjbutton.cpp
@@ -30,8 +30,8 @@
* KJButton
*******************************************/
-KJButton::KJButton(const TQStringList &i, KJLoader *parent)
- : TQObject(0), KJWidget(parent), mTitle(i[0]), mShowPressed(false)
+KJButton::KJButton(const TQStringList &i, KJLoader *tqparent)
+ : TQObject(0), KJWidget(tqparent), mTitle(i[0]), mShowPressed(false)
{
// kdDebug(66666) << k_funcinfo << "new button: " << i[0].latin1() << endl;
mPushedPixmap = (i.count() >= 7);
@@ -53,12 +53,12 @@ KJButton::KJButton(const TQStringList &i, KJLoader *parent)
bool gotBack = false; // in case any of these keys is duplicated
for(TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it)
{
- if((*it).contains("bmp"))
+ if((*it).tqcontains("bmp"))
{
TQString pressedTmp = backgroundPressed((*it));
if(!pressedTmp.isEmpty())
{
- mPressed = parent->pixmap(pressedTmp);
+ mPressed = tqparent->pixmap(pressedTmp);
gotBack = true;
}
}
@@ -67,7 +67,7 @@ KJButton::KJButton(const TQStringList &i, KJLoader *parent)
// take background and darken the buttons rectangle
// FIXME: what KPixmapEffect causes the desired effect?
// intensity is the wrong one
- KPixmap temp = parent->pixmap(parser()["backgroundimage"][1]);
+ KPixmap temp = tqparent->pixmap(parser()["backgroundimage"][1]);
mPressed = (TQPixmap)KPixmapEffect::intensity ( temp, 1.2f );
gotBack = true;
}
@@ -79,7 +79,7 @@ KJButton::KJButton(const TQStringList &i, KJLoader *parent)
{
kdDebug(66666) << k_funcinfo << "Couldn't find valid background for button '" <<
mTitle << "', dafulting to backgroundimage" << endl;
- mPressed = parent->pixmap(parser()["backgroundimage"][1]);
+ mPressed = tqparent->pixmap(parser()["backgroundimage"][1]);
}
// playlistbutton has to show if playlistwindow is open
@@ -152,12 +152,12 @@ TQString KJButton::tip()
void KJButton::paint(TQPainter *, const TQRect &)
{
if (mShowPressed)
- bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP);
+ bitBlt(KJWidget::tqparent(), rect().topLeft(), &mPressed, rect(), TQt::CopyROP);
}
bool KJButton::mousePress(const TQPoint &)
{
- bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP);
+ bitBlt(KJWidget::tqparent(), rect().topLeft(), &mPressed, rect(), TQt::CopyROP);
return true;
}
@@ -165,9 +165,9 @@ void KJButton::showPressed(bool b)
{
mShowPressed = b;
if ( mShowPressed )
- repaint(true); // repaint with selected image
+ tqrepaint(true); // tqrepaint with selected image
else
- repaint(false); // repaint with default image (player-background)
+ tqrepaint(false); // tqrepaint with default image (player-background)
}
void KJButton::slotPlaylistShown(void)
@@ -193,19 +193,19 @@ void KJButton::slotEqEnabled(bool on)
void KJButton::mouseRelease(const TQPoint &, bool in)
{
- // repaint with default image (player-background)
- repaint(false);
+ // tqrepaint with default image (player-background)
+ tqrepaint(false);
if (!in) // only do something if users is still inside the button
return;
// now, find what widget I am and do the proper action
if (mTitle=="closebutton")
- KJWidget::parent()->close();
+ KJWidget::tqparent()->close();
else if (mTitle=="minimizebutton")
- KJWidget::parent()->minimize();
+ KJWidget::tqparent()->minimize();
else if (mTitle=="aboutbutton")
- KJWidget::parent()->helpMenu()->aboutApplication();
+ KJWidget::tqparent()->helpMenu()->aboutApplication();
else if (mTitle=="stopbutton")
napp->player()->stop();
else if (mTitle=="playbutton")
@@ -214,7 +214,7 @@ void KJButton::mouseRelease(const TQPoint &, bool in)
napp->player()->playpause();
else if (mTitle=="openfilebutton")
{
- KURL file(KFileDialog::getOpenURL(0, napp->mimeTypes(), KJWidget::parent(), i18n("Select File to Play")));
+ KURL file(KFileDialog::getOpenURL(0, napp->mimeTypes(), KJWidget::tqparent(), i18n("Select File to Play")));
if (file.isValid())
napp->player()->openFile(file);
}
@@ -222,7 +222,7 @@ void KJButton::mouseRelease(const TQPoint &, bool in)
napp->player()->toggleListView();
else if (mTitle=="repeatbutton")
{
- KPopupMenu *loopMenu = new KPopupMenu(KJWidget::parent(),"loopMenu");
+ KPopupMenu *loopMenu = new KPopupMenu(KJWidget::tqparent(),"loopMenu");
int selectedItem = 0;
loopMenu->setCheckable(true);
@@ -291,11 +291,11 @@ void KJButton::mouseRelease(const TQPoint &, bool in)
else if (mTitle=="rewindbutton")
napp->player()->skipTo(napp->player()->getTime()-10000);
else if (mTitle=="preferencesbutton")
- napp->preferencesBox()->show(static_cast<CModule *>(KJWidget::parent()->prefs()));
+ napp->preferencesBox()->show(static_cast<CModule *>(KJWidget::tqparent()->prefs()));
else if (mTitle=="dockmodebutton")
- KJWidget::parent()->switchToDockmode();
+ KJWidget::tqparent()->switchToDockmode();
else if (mTitle=="undockmodebutton")
- KJWidget::parent()->returnFromDockmode();
+ KJWidget::tqparent()->returnFromDockmode();
else
kdDebug(66666) << "unknown buttontype: " << mTitle.latin1() << endl;
}