• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KMediaPlayer

player.cpp

Go to the documentation of this file.
00001 // Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
00002 //
00003 // Permission is hereby granted, free of charge, to any person obtaining a copy
00004 // of this software and associated documentation files (the "Software"), to deal
00005 // in the Software without restriction, including without limitation the rights
00006 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00007 // copies of the Software, and to permit persons to whom the Software is
00008 // furnished to do so, subject to the following conditions:
00009 //
00010 // The above copyright notice and this permission notice shall be included in
00011 // all copies or substantial portions of the Software.
00012 //
00013 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00014 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00015 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00016 // THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00017 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00018 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00019 //
00020 // Except as contained in this notice, the name(s) of the author(s) shall not be
00021 // used in advertising or otherwise to promote the sale, use or other dealings
00022 // in this Software without prior written authorization from the author(s).
00023 
00024 #include <kmediaplayer/player.h>
00025 #include <kmediaplayer/kmediaplayeradaptor_p.h>
00026 
00027 KMediaPlayer::Player::Player(QWidget *, const char *, QObject *parent)
00028     : KParts::ReadOnlyPart(parent)
00029     , currentLooping(false)
00030     , currentState(Empty)
00031     , d(0)
00032 {
00033     (void)new KMediaPlayerAdaptor(this);
00034 }
00035 
00036 KMediaPlayer::Player::Player(QObject *parent )
00037     : KParts::ReadOnlyPart(parent)
00038     , currentLooping(false)
00039     , currentState(Empty)
00040     , d(0)
00041 {
00042     (void)new KMediaPlayerAdaptor(this);
00043 }
00044 
00045 KMediaPlayer::Player::~Player(void)
00046 {
00047 }
00048 
00049 void KMediaPlayer::Player::setLooping(bool b)
00050 {
00051     if(b != currentLooping)
00052     {
00053         currentLooping = b;
00054         emit loopingChanged(b);
00055     }
00056 }
00057 
00058 bool KMediaPlayer::Player::isLooping(void) const
00059 {
00060     return currentLooping;
00061 }
00062 
00063 void KMediaPlayer::Player::setState(int s)
00064 {
00065     if(s != currentState)
00066     {
00067         currentState = (State)s;
00068         emit stateChanged(s);
00069     }
00070 }
00071 
00072 int KMediaPlayer::Player::state(void) const
00073 {
00074     return (int)currentState;
00075 }
00076 
00077 #include "player.moc"

KMediaPlayer

Skip menu "KMediaPlayer"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal