diff options
Diffstat (limited to 'noatun/modules/kaiman/userinterface.cpp')
-rw-r--r-- | noatun/modules/kaiman/userinterface.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/noatun/modules/kaiman/userinterface.cpp b/noatun/modules/kaiman/userinterface.cpp index 08036a59..b1ae2570 100644 --- a/noatun/modules/kaiman/userinterface.cpp +++ b/noatun/modules/kaiman/userinterface.cpp @@ -30,13 +30,13 @@ #include "userinterface.h" #include "pref.h" -#include <qcursor.h> -#include <qpixmap.h> -#include <qbitmap.h> -#include <qimage.h> -#include <qdropsite.h> -#include <qdragobject.h> -#include <qtimer.h> +#include <tqcursor.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqimage.h> +#include <tqdropsite.h> +#include <tqdragobject.h> +#include <tqtimer.h> #include <kfiledialog.h> #include <kdebug.h> @@ -84,7 +84,7 @@ Kaiman::Kaiman() config->setGroup("Kaiman"); // load skin - QString skinName = config->readEntry( "SkinResource", DEFAULT_SKIN ); + TQString skinName = config->readEntry( "SkinResource", DEFAULT_SKIN ); if ( !changeStyle(skinName, "skindata") ) { @@ -92,22 +92,22 @@ Kaiman::Kaiman() if ( !changeStyle( DEFAULT_SKIN, "skindata" ) ) { KMessageBox::error( this, i18n("Cannot load default skin %1.").arg(DEFAULT_SKIN) ); - QTimer::singleShot( 0, this, SLOT(close()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(close()) ); return; } } // global connects - connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), this, SLOT(show()) ); + connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); - connect( napp->player(), SIGNAL(playing()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(stopped()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(paused()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(timeout()), this, SLOT(timeout())); - connect( napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(loopTypeChange(int))); - connect( napp->player(), SIGNAL(newSongLen(int,int)), this, SLOT(newSongLen(int,int))); - connect( napp->player(), SIGNAL(newSong()), this, SLOT(newSong())); + connect( napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); + connect( napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(loopTypeChange(int))); + connect( napp->player(), TQT_SIGNAL(newSongLen(int,int)), this, TQT_SLOT(newSongLen(int,int))); + connect( napp->player(), TQT_SIGNAL(newSong()), this, TQT_SLOT(newSong())); if( napp->player()->isPlaying() ) newSong(); @@ -123,9 +123,9 @@ Kaiman::~Kaiman() } -bool Kaiman::changeStyle( const QString &style, const QString &desc ) +bool Kaiman::changeStyle( const TQString &style, const TQString &desc ) { - QString ldesc = desc; + TQString ldesc = desc; if ( ldesc.isEmpty() ) ldesc = _altSkin ? "alt_skindata" : "skindata"; @@ -146,7 +146,7 @@ bool Kaiman::changeStyle( const QString &style, const QString &desc ) } -bool Kaiman::loadStyle( const QString &style, const QString &desc ) +bool Kaiman::loadStyle( const TQString &style, const TQString &desc ) { if ( _style ) delete _style; _style = new KaimanStyle(this); @@ -165,7 +165,7 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } KaimanStyleElement* item = _style->find("Background"); - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); if ( item!=0 ) { _style->resize( item->width(), item->height()); @@ -174,64 +174,64 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } item = _style->find("Playlist_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(toggleListView()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView()) ); item = _style->find("Play_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); item = _style->find("Pause_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); item = _style->find("Stop_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(stop()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()) ); item = _style->find("Next_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(forward()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()) ); item = _style->find("Prev_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(back()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()) ); item = _style->find("Exit_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(close()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(close()) ); item = _style->find("Mixer_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(execMixer()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(execMixer()) ); item = _style->find("Iconify_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(showMinimized()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMinimized()) ); item = _style->find("Alt_Skin_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleSkin()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleSkin()) ); item = _style->find("Repeat_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleLoop()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleLoop()) ); item = _style->find("Shuffle_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleShuffle()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleShuffle()) ); item = _style->find("Config_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp, SLOT(preferences()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp, TQT_SLOT(preferences()) ); item = _style->find("Volume_Up_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this,SLOT(volumeUp())); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeUp())); item = _style->find("Volume_Down_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this,SLOT(volumeDown())); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeDown())); KaimanStyleSlider* slider = static_cast<KaimanStyleSlider*>(_style->find("Position_Slider")); if( slider!=0 ) { - connect( slider, SIGNAL(newValueDrag(int)), this, SLOT(seekStart(int)) ); - connect( slider, SIGNAL(newValue(int)), this, SLOT(seekDrag(int)) ); - connect( slider, SIGNAL(newValueDrop(int)), this, SLOT(seekStop(int)) ); + connect( slider, TQT_SIGNAL(newValueDrag(int)), this, TQT_SLOT(seekStart(int)) ); + connect( slider, TQT_SIGNAL(newValue(int)), this, TQT_SLOT(seekDrag(int)) ); + connect( slider, TQT_SIGNAL(newValueDrop(int)), this, TQT_SLOT(seekStop(int)) ); slider->setValue( 0, 0, 1000 ); } slider = static_cast<KaimanStyleSlider*>(_style->find("Volume_Slider")); if ( slider!=0 ) { - connect(slider, SIGNAL(newValue(int)), this, SLOT(setVolume(int))); + connect(slider, TQT_SIGNAL(newValue(int)), this, TQT_SLOT(setVolume(int))); slider->setValue( napp->player()->volume(), 0, 100 ); } @@ -247,25 +247,25 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } -void Kaiman::closeEvent(QCloseEvent*) +void Kaiman::closeEvent(TQCloseEvent*) { unload(); } -void Kaiman::dragEnterEvent( QDragEnterEvent *event ) +void Kaiman::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode(event) ); } -void Kaiman::dropEvent( QDropEvent *event ) +void Kaiman::dropEvent( TQDropEvent *event ) { doDropEvent(event); } -void Kaiman::doDropEvent(QDropEvent *event) +void Kaiman::doDropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -330,18 +330,18 @@ void Kaiman::toggleSkin() { _altSkin = !_altSkin; - QString skinName = _style->skinName(); + TQString skinName = _style->skinName(); - QString oldDesc, newDesc; + TQString oldDesc, newDesc; if ( _altSkin ) { - oldDesc = QString::fromLatin1("skindata"); - newDesc = QString::fromLatin1("alt_skindata"); + oldDesc = TQString::fromLatin1("skindata"); + newDesc = TQString::fromLatin1("alt_skindata"); } else { - newDesc = QString::fromLatin1("skindata"); - oldDesc = QString::fromLatin1("alt_skindata"); + newDesc = TQString::fromLatin1("skindata"); + oldDesc = TQString::fromLatin1("alt_skindata"); } if ( !changeStyle(skinName, newDesc) ) @@ -372,7 +372,7 @@ void Kaiman::volumeDown() void Kaiman::execMixer() { - kapp->startServiceByDesktopName ( QString::fromLatin1("kmix"), QString::null ); + kapp->startServiceByDesktopName ( TQString::fromLatin1("kmix"), TQString::null ); } @@ -424,7 +424,7 @@ void Kaiman::timeout() if ( numItem ) numItem->setValue(item.property("bitrate").toInt()); - QString hzString = item.property("samplerate"); + TQString hzString = item.property("samplerate"); hzString.truncate(2); numItem = static_cast<KaimanStyleNumber*>(_style->find("In_Hz_Number")); @@ -513,7 +513,7 @@ void Kaiman::newSong() KaimanStyleText* titleItem = static_cast<KaimanStyleText*>(_style->find("Title")); if ( titleItem ) { - QString title = i18n("Noatun"); + TQString title = i18n("Noatun"); if ( napp->player()->current() ) { title = napp->player()->current().title(); @@ -546,7 +546,7 @@ void Kaiman::toggleLoop() (int)(Player::Random)); loopMenu->setItemChecked((int)napp->player()->loopStyle(), true); // select current loopstyle in menu - selectedItem = loopMenu->exec(QCursor::pos()); + selectedItem = loopMenu->exec(TQCursor::pos()); if (selectedItem != -1) napp->player()->loop(selectedItem); // set new loopstyle |