summaryrefslogtreecommitdiffstats
path: root/interfaces/kmediaplayer
diff options
context:
space:
mode:
Diffstat (limited to 'interfaces/kmediaplayer')
-rw-r--r--interfaces/kmediaplayer/CMakeLists.txt60
-rw-r--r--interfaces/kmediaplayer/Makefile.am18
-rw-r--r--interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt46
-rw-r--r--interfaces/kmediaplayer/kfileaudiopreview/Makefile.am13
-rw-r--r--interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp146
-rw-r--r--interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h64
-rw-r--r--interfaces/kmediaplayer/kmediaplayer.desktop4
-rw-r--r--interfaces/kmediaplayer/kmediaplayerengine.desktop3
-rw-r--r--interfaces/kmediaplayer/player.cpp79
-rw-r--r--interfaces/kmediaplayer/player.h143
-rw-r--r--interfaces/kmediaplayer/playerdcopobject.h62
-rw-r--r--interfaces/kmediaplayer/view.cpp89
-rw-r--r--interfaces/kmediaplayer/view.h98
13 files changed, 0 insertions, 825 deletions
diff --git a/interfaces/kmediaplayer/CMakeLists.txt b/interfaces/kmediaplayer/CMakeLists.txt
deleted file mode 100644
index 98346388c..000000000
--- a/interfaces/kmediaplayer/CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-#################################################
-#
-# (C) 2010 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-if( ARTS_FOUND )
- add_subdirectory( kfileaudiopreview )
-endif( ARTS_FOUND )
-
-include_directories(
- ${TQT_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/tdecore
- ${CMAKE_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}/interfaces
- ${CMAKE_SOURCE_DIR}/dcop
- ${CMAKE_SOURCE_DIR}/tdecore
- ${CMAKE_SOURCE_DIR}/tdeui
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
-)
-
-
-##### headers ###################################
-
-install( FILES
- player.h playerdcopobject.h view.h
- DESTINATION ${INCLUDE_INSTALL_DIR}/kmediaplayer )
-
-
-##### other data ################################
-
-install( FILES
- kmediaplayerengine.desktop kmediaplayer.desktop
- DESTINATION ${SERVICETYPES_INSTALL_DIR} )
-
-
-##### kmediaplayer ##############################
-
-set( target kmediaplayer )
-
-set( ${target}_SRCS
- player.cpp view.cpp playerdcopobject.skel
-)
-
-tde_add_library( ${target} SHARED AUTOMOC
- SOURCES ${${target}_SRCS}
- VERSION 0.0.0
- LINK kparts-shared
- DESTINATION ${LIB_INSTALL_DIR}
- DEPENDENCIES dcopidl
-)
diff --git a/interfaces/kmediaplayer/Makefile.am b/interfaces/kmediaplayer/Makefile.am
deleted file mode 100644
index 5b26d844e..000000000
--- a/interfaces/kmediaplayer/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-if include_ARTS
-kfileaudiopreview_subdir = kfileaudiopreview
-endif
-
-SUBDIRS = . $(kfileaudiopreview_subdir)
-INCLUDES = -I$(srcdir)/.. $(all_includes)
-
-lib_LTLIBRARIES = libkmediaplayer.la
-
-libkmediaplayer_la_SOURCES = player.cpp playerdcopobject.skel view.cpp
-libkmediaplayer_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined
-libkmediaplayer_la_LIBADD = $(LIB_KPARTS) $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) $(LIB_TDECORE)
-libkmediaplayer_la_METASOURCES = AUTO
-
-kmediaplayerinclude_HEADERS = player.h playerdcopobject.h view.h
-kmediaplayerincludedir = $(includedir)/kmediaplayer
-
-kde_servicetypes_DATA = kmediaplayerengine.desktop kmediaplayer.desktop
diff --git a/interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt b/interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt
deleted file mode 100644
index 03237da87..000000000
--- a/interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-#################################################
-#
-# (C) 2010 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-include_directories(
- ${TQT_INCLUDE_DIRS}
- ${ARTS_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/tdecore
- ${CMAKE_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}/dcop
- ${CMAKE_SOURCE_DIR}/interfaces
- ${CMAKE_SOURCE_DIR}/tdecore
- ${CMAKE_SOURCE_DIR}/tdeui
- ${CMAKE_SOURCE_DIR}/kio
- ${CMAKE_SOURCE_DIR}/kio/kio
- ${CMAKE_SOURCE_DIR}/kio/kfile
- ${CMAKE_SOURCE_DIR}/arts/kde
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
- ${ARTS_LIBRARY_DIRS}
-)
-
-
-##### kfileaudiopreview #########################
-
-set( target kfileaudiopreview )
-
-set( ${target}_SRCS
- kfileaudiopreview.cpp
-)
-
-tde_add_kpart( ${target} AUTOMOC
- SOURCES ${${target}_SRCS}
- LINK kmediaplayer-shared artskde-shared
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
diff --git a/interfaces/kmediaplayer/kfileaudiopreview/Makefile.am b/interfaces/kmediaplayer/kfileaudiopreview/Makefile.am
deleted file mode 100644
index e4232cd78..000000000
--- a/interfaces/kmediaplayer/kfileaudiopreview/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-INCLUDES = -I$(top_srcdir)/interfaces/ -I$(top_srcdir)/arts/kde -I$(includedir)/arts $(all_includes)
-METASOURCES = AUTO
-
-kde_module_LTLIBRARIES = kfileaudiopreview.la
-
-kfileaudiopreview_la_SOURCES = kfileaudiopreview.cpp
-kfileaudiopreview_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined
-kfileaudiopreview_la_LIBADD = $(top_builddir)/interfaces/kmediaplayer/libkmediaplayer.la $(top_builddir)/arts/kde/libartskde.la $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE)
-
-noinst_HEADERS = kfileaudiopreview.h
-
-messages:
- $(XGETTEXT) $(kfileaudiopreview_la_SOURCES) -o $(podir)/kfileaudiopreview.pot
diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
deleted file mode 100644
index 2998af9f5..000000000
--- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-#include "kfileaudiopreview.h"
-
-#include <tqcheckbox.h>
-#include <tqhbox.h>
-#include <tqlayout.h>
-#include <tqvgroupbox.h>
-
-#include <kglobal.h>
-#include <kconfig.h>
-#include <klibloader.h>
-#include <klocale.h>
-#include <kmediaplayer/player.h>
-#include <kmimetype.h>
-#include <kparts/componentfactory.h>
-
-#include <kplayobjectfactory.h>
-
-#include <config-kfile.h>
-
-class KFileAudioPreviewFactory : public KLibFactory
-{
-protected:
- virtual TQObject *createObject( TQObject *parent, const char *name,
- const char *className, const TQStringList & args)
- {
- Q_UNUSED(className);
- Q_UNUSED(args);
- return TQT_TQOBJECT(new KFileAudioPreview( dynamic_cast<TQWidget*>( parent ), name ));
- }
-};
-
-K_EXPORT_COMPONENT_FACTORY( kfileaudiopreview, KFileAudioPreviewFactory )
-
-
-///////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-
-
-class KFileAudioPreview::KFileAudioPreviewPrivate
-{
-public:
- KFileAudioPreviewPrivate( TQWidget *parent )
- {
- player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", TQString(), TQT_TQOBJECT(parent) );
- }
-
- ~KFileAudioPreviewPrivate()
- {
- delete player;
- }
-
- KMediaPlayer::Player *player;
-};
-
-
-KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name )
- : KPreviewWidgetBase( parent, name )
-{
- TDEGlobal::locale()->insertCatalogue("kfileaudiopreview");
-
- TQStringList formats = KDE::PlayObjectFactory::mimeTypes();
- // ###
- TQStringList::ConstIterator it = formats.begin();
- for ( ; it != formats.end(); ++it )
- m_supportedFormats.insert( *it, (void*) 1 );
-
- TQVGroupBox *box = new TQVGroupBox( i18n("Media Player"), this );
- TQVBoxLayout *layout = new TQVBoxLayout( this );
- layout->addWidget( box );
-
- (void) new TQWidget( box ); // spacer
-
- d = new KFileAudioPreviewPrivate( 0L ); // not box -- being reparented anyway
- if ( d->player ) // only if there actually is a component...
- {
- setSupportedMimeTypes( formats );
- KMediaPlayer::View *view = d->player->view();
- view->setEnabled( false );
-
- // if we have access to the video widget, show it above the player
- // So, reparent first the video widget, then the view.
- if ( view->videoWidget() )
- {
- TQHBox *frame = new TQHBox( box );
- frame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- frame->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
- view->videoWidget()->reparent( frame, TQPoint(0,0) );
- }
-
- view->reparent( box, TQPoint(0,0) );
- }
-
- m_autoPlay = new TQCheckBox( i18n("Play &automatically"), box );
- TDEConfigGroup config( TDEGlobal::config(), ConfigGroup );
- m_autoPlay->setChecked( config.readBoolEntry( "Autoplay sounds", true ) );
- connect( m_autoPlay, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) );
-}
-
-KFileAudioPreview::~KFileAudioPreview()
-{
- TDEConfigGroup config( TDEGlobal::config(), ConfigGroup );
- config.writeEntry( "Autoplay sounds", m_autoPlay->isChecked() );
-
- delete d;
-}
-
-void KFileAudioPreview::showPreview( const KURL &url )
-{
- if ( !d->player || !url.isValid() )
- return;
-
- KMimeType::Ptr mt = KMimeType::findByURL( url );
- bool supported = m_supportedFormats.find( mt->name() );
- d->player->view()->setEnabled( supported );
- if ( !supported )
- return;
-
- static_cast<KParts::ReadOnlyPart*>(d->player)->openURL( url );
- if ( m_autoPlay->isChecked() )
- d->player->play();
-}
-
-void KFileAudioPreview::clearPreview()
-{
- if ( d->player )
- {
- d->player->stop();
- d->player->closeURL();
- }
-}
-
-void KFileAudioPreview::toggleAuto( bool on )
-{
- if ( !d->player )
- return;
-
- if ( on && m_currentURL.isValid() && d->player->view()->isEnabled() )
- d->player->play();
- else
- d->player->stop();
-}
-
-void KFileAudioPreview::virtual_hook( int, void* )
-{}
-
-#include "kfileaudiopreview.moc"
diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h
deleted file mode 100644
index de48e4712..000000000
--- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2003 Carsten Pfeiffer <pfeiffer@kde.org>
-
- library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation, version 2.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef KFILEAUDIOPREVIEW_H
-#define KFILEAUDIOPREVIEW_H
-
-#include <tqdict.h>
-
-#include <kurl.h>
-#include <kpreviewwidgetbase.h>
-
-class TQCheckBox;
-class TQPushButton;
-class TQLabel;
-
-class KFileDialog;
-class KFileItem;
-
-/**
- * Audio "preview" widget for the file dialog.
- */
-class KFileAudioPreview : public KPreviewWidgetBase
-{
- Q_OBJECT
-
-public:
- KFileAudioPreview(TQWidget *parent = 0, const char *name = 0 );
- ~KFileAudioPreview();
-
-public slots:
- virtual void showPreview(const KURL &url);
- virtual void clearPreview();
-
-private slots:
- void toggleAuto(bool);
-
-private:
- TQDict<void> m_supportedFormats;
- KURL m_currentURL;
- TQCheckBox *m_autoPlay;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KFileAudioPreviewPrivate;
- KFileAudioPreviewPrivate *d;
-};
-
-#endif // KFILEAUDIOPREVIEW_H
diff --git a/interfaces/kmediaplayer/kmediaplayer.desktop b/interfaces/kmediaplayer/kmediaplayer.desktop
deleted file mode 100644
index 85c1df65b..000000000
--- a/interfaces/kmediaplayer/kmediaplayer.desktop
+++ /dev/null
@@ -1,4 +0,0 @@
-[Desktop Entry]
-Type=ServiceType
-X-TDE-ServiceType=KMediaPlayer/Player
-X-TDE-Derived=KParts/ReadOnlyPart
diff --git a/interfaces/kmediaplayer/kmediaplayerengine.desktop b/interfaces/kmediaplayer/kmediaplayerengine.desktop
deleted file mode 100644
index ba7bf0403..000000000
--- a/interfaces/kmediaplayer/kmediaplayerengine.desktop
+++ /dev/null
@@ -1,3 +0,0 @@
-[Desktop Entry]
-Type=ServiceType
-X-TDE-ServiceType=KMediaPlayer/Engine
diff --git a/interfaces/kmediaplayer/player.cpp b/interfaces/kmediaplayer/player.cpp
deleted file mode 100644
index 681459731..000000000
--- a/interfaces/kmediaplayer/player.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Except as contained in this notice, the name(s) of the author(s) shall not be
-// used in advertising or otherwise to promote the sale, use or other dealings
-// in this Software without prior written authorization from the author(s).
-
-#include <kmediaplayer/player.h>
-
-KMediaPlayer::PlayerDCOPObject::PlayerDCOPObject(void)
- : DCOPObject("KMediaPlayer")
-{
-}
-
-KMediaPlayer::Player::Player(TQWidget *, const char *, TQObject *parent, const char *name)
- : KParts::ReadOnlyPart(parent, name)
- , currentLooping(false)
- , currentState(Empty)
- , d(0)
-{
-}
-
-KMediaPlayer::Player::Player(TQObject *parent, const char *name)
- : KParts::ReadOnlyPart(parent, name)
- , currentLooping(false)
- , currentState(Empty)
- , d(0)
-{
-}
-
-KMediaPlayer::Player::~Player(void)
-{
-}
-
-void KMediaPlayer::Player::setLooping(bool b)
-{
- if(b != currentLooping)
- {
- currentLooping = b;
- emit loopingChanged(b);
- }
-}
-
-bool KMediaPlayer::Player::isLooping(void) const
-{
- return currentLooping;
-}
-
-void KMediaPlayer::Player::setState(int s)
-{
- if(s != currentState)
- {
- currentState = (State)s;
- emit stateChanged(s);
- }
-}
-
-int KMediaPlayer::Player::state(void) const
-{
- return (int)currentState;
-}
-
-#include "player.moc"
diff --git a/interfaces/kmediaplayer/player.h b/interfaces/kmediaplayer/player.h
deleted file mode 100644
index 10e9f4a74..000000000
--- a/interfaces/kmediaplayer/player.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Except as contained in this notice, the name(s) of the author(s) shall not be
-// used in advertising or otherwise to promote the sale, use or other dealings
-// in this Software without prior written authorization from the author(s).
-
-#ifndef KMEDIAPLAYERPLAYER_H
-#define KMEDIAPLAYERPLAYER_H
-
-#include <kparts/part.h>
-#include <kmediaplayer/playerdcopobject.h>
-#include <kmediaplayer/view.h>
-
-/** KMediaPlayer contains an interface to reusable media player components.
-*/
-namespace KMediaPlayer
-{
-
-/** Player is the center of the KMediaPlayer interface. It provides all of
- * the necessary media player operations, and optionally provides the GUI to
- * control them.
- *
- * There are two servicetypes for Player: KMediaPlayer/Player and
- * KMediaPlayer/Engine. KMediaPlayer/Player provides a widget (accessable
- * through view as well as XML GUI KActions. KMediaPlayer/Engine omits
- * the user interface facets, for those who wish to provide their own
- * interface.
- */
-class KDE_EXPORT Player : public KParts::ReadOnlyPart, public PlayerDCOPObject
-{
-Q_OBJECT
-
-public:
- /** This constructor is what to use when no GUI is required, as in the
- * case of a KMediaPlayer/Engine.
- */
- Player(TQObject *parent, const char *name);
-
- /** This constructor is what to use when a GUI is required, as in the
- * case of a KMediaPlayer/Player.
- */
- Player(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name);
-
- virtual ~Player(void);
-
- /** A convenience function returning a pointer to the View for this
- * Player, or 0 if this Player has no GUI.
- */
- virtual View *view(void) = 0;
-
-public slots:
- /** Pause playback of the media track.*/
- virtual void pause(void) = 0;
-
- /** Begin playing the media track.*/
- virtual void play(void) = 0;
-
- /** Stop playback of the media track and return to the beginning.*/
- virtual void stop(void) = 0;
-
- /** Move the current playback position to the specified time in
- * milliseconds, if the track is seekable. Some streams may not be
- * seeked.
- */
- virtual void seek(unsigned long msec) = 0;
-public:
- /** Returns whether the current track honors seek requests.*/
- virtual bool isSeekable(void) const = 0;
-
- /** Returns the current playback position in the track.*/
- virtual unsigned long position(void) const = 0;
-
- /** Returns whether the current track has a length. Some streams are
- * endless, and do not have one. */
- virtual bool hasLength(void) const = 0;
-
- /** Returns the length of the current track.*/
- virtual unsigned long length(void) const = 0;
-
-public slots:
- /** Set whether the Player should continue playing at the beginning of
- * the track when the end of the track is reached.
- */
- void setLooping(bool);
-public:
- /** Return the current looping state. */
- bool isLooping(void) const;
-signals:
- /** Emitted when the looping state is changed. */
- void loopingChanged(bool);
-
-public:
- /** The possible states of the Player */
- enum State
- {
- /** No track is loaded. */
- Empty,
- /** Not playing. */
- Stop,
- /** Playing is temporarily suspended. */
- Pause,
- /** The media is currently being output. */
- Play
- };
- /** Return the current state of the player. */
- int state(void) const;
-signals:
- /** Emitted when the state changes. */
- void stateChanged(int);
-
-protected slots:
- /** Implementers use this to control what users see as the current
- * state.*/
- void setState(int);
-
-private:
- bool currentLooping;
- State currentState;
-
- struct Data;
- Data *d;
-};
-
-}
-
-#endif
diff --git a/interfaces/kmediaplayer/playerdcopobject.h b/interfaces/kmediaplayer/playerdcopobject.h
deleted file mode 100644
index 73a1cfa1d..000000000
--- a/interfaces/kmediaplayer/playerdcopobject.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Except as contained in this notice, the name(s) of the author(s) shall not be
-// used in advertising or otherwise to promote the sale, use or other dealings
-// in this Software without prior written authorization from the author(s).
-
-#ifndef KMEDIAPLAYERPLAYERDCOPOBJECT_H
-#define KMEDIAPLAYERPLAYERDCOPOBJECT_H
-
-#include <dcopobject.h>
-#include <kurl.h>
-
-namespace KMediaPlayer
-{
-
-class KDE_EXPORT PlayerDCOPObject : public DCOPObject
-{
-K_DCOP
-
-public:
- PlayerDCOPObject(void);
-
-k_dcop:
- virtual bool openURL(const KURL &file) = 0;
- virtual void pause() = 0;
- virtual void play() = 0;
- virtual void stop() = 0;
-
- virtual void seek(unsigned long msec) = 0;
- virtual bool isSeekable() const = 0;
- virtual unsigned long position() const = 0;
-
- virtual bool hasLength() const = 0;
- virtual unsigned long length() const = 0;
-
- virtual void setLooping(bool) = 0;
- virtual bool isLooping() const = 0;
-
- virtual int state() const = 0;
- virtual void setState(int) = 0;
-};
-
-}
-
-#endif
diff --git a/interfaces/kmediaplayer/view.cpp b/interfaces/kmediaplayer/view.cpp
deleted file mode 100644
index 64e3bf484..000000000
--- a/interfaces/kmediaplayer/view.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Except as contained in this notice, the name(s) of the author(s) shall not be
-// used in advertising or otherwise to promote the sale, use or other dealings
-// in this Software without prior written authorization from the author(s).
-
-#include <kmediaplayer/view.h>
-
-struct KMediaPlayer::View::Data
-{
- Data() : videoWidget(0L) {}
-
- TQWidget *videoWidget;
-};
-
-KMediaPlayer::View::View(TQWidget *parent, const char *name)
- : TQWidget(parent, name)
- , currentButtons((int)All)
- , d(new Data())
-{
-}
-
-KMediaPlayer::View::~View(void)
-{
- delete d;
-}
-
-int KMediaPlayer::View::buttons(void)
-{
- return currentButtons;
-}
-
-void KMediaPlayer::View::setButtons(int buttons)
-{
- if(buttons != currentButtons)
- {
- currentButtons = buttons;
- emit buttonsChanged(buttons);
- }
-}
-
-bool KMediaPlayer::View::button(int b)
-{
- return currentButtons & b;
-}
-
-void KMediaPlayer::View::showButton(int b)
-{
- setButtons(currentButtons | b);
-}
-
-void KMediaPlayer::View::hideButton(int b)
-{
- setButtons(currentButtons & ~b);
-}
-
-void KMediaPlayer::View::toggleButton(int b)
-{
- setButtons(currentButtons ^ b);
-}
-
-void KMediaPlayer::View::setVideoWidget(TQWidget *videoWidget)
-{
- d->videoWidget = videoWidget;
-}
-
-TQWidget* KMediaPlayer::View::videoWidget()
-{
- return d->videoWidget;
-}
-
-#include "view.moc"
diff --git a/interfaces/kmediaplayer/view.h b/interfaces/kmediaplayer/view.h
deleted file mode 100644
index c1d9dbe41..000000000
--- a/interfaces/kmediaplayer/view.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Except as contained in this notice, the name(s) of the author(s) shall not be
-// used in advertising or otherwise to promote the sale, use or other dealings
-// in this Software without prior written authorization from the author(s).
-
-#ifndef KMEDIAPLAYERVIEW_H
-#define KMEDIAPLAYERVIEW_H
-
-#include <tqwidget.h>
-#include <tdelibs_export.h>
-
-namespace KMediaPlayer
-{
-
-/** View is part of the user interface of a Player. */
-class KDE_EXPORT View : public TQWidget
-{
-Q_OBJECT
-
-public:
- /** Your typical TQWidget constructor. */
- View(TQWidget *parent, const char *name);
- virtual ~View(void);
-
- /** The Possible buttons that can appear in the UI. */
- enum Button
- {
- /** Button that connects to Player::play */
- Play = 1,
- /** Button that connects to Player::stop */
- Stop = 2,
- /** Button that connects to Player::pause */
- Pause = 4,
- /** A seeker that interfaces with Player::seek */
- Seeker = 8,
- /** Show all buttons. */
- All = 255
- };
-
- /** Return which buttons are being displayed. */
- int buttons(void);
-
- /** Return the TQWidget in which video is displayed.
- May Return 0L if there is none. */
- TQWidget *videoWidget();
-
-public slots:
- /** Set which buttons to display. See Button. */
- void setButtons(int);
-
- /** Returns if a particular button is being displayed. */
- bool button(int);
- /** Display a particular button. */
- void showButton(int);
- /** Stop displaying a particular button. */
- void hideButton(int);
- /** Toggle the display of a particular button. */
- void toggleButton(int);
-
-signals:
- /** Emitted when the set of displayed buttons changes. */
- void buttonsChanged(int);
-
-protected:
- /** The implementing view should set the widget in which
- the video will be displayed. KMediaPlayer users may
- reparent() it to somewhere else, for example.
- */
- void setVideoWidget(TQWidget *videoWidget);
-
-private:
- int currentButtons;
-
- struct Data;
- Data *d;
-};
-
-}
-
-#endif