• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • interfaces
 

interfaces

  • interfaces
  • tdemediaplayer
player.cpp
1 // Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 //
20 // Except as contained in this notice, the name(s) of the author(s) shall not be
21 // used in advertising or otherwise to promote the sale, use or other dealings
22 // in this Software without prior written authorization from the author(s).
23 
24 #include <tdemediaplayer/player.h>
25 
26 KMediaPlayer::PlayerDCOPObject::PlayerDCOPObject(void)
27  : DCOPObject("KMediaPlayer")
28 {
29 }
30 
31 KMediaPlayer::Player::Player(TQWidget *, const char *, TQObject *parent, const char *name)
32  : KParts::ReadOnlyPart(parent, name)
33  , currentLooping(false)
34  , currentState(Empty)
35  , d(0)
36 {
37 }
38 
39 KMediaPlayer::Player::Player(TQObject *parent, const char *name)
40  : KParts::ReadOnlyPart(parent, name)
41  , currentLooping(false)
42  , currentState(Empty)
43  , d(0)
44 {
45 }
46 
47 KMediaPlayer::Player::~Player(void)
48 {
49 }
50 
51 void KMediaPlayer::Player::setLooping(bool b)
52 {
53  if(b != currentLooping)
54  {
55  currentLooping = b;
56  emit loopingChanged(b);
57  }
58 }
59 
60 bool KMediaPlayer::Player::isLooping(void) const
61 {
62  return currentLooping;
63 }
64 
65 void KMediaPlayer::Player::setState(int s)
66 {
67  if(s != currentState)
68  {
69  currentState = (State)s;
70  emit stateChanged(s);
71  }
72 }
73 
74 int KMediaPlayer::Player::state(void) const
75 {
76  return (int)currentState;
77 }
78 
79 #include "player.moc"
DCOPObject
KMediaPlayer::Player::isLooping
bool isLooping(void) const
Return the current looping state.
Definition: player.cpp:60
KMediaPlayer::Player::setState
void setState(int)
Implementers use this to control what users see as the current state.
Definition: player.cpp:65
KMediaPlayer::Player::State
State
The possible states of the Player.
Definition: player.h:112
KMediaPlayer::Player::setLooping
void setLooping(bool)
Set whether the Player should continue playing at the beginning of the track when the end of the trac...
Definition: player.cpp:51
KMediaPlayer::Player::Player
Player(TQObject *parent, const char *name)
This constructor is what to use when no GUI is required, as in the case of a KMediaPlayer/Engine.
Definition: player.cpp:39
KMediaPlayer::Player::state
int state(void) const
Return the current state of the player.
Definition: player.cpp:74
KParts

interfaces

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

interfaces

Skip menu "interfaces"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for interfaces by doxygen 1.9.1
This website is maintained by Timothy Pearson.