diff options
Diffstat (limited to 'juk/systemtray.cpp')
-rw-r--r-- | juk/systemtray.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/juk/systemtray.cpp b/juk/systemtray.cpp index 40cdd082..36c6874e 100644 --- a/juk/systemtray.cpp +++ b/juk/systemtray.cpp @@ -47,14 +47,14 @@ using namespace ActionCollection; static bool copyImage(TQImage &dest, TQImage &src, int x, int y); -class FlickerFreeLabel : public QLabel +class FlickerFreeLabel : public TQLabel { public: - FlickerFreeLabel(const TQString &text, TQWidget *parent, const char *name = 0) : - TQLabel(text, parent, name) + FlickerFreeLabel(const TQString &text, TQWidget *tqparent, const char *name = 0) : + TQLabel(text, tqparent, name) { m_textColor = paletteForegroundColor(); - m_bgColor = parentWidget()->paletteBackgroundColor(); + m_bgColor = tqparentWidget()->paletteBackgroundColor(); setBackgroundMode(NoBackground); } @@ -73,7 +73,7 @@ protected: { // We want to intercept the drawContents call and draw on a pixmap // instead of the window to keep flicker to an absolute minimum. - // Since Qt doesn't refresh the background, we need to do so + // Since TQt doesn't refresh the background, we need to do so // ourselves. TQPixmap pix(size()); @@ -90,8 +90,8 @@ protected: TQColor m_bgColor; }; -PassiveInfo::PassiveInfo(TQWidget *parent, const char *name) : - KPassivePopup(parent, name), m_timer(new TQTimer), m_justDie(false) +PassiveInfo::PassiveInfo(TQWidget *tqparent, const char *name) : + KPassivePopup(tqparent, name), m_timer(new TQTimer), m_justDie(false) { // I'm so sick and tired of KPassivePopup screwing this up // that I'll just handle the timeout myself, thank you very much. @@ -137,7 +137,7 @@ void PassiveInfo::leaveEvent(TQEvent *) // public methods //////////////////////////////////////////////////////////////////////////////// -SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, name), +SystemTray::SystemTray(TQWidget *tqparent, const char *name) : KSystemTray(tqparent, name), m_popup(0), m_fadeTimer(0), m_fade(true) @@ -162,8 +162,8 @@ SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, // Just create this here so that it show up in the DCOP interface and the key // bindings dialog. - new KAction(i18n("Redisplay Popup"), KShortcut(), this, - TQT_SLOT(slotPlay()), actions(), "showPopup"); + new KAction(i18n("Redisplay Popup"), KShortcut(), TQT_TQOBJECT(this), + TQT_SLOT(slotPlay()), ActionCollection::actions(), "showPopup"); KPopupMenu *cm = contextMenu(); @@ -181,7 +181,7 @@ SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, // Pity the actionCollection doesn't keep track of what sub-menus it has. - KActionMenu *menu = new KActionMenu(i18n("&Random Play"), this); + KActionMenu *menu = new KActionMenu(i18n("&Random Play"), TQT_TQOBJECT(this)); menu->insert(action("disableRandomPlay")); menu->insert(action("randomPlay")); menu->insert(action("albumRandomPlay")); @@ -299,7 +299,7 @@ void SystemTray::slotMouseInPopup() // private methods //////////////////////////////////////////////////////////////////////////////// -TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file) +TQVBox *SystemTray::createPopupLayout(TQWidget *tqparent, const FileHandle &file) { TQVBox *infoBox = 0; @@ -307,17 +307,17 @@ TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file) // They go to the left because JuK is on that side - createButtonBox(parent); - addSeparatorLine(parent); + createButtonBox(tqparent); + addSeparatorLine(tqparent); - infoBox = new TQVBox(parent); + infoBox = new TQVBox(tqparent); // Another line, and the cover, if there's a cover, and if // it's selected to be shown if(file.coverInfo()->hasCover()) { - addSeparatorLine(parent); - addCoverButton(parent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); + addSeparatorLine(tqparent); + addCoverButton(tqparent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); } } else { @@ -325,14 +325,14 @@ TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file) // Like above, but reversed. if(file.coverInfo()->hasCover()) { - addCoverButton(parent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); - addSeparatorLine(parent); + addCoverButton(tqparent, file.coverInfo()->pixmap(CoverInfo::Thumbnail)); + addSeparatorLine(tqparent); } - infoBox = new TQVBox(parent); + infoBox = new TQVBox(tqparent); - addSeparatorLine(parent); - createButtonBox(parent); + addSeparatorLine(tqparent); + createButtonBox(tqparent); } infoBox->setSpacing(3); @@ -370,7 +370,7 @@ void SystemTray::createPopup() for(unsigned i = 0; i < m_labels.capacity(); ++i) { m_labels[i] = new FlickerFreeLabel(" ", infoBox); - m_labels[i]->setAlignment(AlignRight | AlignVCenter); + m_labels[i]->tqsetAlignment(AlignRight | AlignVCenter); } // We don't want an autodelete popup. There are times when it will need @@ -385,7 +385,7 @@ void SystemTray::createPopup() int labelCount = 0; TQString title = TQStyleSheet::escape(playingInfo->title()); - m_labels[labelCount++]->setText(TQString("<qt><nobr><h2>%1</h2></nobr><qt>").arg(title)); + m_labels[labelCount++]->setText(TQString("<qt><nobr><h2>%1</h2></nobr><qt>").tqarg(title)); if(!playingInfo->artist().isEmpty()) m_labels[labelCount++]->setText(playingInfo->artist()); @@ -393,8 +393,8 @@ void SystemTray::createPopup() if(!playingInfo->album().isEmpty()) { TQString album = TQStyleSheet::escape(playingInfo->album()); TQString s = playingInfo->year() > 0 - ? TQString("<qt><nobr>%1 (%2)</nobr></qt>").arg(album).arg(playingInfo->year()) - : TQString("<qt><nobr>%1</nobr></qt>").arg(album); + ? TQString("<qt><nobr>%1 (%2)</nobr></qt>").tqarg(album).tqarg(playingInfo->year()) + : TQString("<qt><nobr>%1</nobr></qt>").tqarg(album); m_labels[labelCount++]->setText(s); } @@ -440,9 +440,9 @@ TQPixmap SystemTray::createPixmap(const TQString &pixName) return bgPix; } -void SystemTray::createButtonBox(TQWidget *parent) +void SystemTray::createButtonBox(TQWidget *tqparent) { - TQVBox *buttonBox = new TQVBox(parent); + TQVBox *buttonBox = new TQVBox(tqparent); buttonBox->setSpacing(3); @@ -472,9 +472,9 @@ void SystemTray::slotForward() m_fade = false; } -void SystemTray::addSeparatorLine(TQWidget *parent) +void SystemTray::addSeparatorLine(TQWidget *tqparent) { - TQFrame *line = new TQFrame(parent); + TQFrame *line = new TQFrame(tqparent); line->setFrameShape(TQFrame::VLine); // Cover art takes up 80 pixels, make sure we take up at least 80 pixels @@ -483,9 +483,9 @@ void SystemTray::addSeparatorLine(TQWidget *parent) line->setMinimumHeight(80); } -void SystemTray::addCoverButton(TQWidget *parent, const TQPixmap &cover) +void SystemTray::addCoverButton(TQWidget *tqparent, const TQPixmap &cover) { - TQPushButton *coverButton = new TQPushButton(parent); + TQPushButton *coverButton = new TQPushButton(tqparent); coverButton->setPixmap(cover); coverButton->setFixedSize(cover.size()); @@ -531,8 +531,8 @@ void SystemTray::setToolTip(const TQString &tip, const TQPixmap &cover) TQString html = i18n("%1 is Cover Art, %2 is the playing track, %3 is the appname", "<center><table cellspacing=\"2\"><tr><td valign=\"middle\">%1</td>" "<td valign=\"middle\">%2</td></tr></table><em>%3</em></center>"); - html = html.arg("<img valign=\"middle\" src=\"tipCover\""); - html = html.arg(TQString("<nobr>%1</nobr>").arg(tip), i18n("JuK")); + html = html.tqarg("<img valign=\"middle\" src=\"tipCover\""); + html = html.tqarg(TQString("<nobr>%1</nobr>").tqarg(tip), i18n("JuK")); TQToolTip::add(this, html); } @@ -540,7 +540,7 @@ void SystemTray::setToolTip(const TQString &tip, const TQPixmap &cover) void SystemTray::wheelEvent(TQWheelEvent *e) { - if(e->orientation() == Horizontal) + if(e->orientation() ==Qt::Horizontal) return; // I already know the type here, but this file doesn't (and I don't want it @@ -571,13 +571,13 @@ void SystemTray::wheelEvent(TQWheelEvent *e) void SystemTray::mousePressEvent(TQMouseEvent *e) { switch(e->button()) { - case LeftButton: - case RightButton: + case Qt::LeftButton: + case Qt::RightButton: default: KSystemTray::mousePressEvent(e); break; - case MidButton: - if(!rect().contains(e->pos())) + case Qt::MidButton: + if(!TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos())) return; if(action("pause")->isEnabled()) action("pause")->activate(); @@ -589,7 +589,7 @@ void SystemTray::mousePressEvent(TQMouseEvent *e) /* * This function copies the entirety of src into dest, starting in - * dest at x and y. This function exists because I was unable to find + * dest at x and y. This function exists because I was unable to tqfind * a function like it in either TQImage or kdefx */ |