summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2
authorsimon <simon>2002-12-08 20:36:14 (UTC)
committer simon <simon>2002-12-08 20:36:14 (UTC)
commit7c3bd0be34ef70a2297e6f27c592da62f3010da5 (patch) (side-by-side diff)
treec73aaf583ef2b9f56f544f580b52145aca356e84 /noncore/multimedia/opieplayer2
parentec91b042d8312f83027beb357448fe02a13e8923 (diff)
downloadopie-7c3bd0be34ef70a2297e6f27c592da62f3010da5.zip
opie-7c3bd0be34ef70a2297e6f27c592da62f3010da5.tar.gz
opie-7c3bd0be34ef70a2297e6f27c592da62f3010da5.tar.bz2
- minor cleanup
Diffstat (limited to 'noncore/multimedia/opieplayer2') (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 @@
#include <qbutton.h>
#include <qpainter.h>
#include <qframe.h>
#include <qlayout.h>
#include <qdir.h>
#include <stdlib.h>
#include <stdio.h>
#include "audiowidget.h"
#include "mediaplayerstate.h"
#include "playlistwidget.h"
-static const int xo = -2; // movable x offset
-static const int yo = 22; // movable y offset
+namespace
+{
+
+const int xo = -2; // movable x offset
+const int yo = 22; // movable y offset
struct MediaButton {
bool isToggle, isHeld, isDown;
};
//Layout information for the audioButtons (and if it is a toggle button or not)
MediaButton audioButtons[] = {
{ TRUE, FALSE, FALSE }, // play
{ FALSE, FALSE, FALSE }, // stop
{ FALSE, FALSE, FALSE }, // next
{ FALSE, FALSE, FALSE }, // previous
{ FALSE, FALSE, FALSE }, // volume up
{ FALSE, FALSE, FALSE }, // volume down
{ TRUE, FALSE, FALSE }, // repeat/loop
{ FALSE, FALSE, FALSE }, // playlist
{ FALSE, FALSE, FALSE }, // forward
{ FALSE, FALSE, FALSE } // back
};
const char * const skin_mask_file_names[10] = {
"play", "stop", "next", "prev", "up",
"down", "loop", "playlist", "forward", "back"
};
-
-static void changeTextColor( QWidget * w) {
+void changeTextColor( QWidget * w) {
QPalette p = w->palette();
p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) );
p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) );
w->setPalette( p );
}
-static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton));
+const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton));
+}
AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) :
MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) {
setCaption( tr("OpiePlayer") );
Config cfg("OpiePlayer");
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
//skin = "scaleTest";
// 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 @@
#include "videowidget.h"
#include "mediaplayerstate.h"
#include "playlistwidget.h"
#ifdef Q_WS_QWS
# define USE_DIRECT_PAINTER
# include <qdirectpainter_qws.h>
# include <qgfxraster_qws.h>
#endif
+namespace
+{
-
-static const int xo = 2; // movable x offset
-static const int yo = 0; // movable y offset
+const int xo = 2; // movable x offset
+const int yo = 0; // movable y offset
struct MediaButton {
bool isToggle, isHeld, isDown;
};
MediaButton videoButtons[] = {
{ FALSE, FALSE, FALSE }, // stop
{ TRUE, FALSE, FALSE }, // play
{ FALSE, FALSE, FALSE }, // previous
{ FALSE, FALSE, FALSE }, // next
{ FALSE, FALSE, FALSE }, // volUp
{ FALSE, FALSE, FALSE }, // volDown
{ TRUE, FALSE, FALSE } // fullscreen
};
-const char *skinV_mask_file_names[7] = {
+const char * const skinV_mask_file_names[7] = {
"stop","play","back","fwd","up","down","full"
};
-static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton));
+const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton));
+}
VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
: MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 )
{
setCaption( tr("OpiePlayer - Video") );
videoFrame = new XineVideoWidget ( this, "Video frame" );
connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
Config cfg("OpiePlayer");