summaryrefslogtreecommitdiffstats
path: root/kaffeine/src/inputmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaffeine/src/inputmanager.cpp')
-rw-r--r--kaffeine/src/inputmanager.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/kaffeine/src/inputmanager.cpp b/kaffeine/src/inputmanager.cpp
index 75bae51..b578449 100644
--- a/kaffeine/src/inputmanager.cpp
+++ b/kaffeine/src/inputmanager.cpp
@@ -37,7 +37,7 @@
#include "inputmanager.moc"
-InputPlugin::InputPlugin( KaffeineInput *p, int ident, QString na )
+InputPlugin::InputPlugin( KaffeineInput *p, int ident, TQString na )
{
plug = p;
id = ident;
@@ -52,10 +52,10 @@ InputPlugin::~InputPlugin()
-InputManager::InputManager( Kaffeine *parent, QWidgetStack *ws, KMultiTabBar *mt )
- : QObject(parent)
+InputManager::InputManager( Kaffeine *tqparent, TQWidgetStack *ws, KMultiTabBar *mt )
+ : TQObject(tqparent)
{
- kaffeine = parent;
+ kaffeine = tqparent;
stack = ws;
mtBar = mt;
plugs.setAutoDelete( true );
@@ -73,14 +73,14 @@ InputManager::~InputManager()
-QSize InputManager::stackSize()
+TQSize InputManager::stackSize()
{
return stack->size();
}
-QWidget* InputManager::visibleWidget() const
+TQWidget* InputManager::visibleWidget() const
{
return stack->visibleWidget();
}
@@ -131,13 +131,13 @@ void InputManager::setCurrentPlugin( KaffeineInput *p )
-QString InputManager::activePlugin()
+TQString InputManager::activePlugin()
{
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->plug==currentPlugin )
return it.current()->name;
}
- return QString();
+ return TQString();
}
@@ -146,9 +146,9 @@ void InputManager::showMe( KaffeineInput *p )
{
int id=0;
int p_id=0;
- QWidget *widg;
+ TQWidget *widg;
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->plug->inputMainWidget()==currentMainWidget )
id = it.current()->id;
if ( it.current()->plug==p ) {
@@ -174,9 +174,9 @@ void InputManager::showMe( KaffeineInput *p )
-void InputManager::setActivePlugin( QString name )
+void InputManager::setActivePlugin( TQString name )
{
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->name==name ) {
currentPlugin = it.current()->plug;
mtBar->setTab( 1, false );
@@ -198,7 +198,7 @@ void InputManager::showPlayer()
if ( currentMainWidget==startWindow )
id = 1;
else {
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->plug->inputMainWidget()==currentMainWidget ) {
if ( !it.current()->plug->showPlayer() )
return;
@@ -218,13 +218,13 @@ void InputManager::togglePlaylist()
{
int currentPluginId=0, playlistPluginId=0;
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->name == i18n("Playlist") ) {
playlistPluginId = it.current()->id;
break;
}
}
- for ( QPtrListIterator<InputPlugin> it2(plugs); it2.current(); ++it2 ) {
+ for ( TQPtrListIterator<InputPlugin> it2(plugs); it2.current(); ++it2 ) {
if ( it2.current()->plug->inputMainWidget() == currentMainWidget ) {
currentPluginId = it2.current()->id;
break;
@@ -255,7 +255,7 @@ void InputManager::togglePlaylist()
void InputManager::addConfigKeys( KKeyDialog* kd )
{
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it )
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it )
kd->insert( it.current()->plug->actionCollection(), it.current()->plug->name());
}
@@ -263,7 +263,7 @@ void InputManager::addConfigKeys( KKeyDialog* kd )
bool InputManager::isPlaylistCurrent()
{
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->name == i18n("Playlist") ) {
if ( it.current()->plug==currentPlugin )
return true;
@@ -321,16 +321,16 @@ bool InputManager::playbackFinished( MRL &mrl )
-void InputManager::statusBarMessage( const QString &msg )
+void InputManager::statusBarMessage( const TQString &msg )
{
- kaffeine->slotChangePlaylistStatus( msg );
+ kaffeine->slotChangePlaylisttqStatus( msg );
}
void InputManager::saveConfig()
{
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it )
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it )
it.current()->plug->saveConfig();
}
@@ -338,7 +338,7 @@ void InputManager::saveConfig()
bool InputManager::close()
{
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( !it.current()->plug->close() )
return false;
}
@@ -347,18 +347,18 @@ bool InputManager::close()
-void InputManager::add( KaffeineInput *p, const QPixmap &icon, const QString &name )
+void InputManager::add( KaffeineInput *p, const TQPixmap &icon, const TQString &name )
{
mtBar->appendTab( icon, nextId, name );
- connect( mtBar->tab( nextId ), SIGNAL(clicked(int)), this, SLOT(show(int)) );
+ connect( mtBar->tab( nextId ), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(show(int)) );
stack->addWidget( p->inputMainWidget(), nextId );
plugs.append( new InputPlugin( p, nextId, name ) );
- connect( p, SIGNAL(play(const MRL&,KaffeineInput*)), this, SLOT(play(const MRL&,KaffeineInput*)));
- connect( p, SIGNAL(setCurrentPlugin(KaffeineInput*)), this, SLOT(setCurrentPlugin(KaffeineInput*)));
- connect( p, SIGNAL(statusBarMessage(const QString&)), this, SLOT(statusBarMessage(const QString&)));
- connect( p, SIGNAL(stop()), this, SLOT(stop()));
- connect( p, SIGNAL(pause()), this, SLOT(pause()));
- connect( p, SIGNAL(showMe(KaffeineInput*)), this, SLOT(showMe(KaffeineInput*)));
+ connect( p, TQT_SIGNAL(play(const MRL&,KaffeineInput*)), this, TQT_SLOT(play(const MRL&,KaffeineInput*)));
+ connect( p, TQT_SIGNAL(setCurrentPlugin(KaffeineInput*)), this, TQT_SLOT(setCurrentPlugin(KaffeineInput*)));
+ connect( p, TQT_SIGNAL(statusBarMessage(const TQString&)), this, TQT_SLOT(statusBarMessage(const TQString&)));
+ connect( p, TQT_SIGNAL(stop()), this, TQT_SLOT(stop()));
+ connect( p, TQT_SIGNAL(pause()), this, TQT_SLOT(pause()));
+ connect( p, TQT_SIGNAL(showMe(KaffeineInput*)), this, TQT_SLOT(showMe(KaffeineInput*)));
if ( !currentPlugin )
currentPlugin = plugs.current()->plug;
++nextId;
@@ -367,33 +367,33 @@ void InputManager::add( KaffeineInput *p, const QPixmap &icon, const QString &na
-void InputManager::addPlayerWidget( QWidget *w, const QPixmap &icon, const QString &name )
+void InputManager::addPlayerWidget( TQWidget *w, const TQPixmap &icon, const TQString &name )
{
playerWidget = w;
mtBar->appendTab( icon, 2, name );
- connect( mtBar->tab(2), SIGNAL(clicked(int)), this, SLOT(show(int)) );
+ connect( mtBar->tab(2), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(show(int)) );
stack->addWidget( playerWidget, 2 );
}
-void InputManager::addStartWindow( QWidget *w, const QPixmap &icon, const QString &name )
+void InputManager::addStartWindow( TQWidget *w, const TQPixmap &icon, const TQString &name )
{
startWindow = w;
mtBar->appendTab( icon, 1, name );
- connect( mtBar->tab(1), SIGNAL(clicked(int)), this, SLOT(show(int)) );
+ connect( mtBar->tab(1), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(show(int)) );
stack->addWidget( startWindow, 1 );
mtBar->setTab( 1, true );
stack->raiseWidget( 1 );
oldMainWidget = currentMainWidget = startWindow;
- connect( (StartWindow*)w, SIGNAL(execTarget(const QString&)), this, SLOT(execTarget(const QString&)) );
+ connect( (StartWindow*)w, TQT_SIGNAL(execTarget(const TQString&)), this, TQT_SLOT(execTarget(const TQString&)) );
}
-void InputManager::execTarget( const QString &target )
+void InputManager::execTarget( const TQString &target )
{
- QPtrListIterator<InputPlugin> it(plugs);
+ TQPtrListIterator<InputPlugin> it(plugs);
for ( it.toFirst(); it.current(); ++it ) {
if ( it.current()->plug->execTarget( target ) )
return;
@@ -405,7 +405,7 @@ void InputManager::execTarget( const QString &target )
void InputManager::makeTargets( KaffeineInput *p, bool make )
{
int i;
- QStringList uiNames, iconNames, targetNames;
+ TQStringList uiNames, iconNames, targetNames;
StartWindow *sw = (StartWindow*)(startWindow);
p->getTargets( uiNames, iconNames, targetNames );
@@ -422,7 +422,7 @@ void InputManager::makeTargets( KaffeineInput *p, bool make )
void InputManager::remove( KaffeineInput *p )
{
InputPlugin *i=NULL;
- QPtrListIterator<InputPlugin> it(plugs);
+ TQPtrListIterator<InputPlugin> it(plugs);
for ( it.toFirst(); it.current(); ++it ) {
if ( it.current()->plug==p ) {
@@ -471,9 +471,9 @@ void InputManager::setPlayerContainer( PlayerContainer *pc )
{
playerContainer = pc;
if ( playerContainer ) {
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->plug->inputMainWidget()==currentMainWidget ) {
- playerContainer->reparent( it.current()->plug->wantPlayerWindow(), QPoint(0,0), true);
+ playerContainer->reparent( it.current()->plug->wantPlayerWindow(), TQPoint(0,0), true);
playerContainer->show();
break;
}
@@ -485,14 +485,14 @@ void InputManager::setPlayerContainer( PlayerContainer *pc )
void InputManager::show( int id )
{
- QWidget *widg = NULL;
- QWidget *main = NULL;
+ TQWidget *widg = NULL;
+ TQWidget *main = NULL;
if ( id==2 ) {
if ( currentMainWidget==playerWidget )
return;
if ( playerContainer ) {
- playerContainer->reparent(playerWidget, QPoint(0,0), true);
+ playerContainer->reparent(playerWidget, TQPoint(0,0), true);
currentMainWidget = playerWidget;
}
currentMainWidget = playerWidget;
@@ -503,7 +503,7 @@ void InputManager::show( int id )
currentMainWidget = startWindow;
}
else {
- for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
+ for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) {
if ( it.current()->id==id ) {
main = it.current()->plug->inputMainWidget();
if ( main==currentMainWidget ) {
@@ -513,7 +513,7 @@ void InputManager::show( int id )
currentMainWidget = main;
widg = it.current()->plug->wantPlayerWindow();
if ( widg && playerContainer )
- playerContainer->reparent(widg, QPoint(0,0), true);
+ playerContainer->reparent(widg, TQPoint(0,0), true);
break;
}
}
@@ -526,17 +526,17 @@ void InputManager::show( int id )
void InputManager::fullscreen( bool b )
{
- QPtrListIterator<InputPlugin> it(plugs);
+ TQPtrListIterator<InputPlugin> it(plugs);
int id=0;
if ( b ) {
- stack->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+ stack->tqsetSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored);
oldMainWidget = currentMainWidget;
show( 2 );
mtBar->hide();
}
else {
- stack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ stack->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
mtBar->show();
if ( oldMainWidget==startWindow )
id = 1;
@@ -555,30 +555,30 @@ void InputManager::fullscreen( bool b )
/********/
-PlayerContainer::PlayerContainer(QWidget* parent, const char* name) : QVBox(parent, name)
+PlayerContainer::PlayerContainer(TQWidget* tqparent, const char* name) : TQVBox(tqparent, name)
{
setAcceptDrops(true);
setMouseTracking( true );
}
-void PlayerContainer::dragEnterEvent (QDragEnterEvent* dev)
+void PlayerContainer::dragEnterEvent (TQDragEnterEvent* dev)
{
kdDebug() << "PlayerContainer: drag enter event" << endl;
- dev->accept(QUriDrag::canDecode(dev) || QTextDrag::canDecode(dev));
+ dev->accept(TQUriDrag::canDecode(dev) || TQTextDrag::canDecode(dev));
}
-void PlayerContainer::dropEvent(QDropEvent* dev)
+void PlayerContainer::dropEvent(TQDropEvent* dev)
{
- QStringList urls,newurls;
+ TQStringList urls,newurls;
- if (QUriDrag::decodeLocalFiles(dev, urls))
+ if (TQUriDrag::decodeLocalFiles(dev, urls))
{
if (urls.count())
{
for (uint i=0; i < urls.count() ;i++)
{
- //KURL url(QUriDrag::unicodeUriToUri(urls[i]));
+ //KURL url(TQUriDrag::tqunicodeUriToUri(urls[i]));
//newurls << url.path(-1);
//kdDebug() << "Kaffeine: Dropped " << url.path() << endl;
newurls << urls[i];
@@ -588,7 +588,7 @@ void PlayerContainer::dropEvent(QDropEvent* dev)
}
else
{
- QUriDrag::decodeToUnicodeUris(dev, urls);
+ TQUriDrag::decodeToUnicodeUris(dev, urls);
if (urls.count())
emit signalURLDropEvent(urls);
}
@@ -596,8 +596,8 @@ void PlayerContainer::dropEvent(QDropEvent* dev)
else
if (strcmp(dev->format(), "text/x-moz-url") == 0) // for mozilla drops
{
- QByteArray data = dev->encodedData("text/plain");
- QString md(data);
+ TQByteArray data = dev->tqencodedData("text/plain");
+ TQString md(data);
emit signalURLDropEvent(md);
}
}