summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiowidget.h
authorllornkcor <llornkcor>2002-11-03 21:45:32 (UTC)
committer llornkcor <llornkcor>2002-11-03 21:45:32 (UTC)
commitbf62b8f48d08f5a5e92681e1487a5f43d5c7a231 (patch) (side-by-side diff)
treef2a02844f411d874e9afd703c18b6ebd70d97172 /core/multimedia/opieplayer/audiowidget.h
parent5ba841a12e67b326833751ea502cf054e423114d (diff)
downloadopie-bf62b8f48d08f5a5e92681e1487a5f43d5c7a231.zip
opie-bf62b8f48d08f5a5e92681e1487a5f43d5c7a231.tar.gz
opie-bf62b8f48d08f5a5e92681e1487a5f43d5c7a231.tar.bz2
m3u stuff and op2 skins
Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.h') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.h73
1 files changed, 20 insertions, 53 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h
index b3d39bf..c686741 100644
--- a/core/multimedia/opieplayer/audiowidget.h
+++ b/core/multimedia/opieplayer/audiowidget.h
@@ -27,6 +27,9 @@
#include <qpixmap.h>
+#include <qbitmap.h>
#include <qstring.h>
#include <qslider.h>
+#include <qlineedit.h>
#include <qframe.h>
+#include <opie/oticker.h>
@@ -34,3 +37,2 @@ class QPixmap;
-
enum AudioButtons {
@@ -48,51 +50,3 @@ enum AudioButtons {
-#define USE_DBLBUF
-
-
-class Ticker : public QFrame {
- Q_OBJECT
-public:
- Ticker( QWidget* parent=0 ) : QFrame( parent ) {
- setFrameStyle( WinPanel | Sunken );
- setText( "No Song" );
- }
- ~Ticker() { }
- void setText( const QString& text ) {
- pos = 0; // reset it everytime the text is changed
- scrollText = text;
- pixelLen = fontMetrics().width( scrollText );
- killTimers();
- if ( pixelLen > width() )
- startTimer( 50 );
- update();
- }
-protected:
- void timerEvent( QTimerEvent * ) {
- pos = ( pos + 1 > pixelLen ) ? 0 : pos + 1;
-#ifndef USE_DBLBUF
- scroll( -1, 0, contentsRect() );
-#else
- repaint( FALSE );
-#endif
- }
- void drawContents( QPainter *p ) {
-#ifndef USE_DBLBUF
- for ( int i = 0; i - pos < width() && (i < 1 || pixelLen > width()); i += pixelLen )
- p->drawText( i - pos, 0, INT_MAX, height(), AlignVCenter, scrollText );
-#else
- // Double buffering code.
- // Looks like qvfb makes it look like it flickers but I don't think it really is
- QPixmap pm( width(), height() );
- pm.fill( colorGroup().base() );
- QPainter pmp( &pm );
- for ( int i = 0; i - pos < width() && (i < 1 || pixelLen > width()); i += pixelLen )
- pmp.drawText( i - pos, 0, INT_MAX, height(), AlignVCenter, scrollText );
- p->drawPixmap( 0, 0, pm );
-#endif
- }
-private:
- QString scrollText;
- int pos, pixelLen;
-};
-
+//#define USE_DBLBUF
@@ -103,3 +57,3 @@ public:
~AudioWidget();
- void setTickerText( const QString &text ) { songInfo->setText( text ); }
+ void setTickerText( const QString &text ) { songInfo.setText( text ); }
bool isStreaming;
@@ -128,2 +82,3 @@ protected:
void showEvent( QShowEvent *se );
+ void resizeEvent( QResizeEvent *re );
void mouseMoveEvent( QMouseEvent *event );
@@ -138,5 +93,17 @@ private:
void paintButton( QPainter *p, int i );
+ QString skin;
+ QPixmap *pixBg;
+ QImage *imgUp;
+ QImage *imgDn;
+ QImage *imgButtonMask;
+ QBitmap *masks[11];
+ QPixmap *buttonPixUp[11];
+ QPixmap *buttonPixDown[11];
+
QPixmap *pixmaps[4];
- Ticker *songInfo;
- QSlider *slider;
+ OTicker songInfo;
+ QSlider slider;
+ QLineEdit time;
+ int xoff, yoff;
+
};