summaryrefslogtreecommitdiffstats
path: root/noatun/modules/winskin/waSkin.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/modules/winskin/waSkin.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/winskin/waSkin.cpp')
-rw-r--r--noatun/modules/winskin/waSkin.cpp162
1 files changed, 81 insertions, 81 deletions
diff --git a/noatun/modules/winskin/waSkin.cpp b/noatun/modules/winskin/waSkin.cpp
index 7d95047d..d7b443ee 100644
--- a/noatun/modules/winskin/waSkin.cpp
+++ b/noatun/modules/winskin/waSkin.cpp
@@ -12,7 +12,7 @@
*/
#include <kconfig.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kglobal.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -21,7 +21,7 @@
#include <kurldrag.h>
#include <kstdaction.h>
#include <kaction.h>
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kstandarddirs.h>
#include <kwin.h>
#include <time.h>
@@ -57,7 +57,7 @@
WaSkin *_waskin_instance = NULL;
-WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface()
+WaSkin::WaSkin() : TQWidget(0, "NoatunWinampSkin"), UserInterface()
{
mJumpPressed = false;
mVolumePressed = false;
@@ -83,22 +83,22 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface()
title_shaded = false;
// These slots make Young Hickory love us
- connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) );
- connect( napp, SIGNAL(showYourself()), this, SLOT(show()) );
-
- connect(napp->player(), SIGNAL(playlistShown()), this,
- SLOT(playlistShown()));
- connect(napp->player(), SIGNAL(playlistHidden()), this,
- SLOT(playlistHidden()));
- connect(napp->player(), SIGNAL(loopTypeChange(int)), this,
- SLOT(loopChange(int)));
- connect(napp->player(), SIGNAL(newSong()), this, SLOT(newSong()));
-
- connect(napp->player(), SIGNAL(timeout()), this, SLOT(timetick()));
+ connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) );
+ connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) );
+
+ connect(napp->player(), TQT_SIGNAL(playlistShown()), this,
+ TQT_SLOT(playlistShown()));
+ connect(napp->player(), TQT_SIGNAL(playlistHidden()), this,
+ TQT_SLOT(playlistHidden()));
+ connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this,
+ TQT_SLOT(loopChange(int)));
+ connect(napp->player(), TQT_SIGNAL(newSong()), this, TQT_SLOT(newSong()));
+
+ connect(napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(timetick()));
KConfig *config=KGlobal::config();
config->setGroup("Winskin");
- QString skin = config->readEntry("CurrentSkin", WaSkin::defaultSkin());
+ TQString skin = config->readEntry("CurrentSkin", WaSkin::defaultSkin());
loadSkin(skin);
@@ -106,13 +106,13 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface()
setIcon(SmallIcon("noatun"));
- QObject::connect(waTitleBar, SIGNAL(shaded()), this, SLOT(shadeEvent()));
+ TQObject::connect(waTitleBar, TQT_SIGNAL(shaded()), this, TQT_SLOT(shadeEvent()));
// connect to players signals - so we can update our display if someone else
// changes settings...
- connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped()));
- connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlaying()));
- connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPaused()));
+ connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped()));
+ connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlaying()));
+ connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPaused()));
napp->player()->handleButtons();
@@ -126,7 +126,7 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface()
newSong();
// HACK: We won't get focus events otherwise
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
show();
}
@@ -138,7 +138,7 @@ WaSkin::~WaSkin()
waSkinManager = 0L;
}
-void WaSkin::loadSkin(QString newSkinDir)
+void WaSkin::loadSkin(TQString newSkinDir)
{
waSkinManager->loadSkin(newSkinDir);
@@ -154,9 +154,9 @@ void WaSkin::loadSkin(QString newSkinDir)
}
}
-QSize WaSkin::sizeHint() const
+TQSize WaSkin::sizeHint() const
{
- QRect temp_rect;
+ TQRect temp_rect;
temp_rect = waSkinModel->getGeometry(_WA_SKIN_MAIN);
@@ -180,22 +180,22 @@ void WaSkin::createButtons()
menu = new WaButton(_WA_MAPPING_TITLE_MENU);
menu->setPixmapUp(_WA_SKIN_TITLE_MENU_NORM);
menu->setPixmapDown(_WA_SKIN_TITLE_MENU_PRES);
- connect(menu, SIGNAL(clicked()), this, SLOT(menuEvent()));
+ connect(menu, TQT_SIGNAL(clicked()), this, TQT_SLOT(menuEvent()));
minimize = new WaButton(_WA_MAPPING_TITLE_MIN);
minimize->setPixmapUp(_WA_SKIN_TITLE_MIN_NORM);
minimize->setPixmapDown(_WA_SKIN_TITLE_MIN_PRES);
- connect(minimize, SIGNAL(clicked()), this, SLOT(minimizeEvent()));
+ connect(minimize, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimizeEvent()));
titleshade = new WaButton(_WA_MAPPING_TITLE_SHADE);
titleshade->setPixmapUp(_WA_SKIN_TITLE_SHADE_NORM);
titleshade->setPixmapDown(_WA_SKIN_TITLE_SHADE_PRES);
- connect(titleshade, SIGNAL(clicked()), this, SLOT(shadeEvent()));
+ connect(titleshade, TQT_SIGNAL(clicked()), this, TQT_SLOT(shadeEvent()));
close = new WaButton(_WA_MAPPING_TITLE_CLOSE);
close->setPixmapUp(_WA_SKIN_TITLE_CLOSE_NORM);
close->setPixmapDown(_WA_SKIN_TITLE_CLOSE_PRES);
- connect(close, SIGNAL(clicked()), this, SLOT(doClose()));
+ connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(doClose()));
shuffle->setTogglable(true);
shuffle->show();
@@ -203,44 +203,44 @@ void WaSkin::createButtons()
repeat->setTogglable(true);
playlist->setTogglable(true);
- connect(shuffle, SIGNAL(toggleEvent(bool)),
- this, SLOT(shuffleClickedEvent(bool)));
+ connect(shuffle, TQT_SIGNAL(toggleEvent(bool)),
+ this, TQT_SLOT(shuffleClickedEvent(bool)));
- connect(repeat, SIGNAL(toggleEvent(bool)),
- this, SLOT(repeatClickedEvent(bool)));
+ connect(repeat, TQT_SIGNAL(toggleEvent(bool)),
+ this, TQT_SLOT(repeatClickedEvent(bool)));
- connect(playlist, SIGNAL(toggleEvent(bool)),
- this, SLOT(playlistClickedEvent(bool)));
+ connect(playlist, TQT_SIGNAL(toggleEvent(bool)),
+ this, TQT_SLOT(playlistClickedEvent(bool)));
- connect(eq, SIGNAL(clicked()),
- this, SLOT(eqClickedEvent()));
+ connect(eq, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(eqClickedEvent()));
prev->setPixmapUp(_WA_SKIN_CBUTTONS_PREV_NORM);
prev->setPixmapDown(_WA_SKIN_CBUTTONS_PREV_PRES);
- connect(prev, SIGNAL(clicked()), napp->player(), SLOT(back()));
+ connect(prev, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()));
play->setPixmapUp(_WA_SKIN_CBUTTONS_PLAY_NORM);
play->setPixmapDown(_WA_SKIN_CBUTTONS_PLAY_PRES);
- connect(play, SIGNAL(clicked()), this, SLOT(playCurrentEvent()));
+ connect(play, TQT_SIGNAL(clicked()), this, TQT_SLOT(playCurrentEvent()));
pause->setPixmapUp(_WA_SKIN_CBUTTONS_PAUSE_NORM);
pause->setPixmapDown(_WA_SKIN_CBUTTONS_PAUSE_PRES);
- connect(pause, SIGNAL(clicked()), this, SLOT(playPauseEvent()));
+ connect(pause, TQT_SIGNAL(clicked()), this, TQT_SLOT(playPauseEvent()));
stop->setPixmapUp(_WA_SKIN_CBUTTONS_STOP_NORM);
stop->setPixmapDown(_WA_SKIN_CBUTTONS_STOP_PRES);
- connect(stop, SIGNAL(clicked()), napp->player(), SLOT(stop()));
+ connect(stop, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()));
next->setPixmapUp(_WA_SKIN_CBUTTONS_NEXT_NORM);
next->setPixmapDown(_WA_SKIN_CBUTTONS_NEXT_PRES);
- connect(next, SIGNAL(clicked()), napp->player(), SLOT(forward()));
+ connect(next, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()));
eject->setPixmapUp(_WA_SKIN_CBUTTONS_EJECT_NORM);
eject->setPixmapDown(_WA_SKIN_CBUTTONS_EJECT_PRESS);
- connect(eject, SIGNAL(clicked()), napp, SLOT(fileOpen()));
+ connect(eject, TQT_SIGNAL(clicked()), napp, TQT_SLOT(fileOpen()));
shuffle->setPixmapUp(_WA_SKIN_SHUFREP_SHUFFLE_NOT_SET_NORM);
shuffle->setPixmapDown(_WA_SKIN_SHUFREP_SHUFFLE_NOT_SET_PRES);
@@ -280,25 +280,25 @@ void WaSkin::createHighLevelElements()
waVolumeSlider = new WaVolumeSlider();
waVolumeSlider->buildGui();
- connect(waVolumeSlider, SIGNAL(volumeSetValue(int)),
- this, SLOT(volumeSetValue(int)));
- connect(waVolumeSlider, SIGNAL(sliderPressed()),
- this, SLOT(volumeSliderPressed()));
- connect(waVolumeSlider, SIGNAL(sliderReleased()),
- this, SLOT(volumeSliderReleased()));
+ connect(waVolumeSlider, TQT_SIGNAL(volumeSetValue(int)),
+ this, TQT_SLOT(volumeSetValue(int)));
+ connect(waVolumeSlider, TQT_SIGNAL(sliderPressed()),
+ this, TQT_SLOT(volumeSliderPressed()));
+ connect(waVolumeSlider, TQT_SIGNAL(sliderReleased()),
+ this, TQT_SLOT(volumeSliderReleased()));
waBalanceSlider = new WaBalanceSlider();
waBalanceSlider->buildGui();
- connect(waBalanceSlider, SIGNAL(balanceSetValue(int)),
- this, SLOT(balanceSetValue(int)));
- connect(waBalanceSlider, SIGNAL(sliderPressed()),
- this, SLOT(balanceSliderPressed()));
- connect(waBalanceSlider, SIGNAL(sliderReleased()),
- this, SLOT(balanceSliderReleased()));
+ connect(waBalanceSlider, TQT_SIGNAL(balanceSetValue(int)),
+ this, TQT_SLOT(balanceSetValue(int)));
+ connect(waBalanceSlider, TQT_SIGNAL(sliderPressed()),
+ this, TQT_SLOT(balanceSliderPressed()));
+ connect(waBalanceSlider, TQT_SIGNAL(sliderReleased()),
+ this, TQT_SLOT(balanceSliderReleased()));
waDigit = new WaDigit();
- connect(waDigit, SIGNAL(digitsClicked()), this, SLOT(digitsClicked()));
+ connect(waDigit, TQT_SIGNAL(digitsClicked()), this, TQT_SLOT(digitsClicked()));
waBPS = new WaLabel(_WA_MAPPING_BPS);
waFreq = new WaLabel(_WA_MAPPING_FREQ);
@@ -310,13 +310,13 @@ void WaSkin::createHighLevelElements()
waStereo = new WaIndicator(_WA_MAPPING_MONOSTER_STEREO, _WA_SKIN_MONOSTER_STEREO_TRUE, _WA_SKIN_MONOSTER_STEREO_FALSE);
waMono = new WaIndicator(_WA_MAPPING_MONOSTER_MONO, _WA_SKIN_MONOSTER_MONO_TRUE, _WA_SKIN_MONOSTER_MONO_FALSE);
- connect(waJumpSlider, SIGNAL(jump(int)), this, SLOT(jump(int)));
- connect(waJumpSlider, SIGNAL(sliderPressed()),
- this, SLOT(jumpSliderPressed()));
- connect(waJumpSlider, SIGNAL(sliderReleased()),
- this, SLOT(jumpSliderReleased()));
- connect(waJumpSlider, SIGNAL(valueChanged(int)),
- this, SLOT(jumpValueChanged(int)));
+ connect(waJumpSlider, TQT_SIGNAL(jump(int)), this, TQT_SLOT(jump(int)));
+ connect(waJumpSlider, TQT_SIGNAL(sliderPressed()),
+ this, TQT_SLOT(jumpSliderPressed()));
+ connect(waJumpSlider, TQT_SIGNAL(sliderReleased()),
+ this, TQT_SLOT(jumpSliderReleased()));
+ connect(waJumpSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(jumpValueChanged(int)));
}
@@ -352,7 +352,7 @@ void WaSkin::unshade() {
title_shaded = false;
}
-void WaSkin::focusOutEvent( QFocusEvent * ) {
+void WaSkin::focusOutEvent( TQFocusEvent * ) {
menu->setPixmapUp(_WA_SKIN_TITLE_MENU_INACTIVE);
menu->update();
@@ -368,7 +368,7 @@ void WaSkin::focusOutEvent( QFocusEvent * ) {
waTitleBar->setState(false);
}
-void WaSkin::focusInEvent( QFocusEvent * ) {
+void WaSkin::focusInEvent( TQFocusEvent * ) {
menu->setPixmapUp(_WA_SKIN_TITLE_MENU_NORM);
menu->update();
@@ -384,7 +384,7 @@ void WaSkin::focusInEvent( QFocusEvent * ) {
waTitleBar->setState(true);
}
-void WaSkin::wheelEvent(QWheelEvent *e) {
+void WaSkin::wheelEvent(TQWheelEvent *e) {
// Get the current volume
int newVolume = napp->player()->volume();
@@ -448,7 +448,7 @@ void WaSkin::jumpSliderReleased()
void WaSkin::jumpValueChanged(int val)
{
if (mJumpPressed && !napp->player()->isStopped()) {
- QString timeStr = i18n("Seek to: %1/%2 (%3%)").
+ TQString timeStr = i18n("Seek to: %1/%2 (%3%)").
arg(getTimeString(val * 1000)).
arg(getTimeString(napp->player()->getLength())).
arg((val * 1000 * 100) / napp->player()->getLength());
@@ -456,15 +456,15 @@ void WaSkin::jumpValueChanged(int val)
}
}
-QString WaSkin::getTitleString() {
+TQString WaSkin::getTitleString() {
int length;
- QString title = "";
+ TQString title = "";
if (!napp->playlist()->current()) {
title = "Noatun ";
- title += QString::number(NOATUN_MAJOR) + ".";
- title += QString::number(NOATUN_MINOR) + ".";
- title += QString::number(NOATUN_PATCHLEVEL);
+ title += TQString::number(NOATUN_MAJOR) + ".";
+ title += TQString::number(NOATUN_MINOR) + ".";
+ title += TQString::number(NOATUN_PATCHLEVEL);
}
else {
length = napp->playlist()->current().length();
@@ -483,9 +483,9 @@ QString WaSkin::getTitleString() {
return title;
}
-QString WaSkin::getTimeString(int milliseconds, bool truncate) {
+TQString WaSkin::getTimeString(int milliseconds, bool truncate) {
int seconds = abs(milliseconds / 1000);
- QString ret = "";
+ TQString ret = "";
// Do we need to convert to hours:minutes instead of minutes:seconds?
if (truncate && (abs(seconds) >= (100 * 60)))
@@ -498,7 +498,7 @@ QString WaSkin::getTimeString(int milliseconds, bool truncate) {
}
void WaSkin::menuEvent() {
- NoatunStdAction::ContextMenu::showContextMenu(mapToGlobal(QPoint(0, 14)));
+ NoatunStdAction::ContextMenu::showContextMenu(mapToGlobal(TQPoint(0, 14)));
}
void WaSkin::minimizeEvent() {
@@ -518,16 +518,16 @@ void WaSkin::doUnload() {
}
void WaSkin::doClose() {
- QTimer::singleShot(0, this, SLOT(doUnload()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doUnload()));
}
-void WaSkin::dragEnterEvent(QDragEnterEvent * event)
+void WaSkin::dragEnterEvent(TQDragEnterEvent * event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void WaSkin::dropEvent(QDropEvent * event)
+void WaSkin::dropEvent(TQDropEvent * event)
{
KURL::List uri;
if (KURLDrag::decode(event, uri))
@@ -690,12 +690,12 @@ void WaSkin::slotPlaying()
if (!info.bps())
waBPS->setText("");
else
- waBPS->setText(QString::number(info.bps()));
+ waBPS->setText(TQString::number(info.bps()));
if (!info.KHz())
waFreq->setText("");
else
- waFreq->setText(QString::number(info.KHz() / 1000));
+ waFreq->setText(TQString::number(info.KHz() / 1000));
setChannels(info.channelCount());
guiSpectrumAnalyser->resumeVisualization();
@@ -736,7 +736,7 @@ void WaSkin::slotPaused()
waStatus->setStatus(STATUS_PAUSED);
}
-void WaSkin::keyPressEvent(QKeyEvent *e) {
+void WaSkin::keyPressEvent(TQKeyEvent *e) {
switch(e->key()) {
case Key_Up:
napp->player()->setVolume(napp->player()->volume() + 5);
@@ -793,7 +793,7 @@ void WaSkin::keyPressEvent(QKeyEvent *e) {
}
}
-QString WaSkin::defaultSkin() {
+TQString WaSkin::defaultSkin() {
return "Winamp";
}