Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h index 53e84b3..a2850aa 100644 --- a/core/multimedia/opieplayer/audiowidget.h +++ b/core/multimedia/opieplayer/audiowidget.h | |||
@@ -83,61 +83,62 @@ protected: | |||
83 | // Looks like qvfb makes it look like it flickers but I don't think it really is | 83 | // Looks like qvfb makes it look like it flickers but I don't think it really is |
84 | QPixmap pm( width(), height() ); | 84 | QPixmap pm( width(), height() ); |
85 | pm.fill( colorGroup().base() ); | 85 | pm.fill( colorGroup().base() ); |
86 | QPainter pmp( &pm ); | 86 | QPainter pmp( &pm ); |
87 | for ( int i = 0; i - pos < width() && (i < 1 || pixelLen > width()); i += pixelLen ) | 87 | for ( int i = 0; i - pos < width() && (i < 1 || pixelLen > width()); i += pixelLen ) |
88 | pmp.drawText( i - pos, 0, INT_MAX, height(), AlignVCenter, scrollText ); | 88 | pmp.drawText( i - pos, 0, INT_MAX, height(), AlignVCenter, scrollText ); |
89 | p->drawPixmap( 0, 0, pm ); | 89 | p->drawPixmap( 0, 0, pm ); |
90 | #endif | 90 | #endif |
91 | } | 91 | } |
92 | private: | 92 | private: |
93 | QString scrollText; | 93 | QString scrollText; |
94 | int pos, pixelLen; | 94 | int pos, pixelLen; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | 97 | ||
98 | class AudioWidget : public QWidget { | 98 | class AudioWidget : public QWidget { |
99 | Q_OBJECT | 99 | Q_OBJECT |
100 | public: | 100 | public: |
101 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 101 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
102 | ~AudioWidget(); | 102 | ~AudioWidget(); |
103 | void setTickerText( const QString &text ) { songInfo->setText( text ); } | 103 | void setTickerText( const QString &text ) { songInfo->setText( text ); } |
104 | 104 | ||
105 | public slots: | 105 | public slots: |
106 | void updateSlider( long, long ); | 106 | void updateSlider( long, long ); |
107 | void sliderPressed( ); | 107 | void sliderPressed( ); |
108 | void sliderReleased( ); | 108 | void sliderReleased( ); |
109 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } | 109 | void setPaused( bool b) { setToggleButton( AudioPause, b ); } |
110 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 110 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
111 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 111 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
112 | void setPosition( long ); | 112 | void setPosition( long ); |
113 | void setLength( long ); | 113 | void setLength( long ); |
114 | void setView( char ); | 114 | void setView( char ); |
115 | 115 | ||
116 | signals: | 116 | signals: |
117 | void moreClicked(); | 117 | void moreClicked(); |
118 | void lessClicked(); | 118 | void lessClicked(); |
119 | void moreReleased(); | 119 | void moreReleased(); |
120 | void lessReleased(); | 120 | void lessReleased(); |
121 | void sliderMoved(long); | 121 | void sliderMoved(long); |
122 | 122 | ||
123 | protected: | 123 | protected: |
124 | void paintEvent( QPaintEvent *pe ); | 124 | void paintEvent( QPaintEvent *pe ); |
125 | void showEvent( QShowEvent *se ); | 125 | void showEvent( QShowEvent *se ); |
126 | void mouseMoveEvent( QMouseEvent *event ); | 126 | void mouseMoveEvent( QMouseEvent *event ); |
127 | void mousePressEvent( QMouseEvent *event ); | 127 | void mousePressEvent( QMouseEvent *event ); |
128 | void mouseReleaseEvent( QMouseEvent *event ); | 128 | void mouseReleaseEvent( QMouseEvent *event ); |
129 | void timerEvent( QTimerEvent *event ); | 129 | void timerEvent( QTimerEvent *event ); |
130 | void closeEvent( QCloseEvent *event ); | 130 | void closeEvent( QCloseEvent *event ); |
131 | void keyReleaseEvent( QKeyEvent *e); | ||
131 | 132 | ||
132 | private: | 133 | private: |
133 | void toggleButton( int ); | 134 | void toggleButton( int ); |
134 | void setToggleButton( int, bool ); | 135 | void setToggleButton( int, bool ); |
135 | void paintButton( QPainter *p, int i ); | 136 | void paintButton( QPainter *p, int i ); |
136 | QPixmap *pixmaps[4]; | 137 | QPixmap *pixmaps[4]; |
137 | Ticker *songInfo; | 138 | Ticker *songInfo; |
138 | QSlider *slider; | 139 | QSlider *slider; |
139 | }; | 140 | }; |
140 | 141 | ||
141 | 142 | ||
142 | #endif // AUDIO_WIDGET_H | 143 | #endif // AUDIO_WIDGET_H |
143 | 144 | ||