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

interfaces

  • interfaces
  • tdemediaplayer
player.h
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#ifndef KMEDIAPLAYERPLAYER_H
25#define KMEDIAPLAYERPLAYER_H
26
27#include <tdeparts/part.h>
28#include <tdemediaplayer/playerdcopobject.h>
29#include <tdemediaplayer/view.h>
30
33namespace KMediaPlayer
34{
35
46class TDE_EXPORT Player : public KParts::ReadOnlyPart, public PlayerDCOPObject
47{
48TQ_OBJECT
49
50public:
54 Player(TQObject *parent, const char *name);
55
59 Player(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name);
60
61 virtual ~Player(void);
62
66 virtual View *view(void) = 0;
67
68public slots:
70 virtual void pause(void) = 0;
71
73 virtual void play(void) = 0;
74
76 virtual void stop(void) = 0;
77
82 virtual void seek(unsigned long msec) = 0;
83public:
85 virtual bool isSeekable(void) const = 0;
86
88 virtual unsigned long position(void) const = 0;
89
92 virtual bool hasLength(void) const = 0;
93
95 virtual unsigned long length(void) const = 0;
96
97public slots:
101 void setLooping(bool);
102public:
104 bool isLooping(void) const;
105signals:
107 void loopingChanged(bool);
108
109public:
111 enum State
112 {
114 Empty,
116 Stop,
118 Pause,
120 Play
121 };
123 int state(void) const;
124signals:
126 void stateChanged(int);
127
128protected slots:
131 void setState(int);
132
133private:
134 bool currentLooping;
135 State currentState;
136
137 struct Data;
138 Data *d;
139};
140
141}
142
143#endif
KMediaPlayer::Player
Player is the center of the KMediaPlayer interface.
Definition: player.h:47
KMediaPlayer::Player::loopingChanged
void loopingChanged(bool)
Emitted when the looping state is changed.
KMediaPlayer::Player::position
virtual unsigned long position(void) const =0
Returns the current playback position in the track.
KMediaPlayer::Player::isSeekable
virtual bool isSeekable(void) const =0
Returns whether the current track honors seek requests.
KMediaPlayer::Player::pause
virtual void pause(void)=0
Pause playback of the media track.
KMediaPlayer::Player::State
State
The possible states of the Player.
Definition: player.h:112
KMediaPlayer::Player::Stop
@ Stop
Not playing.
Definition: player.h:116
KMediaPlayer::Player::Empty
@ Empty
No track is loaded.
Definition: player.h:114
KMediaPlayer::Player::Pause
@ Pause
Playing is temporarily suspended.
Definition: player.h:118
KMediaPlayer::Player::play
virtual void play(void)=0
Begin playing the media track.
KMediaPlayer::Player::seek
virtual void seek(unsigned long msec)=0
Move the current playback position to the specified time in milliseconds, if the track is seekable.
KMediaPlayer::Player::stop
virtual void stop(void)=0
Stop playback of the media track and return to the beginning.
KMediaPlayer::Player::stateChanged
void stateChanged(int)
Emitted when the state changes.
KMediaPlayer::Player::view
virtual View * view(void)=0
A convenience function returning a pointer to the View for this Player, or 0 if this Player has no GU...
KMediaPlayer::Player::hasLength
virtual bool hasLength(void) const =0
Returns whether the current track has a length.
KMediaPlayer::Player::length
virtual unsigned long length(void) const =0
Returns the length of the current track.
KMediaPlayer::View
View is part of the user interface of a Player.
Definition: tdemediaplayer/view.h:35
KParts::ReadOnlyPart
KMediaPlayer
KMediaPlayer contains an interface to reusable media player components.
Definition: player.h:34

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.4
This website is maintained by Timothy Pearson.