summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h6
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 73ce1e5..332fb4b 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -70,48 +70,42 @@ public:
70 70
71signals: 71signals:
72 void moreClicked(); 72 void moreClicked();
73 void lessClicked(); 73 void lessClicked();
74 void forwardClicked(); 74 void forwardClicked();
75 void backClicked(); 75 void backClicked();
76 void sliderMoved(long); 76 void sliderMoved(long);
77 77
78protected: 78protected:
79 void doBlank(); 79 void doBlank();
80 void doUnblank(); 80 void doUnblank();
81 void paintEvent( QPaintEvent *pe ); 81 void paintEvent( QPaintEvent *pe );
82 void showEvent( QShowEvent *se ); 82 void showEvent( QShowEvent *se );
83 void resizeEvent( QResizeEvent *re ); 83 void resizeEvent( QResizeEvent *re );
84 void mouseMoveEvent( QMouseEvent *event ); 84 void mouseMoveEvent( QMouseEvent *event );
85 void mousePressEvent( QMouseEvent *event ); 85 void mousePressEvent( QMouseEvent *event );
86 void mouseReleaseEvent( QMouseEvent *event ); 86 void mouseReleaseEvent( QMouseEvent *event );
87 void timerEvent( QTimerEvent *event ); 87 void timerEvent( QTimerEvent *event );
88 void keyReleaseEvent( QKeyEvent *e); 88 void keyReleaseEvent( QKeyEvent *e);
89private slots: 89private slots:
90 void skipFor(); 90 void skipFor();
91 void skipBack(); 91 void skipBack();
92 void stopSkip(); 92 void stopSkip();
93private: 93private:
94 typedef std::vector<QBitmap> MaskVector;
95 typedef std::vector<QPixmap> PixmapVector;
96
97 void setToggleButton( int, bool ); 94 void setToggleButton( int, bool );
98 virtual void paintButton( QPainter &p, int i ); 95 virtual void paintButton( QPainter &p, int i );
99 int skipDirection; 96 int skipDirection;
100 QString skin; 97 QString skin;
101 QPixmap pixBg; 98 QPixmap pixBg;
102 QImage imgUp; 99 QImage imgUp;
103 QImage imgDn; 100 QImage imgDn;
104 MaskVector masks;
105 PixmapVector buttonPixUp;
106 PixmapVector buttonPixDown;
107 101
108 OTicker songInfo; 102 OTicker songInfo;
109 QSlider slider; 103 QSlider slider;
110 QLineEdit time; 104 QLineEdit time;
111 bool isStreaming : 1; 105 bool isStreaming : 1;
112 bool audioSliderBeingMoved : 1; 106 bool audioSliderBeingMoved : 1;
113}; 107};
114 108
115 109
116#endif // AUDIO_WIDGET_H 110#endif // AUDIO_WIDGET_H
117 111
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 9fb3499..2641df6 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -33,63 +33,70 @@
33class MediaWidget : public QWidget 33class MediaWidget : public QWidget
34{ 34{
35 Q_OBJECT 35 Q_OBJECT
36public: 36public:
37 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; 37 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back };
38 enum ButtonType { NormalButton, ToggleButton }; 38 enum ButtonType { NormalButton, ToggleButton };
39 39
40 struct Button 40 struct Button
41 { 41 {
42 Button() : type( NormalButton ), isHeld( false ), isDown( false ) {} 42 Button() : type( NormalButton ), isHeld( false ), isDown( false ) {}
43 43
44 ButtonType type : 1; 44 ButtonType type : 1;
45 bool isHeld : 1; 45 bool isHeld : 1;
46 bool isDown : 1; 46 bool isDown : 1;
47 }; 47 };
48 typedef std::vector<Button> ButtonVector; 48 typedef std::vector<Button> ButtonVector;
49 49
50 struct SkinButtonInfo 50 struct SkinButtonInfo
51 { 51 {
52 Command command; 52 Command command;
53 const char *fileName; 53 const char *fileName;
54 ButtonType type; 54 ButtonType type;
55 }; 55 };
56 56
57 typedef std::vector<QBitmap> MaskVector;
58 typedef std::vector<QPixmap> PixmapVector;
59
57 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); 60 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 );
58 virtual ~MediaWidget(); 61 virtual ~MediaWidget();
59 62
60public slots: 63public slots:
61 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; 64 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0;
62 virtual void setLength( long length ) = 0; 65 virtual void setLength( long length ) = 0;
63 virtual void setPlaying( bool playing ) = 0; 66 virtual void setPlaying( bool playing ) = 0;
64 67
65signals: 68signals:
66 void moreReleased(); 69 void moreReleased();
67 void lessReleased(); 70 void lessReleased();
68 void forwardReleased(); 71 void forwardReleased();
69 void backReleased(); 72 void backReleased();
70 73
71protected: 74protected:
72 virtual void closeEvent( QCloseEvent * ); 75 virtual void closeEvent( QCloseEvent * );
73 76
74 void handleCommand( Command command, bool buttonDown ); 77 void handleCommand( Command command, bool buttonDown );
75 78
76 bool isOverButton( const QPoint &position, int buttonId ) const; 79 bool isOverButton( const QPoint &position, int buttonId ) const;
77 80
78 void paintButton( int buttonId ); 81 void paintButton( int buttonId );
79 virtual void paintButton( QPainter &p, int i ) = 0; 82 virtual void paintButton( QPainter &p, int i ) = 0;
80 83
81 void toggleButton( int buttonId ); 84 void toggleButton( int buttonId );
82 85
83 MediaPlayerState &mediaPlayerState; 86 MediaPlayerState &mediaPlayerState;
84 PlayListWidget &playList; 87 PlayListWidget &playList;
85 88
86 ButtonVector buttons; 89 ButtonVector buttons;
87 90
88 QImage buttonMask; 91 QImage buttonMask;
89 92
93 MaskVector masks;
94 PixmapVector buttonPixUp;
95 PixmapVector buttonPixDown;
96
90 QPoint upperLeftOfButtonMask; 97 QPoint upperLeftOfButtonMask;
91}; 98};
92 99
93#endif // MEDIAWIDGET_H 100#endif // MEDIAWIDGET_H
94/* vim: et sw=4 ts=4 101/* vim: et sw=4 ts=4
95 */ 102 */