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

interfaces

  • interfaces
  • kmediaplayer
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 <kparts/part.h>
28 #include <kmediaplayer/playerdcopobject.h>
29 #include <kmediaplayer/view.h>
30 
33 namespace KMediaPlayer
34 {
35 
46 class KDE_EXPORT Player : public KParts::ReadOnlyPart, public PlayerDCOPObject
47 {
48 Q_OBJECT
49 
50 public:
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 
68 public 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;
83 public:
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 
97 public slots:
101  void setLooping(bool);
102 public:
104  bool isLooping(void) const;
105 signals:
107  void loopingChanged(bool);
108 
109 public:
111  enum State
112  {
114  Empty,
116  Stop,
118  Pause,
120  Play
121  };
123  int state(void) const;
124 signals:
126  void stateChanged(int);
127 
128 protected slots:
131  void setState(int);
132 
133 private:
134  bool currentLooping;
135  State currentState;
136 
137  struct Data;
138  Data *d;
139 };
140 
141 }
142 
143 #endif
KMediaPlayer::View
View is part of the user interface of a Player.
Definition: kmediaplayer/view.h:34
KMediaPlayer::Player::Stop
Not playing.
Definition: player.h:116
KMediaPlayer::Player::Empty
No track is loaded.
Definition: player.h:114
KMediaPlayer
KMediaPlayer contains an interface to reusable media player components.
Definition: player.h:33
KMediaPlayer::Player::Pause
Playing is temporarily suspended.
Definition: player.h:118
KMediaPlayer::Player
Player is the center of the KMediaPlayer interface.
Definition: player.h:46
KMediaPlayer::Player::State
State
The possible states of the Player.
Definition: player.h:111
KParts::ReadOnlyPart

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
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for interfaces by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |