summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-08 21:22:34 (UTC)
committer simon <simon>2002-12-08 21:22:34 (UTC)
commit10cf937a493866cfa0df9569f67c8cad25c62a5b (patch) (unidiff)
tree95719a27fb96ecb6c115f7816265a0377787db64
parenta78a8d830d81adc8c6e9b2131329d72aa0c18b55 (diff)
downloadopie-10cf937a493866cfa0df9569f67c8cad25c62a5b.zip
opie-10cf937a493866cfa0df9569f67c8cad25c62a5b.tar.gz
opie-10cf937a493866cfa0df9569f67c8cad25c62a5b.tar.bz2
- unused variables removed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp22
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h4
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp14
3 files changed, 1 insertions, 39 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 4172da0..7fb3781 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -47,58 +47,36 @@
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
53namespace 53namespace
54{ 54{
55 55
56const int xo = -2; // movable x offset 56const int xo = -2; // movable x offset
57const int yo = 22; // movable y offset 57const int yo = 22; // movable y offset
58 58
59struct MediaButton {
60 bool isToggle, isHeld, isDown;
61};
62
63//Layout information for the audioButtons (and if it is a toggle button or not)
64/*
65MediaWidget::Button audioButtons[] = {
66 { TRUE, FALSE, FALSE }, // play
67 { FALSE, FALSE, FALSE }, // stop
68 { FALSE, FALSE, FALSE }, // next
69 { FALSE, FALSE, FALSE }, // previous
70 { FALSE, FALSE, FALSE }, // volume up
71 { FALSE, FALSE, FALSE }, // volume down
72 { TRUE, FALSE, FALSE }, // repeat/loop
73 { FALSE, FALSE, FALSE }, // playlist
74 { FALSE, FALSE, FALSE }, // forward
75 { FALSE, FALSE, FALSE } // back
76};
77*/
78
79const char * const skin_mask_file_names[10] = { 59const char * const skin_mask_file_names[10] = {
80 "play", "stop", "next", "prev", "up", 60 "play", "stop", "next", "prev", "up",
81 "down", "loop", "playlist", "forward", "back" 61 "down", "loop", "playlist", "forward", "back"
82}; 62};
83 63
84void changeTextColor( QWidget * w) { 64void changeTextColor( QWidget * w) {
85 QPalette p = w->palette(); 65 QPalette p = w->palette();
86 p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); 66 p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) );
87 p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); 67 p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) );
88 w->setPalette( p ); 68 w->setPalette( p );
89} 69}
90 70
91//const int numButtons = (sizeof(audioButtons)/sizeof(MediaWidget::Button));
92
93} 71}
94 72
95AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : 73AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) :
96 74
97 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { 75 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) {
98 76
99 Button defaultButton; 77 Button defaultButton;
100 defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false; 78 defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false;
101 Button toggleButton; 79 Button toggleButton;
102 toggleButton.isToggle = true; 80 toggleButton.isToggle = true;
103 toggleButton.isHeld = toggleButton.isDown = false; 81 toggleButton.isHeld = toggleButton.isDown = false;
104 82
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 9cb75ae..8b0d48c 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -26,27 +26,25 @@
26#include "playlistwidget.h" 26#include "playlistwidget.h"
27 27
28#include <vector> 28#include <vector>
29 29
30class MediaWidget : public QWidget 30class MediaWidget : public QWidget
31{ 31{
32 Q_OBJECT 32 Q_OBJECT
33public: 33public:
34 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; 34 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back };
35 35
36 struct Button 36 struct Button
37 { 37 {
38 //Button() : isToggle( false ), isHeld( false ), isDown( false ) {} 38 Button() : isToggle( false ), isHeld( false ), isDown( false ) {}
39// Button( bool toggle, bool held, bool down )
40// : isToggle( toggle ), isHeld( held ), isDown( down ) {}
41 39
42 bool isToggle : 1; 40 bool isToggle : 1;
43 bool isHeld : 1; 41 bool isHeld : 1;
44 bool isDown : 1; 42 bool isDown : 1;
45 }; 43 };
46 typedef std::vector<Button> ButtonVector; 44 typedef std::vector<Button> ButtonVector;
47 45
48 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); 46 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 );
49 virtual ~MediaWidget(); 47 virtual ~MediaWidget();
50 48
51public slots: 49public slots:
52 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; 50 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0;
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index efd756c..6e2e03e 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -50,42 +50,28 @@
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 56namespace
57{ 57{
58 58
59const int xo = 2; // movable x offset 59const int xo = 2; // movable x offset
60const int yo = 0; // movable y offset 60const int yo = 0; // movable y offset
61 61
62/*
63MediaWidget::Button videoButtons[] = {
64 { FALSE, FALSE, FALSE }, // stop
65 { TRUE, FALSE, FALSE }, // play
66 { FALSE, FALSE, FALSE }, // previous
67 { FALSE, FALSE, FALSE }, // next
68 { FALSE, FALSE, FALSE }, // volUp
69 { FALSE, FALSE, FALSE }, // volDown
70 { TRUE, FALSE, FALSE } // fullscreen
71};
72*/
73
74const char * const skinV_mask_file_names[7] = { 62const char * const skinV_mask_file_names[7] = {
75"stop","play","back","fwd","up","down","full" 63"stop","play","back","fwd","up","down","full"
76}; 64};
77 65
78//const int numVButtons = (sizeof(videoButtons)/sizeof(MediaWidget::Button));
79
80} 66}
81 67
82VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) 68VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
83 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) 69 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 )
84{ 70{
85 setCaption( tr("OpiePlayer - Video") ); 71 setCaption( tr("OpiePlayer - Video") );
86 72
87 Button defaultButton; 73 Button defaultButton;
88 defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false; 74 defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false;
89 Button toggleButton; 75 Button toggleButton;
90 toggleButton.isToggle = true; 76 toggleButton.isToggle = true;
91 toggleButton.isHeld = toggleButton.isDown = false; 77 toggleButton.isHeld = toggleButton.isDown = false;