-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 3ebec5b..9bc924d 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -1,107 +1,107 @@ | |||
1 | #ifndef AUDIO_WIDGET_H | 1 | #ifndef AUDIO_WIDGET_H |
2 | #define AUDIO_WIDGET_H | 2 | #define AUDIO_WIDGET_H |
3 | 3 | ||
4 | #include <qwidget.h> | 4 | #include <qwidget.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qdrawutil.h> | 6 | #include <qdrawutil.h> |
7 | #include <qpixmap.h> | 7 | #include <qpixmap.h> |
8 | #include <qstring.h> | 8 | #include <qstring.h> |
9 | #include <qslider.h> | 9 | #include <qslider.h> |
10 | #include <qframe.h> | 10 | #include <qframe.h> |
11 | 11 | ||
12 | 12 | ||
13 | class QPixmap; | 13 | class QPixmap; |
14 | 14 | ||
15 | enum AudioButtons { | 15 | enum AudioButtons { |
16 | AudioPlay=0, | 16 | AudioPlay=0, |
17 | AudioStop, | 17 | AudioStop, |
18 | AudioPause, | 18 | AudioPause, |
19 | AudioNext, | 19 | AudioNext, |
20 | AudioPrevious, | 20 | AudioPrevious, |
21 | AudioVolumeUp, | 21 | AudioVolumeUp, |
22 | AudioVolumeDown, | 22 | AudioVolumeDown, |
23 | AudioLoop, | 23 | AudioLoop, |
24 | AudioPlayList | 24 | AudioPlayList |
25 | }; | 25 | }; |
26 | 26 | ||
27 | 27 | ||
28 | //#define USE_DBLBUF | 28 | //#define USE_DBLBUF |
29 | 29 | ||
30 | 30 | ||
31 | class Ticker : public QFrame { | 31 | class Ticker : public QFrame { |
32 | Q_OBJECT | 32 | Q_OBJECT |
33 | 33 | ||
34 | public: | 34 | public: |
35 | Ticker( QWidget* parent=0 ); | 35 | Ticker( QWidget* parent=0 ); |
36 | ~Ticker(); | 36 | ~Ticker(); |
37 | void setText( const QString& text ) ; | 37 | void setText( const QString& text ) ; |
38 | 38 | ||
39 | protected: | 39 | protected: |
40 | void timerEvent( QTimerEvent * ); | 40 | void timerEvent( QTimerEvent * ); |
41 | void drawContents( QPainter *p ); | 41 | void drawContents( QPainter *p ); |
42 | private: | 42 | private: |
43 | QString scrollText; | 43 | QString scrollText; |
44 | int pos, pixelLen; | 44 | int pos, pixelLen; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | 47 | ||
48 | class AudioWidget : public QWidget { | 48 | class AudioWidget : public QWidget { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 51 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
52 | ~AudioWidget(); | 52 | ~AudioWidget(); |
53 | void setTickerText( const QString &text ) { songInfo->setText( text ); } | 53 | void setTickerText( const QString &text ) { songInfo.setText( text ); } |
54 | bool isStreaming; | 54 | bool isStreaming; |
55 | public slots: | 55 | public slots: |
56 | void updateSlider( long, long ); | 56 | void updateSlider( long, long ); |
57 | void sliderPressed( ); | 57 | void sliderPressed( ); |
58 | void sliderReleased( ); | 58 | void sliderReleased( ); |
59 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } | 59 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } |
60 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 60 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
61 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 61 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
62 | void setPosition( long ); | 62 | void setPosition( long ); |
63 | void setLength( long ); | 63 | void setLength( long ); |
64 | void setView( char ); | 64 | void setView( char ); |
65 | 65 | ||
66 | signals: | 66 | signals: |
67 | void moreClicked(); | 67 | void moreClicked(); |
68 | void lessClicked(); | 68 | void lessClicked(); |
69 | void moreReleased(); | 69 | void moreReleased(); |
70 | void lessReleased(); | 70 | void lessReleased(); |
71 | void sliderMoved(long); | 71 | void sliderMoved(long); |
72 | 72 | ||
73 | protected: | 73 | protected: |
74 | void doBlank(); | 74 | void doBlank(); |
75 | void doUnblank(); | 75 | void doUnblank(); |
76 | void paintEvent( QPaintEvent *pe ); | 76 | void paintEvent( QPaintEvent *pe ); |
77 | void showEvent( QShowEvent *se ); | 77 | void showEvent( QShowEvent *se ); |
78 | void resizeEvent( QResizeEvent *re ); | 78 | void resizeEvent( QResizeEvent *re ); |
79 | void mouseMoveEvent( QMouseEvent *event ); | 79 | void mouseMoveEvent( QMouseEvent *event ); |
80 | void mousePressEvent( QMouseEvent *event ); | 80 | void mousePressEvent( QMouseEvent *event ); |
81 | void mouseReleaseEvent( QMouseEvent *event ); | 81 | void mouseReleaseEvent( QMouseEvent *event ); |
82 | void timerEvent( QTimerEvent *event ); | 82 | void timerEvent( QTimerEvent *event ); |
83 | void closeEvent( QCloseEvent *event ); | 83 | void closeEvent( QCloseEvent *event ); |
84 | void keyReleaseEvent( QKeyEvent *e); | 84 | void keyReleaseEvent( QKeyEvent *e); |
85 | private: | 85 | private: |
86 | void toggleButton( int ); | 86 | void toggleButton( int ); |
87 | void setToggleButton( int, bool ); | 87 | void setToggleButton( int, bool ); |
88 | void paintButton( QPainter *p, int i ); | 88 | void paintButton( QPainter *p, int i ); |
89 | QString skin; | 89 | QString skin; |
90 | QPixmap *pixBg; | 90 | QPixmap *pixBg; |
91 | QImage *imgUp; | 91 | QImage *imgUp; |
92 | QImage *imgDn; | 92 | QImage *imgDn; |
93 | QImage *imgButtonMask; | 93 | QImage *imgButtonMask; |
94 | QBitmap *masks[11]; | 94 | QBitmap *masks[11]; |
95 | QPixmap *buttonPixUp[11]; | 95 | QPixmap *buttonPixUp[11]; |
96 | QPixmap *buttonPixDown[11]; | 96 | QPixmap *buttonPixDown[11]; |
97 | 97 | ||
98 | QPixmap *pixmaps[4]; | 98 | QPixmap *pixmaps[4]; |
99 | Ticker songInfo; | 99 | Ticker songInfo; |
100 | QSlider slider; | 100 | QSlider slider; |
101 | QLineEdit time; | 101 | QLineEdit time; |
102 | int xoff, yoff; | 102 | int xoff, yoff; |
103 | }; | 103 | }; |
104 | 104 | ||
105 | 105 | ||
106 | #endif // AUDIO_WIDGET_H | 106 | #endif // AUDIO_WIDGET_H |
107 | 107 | ||