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.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 52b9fcb..0d635aa 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -34,24 +34,26 @@
34 34
35namespace 35namespace
36{ 36{
37 struct simpleAndStupidAllocator 37 struct simpleAndStupidAllocator
38 { 38 {
39 static void *allocate( size_t amount ) 39 static void *allocate( size_t amount )
40 { return ::operator new( amount ); } 40 { return ::operator new( amount ); }
41 static void deallocate( void *p, size_t ) 41 static void deallocate( void *p, size_t )
42 { ::operator delete( p ); } 42 { ::operator delete( p ); }
43 }; 43 };
44} 44}
45 45
46class Skin;
47
46class MediaWidget : public QWidget 48class MediaWidget : public QWidget
47{ 49{
48 Q_OBJECT 50 Q_OBJECT
49public: 51public:
50 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined }; 52 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined };
51 enum ButtonType { NormalButton, ToggleButton }; 53 enum ButtonType { NormalButton, ToggleButton };
52 54
53 struct Button 55 struct Button
54 { 56 {
55 Button() : command( Undefined ), type( NormalButton ), isDown( false ) {} 57 Button() : command( Undefined ), type( NormalButton ), isDown( false ) {}
56 58
57 Command command; 59 Command command;
@@ -91,27 +93,27 @@ public slots:
91signals: 93signals:
92 void moreReleased(); 94 void moreReleased();
93 void lessReleased(); 95 void lessReleased();
94 void forwardReleased(); 96 void forwardReleased();
95 void backReleased(); 97 void backReleased();
96 void forwardClicked(); 98 void forwardClicked();
97 void backClicked(); 99 void backClicked();
98 void moreClicked(); 100 void moreClicked();
99 void lessClicked(); 101 void lessClicked();
100 102
101protected: 103protected:
102 void setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount, 104 void setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
103 const QString &imagePrefix, const QSize &buttonAreaSize ); 105 const Skin &skin, const QSize &buttonAreaSize );
104 Button setupButton( const SkinButtonInfo &buttonInfo, const QString &imagePrefix ); 106 Button setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin );
105 QBitmap setupButtonMask( const Command &command, const QString &fileName ); 107 QBitmap setupButtonMask( const Command &command, const QImage &maskImage );
106 108
107 void loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix = QString::null ); 109 void loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix = QString::null );
108 void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ); 110 void loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix );
109 111
110 virtual void closeEvent( QCloseEvent * ); 112 virtual void closeEvent( QCloseEvent * );
111 113
112 virtual void paintEvent( QPaintEvent *pe ); 114 virtual void paintEvent( QPaintEvent *pe );
113 115
114 Button *buttonAt( const QPoint &position ); 116 Button *buttonAt( const QPoint &position );
115 117
116 virtual void mousePressEvent( QMouseEvent *event ); 118 virtual void mousePressEvent( QMouseEvent *event );
117 virtual void mouseReleaseEvent( QMouseEvent *event ); 119 virtual void mouseReleaseEvent( QMouseEvent *event );