diff options
Diffstat (limited to 'amarok/src/actionclasses.cpp')
-rw-r--r-- | amarok/src/actionclasses.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/amarok/src/actionclasses.cpp b/amarok/src/actionclasses.cpp index d2330e61..79ec38a1 100644 --- a/amarok/src/actionclasses.cpp +++ b/amarok/src/actionclasses.cpp @@ -18,8 +18,8 @@ #include "socketserver.h" //Vis::Selector::showInstance() #include "threadmanager.h" -#include <qpixmap.h> -#include <qtooltip.h> +#include <tqpixmap.h> +#include <tqtooltip.h> #include <kaction.h> #include <khelpmenu.h> @@ -51,7 +51,7 @@ using namespace Amarok; KHelpMenu *Menu::s_helpMenu = 0; static void -safePlug( KActionCollection *ac, const char *name, QWidget *w ) +safePlug( KActionCollection *ac, const char *name, TQWidget *w ) { if( ac ) { @@ -69,11 +69,11 @@ safePlug( KActionCollection *ac, const char *name, QWidget *w ) MenuAction::MenuAction( KActionCollection *ac ) : KAction( i18n( "Amarok Menu" ), 0, ac, "amarok_menu" ) { - setShortcutConfigurable ( false ); //FIXME disabled as it doesn't work, should use QCursor::pos() + setShortcutConfigurable ( false ); //FIXME disabled as it doesn't work, should use TQCursor::pos() } int -MenuAction::plug( QWidget *w, int index ) +MenuAction::plug( TQWidget *w, int index ) { KToolBar *bar = dynamic_cast<KToolBar*>(w); @@ -82,12 +82,12 @@ MenuAction::plug( QWidget *w, int index ) const int id = KAction::getToolButtonID(); addContainer( bar, id ); - connect( bar, SIGNAL( destroyed() ), SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) ); //TODO create menu on demand //TODO create menu above and aligned within window //TODO make the arrow point upwards! - bar->insertButton( QString::null, id, true, i18n( "Menu" ), index ); + bar->insertButton( TQString::null, id, true, i18n( "Menu" ), index ); bar->alignItemRight( id ); KToolBarButton* button = bar->getButton( id ); @@ -120,7 +120,7 @@ Menu::Menu() insertItem( SmallIconSet( Amarok::icon( "covermanager" ) ), i18n( "C&over Manager" ), ID_SHOW_COVER_MANAGER ); safePlug( ac, "queue_manager", this ); insertItem( SmallIconSet( Amarok::icon( "visualizations" ) ), i18n( "&Visualizations" ), ID_SHOW_VIS_SELECTOR ); - insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_EQUALIZER ); + insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, TQT_SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_EQUALIZER ); safePlug( ac, "script_manager", this ); safePlug( ac, "statistics", this ); @@ -152,8 +152,8 @@ Menu::Menu() safePlug( ac, KStdAction::name(KStdAction::Quit), this ); - connect( this, SIGNAL( aboutToShow() ), SLOT( slotAboutToShow() ) ); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); setItemEnabled( ID_SHOW_VIS_SELECTOR, false ); #ifdef HAVE_LIBVISUAL @@ -169,7 +169,7 @@ Menu::instance() } KPopupMenu* -Menu::helpMenu( QWidget *parent ) //STATIC +Menu::helpMenu( TQWidget *parent ) //STATIC { extern KAboutData aboutData; @@ -213,13 +213,13 @@ PlayPauseAction::PlayPauseAction( KActionCollection *ac ) { engineStateChanged( EngineController::engine()->state() ); - connect( this, SIGNAL(activated()), EngineController::instance(), SLOT(playPause()) ); + connect( this, TQT_SIGNAL(activated()), EngineController::instance(), TQT_SLOT(playPause()) ); } void PlayPauseAction::engineStateChanged( Engine::State state, Engine::State /*oldState*/ ) { - QString text; + TQString text; switch( state ) { case Engine::Playing: @@ -243,9 +243,9 @@ PlayPauseAction::engineStateChanged( Engine::State state, Engine::State /*oldSt //update menu texts for this special action for( int x = 0; x < containerCount(); ++x ) { - QWidget *w = container( x ); - if( w->inherits( "QPopupMenu" ) ) - static_cast<QPopupMenu*>(w)->changeItem( itemId( x ), text ); + TQWidget *w = container( x ); + if( w->inherits( "TQPopupMenu" ) ) + static_cast<TQPopupMenu*>(w)->changeItem( itemId( x ), text ); //TODO KToolBar sucks so much // else if( w->inherits( "KToolBar" ) ) // static_cast<KToolBar*>(w)->getButton( itemId( x ) )->setText( text ); @@ -264,7 +264,7 @@ AnalyzerAction::AnalyzerAction( KActionCollection *ac ) } int -AnalyzerAction::plug( QWidget *w, int index ) +AnalyzerAction::plug( TQWidget *w, int index ) { //NOTE the analyzer will be deleted when the toolbar is deleted or cleared() //we are not designed for unplugging() yet so there would be a leak if that happens @@ -277,8 +277,8 @@ AnalyzerAction::plug( QWidget *w, int index ) const int id = KAction::getToolButtonID(); addContainer( w, id ); - connect( w, SIGNAL( destroyed() ), SLOT( slotDestroyed() ) ); - QWidget *container = new AnalyzerContainer( w ); + connect( w, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) ); + TQWidget *container = new AnalyzerContainer( w ); bar->insertWidget( id, 0, container, index ); bar->setItemAutoSized( id, true ); @@ -288,16 +288,16 @@ AnalyzerAction::plug( QWidget *w, int index ) } -AnalyzerContainer::AnalyzerContainer( QWidget *parent ) - : QWidget( parent, "AnalyzerContainer" ) +AnalyzerContainer::AnalyzerContainer( TQWidget *parent ) + : TQWidget( parent, "AnalyzerContainer" ) , m_child( 0 ) { - QToolTip::add( this, i18n( "Click for more analyzers" ) ); + TQToolTip::add( this, i18n( "Click for more analyzers" ) ); changeAnalyzer(); } void -AnalyzerContainer::resizeEvent( QResizeEvent *) +AnalyzerContainer::resizeEvent( TQResizeEvent *) { m_child->resize( size() ); } @@ -312,7 +312,7 @@ void AnalyzerContainer::changeAnalyzer() } void -AnalyzerContainer::mousePressEvent( QMouseEvent *e) +AnalyzerContainer::mousePressEvent( TQMouseEvent *e) { if( e->button() == Qt::LeftButton ) { AmarokConfig::setCurrentPlaylistAnalyzer( AmarokConfig::currentPlaylistAnalyzer() + 1 ); @@ -321,7 +321,7 @@ AnalyzerContainer::mousePressEvent( QMouseEvent *e) } void -AnalyzerContainer::contextMenuEvent( QContextMenuEvent *e) +AnalyzerContainer::contextMenuEvent( TQContextMenuEvent *e) { #if defined HAVE_LIBVISUAL KPopupMenu menu; @@ -338,7 +338,7 @@ AnalyzerContainer::contextMenuEvent( QContextMenuEvent *e) // ToggleAction ////////////////////////////////////////////////////////////////////////////////////////// -ToggleAction::ToggleAction( const QString &text, void ( *f ) ( bool ), KActionCollection* const ac, const char *name ) +ToggleAction::ToggleAction( const TQString &text, void ( *f ) ( bool ), KActionCollection* const ac, const char *name ) : KToggleAction( text, 0, ac, name ) , m_function( f ) {} @@ -368,7 +368,7 @@ void ToggleAction::setEnabled( bool b ) // SelectAction ////////////////////////////////////////////////////////////////////////////////////////// -SelectAction::SelectAction( const QString &text, void ( *f ) ( int ), KActionCollection* const ac, const char *name ) +SelectAction::SelectAction( const TQString &text, void ( *f ) ( int ), KActionCollection* const ac, const char *name ) : KSelectAction( text, 0, ac, name ) , m_function( f ) { } @@ -394,23 +394,23 @@ void SelectAction::setEnabled( bool b ) if( announce ) emit enabled( b ); } -void SelectAction::setIcons( QStringList icons ) +void SelectAction::setIcons( TQStringList icons ) { m_icons = icons; for( int i = 0, n = items().count(); i < n; ++i ) popupMenu()->changeItem( i, kapp->iconLoader()->loadIconSet( *icons.at( i ), KIcon::Small ), popupMenu()->text( i ) ); } -QStringList SelectAction::icons() const { return m_icons; } +TQStringList SelectAction::icons() const { return m_icons; } -QString SelectAction::currentIcon() const +TQString SelectAction::currentIcon() const { if( m_icons.count() ) return *m_icons.at( currentItem() ); - return QString(); + return TQString(); } -QString SelectAction::currentText() const { +TQString SelectAction::currentText() const { return KSelectAction::currentText() + "<br /><br />" + i18n("Click to change"); } @@ -425,7 +425,7 @@ VolumeAction::VolumeAction( KActionCollection *ac ) {} int -VolumeAction::plug( QWidget *w, int index ) +VolumeAction::plug( TQWidget *w, int index ) { //NOTE we only support one plugging currently @@ -434,13 +434,13 @@ VolumeAction::plug( QWidget *w, int index ) m_slider = new Amarok::VolumeSlider( w, Amarok::VOLUME_MAX ); m_slider->setName( "ToolBarVolume" ); m_slider->setValue( AmarokConfig::masterVolume() ); - m_slider->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Ignored ); + m_slider->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Ignored ); - QToolTip::add( m_slider, i18n( "Volume control" ) ); + TQToolTip::add( m_slider, i18n( "Volume control" ) ); EngineController* const ec = EngineController::instance(); - connect( m_slider, SIGNAL(sliderMoved( int )), ec, SLOT(setVolume( int )) ); - connect( m_slider, SIGNAL(sliderReleased( int )), ec, SLOT(setVolume( int )) ); + connect( m_slider, TQT_SIGNAL(sliderMoved( int )), ec, TQT_SLOT(setVolume( int )) ); + connect( m_slider, TQT_SIGNAL(sliderReleased( int )), ec, TQT_SLOT(setVolume( int )) ); static_cast<KToolBar*>(w)->insertWidget( KAction::getToolButtonID(), 0, m_slider, index ); @@ -461,9 +461,9 @@ VolumeAction::engineVolumeChanged( int value ) RandomAction::RandomAction( KActionCollection *ac ) : SelectAction( i18n( "Ra&ndom" ), &AmarokConfig::setRandomMode, ac, "random_mode" ) { - setItems( QStringList() << i18n( "&Off" ) << i18n( "&Tracks" ) << i18n( "&Albums" ) ); + setItems( TQStringList() << i18n( "&Off" ) << i18n( "&Tracks" ) << i18n( "&Albums" ) ); setCurrentItem( AmarokConfig::randomMode() ); - setIcons( QStringList() << Amarok::icon( "random_no" ) << Amarok::icon( "random_track" ) << Amarok::icon( "random_album" ) ); + setIcons( TQStringList() << Amarok::icon( "random_no" ) << Amarok::icon( "random_track" ) << Amarok::icon( "random_album" ) ); } void @@ -481,7 +481,7 @@ RandomAction::setCurrentItem( int n ) FavorAction::FavorAction( KActionCollection *ac ) : SelectAction( i18n( "&Favor" ), &AmarokConfig::setFavorTracks, ac, "favor_tracks" ) { - setItems( QStringList() << i18n( "Off" ) + setItems( TQStringList() << i18n( "Off" ) << i18n( "Higher &Scores" ) << i18n( "Higher &Ratings" ) << i18n( "Not Recently &Played" ) ); @@ -496,9 +496,9 @@ FavorAction::FavorAction( KActionCollection *ac ) : RepeatAction::RepeatAction( KActionCollection *ac ) : SelectAction( i18n( "&Repeat" ), &AmarokConfig::setRepeat, ac, "repeat" ) { - setItems( QStringList() << i18n( "&Off" ) << i18n( "&Track" ) + setItems( TQStringList() << i18n( "&Off" ) << i18n( "&Track" ) << i18n( "&Album" ) << i18n( "&Playlist" ) ); - setIcons( QStringList() << Amarok::icon( "repeat_no" ) << Amarok::icon( "repeat_track" ) << Amarok::icon( "repeat_album" ) << Amarok::icon( "repeat_playlist" ) ); + setIcons( TQStringList() << Amarok::icon( "repeat_no" ) << Amarok::icon( "repeat_track" ) << Amarok::icon( "repeat_album" ) << Amarok::icon( "repeat_playlist" ) ); setCurrentItem( AmarokConfig::repeat() ); } @@ -510,7 +510,7 @@ BurnMenuAction::BurnMenuAction( KActionCollection *ac ) {} int -BurnMenuAction::plug( QWidget *w, int index ) +BurnMenuAction::plug( TQWidget *w, int index ) { KToolBar *bar = dynamic_cast<KToolBar*>(w); @@ -519,9 +519,9 @@ BurnMenuAction::plug( QWidget *w, int index ) const int id = KAction::getToolButtonID(); addContainer( bar, id ); - connect( bar, SIGNAL( destroyed() ), SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) ); - bar->insertButton( QString::null, id, true, i18n( "Burn" ), index ); + bar->insertButton( TQString::null, id, true, i18n( "Burn" ), index ); KToolBarButton* button = bar->getButton( id ); button->setPopup( Amarok::BurnMenu::instance() ); @@ -539,8 +539,8 @@ BurnMenu::BurnMenu() insertItem( i18n("Selected Tracks"), SELECTED_TRACKS ); //TODO add "album" and "all tracks by artist" - connect( this, SIGNAL( aboutToShow() ), SLOT( slotAboutToShow() ) ); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); } KPopupMenu* @@ -574,11 +574,11 @@ BurnMenu::slotActivated( int index ) ////////////////////////////////////////////////////////////////////////////////////////// StopAction::StopAction( KActionCollection *ac ) - : KAction( i18n( "Stop" ), Amarok::icon( "stop" ), 0, EngineController::instance(), SLOT( stop() ), ac, "stop" ) + : KAction( i18n( "Stop" ), Amarok::icon( "stop" ), 0, EngineController::instance(), TQT_SLOT( stop() ), ac, "stop" ) {} int -StopAction::plug( QWidget *w, int index ) +StopAction::plug( TQWidget *w, int index ) { KToolBar *bar = dynamic_cast<KToolBar*>(w); @@ -587,9 +587,9 @@ StopAction::plug( QWidget *w, int index ) const int id = KAction::getToolButtonID(); addContainer( bar, id ); - connect( bar, SIGNAL( destroyed() ), SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) ); - bar->insertButton( QString::null, id, SIGNAL( clicked() ), EngineController::instance(), SLOT( stop() ), + bar->insertButton( TQString::null, id, TQT_SIGNAL( clicked() ), EngineController::instance(), TQT_SLOT( stop() ), true, i18n( "Stop" ), index ); KToolBarButton* button = bar->getButton( id ); @@ -610,8 +610,8 @@ StopMenu::StopMenu() insertItem( i18n("After Current Track"), AFTER_TRACK ); insertItem( i18n("After Queue"), AFTER_QUEUE ); - connect( this, SIGNAL( aboutToShow() ), SLOT( slotAboutToShow() ) ); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); } KPopupMenu* |