summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp13
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp12
2 files changed, 15 insertions, 10 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 8dbfb3d..7bf3a19 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -41,60 +41,63 @@
41#include <qbutton.h> 41#include <qbutton.h>
42#include <qpainter.h> 42#include <qpainter.h>
43#include <qframe.h> 43#include <qframe.h>
44#include <qlayout.h> 44#include <qlayout.h>
45#include <qdir.h> 45#include <qdir.h>
46#include <stdlib.h> 46#include <stdlib.h>
47#include <stdio.h> 47#include <stdio.h>
48 48
49#include "audiowidget.h" 49#include "audiowidget.h"
50#include "mediaplayerstate.h" 50#include "mediaplayerstate.h"
51#include "playlistwidget.h" 51#include "playlistwidget.h"
52 52
53static const int xo = -2; // movable x offset 53namespace
54static const int yo = 22; // movable y offset 54{
55
56const int xo = -2; // movable x offset
57const int yo = 22; // movable y offset
55 58
56struct MediaButton { 59struct MediaButton {
57 bool isToggle, isHeld, isDown; 60 bool isToggle, isHeld, isDown;
58}; 61};
59 62
60//Layout information for the audioButtons (and if it is a toggle button or not) 63//Layout information for the audioButtons (and if it is a toggle button or not)
61MediaButton audioButtons[] = { 64MediaButton audioButtons[] = {
62 { TRUE, FALSE, FALSE }, // play 65 { TRUE, FALSE, FALSE }, // play
63 { FALSE, FALSE, FALSE }, // stop 66 { FALSE, FALSE, FALSE }, // stop
64 { FALSE, FALSE, FALSE }, // next 67 { FALSE, FALSE, FALSE }, // next
65 { FALSE, FALSE, FALSE }, // previous 68 { FALSE, FALSE, FALSE }, // previous
66 { FALSE, FALSE, FALSE }, // volume up 69 { FALSE, FALSE, FALSE }, // volume up
67 { FALSE, FALSE, FALSE }, // volume down 70 { FALSE, FALSE, FALSE }, // volume down
68 { TRUE, FALSE, FALSE }, // repeat/loop 71 { TRUE, FALSE, FALSE }, // repeat/loop
69 { FALSE, FALSE, FALSE }, // playlist 72 { FALSE, FALSE, FALSE }, // playlist
70 { FALSE, FALSE, FALSE }, // forward 73 { FALSE, FALSE, FALSE }, // forward
71 { FALSE, FALSE, FALSE } // back 74 { FALSE, FALSE, FALSE } // back
72}; 75};
73 76
74const char * const skin_mask_file_names[10] = { 77const char * const skin_mask_file_names[10] = {
75 "play", "stop", "next", "prev", "up", 78 "play", "stop", "next", "prev", "up",
76 "down", "loop", "playlist", "forward", "back" 79 "down", "loop", "playlist", "forward", "back"
77}; 80};
78 81
79 82void changeTextColor( QWidget * w) {
80static void changeTextColor( QWidget * w) {
81 QPalette p = w->palette(); 83 QPalette p = w->palette();
82 p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); 84 p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) );
83 p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); 85 p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) );
84 w->setPalette( p ); 86 w->setPalette( p );
85} 87}
86 88
87static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); 89const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton));
88 90
91}
89 92
90AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : 93AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) :
91 94
92 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { 95 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) {
93 96
94 setCaption( tr("OpiePlayer") ); 97 setCaption( tr("OpiePlayer") );
95 98
96 Config cfg("OpiePlayer"); 99 Config cfg("OpiePlayer");
97 cfg.setGroup("Options"); 100 cfg.setGroup("Options");
98 skin = cfg.readEntry("Skin","default"); 101 skin = cfg.readEntry("Skin","default");
99 //skin = "scaleTest"; 102 //skin = "scaleTest";
100 // color of background, frame, degree of transparency 103 // color of background, frame, degree of transparency
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index b7305fe..a0aed62 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -44,50 +44,52 @@
44#include "videowidget.h" 44#include "videowidget.h"
45#include "mediaplayerstate.h" 45#include "mediaplayerstate.h"
46#include "playlistwidget.h" 46#include "playlistwidget.h"
47 47
48 48
49#ifdef Q_WS_QWS 49#ifdef Q_WS_QWS
50# define USE_DIRECT_PAINTER 50# define USE_DIRECT_PAINTER
51# include <qdirectpainter_qws.h> 51# include <qdirectpainter_qws.h>
52# include <qgfxraster_qws.h> 52# include <qgfxraster_qws.h>
53#endif 53#endif
54 54
55 55
56namespace
57{
56 58
57 59const int xo = 2; // movable x offset
58static const int xo = 2; // movable x offset 60const int yo = 0; // movable y offset
59static const int yo = 0; // movable y offset
60 61
61 62
62struct MediaButton { 63struct MediaButton {
63 bool isToggle, isHeld, isDown; 64 bool isToggle, isHeld, isDown;
64}; 65};
65 66
66MediaButton videoButtons[] = { 67MediaButton videoButtons[] = {
67 { FALSE, FALSE, FALSE }, // stop 68 { FALSE, FALSE, FALSE }, // stop
68 { TRUE, FALSE, FALSE }, // play 69 { TRUE, FALSE, FALSE }, // play
69 { FALSE, FALSE, FALSE }, // previous 70 { FALSE, FALSE, FALSE }, // previous
70 { FALSE, FALSE, FALSE }, // next 71 { FALSE, FALSE, FALSE }, // next
71 { FALSE, FALSE, FALSE }, // volUp 72 { FALSE, FALSE, FALSE }, // volUp
72 { FALSE, FALSE, FALSE }, // volDown 73 { FALSE, FALSE, FALSE }, // volDown
73 { TRUE, FALSE, FALSE } // fullscreen 74 { TRUE, FALSE, FALSE } // fullscreen
74}; 75};
75 76
76const char *skinV_mask_file_names[7] = { 77const char * const skinV_mask_file_names[7] = {
77"stop","play","back","fwd","up","down","full" 78"stop","play","back","fwd","up","down","full"
78}; 79};
79 80
80static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); 81const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton));
81 82
83}
82 84
83VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) 85VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
84 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) 86 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 )
85{ 87{
86 setCaption( tr("OpiePlayer - Video") ); 88 setCaption( tr("OpiePlayer - Video") );
87 89
88 videoFrame = new XineVideoWidget ( this, "Video frame" ); 90 videoFrame = new XineVideoWidget ( this, "Video frame" );
89 91
90 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); 92 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
91 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); 93 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
92 94
93 Config cfg("OpiePlayer"); 95 Config cfg("OpiePlayer");