diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /kicker-applets/mediacontrol | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker-applets/mediacontrol')
24 files changed, 193 insertions, 179 deletions
diff --git a/kicker-applets/mediacontrol/amarokInterface.cpp b/kicker-applets/mediacontrol/amarokInterface.cpp index f52ae4b..a89e693 100644 --- a/kicker-applets/mediacontrol/amarokInterface.cpp +++ b/kicker-applets/mediacontrol/amarokInterface.cpp @@ -68,7 +68,7 @@ void AmarokInterface::myInit() void AmarokInterface::appRegistered ( const TQCString &appId ) { - if(appId.contains("amarok",false) ) + if(appId.tqcontains("amarok",false) ) { mAppId = appId; emit playerStarted(); @@ -78,7 +78,7 @@ void AmarokInterface::appRegistered ( const TQCString &appId ) void AmarokInterface::appRemoved ( const TQCString &appId ) { - if ( appId.contains("amarok",false) ) + if ( appId.tqcontains("amarok",false) ) { // is there still another amarok alive? if ( findRunningAmarok() ) @@ -146,7 +146,7 @@ void AmarokInterface::updateSlider ( ) time = 0; } emit newSliderPosition(len,time); - emit playingStatusChanged(playingStatus()); + emit playingStatusChanged(playingtqStatus()); } // Drag-n-Drop stuff ================================================================= @@ -242,7 +242,7 @@ const TQString AmarokInterface::getTrackTitle() const else { TQDataStream reply(replyData, IO_ReadOnly); - if (replyType == "TQString") + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> title; return title; @@ -264,7 +264,7 @@ bool AmarokInterface::findRunningAmarok() for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { - if ((*iterator).contains("amarok",false)) + if ((*iterator).tqcontains("amarok",false)) { if (kapp->dcopClient()->call((*iterator), "player", "interfaces()", data, replyType, replyData) ) { @@ -274,7 +274,7 @@ bool AmarokInterface::findRunningAmarok() QCStringList list; reply >> list; - if ( list.contains("AmarokPlayerInterface") ) + if ( list.tqcontains("AmarokPlayerInterface") ) { kdDebug(90200) << "mediacontrol: amarok found" << endl; mAppId = *iterator; @@ -289,7 +289,7 @@ bool AmarokInterface::findRunningAmarok() } -int AmarokInterface::playingStatus() +int AmarokInterface::playingtqStatus() { TQByteArray data, replyData; TQCString replyType; diff --git a/kicker-applets/mediacontrol/amarokInterface.h b/kicker-applets/mediacontrol/amarokInterface.h index 53f1ac6..f863208 100644 --- a/kicker-applets/mediacontrol/amarokInterface.h +++ b/kicker-applets/mediacontrol/amarokInterface.h @@ -29,6 +29,7 @@ class AmarokInterface : public PlayerInterface { Q_OBJECT + TQ_OBJECT public: AmarokInterface(); ~AmarokInterface(); @@ -47,7 +48,7 @@ class AmarokInterface : public PlayerInterface virtual void dragEnterEvent(TQDragEnterEvent* event); virtual void dropEvent(TQDropEvent* event); virtual const TQString getTrackTitle() const; - virtual int playingStatus(); + virtual int playingtqStatus(); private slots: void myInit(); diff --git a/kicker-applets/mediacontrol/configfrontend.cpp b/kicker-applets/mediacontrol/configfrontend.cpp index 4deab8b..971d4d5 100644 --- a/kicker-applets/mediacontrol/configfrontend.cpp +++ b/kicker-applets/mediacontrol/configfrontend.cpp @@ -23,7 +23,7 @@ ConfigFrontend::ConfigFrontend() : TQObject(0, 0) { - _config = new KConfig(TQString::null, true, false); + _config = new KConfig(TQString(), true, false); _ownConfig = true; } diff --git a/kicker-applets/mediacontrol/configfrontend.h b/kicker-applets/mediacontrol/configfrontend.h index b625c70..fc5f346 100644 --- a/kicker-applets/mediacontrol/configfrontend.h +++ b/kicker-applets/mediacontrol/configfrontend.h @@ -24,9 +24,10 @@ #include <kconfig.h> #include <klocale.h> -class ConfigFrontend : public QObject +class ConfigFrontend : public TQObject { Q_OBJECT + TQ_OBJECT public: ConfigFrontend(); ConfigFrontend(KConfig *); diff --git a/kicker-applets/mediacontrol/jukInterface.cpp b/kicker-applets/mediacontrol/jukInterface.cpp index be99528..533ba20 100644 --- a/kicker-applets/mediacontrol/jukInterface.cpp +++ b/kicker-applets/mediacontrol/jukInterface.cpp @@ -68,7 +68,7 @@ void JuKInterface::myInit() void JuKInterface::appRegistered ( const TQCString &appId ) { - if(appId.contains("juk",false) ) + if(appId.tqcontains("juk",false) ) { mAppId = appId; @@ -93,7 +93,7 @@ void JuKInterface::appRegistered ( const TQCString &appId ) void JuKInterface::appRemoved ( const TQCString &appId ) { - if ( appId.contains("juk",false) ) + if ( appId.tqcontains("juk",false) ) { // is there still another juk alive? if ( findRunningJuK() ) @@ -148,7 +148,7 @@ void JuKInterface::updateSlider () time = 0; } emit ( newSliderPosition(len,time) ); - emit playingStatusChanged(playingStatus()); + emit playingStatusChanged(playingtqStatus()); } // Drag-n-Drop stuff ================================================================= @@ -185,7 +185,7 @@ void JuKInterface::dropEvent(TQDropEvent* event) kdDebug(90200) << "Couldn't send drop to juk" << endl; } - // Apparently we should auto-play? + // Aptqparently we should auto-play? TQByteArray strData; TQDataStream strArg(strData, IO_WriteOnly); strArg << *fileList.begin(); @@ -265,7 +265,7 @@ const TQString JuKInterface::getTrackTitle() const replyType, replyData)) { TQDataStream reply(replyData, IO_ReadOnly); - if (replyType == "TQString") + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> title; return title; @@ -282,7 +282,7 @@ bool JuKInterface::findRunningJuK() for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { - if ((*iterator).contains("juk",false)) + if ((*iterator).tqcontains("juk",false)) { mAppId = *iterator; return true; @@ -291,7 +291,7 @@ bool JuKInterface::findRunningJuK() return false; } -int JuKInterface::playingStatus() +int JuKInterface::playingtqStatus() { TQByteArray data, replyData; TQCString replyType; diff --git a/kicker-applets/mediacontrol/jukInterface.h b/kicker-applets/mediacontrol/jukInterface.h index 55874f6..fa74fba 100644 --- a/kicker-applets/mediacontrol/jukInterface.h +++ b/kicker-applets/mediacontrol/jukInterface.h @@ -30,6 +30,7 @@ class TQProcess; class JuKInterface : public PlayerInterface { Q_OBJECT + TQ_OBJECT public: JuKInterface(); ~JuKInterface(); @@ -48,7 +49,7 @@ class JuKInterface : public PlayerInterface void dragEnterEvent(TQDragEnterEvent* event); void dropEvent(TQDropEvent* event); const TQString getTrackTitle() const; - int playingStatus(); + int playingtqStatus(); private slots: void myInit(); diff --git a/kicker-applets/mediacontrol/kscdInterface.cpp b/kicker-applets/mediacontrol/kscdInterface.cpp index fea1048..d14d609 100644 --- a/kicker-applets/mediacontrol/kscdInterface.cpp +++ b/kicker-applets/mediacontrol/kscdInterface.cpp @@ -126,7 +126,7 @@ void KsCDInterface::updateSlider() time = 0; } emit newSliderPosition(len,time); - emit playingStatusChanged(playingStatus()); + emit playingStatusChanged(playingtqStatus()); } // Drag-n-Drop stuff ================================================================= @@ -213,7 +213,7 @@ const TQString KsCDInterface::getTrackTitle() const replyType, replyData)) { TQDataStream reply(replyData, IO_ReadOnly); - if (replyType == "TQString") + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> title; } @@ -224,7 +224,7 @@ const TQString KsCDInterface::getTrackTitle() const replyType, replyData)) { TQDataStream reply(replyData, IO_ReadOnly); - if (replyType == "TQString") + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> album; } @@ -235,7 +235,7 @@ const TQString KsCDInterface::getTrackTitle() const replyType, replyData)) { TQDataStream reply(replyData, IO_ReadOnly); - if (replyType == "TQString") + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> artist; } @@ -256,7 +256,7 @@ const TQString KsCDInterface::getTrackTitle() const } else { - result = i18n("artist - trackname", "%1 - %2").arg(artist, title); + result = i18n("artist - trackname", "%1 - %2").tqarg(artist, title); } } } @@ -270,18 +270,18 @@ const TQString KsCDInterface::getTrackTitle() const } else { - result = i18n("(album) - trackname", "(%1) - %2").arg(artist, title); + result = i18n("(album) - trackname", "(%1) - %2").tqarg(artist, title); } } else // artist is non-empty { if(title.isEmpty()) { - result = i18n("artistname (albumname)", "%1 (%2)").arg(artist, album); + result = i18n("artistname (albumname)", "%1 (%2)").tqarg(artist, album); } else { - result = i18n("artistname (albumname) - trackname", "%1 (%2) - %3").arg(artist, album, title); + result = i18n("artistname (albumname) - trackname", "%1 (%2) - %3").tqarg(artist, album, title); } } } @@ -305,12 +305,12 @@ bool KsCDInterface::findRunningKsCD() return false; } -int KsCDInterface::playingStatus() +int KsCDInterface::playingtqStatus() { TQByteArray data, replyData; TQCString replyType; - if (kapp->dcopClient()->call(mAppId, "CDPlayer", "getStatus()", data, replyType, + if (kapp->dcopClient()->call(mAppId, "CDPlayer", "gettqStatus()", data, replyType, replyData)) { int status = 0; diff --git a/kicker-applets/mediacontrol/kscdInterface.h b/kicker-applets/mediacontrol/kscdInterface.h index 8af0d1d..2d37e42 100644 --- a/kicker-applets/mediacontrol/kscdInterface.h +++ b/kicker-applets/mediacontrol/kscdInterface.h @@ -29,6 +29,7 @@ class KsCDInterface : public PlayerInterface { Q_OBJECT + TQ_OBJECT public: KsCDInterface(); ~KsCDInterface(); @@ -47,7 +48,7 @@ class KsCDInterface : public PlayerInterface void dragEnterEvent(TQDragEnterEvent* event); void dropEvent(TQDropEvent* event); const TQString getTrackTitle() const; - int playingStatus(); + int playingtqStatus(); private slots: void myInit(); diff --git a/kicker-applets/mediacontrol/mcslider.cpp b/kicker-applets/mediacontrol/mcslider.cpp index cad953d..147dc5a 100644 --- a/kicker-applets/mediacontrol/mcslider.cpp +++ b/kicker-applets/mediacontrol/mcslider.cpp @@ -19,8 +19,8 @@ #include "mcslider.h" -MCSlider::MCSlider( Orientation orientation, TQWidget *parent, const char *name ) - : TQSlider( orientation, parent, name ) +MCSlider::MCSlider( Qt::Orientation orientation, TQWidget *tqparent, const char *name ) + : TQSlider( orientation, tqparent, name ) { setBackgroundOrigin(WidgetOrigin); setBackground(); @@ -36,17 +36,17 @@ void MCSlider::setBackground() { unsetPalette(); - if (parentWidget()->paletteBackgroundPixmap()) + if (tqparentWidget()->paletteBackgroundPixmap()) { TQPixmap pm(width(), height()); - pm.fill(parentWidget(), pos()); + pm.fill(tqparentWidget(), pos()); setPaletteBackgroundPixmap(pm); } } void MCSlider::wheelEvent(TQWheelEvent *e) { - if (e->orientation() == Horizontal) + if (e->orientation() ==Qt::Horizontal) return; if (e->state() == ShiftButton) diff --git a/kicker-applets/mediacontrol/mcslider.h b/kicker-applets/mediacontrol/mcslider.h index d58aac0..0c4a784 100644 --- a/kicker-applets/mediacontrol/mcslider.h +++ b/kicker-applets/mediacontrol/mcslider.h @@ -20,12 +20,13 @@ #include <tqslider.h> -class MCSlider : public QSlider +class MCSlider : public TQSlider { Q_OBJECT + TQ_OBJECT public: - MCSlider( Orientation orientation, TQWidget *parent, const char *name = 0 ); + MCSlider( Qt::Orientation orientation, TQWidget *tqparent, const char *name = 0 ); ~MCSlider(); void setBackground(); private: diff --git a/kicker-applets/mediacontrol/mediacontrol.cpp b/kicker-applets/mediacontrol/mediacontrol.cpp index 433f52d..9068aeb 100644 --- a/kicker-applets/mediacontrol/mediacontrol.cpp +++ b/kicker-applets/mediacontrol/mediacontrol.cpp @@ -57,18 +57,18 @@ const int NO_BUTTONS = 4; extern "C" { - KDE_EXPORT KPanelApplet *init( TQWidget *parent, const TQString &configFile) + KDE_EXPORT KPanelApplet *init( TQWidget *tqparent, const TQString &configFile) { KGlobal::locale()->insertCatalogue("mediacontrol"); return new MediaControl(configFile, KPanelApplet::Normal, KPanelApplet::About | KPanelApplet::Preferences | - KPanelApplet::ReportBug, parent, "mediacontrol"); + KPanelApplet::ReportBug, tqparent, "mediacontrol"); } } // ============================================================================= -class MediaControlToolTip : public QToolTip +class MediaControlToolTip : public TQToolTip { public: MediaControlToolTip(TQWidget *widget, PlayerInterface *pl_obj) : @@ -78,7 +78,7 @@ class MediaControlToolTip : public QToolTip virtual void maybeTip(const TQPoint &pt) { TQRect rc( mWidget->rect()); - if (rc.contains(pt)) + if (rc.tqcontains(pt)) { tip ( rc, mPlayer->getTrackTitle() ); } @@ -91,9 +91,9 @@ class MediaControlToolTip : public QToolTip // ============================================================================= MediaControl::MediaControl(const TQString &configFile, Type t, int actions, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : DCOPObject("MediaControl"), - KPanelApplet(configFile, t, actions, parent, name), + KPanelApplet(configFile, t, actions, tqparent, name), mInstance(new KInstance("mediacontrol")), mAboutData(new KAboutData("mediacontrol", I18N_NOOP("MediaControl"), @@ -124,7 +124,7 @@ MediaControl::MediaControl(const TQString &configFile, Type t, int actions, "tisch.crix@gmx.de", "http://www.crixensgfxcorner.de.vu/"); mAboutData->addCredit("Ulrik Mikaelsson", I18N_NOOP("Fix for Noatun-Support"), "rawler@rsn.bth.se", 0); - mAboutData->addCredit("Anthony J Moulen", I18N_NOOP("Fix for Vertical Slider"), + mAboutData->addCredit("Anthony J Moulen", I18N_NOOP("Fix forQt::Vertical Slider"), "ajmoulen@moulen.org", 0); mAboutData->addCredit("Teemu Rytilahti", I18N_NOOP("Volume Control Implementation"), "teemu.rytilahti@kde-fi.org", 0); @@ -139,7 +139,7 @@ MediaControl::MediaControl(const TQString &configFile, Type t, int actions, playpause_button = new TrayButton (this, "PLAYPAUSE"); stop_button = new TrayButton (this, "STOP"); next_button = new TrayButton (this, "NEXT"); - time_slider = new MCSlider (TQSlider::Horizontal, this, "time_slider" ); + time_slider = new MCSlider (Qt::Horizontal, this, "time_slider" ); time_slider->setRange(0,0); time_slider->setValue(0); time_slider->setTracking( false ); @@ -184,7 +184,7 @@ void MediaControl::dropEvent(TQDropEvent* event) void MediaControl::setSliderPosition(int len ,int time) { time_slider->blockSignals(true); - if(orientation() == Vertical) + if(orientation() ==Qt::Vertical) time = len - time; if (mLastLen != len) @@ -226,10 +226,10 @@ void MediaControl::disableAll() void MediaControl::slotPlayingStatusChanged(int status) { - if (mLastStatus == status) + if (mLasttqStatus == status) return; - mLastStatus = status; + mLasttqStatus = status; TQString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); switch (status) @@ -255,7 +255,7 @@ void MediaControl::slotIconChanged() if(!_configFrontend->useCustomTheme()) { prev_button->setIconSet(SmallIconSet("player_start")); - if (_player->playingStatus() == PlayerInterface::Playing) + if (_player->playingtqStatus() == PlayerInterface::Playing) playpause_button->setIconSet(SmallIconSet("player_pause")); else playpause_button->setIconSet(SmallIconSet("player_play")); @@ -318,7 +318,7 @@ void MediaControl::reportBug() // Fixing the orientation problem in qslider. void MediaControl::adjustTime(int time) { - if(orientation() == Vertical) + if(orientation() ==Qt::Vertical) emit(newJumpToTime(mLastLen - time)); else emit(newJumpToTime(time)); @@ -350,7 +350,7 @@ void MediaControl::reparseConfig() mLastLen = -1; mLastTime = -1; - mLastStatus = -1; + mLasttqStatus = -1; TQString playerString = _configFrontend->player(); @@ -413,7 +413,7 @@ void MediaControl::reparseConfig() if (TQFile(skindir+"play.png").exists()) { prev_button->setIconSet(SmallIconSet(locate("data",skindir+"prev.png"))); - if (_player->playingStatus() == PlayerInterface::Playing) + if (_player->playingtqStatus() == PlayerInterface::Playing) playpause_button->setIconSet(SmallIconSet(locate("data",skindir+"play.png"))); else playpause_button->setIconSet(SmallIconSet(locate("data",skindir+"pause.png"))); @@ -424,7 +424,7 @@ void MediaControl::reparseConfig() { KNotifyClient::event(winId(), KNotifyClient::warning, i18n("There was trouble loading theme %1. Please choose" \ - " a different theme.").arg(skindir)); + " a different theme.").tqarg(skindir)); // default to kde-icons, they have to be installed :) slotIconChanged(); @@ -461,10 +461,10 @@ void MediaControl::reparseConfig() int MediaControl::widthForHeight(int height) const { // kdDebug(90200) << "kicker height: " << height << endl; -// kdDebug(90200) << "slider needs: " << time_slider->minimumSizeHint().height() << endl; +// kdDebug(90200) << "slider needs: " << time_slider->tqminimumSizeHint().height() << endl; // slider height + button height - if ( height >= (time_slider->minimumSizeHint().height()+MC_BUTTONSIZE) ) + if ( height >= (time_slider->tqminimumSizeHint().height()+MC_BUTTONSIZE) ) { // slider UNDER buttons // (5 * button width + spaces between them); return (4*MC_BUTTONSIZE+10); @@ -483,7 +483,7 @@ int MediaControl::heightForWidth(int width) const // kdDebug(90200) << "kicker width: " << width << endl; // slider height + button height - if ( width >= (time_slider->minimumSizeHint().width()+MC_BUTTONSIZE) ) + if ( width >= (time_slider->tqminimumSizeHint().width()+MC_BUTTONSIZE) ) { // slider ASIDE icons // (5 * button width + spaces between them); return (4*MC_BUTTONSIZE+10); @@ -498,7 +498,7 @@ int MediaControl::heightForWidth(int width) const void MediaControl::mousePressEvent(TQMouseEvent* e) { - if (e->button() == TQMouseEvent::RightButton) + if (e->button() == Qt::RightButton) rmbMenu->popup(e->globalPos()); } @@ -506,8 +506,8 @@ bool MediaControl::eventFilter(TQObject *, TQEvent *e) { if (e->type() == TQEvent::MouseButtonPress) { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); - if (me->button() == TQMouseEvent::RightButton) + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); + if (me->button() == Qt::RightButton) { rmbMenu->popup(me->globalPos()); return true; @@ -532,10 +532,10 @@ void MediaControl::resizeEvent( TQResizeEvent* ) // kdDebug(90200) << "resizeEvent()" << endl; int w = width(); int h = height(); - if ( orientation() == Vertical ) + if ( orientation() ==Qt::Vertical ) { // ====== VERTICAL ================================================= - time_slider->setOrientation(TQSlider::Vertical); - int slider_width = time_slider->minimumSizeHint().width(); + time_slider->setOrientation(Qt::Vertical); + int slider_width = time_slider->tqminimumSizeHint().width(); // some styles need more space for sliders than avilable in very small panels :( if ( slider_width > w ) slider_width = w; @@ -566,8 +566,8 @@ void MediaControl::resizeEvent( TQResizeEvent* ) } else // ====== HORIZONTAL =============================================== { - time_slider->setOrientation(TQSlider::Horizontal); - int slider_height = time_slider->minimumSizeHint().height(); + time_slider->setOrientation(Qt::Horizontal); + int slider_height = time_slider->tqminimumSizeHint().height(); // some styles need more space for sliders than avilable in very small panels :( if ( slider_height > h ) slider_height = h; @@ -600,8 +600,8 @@ void MediaControl::resizeEvent( TQResizeEvent* ) // Our Button ======================================================================== -TrayButton::TrayButton(TQWidget* parent, const char* name) - : SimpleButton (parent, name) +TrayButton::TrayButton(TQWidget* tqparent, const char* name) + : SimpleButton (tqparent, name) { setBackgroundMode(PaletteBackground); setBackgroundOrigin(AncestorOrigin); diff --git a/kicker-applets/mediacontrol/mediacontrol.h b/kicker-applets/mediacontrol/mediacontrol.h index c6ec47b..887ebb4 100644 --- a/kicker-applets/mediacontrol/mediacontrol.h +++ b/kicker-applets/mediacontrol/mediacontrol.h @@ -53,9 +53,10 @@ class MediaControlToolTip; class TrayButton : public SimpleButton { Q_OBJECT + TQ_OBJECT public: - TrayButton(TQWidget* parent, const char* name); + TrayButton(TQWidget* tqparent, const char* name); virtual ~TrayButton() {} void setIconSet(const TQIconSet &iconSet); }; @@ -65,6 +66,7 @@ class TrayButton : public SimpleButton class MediaControl : public KPanelApplet, virtual public MediaControlIface { Q_OBJECT + TQ_OBJECT public: MediaControl(const TQString&, Type, int ,TQWidget * = 0, const char * = 0); @@ -93,7 +95,7 @@ class MediaControl : public KPanelApplet, virtual public MediaControlIface TrayButton *stop_button; // Stop the music TrayButton *next_button; // GoTo Next Playlist-Item MCSlider *time_slider; - int mLastLen, mLastTime, mLastStatus; + int mLastLen, mLastTime, mLasttqStatus; KPopupMenu *rmbMenu; virtual void mousePressEvent(TQMouseEvent* e); diff --git a/kicker-applets/mediacontrol/mediacontrolconfig.cpp b/kicker-applets/mediacontrol/mediacontrolconfig.cpp index 0217a25..5f5d06a 100644 --- a/kicker-applets/mediacontrol/mediacontrolconfig.cpp +++ b/kicker-applets/mediacontrol/mediacontrolconfig.cpp @@ -42,8 +42,8 @@ #include <knuminput.h> #include <kstandarddirs.h> -MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, TQWidget *parent, const char* name) -: KDialogBase( parent, name, false, i18n("MediaControl"), Ok | Apply | Cancel, Ok, false ) +MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, TQWidget *tqparent, const char* name) +: KDialogBase( tqparent, name, false, i18n("MediaControl"), Ok | Apply | Cancel, Ok, false ) { _configFrontend = cfg; if (!_configFrontend) // emergency!!! @@ -87,8 +87,8 @@ void MediaControlConfig::readSkinDir( const TQString &dir ) if (!directory.exists()) return; - const QFileInfoList *list = directory.entryInfoList(); - QFileInfoListIterator it(*list); + const TQFileInfoList *list = directory.entryInfoList(); + TQFileInfoListIterator it(*list); while ( it.current() ) { @@ -106,7 +106,7 @@ void MediaControlConfig::load() // find the playerstring from config in the playerlist and select it if found TQListBoxItem *item = 0; - item = _child->playerListBox->findItem( _configFrontend->player() ); + item = _child->playerListBox->tqfindItem( _configFrontend->player() ); if ( item ) _child->playerListBox->setCurrentItem ( item ); else @@ -118,7 +118,7 @@ void MediaControlConfig::load() _child->mWheelScrollAmount->setValue( _configFrontend->mouseWheelSpeed() ); // Select the used Theme - item = _child->themeListBox->findItem( _configFrontend->theme() ); + item = _child->themeListBox->tqfindItem( _configFrontend->theme() ); if ( item ) _child->themeListBox->setCurrentItem( item ); else diff --git a/kicker-applets/mediacontrol/mediacontrolconfig.h b/kicker-applets/mediacontrol/mediacontrolconfig.h index 4467177..4d5c388 100644 --- a/kicker-applets/mediacontrol/mediacontrolconfig.h +++ b/kicker-applets/mediacontrol/mediacontrolconfig.h @@ -28,8 +28,9 @@ class KConfig; class MediaControlConfig: public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MediaControlConfig(ConfigFrontend *cfg, TQWidget *parent = 0, const char* name = "MediaControlConfig"); + MediaControlConfig(ConfigFrontend *cfg, TQWidget *tqparent = 0, const char* name = "MediaControlConfig"); void readSkinDir(const TQString &dir); void load(); diff --git a/kicker-applets/mediacontrol/mediacontrolconfigwidget.ui b/kicker-applets/mediacontrol/mediacontrolconfigwidget.ui index 9f5c662..8386754 100644 --- a/kicker-applets/mediacontrol/mediacontrolconfigwidget.ui +++ b/kicker-applets/mediacontrol/mediacontrolconfigwidget.ui @@ -2,7 +2,7 @@ <class>MediaControlConfigWidget</class> <comment>Preferences-Dialog for MediaControl </comment> <author>Stefan Gehn <metz@gehn.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MediaControlConfigWidget</cstring> </property> @@ -14,9 +14,9 @@ <height>245</height> </rect> </property> - <property name="layoutMargin" stdset="0"> + <property name="tqlayoutMargin" stdset="0"> </property> - <property name="layoutSpacing" stdset="0"> + <property name="tqlayoutSpacing" stdset="0"> </property> <property name="toolTip" stdset="0"> <string></string> @@ -34,11 +34,11 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tabGeneral</cstring> </property> @@ -49,7 +49,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>gbMediaPlayer</cstring> </property> @@ -70,7 +70,7 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> <cstring>Layout5</cstring> </property> @@ -78,7 +78,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lmousewheelscrollingamount</cstring> </property> @@ -101,7 +101,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>themes</cstring> </property> @@ -112,7 +112,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>mUseThemes</cstring> </property> @@ -138,7 +138,7 @@ </sizepolicy> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -156,23 +156,23 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>previewGroupBox</cstring> </property> <property name="title"> <string>Preview</string> </property> - <property name="layoutMargin" stdset="0"> + <property name="tqlayoutMargin" stdset="0"> </property> - <property name="layoutSpacing" stdset="0"> + <property name="tqlayoutSpacing" stdset="0"> </property> <property name="whatsThis" stdset="0"> <string>Shows you how the selected theme will look</string> @@ -187,7 +187,7 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QToolButton" row="0" column="0"> + <widget class="TQToolButton" row="0" column="0"> <property name="name"> <cstring>previewPrev</cstring> </property> @@ -199,13 +199,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>18</width> <height>18</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -215,7 +215,7 @@ <string><</string> </property> </widget> - <widget class="QToolButton" row="0" column="1"> + <widget class="TQToolButton" row="0" column="1"> <property name="name"> <cstring>previewPlay</cstring> </property> @@ -227,13 +227,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>18</width> <height>18</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -243,7 +243,7 @@ <string>></string> </property> </widget> - <widget class="QToolButton" row="0" column="2"> + <widget class="TQToolButton" row="0" column="2"> <property name="name"> <cstring>previewPause</cstring> </property> @@ -255,13 +255,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>18</width> <height>18</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -271,7 +271,7 @@ <string>o</string> </property> </widget> - <widget class="QToolButton" row="0" column="3"> + <widget class="TQToolButton" row="0" column="3"> <property name="name"> <cstring>previewStop</cstring> </property> @@ -283,13 +283,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>18</width> <height>18</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -299,7 +299,7 @@ <string>O</string> </property> </widget> - <widget class="QToolButton" row="0" column="4"> + <widget class="TQToolButton" row="0" column="4"> <property name="name"> <cstring>previewNext</cstring> </property> @@ -311,13 +311,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>18</width> <height>18</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -339,7 +339,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> @@ -362,10 +362,10 @@ <include location="global" impldecl="in declaration">klistview.h</include> <include location="global" impldecl="in declaration">klistbox.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>toggled(bool)</signal> -</signals> -<layoutdefaults spacing="6" margin="11"/> +</Q_SIGNALS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistbox.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kicker-applets/mediacontrol/mpdInterface.cpp b/kicker-applets/mediacontrol/mpdInterface.cpp index 98ba0cb..e9be885 100644 --- a/kicker-applets/mediacontrol/mpdInterface.cpp +++ b/kicker-applets/mediacontrol/mpdInterface.cpp @@ -118,7 +118,7 @@ void MpdInterface::connected() { //kdDebug(90200) << "Connected ok\n"; emit playerStarted(); - emit playingStatusChanged(playingStatus()); + emit playingStatusChanged(playingtqStatus()); } else { @@ -137,10 +137,10 @@ void MpdInterface::connectionError(int e) switch (e) { case TQSocket::ErrConnectionRefused: - message=i18n("Connection refused to %1:%2.\nIs mpd running?").arg(hostname).arg(port); + message=i18n("Connection refused to %1:%2.\nIs mpd running?").tqarg(hostname).tqarg(port); break; case TQSocket::ErrHostNotFound: - message=i18n("Host '%1' not found.").arg(hostname); + message=i18n("Host '%1' not found.").tqarg(hostname); break; case TQSocket::ErrSocketRead: message=i18n("Error reading socket."); @@ -265,7 +265,7 @@ void MpdInterface::updateSlider() } else if (time_re.search(res)>=0) { - TQStringList timeinfo=time_re.capturedTexts(); + TQStringList timeinfo=time_re.tqcapturedTexts(); timeinfo.pop_front(); int elapsed_seconds=timeinfo.first().toInt(); timeinfo.pop_front(); @@ -298,7 +298,7 @@ void MpdInterface::jumpToTime(int sec) { if (songid_re.search(res)>=0) { - TQStringList songidinfo=songid_re.capturedTexts(); + TQStringList songidinfo=songid_re.tqcapturedTexts(); songidinfo.pop_front(); songid=songidinfo.first().toInt(); } @@ -306,7 +306,7 @@ void MpdInterface::jumpToTime(int sec) if (songid>-1) { - if (dispatch(TQString("seekid %1 %2\n").arg(songid).arg(sec).latin1())) + if (dispatch(TQString("seekid %1 %2\n").tqarg(songid).tqarg(sec).latin1())) { fetchOk(); // unlocks } @@ -316,7 +316,7 @@ void MpdInterface::jumpToTime(int sec) void MpdInterface::playpause() { reconnect(); - if (playingStatus()==Stopped ? dispatch("play\n") : dispatch("pause\n")) + if (playingtqStatus()==Stopped ? dispatch("play\n") : dispatch("pause\n")) { fetchOk(); } @@ -355,7 +355,7 @@ void MpdInterface::changeVolume(int delta) { if (volume_re.search(res)>=0) { - TQStringList info=volume_re.capturedTexts(); + TQStringList info=volume_re.tqcapturedTexts(); info.pop_front(); volume=info.first().toInt(); } @@ -366,7 +366,7 @@ void MpdInterface::changeVolume(int delta) volume+=delta; if (volume<0) volume=0; if (volume>100) volume=100; - if (dispatch(TQString("setvol %1\n").arg(volume).latin1())) + if (dispatch(TQString("setvol %1\n").tqarg(volume).latin1())) { fetchOk(); } @@ -411,7 +411,7 @@ void MpdInterface::dropEvent(TQDropEvent* event) TQRegExp id_re("Id: (.+)"); if (file.isEmpty() && file_re.search(res)>=0) { - TQStringList info=file_re.capturedTexts(); + TQStringList info=file_re.tqcapturedTexts(); info.pop_front(); // if the dropped file ends with the same name, record it if (list.front().path().endsWith(info.first())) @@ -422,7 +422,7 @@ void MpdInterface::dropEvent(TQDropEvent* event) else if (!file.isEmpty() && id_re.search(res)>=0) { // when we have the file, pick up the id (file scomes first) - TQStringList info=id_re.capturedTexts(); + TQStringList info=id_re.tqcapturedTexts(); info.pop_front(); songid=info.first().toInt(); fetchOk(); // skip to the end @@ -433,7 +433,7 @@ void MpdInterface::dropEvent(TQDropEvent* event) // found song, so lets play it if (songid>-1) { - if (dispatch((TQString("playid %1\n").arg(songid)).latin1())) + if (dispatch((TQString("playid %1\n").tqarg(songid)).latin1())) { if (fetchOk()) list.pop_front(); return; @@ -452,7 +452,7 @@ void MpdInterface::dropEvent(TQDropEvent* event) while (!path.empty()) { if (dispatch((TQString("add \"") - +path.join("/").replace("\"","\\\"") + +path.join("/").tqreplace("\"","\\\"") +TQString("\"\n")).latin1())) { if (fetchOk()) break; @@ -483,7 +483,7 @@ const TQString MpdInterface::getTrackTitle() const TQRegExp songid_re("songid: (\\d+)"); if (songid_re.search(res)>=0) { - TQStringList songidinfo=songid_re.capturedTexts(); + TQStringList songidinfo=songid_re.tqcapturedTexts(); songidinfo.pop_front(); songid=songidinfo.first().toInt(); } @@ -491,7 +491,7 @@ const TQString MpdInterface::getTrackTitle() const if (!(songid>-1)) return result; - if (!dispatch(TQString("playlistid %1\n").arg(songid).latin1())) + if (!dispatch(TQString("playlistid %1\n").tqarg(songid).latin1())) return result; TQString artist; @@ -508,31 +508,31 @@ const TQString MpdInterface::getTrackTitle() const TQRegExp file_re("file: (.+)"); if (artist_re.search(res)>=0) { - TQStringList info=artist_re.capturedTexts(); + TQStringList info=artist_re.tqcapturedTexts(); info.pop_front(); artist=info.first(); } else if (album_re.search(res)>=0) { - TQStringList info=album_re.capturedTexts(); + TQStringList info=album_re.tqcapturedTexts(); info.pop_front(); album=info.first(); } else if (title_re.search(res)>=0) { - TQStringList info=title_re.capturedTexts(); + TQStringList info=title_re.tqcapturedTexts(); info.pop_front(); title=info.first(); } else if (track_re.search(res)>=0) { - TQStringList info=track_re.capturedTexts(); + TQStringList info=track_re.tqcapturedTexts(); info.pop_front(); track=info.first(); } else if (file_re.search(res)>=0) { - TQStringList info=file_re.capturedTexts(); + TQStringList info=file_re.tqcapturedTexts(); info.pop_front(); file=info.first(); } @@ -559,15 +559,15 @@ const TQString MpdInterface::getTrackTitle() const else return album; } - return i18n("No tags: %1").arg(file); + return i18n("No tags: %1").tqarg(file); } -int MpdInterface::playingStatus() +int MpdInterface::playingtqStatus() { //kdDebug(90200) << "looking up playing status\n"; if (!dispatch("status\n")) return Stopped; - PlayingStatus status=Stopped; + PlayingtqStatus status=Stopped; TQString res; while(fetchLine(res)) { diff --git a/kicker-applets/mediacontrol/mpdInterface.h b/kicker-applets/mediacontrol/mpdInterface.h index ab95637..b7512b9 100644 --- a/kicker-applets/mediacontrol/mpdInterface.h +++ b/kicker-applets/mediacontrol/mpdInterface.h @@ -32,6 +32,7 @@ class MpdInterface : public PlayerInterface { Q_OBJECT + TQ_OBJECT public: MpdInterface(); ~MpdInterface(); @@ -50,7 +51,7 @@ class MpdInterface virtual void dragEnterEvent(TQDragEnterEvent* event); virtual void dropEvent(TQDropEvent* event); virtual const TQString getTrackTitle() const; - virtual int playingStatus(); + virtual int playingtqStatus(); void changeVolume(int delta); diff --git a/kicker-applets/mediacontrol/noatunInterface.cpp b/kicker-applets/mediacontrol/noatunInterface.cpp index c7355dc..4047eb6 100644 --- a/kicker-applets/mediacontrol/noatunInterface.cpp +++ b/kicker-applets/mediacontrol/noatunInterface.cpp @@ -66,7 +66,7 @@ void NoatunInterface::myInit() void NoatunInterface::appRegistered(const TQCString &appId) { - if (appId.contains("noatun",false)) + if (appId.tqcontains("noatun",false)) { mAppId = appId; emit playerStarted(); @@ -76,7 +76,7 @@ void NoatunInterface::appRegistered(const TQCString &appId) void NoatunInterface::appRemoved(const TQCString &appId) { - if (appId.contains("noatun",false)) + if (appId.tqcontains("noatun",false)) { // is there still another noatun alive? if (findRunningNoatun()) @@ -145,10 +145,10 @@ void NoatunInterface::updateSlider() time = 0; } emit newSliderPosition(len/1000,time/1000); - emit playingStatusChanged(playingStatus()); + emit playingStatusChanged(playingtqStatus()); } -int NoatunInterface::playingStatus() +int NoatunInterface::playingtqStatus() { TQByteArray data, replyData; TQCString replyType; @@ -220,34 +220,34 @@ void NoatunInterface::playpause() { if (!findRunningNoatun()) startPlayer("noatun"); - kapp->dcopClient()->send(mAppId, "Noatun", "playpause()", TQString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "playpause()", TQString()); } void NoatunInterface::stop() { - kapp->dcopClient()->send(mAppId, "Noatun", "stop()", TQString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "stop()", TQString()); } void NoatunInterface::next() { // fastForward() is noatun from kde2 - //kapp->dcopClient()->send("noatun", "Noatun", "fastForward()", TQString::null); - kapp->dcopClient()->send(mAppId, "Noatun", "forward()", TQString::null); + //kapp->dcopClient()->send("noatun", "Noatun", "fastForward()", TQString()); + kapp->dcopClient()->send(mAppId, "Noatun", "forward()", TQString()); } void NoatunInterface::prev() { - kapp->dcopClient()->send(mAppId, "Noatun", "back()", TQString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "back()", TQString()); } void NoatunInterface::volumeUp() { - kapp->dcopClient()->send(mAppId, "Noatun", "volumeDown()", TQString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "volumeDown()", TQString()); } void NoatunInterface::volumeDown() { - kapp->dcopClient()->send(mAppId, "Noatun", "volumeUp()", TQString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "volumeUp()", TQString()); } const TQString NoatunInterface::getTrackTitle() const @@ -259,7 +259,7 @@ const TQString NoatunInterface::getTrackTitle() const replyData, false, 200)) { TQDataStream reply(replyData, IO_ReadOnly); - if (replyType == "TQString") + if (replyType == TQSTRING_OBJECT_NAME_STRING) reply >> title; } return title; @@ -273,7 +273,7 @@ bool NoatunInterface::findRunningNoatun() for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { - if ((*iterator).contains("noatun", false)) + if ((*iterator).tqcontains("noatun", false)) { mAppId = *iterator; return true; diff --git a/kicker-applets/mediacontrol/noatunInterface.h b/kicker-applets/mediacontrol/noatunInterface.h index 36fa21c..64f9ab9 100644 --- a/kicker-applets/mediacontrol/noatunInterface.h +++ b/kicker-applets/mediacontrol/noatunInterface.h @@ -28,6 +28,7 @@ class NoatunInterface : public PlayerInterface { Q_OBJECT + TQ_OBJECT public: NoatunInterface(); ~NoatunInterface(); @@ -48,7 +49,7 @@ class NoatunInterface : public PlayerInterface const TQString getTrackTitle() const; void appRegistered(const TQCString &appId); void appRemoved(const TQCString &appId); - int playingStatus(); + int playingtqStatus(); void myInit(void); diff --git a/kicker-applets/mediacontrol/playerInterface.h b/kicker-applets/mediacontrol/playerInterface.h index 4d7fa7c..916d387 100644 --- a/kicker-applets/mediacontrol/playerInterface.h +++ b/kicker-applets/mediacontrol/playerInterface.h @@ -21,14 +21,15 @@ #include <tqobject.h> #include <tqdragobject.h> -class PlayerInterface : public QObject +class PlayerInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: PlayerInterface(); virtual ~PlayerInterface(); - enum PlayingStatus { Stopped=0, Playing, Paused }; + enum PlayingtqStatus { Stopped=0, Playing, Paused }; public slots: virtual void updateSlider()=0; // gets called on timer-timeout @@ -44,7 +45,7 @@ class PlayerInterface : public QObject virtual void dragEnterEvent(TQDragEnterEvent* event)=0; virtual void dropEvent(TQDropEvent* event)=0; virtual const TQString getTrackTitle() const=0; - virtual int playingStatus()=0; + virtual int playingtqStatus()=0; void startPlayer(const TQString &desktopname); diff --git a/kicker-applets/mediacontrol/simplebutton.cpp b/kicker-applets/mediacontrol/simplebutton.cpp index 478ca2d..8e6c8ec 100644 --- a/kicker-applets/mediacontrol/simplebutton.cpp +++ b/kicker-applets/mediacontrol/simplebutton.cpp @@ -32,8 +32,8 @@ #include <kipc.h> #include <kstandarddirs.h> -SimpleButton::SimpleButton(TQWidget *parent, const char *name) - : TQButton(parent, name), +SimpleButton::SimpleButton(TQWidget *tqparent, const char *name) + : TQButton(tqparent, name), m_highlight(false), m_orientation(Qt::Horizontal) { @@ -63,22 +63,22 @@ void SimpleButton::setOrientation(Qt::Orientation orientation) update(); } -TQSize SimpleButton::sizeHint() const +TQSize SimpleButton::tqsizeHint() const { const TQPixmap* pm = pixmap(); if (!pm) - return TQButton::sizeHint(); + return TQButton::tqsizeHint(); else return TQSize(pm->width() + KDialog::spacingHint(), pm->height() + KDialog::spacingHint()); } -TQSize SimpleButton::minimumSizeHint() const +TQSize SimpleButton::tqminimumSizeHint() const { const TQPixmap* pm = pixmap(); if (!pm) - return TQButton::minimumSizeHint(); + return TQButton::tqminimumSizeHint(); else return TQSize(pm->width(), pm->height()); } @@ -174,7 +174,7 @@ void SimpleButton::enterEvent( TQEvent *e ) { m_highlight = true; - repaint( false ); + tqrepaint( false ); TQButton::enterEvent( e ); } @@ -182,7 +182,7 @@ void SimpleButton::leaveEvent( TQEvent *e ) { m_highlight = false; - repaint( false ); + tqrepaint( false ); TQButton::enterEvent( e ); } @@ -192,20 +192,20 @@ void SimpleButton::resizeEvent( TQResizeEvent * ) } -SimpleArrowButton::SimpleArrowButton(TQWidget *parent, Qt::ArrowType arrow, const char *name) - : SimpleButton(parent, name) +SimpleArrowButton::SimpleArrowButton(TQWidget *tqparent, TQt::ArrowType arrow, const char *name) + : SimpleButton(tqparent, name) { setBackgroundOrigin(AncestorOrigin); _arrow = arrow; _inside = false; } -TQSize SimpleArrowButton::sizeHint() const +TQSize SimpleArrowButton::tqsizeHint() const { return TQSize( 12, 12 ); } -void SimpleArrowButton::setArrowType(Qt::ArrowType a) +void SimpleArrowButton::setArrowType(TQt::ArrowType a) { if (_arrow != a) { @@ -214,7 +214,7 @@ void SimpleArrowButton::setArrowType(Qt::ArrowType a) } } -Qt::ArrowType SimpleArrowButton::arrowType() const +TQt::ArrowType SimpleArrowButton::arrowType() const { return _arrow; } @@ -226,15 +226,15 @@ void SimpleArrowButton::drawButton( TQPainter *p ) TQStyle::PrimitiveElement pe = TQStyle::PE_ArrowLeft; switch (_arrow) { - case Qt::LeftArrow: pe = TQStyle::PE_ArrowLeft; break; - case Qt::RightArrow: pe = TQStyle::PE_ArrowRight; break; - case Qt::UpArrow: pe = TQStyle::PE_ArrowUp; break; - case Qt::DownArrow: pe = TQStyle::PE_ArrowDown; break; + case TQt::LeftArrow: pe = TQStyle::PE_ArrowLeft; break; + case TQt::RightArrow: pe = TQStyle::PE_ArrowRight; break; + case TQt::UpArrow: pe = TQStyle::PE_ArrowUp; break; + case TQt::DownArrow: pe = TQStyle::PE_ArrowDown; break; } int flags = TQStyle::Style_Default | TQStyle::Style_Enabled; if (isDown() || isOn()) flags |= TQStyle::Style_Down; - style().drawPrimitive(pe, p, r, colorGroup(), flags); + tqstyle().tqdrawPrimitive(pe, p, r, tqcolorGroup(), flags); } void SimpleArrowButton::enterEvent( TQEvent *e ) diff --git a/kicker-applets/mediacontrol/simplebutton.h b/kicker-applets/mediacontrol/simplebutton.h index 1ea5c7a..9b4e231 100644 --- a/kicker-applets/mediacontrol/simplebutton.h +++ b/kicker-applets/mediacontrol/simplebutton.h @@ -26,16 +26,17 @@ #include <kdemacros.h> -class KDE_EXPORT SimpleButton : public QButton +class KDE_EXPORT SimpleButton : public TQButton { Q_OBJECT + TQ_OBJECT public: - SimpleButton(TQWidget *parent, const char *name = 0); + SimpleButton(TQWidget *tqparent, const char *name = 0); void setPixmap(const TQPixmap &pix); void setOrientation(Qt::Orientation orientaton); - TQSize sizeHint() const; - TQSize minimumSizeHint() const; + TQSize tqsizeHint() const; + TQSize tqminimumSizeHint() const; protected: void drawButton( TQPainter *p ); @@ -63,23 +64,24 @@ class KDE_EXPORT SimpleButton : public QButton class KDE_EXPORT SimpleArrowButton: public SimpleButton { Q_OBJECT + TQ_OBJECT public: - SimpleArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); + SimpleArrowButton(TQWidget *tqparent = 0, TQt::ArrowType arrow = TQt::UpArrow, const char *name = 0); virtual ~SimpleArrowButton() {}; - TQSize sizeHint() const; + TQSize tqsizeHint() const; protected: virtual void enterEvent( TQEvent *e ); virtual void leaveEvent( TQEvent *e ); virtual void drawButton(TQPainter *p); - Qt::ArrowType arrowType() const; + TQt::ArrowType arrowType() const; public slots: - void setArrowType(Qt::ArrowType a); + void setArrowType(TQt::ArrowType a); private: - Qt::ArrowType _arrow; + TQt::ArrowType _arrow; bool _inside; }; diff --git a/kicker-applets/mediacontrol/xmmsInterface.cpp b/kicker-applets/mediacontrol/xmmsInterface.cpp index 7d8e236..05fc2b0 100644 --- a/kicker-applets/mediacontrol/xmmsInterface.cpp +++ b/kicker-applets/mediacontrol/xmmsInterface.cpp @@ -79,7 +79,7 @@ void XmmsInterface::updateSlider ( void ) } emit newSliderPosition(len,time); - emit playingStatusChanged(playingStatus()); + emit playingStatusChanged(playingtqStatus()); } @@ -163,7 +163,7 @@ void XmmsInterface::volumeDown() xmms_remote_set_main_volume(XMMS_SESSION, cur-1); } -int XmmsInterface::playingStatus() +int XmmsInterface::playingtqStatus() { if (xmms_remote_is_paused(XMMS_SESSION)) return Paused; diff --git a/kicker-applets/mediacontrol/xmmsInterface.h b/kicker-applets/mediacontrol/xmmsInterface.h index 34db157..59bea23 100644 --- a/kicker-applets/mediacontrol/xmmsInterface.h +++ b/kicker-applets/mediacontrol/xmmsInterface.h @@ -30,6 +30,7 @@ class XmmsInterface : public PlayerInterface { Q_OBJECT + TQ_OBJECT public: XmmsInterface(); ~XmmsInterface(); @@ -48,7 +49,7 @@ class XmmsInterface : public PlayerInterface virtual void dragEnterEvent(TQDragEnterEvent* event); virtual void dropEvent(TQDropEvent* event); virtual const TQString getTrackTitle() const; - virtual int playingStatus(); + virtual int playingtqStatus(); private: TQTimer *xmms_timer; |