summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediawidget.h
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 2d92d65..0b9d826 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -10,48 +10,57 @@
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef MEDIAWIDGET_H 20#ifndef MEDIAWIDGET_H
21#define MEDIAWIDGET_H 21#define MEDIAWIDGET_H
22 22
23#include <qwidget.h> 23#include <qwidget.h>
24 24
25#include "mediaplayerstate.h" 25#include "mediaplayerstate.h"
26#include "playlistwidget.h" 26#include "playlistwidget.h"
27 27
28class MediaWidget : public QWidget 28class MediaWidget : public QWidget
29{ 29{
30 Q_OBJECT 30 Q_OBJECT
31public: 31public:
32 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; 32 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back };
33 33
34 struct Button
35 {
36// Button() : isToggle( false ), isHeld( false ), isDown( false ) {}
37
38 bool isToggle : 1;
39 bool isHeld : 1;
40 bool isDown : 1;
41 };
42
34 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); 43 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 );
35 virtual ~MediaWidget(); 44 virtual ~MediaWidget();
36 45
37public slots: 46public slots:
38 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; 47 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0;
39 virtual void setLength( long length ) = 0; 48 virtual void setLength( long length ) = 0;
40 virtual void setPlaying( bool playing ) = 0; 49 virtual void setPlaying( bool playing ) = 0;
41 50
42signals: 51signals:
43 void moreReleased(); 52 void moreReleased();
44 void lessReleased(); 53 void lessReleased();
45 void forwardReleased(); 54 void forwardReleased();
46 void backReleased(); 55 void backReleased();
47 56
48protected: 57protected:
49 virtual void closeEvent( QCloseEvent * ); 58 virtual void closeEvent( QCloseEvent * );
50 59
51 void handleCommand( Command command, bool buttonDown ); 60 void handleCommand( Command command, bool buttonDown );
52 61
53 MediaPlayerState &mediaPlayerState; 62 MediaPlayerState &mediaPlayerState;
54 PlayListWidget &playList; 63 PlayListWidget &playList;
55}; 64};
56 65
57#endif // MEDIAWIDGET_H 66#endif // MEDIAWIDGET_H