author | llornkcor <llornkcor> | 2002-12-05 00:24:55 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-12-05 00:24:55 (UTC) |
commit | 1763bcf5df7bf5564a88d41be88cbb882c85a7c0 (patch) (unidiff) | |
tree | 04165a4a1c31f84daa4a1aebeacc86da20e5662d | |
parent | 35d40e65116cee8b430cdc586db187f81488aa1d (diff) | |
download | opie-1763bcf5df7bf5564a88d41be88cbb882c85a7c0.zip opie-1763bcf5df7bf5564a88d41be88cbb882c85a7c0.tar.gz opie-1763bcf5df7bf5564a88d41be88cbb882c85a7c0.tar.bz2 |
trying to keep up with tronical.. just removed unused parameters.
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/om3u.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index b573c45..3d6428d 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -32,97 +32,97 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <qpe/qpeapplication.h> | 34 | #include <qpe/qpeapplication.h> |
35 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
36 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
37 | #include <opie/oticker.h> | 37 | #include <opie/oticker.h> |
38 | 38 | ||
39 | #include <qwidget.h> | 39 | #include <qwidget.h> |
40 | #include <qpixmap.h> | 40 | #include <qpixmap.h> |
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 | ||
53 | static const int xo = -2; // movable x offset | 53 | static const int xo = -2; // movable x offset |
54 | static const int yo = 22; // movable y offset | 54 | static const int yo = 22; // movable y offset |
55 | 55 | ||
56 | struct MediaButton { | 56 | struct MediaButton { |
57 | bool isToggle, isHeld, isDown; | 57 | bool isToggle, isHeld, isDown; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | //Layout information for the audioButtons (and if it is a toggle button or not) | 60 | //Layout information for the audioButtons (and if it is a toggle button or not) |
61 | MediaButton audioButtons[] = { | 61 | MediaButton audioButtons[] = { |
62 | { TRUE, FALSE, FALSE }, // play | 62 | { TRUE, FALSE, FALSE }, // play |
63 | { FALSE, FALSE, FALSE }, // stop | 63 | { FALSE, FALSE, FALSE }, // stop |
64 | { FALSE, FALSE, FALSE }, // next | 64 | { FALSE, FALSE, FALSE }, // next |
65 | { FALSE, FALSE, FALSE }, // previous | 65 | { FALSE, FALSE, FALSE }, // previous |
66 | { FALSE, FALSE, FALSE }, // volume up | 66 | { FALSE, FALSE, FALSE }, // volume up |
67 | { FALSE, FALSE, FALSE }, // volume down | 67 | { FALSE, FALSE, FALSE }, // volume down |
68 | { TRUE, FALSE, FALSE }, // repeat/loop | 68 | { TRUE, FALSE, FALSE }, // repeat/loop |
69 | { FALSE, FALSE, FALSE }, // playlist | 69 | { FALSE, FALSE, FALSE }, // playlist |
70 | { FALSE, FALSE, FALSE }, // forward | 70 | { FALSE, FALSE, FALSE }, // forward |
71 | { FALSE, FALSE, FALSE } // back | 71 | { FALSE, FALSE, FALSE } // back |
72 | }; | 72 | }; |
73 | 73 | ||
74 | const char * const skin_mask_file_names[10] = { | 74 | const char * const skin_mask_file_names[10] = { |
75 | "play", "stop", "next", "prev", "up", | 75 | "play", "stop", "next", "prev", "up", |
76 | "down", "loop", "playlist", "forward", "back" | 76 | "down", "loop", "playlist", "forward", "back" |
77 | }; | 77 | }; |
78 | 78 | ||
79 | 79 | ||
80 | static void changeTextColor( QWidget *w ) { | 80 | static void changeTextColor( QWidget * ) { |
81 | QPalette p = w->palette(); | 81 | QPalette p = w->palette(); |
82 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); | 82 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); |
83 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); | 83 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); |
84 | w->setPalette( p ); | 84 | w->setPalette( p ); |
85 | } | 85 | } |
86 | 86 | ||
87 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); | 87 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); |
88 | 88 | ||
89 | 89 | ||
90 | AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : | 90 | AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : |
91 | 91 | ||
92 | MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { | 92 | MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { |
93 | 93 | ||
94 | setCaption( tr("OpiePlayer") ); | 94 | setCaption( tr("OpiePlayer") ); |
95 | 95 | ||
96 | Config cfg("OpiePlayer"); | 96 | Config cfg("OpiePlayer"); |
97 | cfg.setGroup("Options"); | 97 | cfg.setGroup("Options"); |
98 | skin = cfg.readEntry("Skin","default"); | 98 | skin = cfg.readEntry("Skin","default"); |
99 | //skin = "scaleTest"; | 99 | //skin = "scaleTest"; |
100 | // color of background, frame, degree of transparency | 100 | // color of background, frame, degree of transparency |
101 | 101 | ||
102 | QString skinPath = "opieplayer2/skins/" + skin; | 102 | QString skinPath = "opieplayer2/skins/" + skin; |
103 | pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 103 | pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
104 | imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); | 104 | imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); |
105 | imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); | 105 | imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); |
106 | 106 | ||
107 | imgButtonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); | 107 | imgButtonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); |
108 | imgButtonMask.fill( 0 ); | 108 | imgButtonMask.fill( 0 ); |
109 | 109 | ||
110 | for ( int i = 0; i < 10; i++ ) { | 110 | for ( int i = 0; i < 10; i++ ) { |
111 | QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png" ); | 111 | QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png" ); |
112 | masks[i] = new QBitmap( filename ); | 112 | masks[i] = new QBitmap( filename ); |
113 | 113 | ||
114 | if ( !masks[i]->isNull() ) { | 114 | if ( !masks[i]->isNull() ) { |
115 | QImage imgMask = masks[i]->convertToImage(); | 115 | QImage imgMask = masks[i]->convertToImage(); |
116 | uchar **dest = imgButtonMask.jumpTable(); | 116 | uchar **dest = imgButtonMask.jumpTable(); |
117 | for ( int y = 0; y < imgUp.height(); y++ ) { | 117 | for ( int y = 0; y < imgUp.height(); y++ ) { |
118 | uchar *line = dest[y]; | 118 | uchar *line = dest[y]; |
119 | for ( int x = 0; x < imgUp.width(); x++ ) | 119 | for ( int x = 0; x < imgUp.width(); x++ ) |
120 | if ( !qRed( imgMask.pixel( x, y ) ) ) | 120 | if ( !qRed( imgMask.pixel( x, y ) ) ) |
121 | line[x] = i + 1; | 121 | line[x] = i + 1; |
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
125 | } | 125 | } |
126 | 126 | ||
127 | for ( int i = 0; i < 10; i++ ) { | 127 | for ( int i = 0; i < 10; i++ ) { |
128 | buttonPixUp[i] = 0l; | 128 | buttonPixUp[i] = 0l; |
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp index 4617c59..235d973 100644 --- a/noncore/multimedia/opieplayer2/om3u.cpp +++ b/noncore/multimedia/opieplayer2/om3u.cpp | |||
@@ -109,57 +109,57 @@ void Om3u::readPls() { //it's a pls file | |||
109 | if( name.left( 4 ) == "http" ) { | 109 | if( name.left( 4 ) == "http" ) { |
110 | name = s.right( s.length() - 7); | 110 | name = s.right( s.length() - 7); |
111 | } else { | 111 | } else { |
112 | name = s; | 112 | name = s; |
113 | } | 113 | } |
114 | name = name.right( name.length() - name.findRev( "\\", -1, TRUE) - 1 ); | 114 | name = name.right( name.length() - name.findRev( "\\", -1, TRUE) - 1 ); |
115 | if( s.at( s.length() - 4) == '.') // if this is probably a file | 115 | if( s.at( s.length() - 4) == '.') // if this is probably a file |
116 | append(s); | 116 | append(s); |
117 | else { //if its a url | 117 | else { //if its a url |
118 | // if( name.right( 1 ).find( '/' ) == -1) { | 118 | // if( name.right( 1 ).find( '/' ) == -1) { |
119 | // s += "/"; | 119 | // s += "/"; |
120 | // } | 120 | // } |
121 | append(s); | 121 | append(s); |
122 | } | 122 | } |
123 | } | 123 | } |
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
127 | void Om3u::write() { //writes list to m3u file | 127 | void Om3u::write() { //writes list to m3u file |
128 | QString list; | 128 | QString list; |
129 | if(count()>0) { | 129 | if(count()>0) { |
130 | for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { | 130 | for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { |
131 | // qDebug(*it); | 131 | // qDebug(*it); |
132 | list += *it+"\n"; | 132 | list += *it+"\n"; |
133 | } | 133 | } |
134 | f.writeBlock( list, list.length() ); | 134 | f.writeBlock( list, list.length() ); |
135 | } | 135 | } |
136 | // f.close(); | 136 | // f.close(); |
137 | } | 137 | } |
138 | 138 | ||
139 | void Om3u::add(const QString &filePath) { //adds to m3u file | 139 | void Om3u::add(const QString &filePath) { //adds to m3u file |
140 | append(filePath); | 140 | append(filePath); |
141 | } | 141 | } |
142 | 142 | ||
143 | void Om3u::remove(const QString &filePath) { //removes from m3u list | 143 | void Om3u::remove(const QString &filePath) { //removes from m3u list |
144 | QString list, currentFile; | 144 | QString list, currentFile; |
145 | if(count()>0) { | 145 | if(count()>0) { |
146 | for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { | 146 | for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { |
147 | currentFile=*it; | 147 | currentFile=*it; |
148 | // qDebug(*it); | 148 | // qDebug(*it); |
149 | 149 | ||
150 | if( filePath != currentFile) | 150 | if( filePath != currentFile) |
151 | list += currentFile+"\n"; | 151 | list += currentFile+"\n"; |
152 | } | 152 | } |
153 | f.writeBlock( list, list.length() ); | 153 | f.writeBlock( list, list.length() ); |
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
157 | void Om3u::deleteFile(const QString &filePath) {//deletes m3u file | 157 | void Om3u::deleteFile(const QString &/*filePath*/) {//deletes m3u file |
158 | f.close(); | 158 | f.close(); |
159 | f.remove(); | 159 | f.remove(); |
160 | 160 | ||
161 | } | 161 | } |
162 | 162 | ||
163 | void Om3u::close() { //closes m3u file | 163 | void Om3u::close() { //closes m3u file |
164 | f.close(); | 164 | f.close(); |
165 | } | 165 | } |