summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h17
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro2
2 files changed, 1 insertions, 18 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 45c46ea..8c3a467 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -23,64 +23,47 @@
23#ifndef MEDIAWIDGET_H 23#ifndef MEDIAWIDGET_H
24#define MEDIAWIDGET_H 24#define MEDIAWIDGET_H
25 25
26#include <qwidget.h> 26#include <qwidget.h>
27#include <qmap.h> 27#include <qmap.h>
28 28
29#include "mediaplayerstate.h" 29#include "mediaplayerstate.h"
30#include "playlistwidget.h" 30#include "playlistwidget.h"
31 31
32#include <vector> 32#include <vector>
33#include <memory> 33#include <memory>
34 34
35namespace
36{
37 struct simpleAndStupidAllocator
38 {
39 static void *allocate( size_t amount )
40 { return ::operator new( amount ); }
41 static void deallocate( void *p, size_t )
42 { ::operator delete( p ); }
43 };
44}
45
46class Skin; 35class Skin;
47 36
48class MediaWidget : public QWidget 37class MediaWidget : public QWidget
49{ 38{
50 Q_OBJECT 39 Q_OBJECT
51public: 40public:
52 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined }; 41 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined };
53 enum ButtonType { NormalButton, ToggleButton }; 42 enum ButtonType { NormalButton, ToggleButton };
54 43
55 struct Button 44 struct Button
56 { 45 {
57 Button() : command( Undefined ), type( NormalButton ), isDown( false ) {} 46 Button() : command( Undefined ), type( NormalButton ), isDown( false ) {}
58 47
59 Command command; 48 Command command;
60 49
61 ButtonType type; // this should be part of the bitfield but gcc2 is too buggy to support this :-( 50 ButtonType type; // this should be part of the bitfield but gcc2 is too buggy to support this :-(
62 bool isDown : 1; 51 bool isDown : 1;
63 52
64 QBitmap mask; 53 QBitmap mask;
65 QPixmap pixUp; 54 QPixmap pixUp;
66 QPixmap pixDown; 55 QPixmap pixDown;
67 }; 56 };
68#if defined( _CC_GNU_ )
69 // use that allocator to avoid the default allocator that on gcc2 requires libstdc++ because
70 // in the BAD_ALLOC macro it uses std::cerr and friends :-(
71 typedef std::vector<Button, std::__allocator<Button, simpleAndStupidAllocator> > ButtonVector;
72#else
73 typedef std::vector<Button> ButtonVector; 57 typedef std::vector<Button> ButtonVector;
74#endif
75 58
76 struct SkinButtonInfo 59 struct SkinButtonInfo
77 { 60 {
78 Command command; 61 Command command;
79 const char *fileName; 62 const char *fileName;
80 ButtonType type; 63 ButtonType type;
81 }; 64 };
82 65
83 struct GUIInfo 66 struct GUIInfo
84 { 67 {
85 GUIInfo() : buttonInfo( 0 ), buttonCount( 0 ) {} 68 GUIInfo() : buttonInfo( 0 ), buttonCount( 0 ) {}
86 GUIInfo( const QString &_fileNameInfix, const SkinButtonInfo *_buttonInfo, const uint _buttonCount ) 69 GUIInfo( const QString &_fileNameInfix, const SkinButtonInfo *_buttonInfo, const uint _buttonCount )
diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro
index 44af25f..a739692 100644
--- a/noncore/multimedia/opieplayer2/opieplayer2.pro
+++ b/noncore/multimedia/opieplayer2/opieplayer2.pro
@@ -8,25 +8,25 @@ HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \
8 skin.h 8 skin.h
9SOURCES = main.cpp \ 9SOURCES = main.cpp \
10 playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp \ 10 playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp \
11 videowidget.cpp audiowidget.cpp playlistwidget.cpp om3u.cpp mediaplayer.cpp inputDialog.cpp \ 11 videowidget.cpp audiowidget.cpp playlistwidget.cpp om3u.cpp mediaplayer.cpp inputDialog.cpp \
12 frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp volumecontrol.cpp \ 12 frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp volumecontrol.cpp \
13 playlistwidgetgui.cpp\ 13 playlistwidgetgui.cpp\
14 alphablend.c yuv2rgb.c yuv2rgb_arm.c yuv2rgb_arm4l.S \ 14 alphablend.c yuv2rgb.c yuv2rgb_arm.c yuv2rgb_arm4l.S \
15 threadutil.cpp mediawidget.cpp playlistview.cpp playlistfileview.cpp \ 15 threadutil.cpp mediawidget.cpp playlistview.cpp playlistfileview.cpp \
16 skin.cpp 16 skin.cpp
17TARGET = opieplayer2 17TARGET = opieplayer2
18INCLUDEPATH += $(OPIEDIR)/include 18INCLUDEPATH += $(OPIEDIR)/include
19DEPENDPATH += $(OPIEDIR)/include 19DEPENDPATH += $(OPIEDIR)/include
20LIBS += -lqpe -lpthread -lopie -lxine 20LIBS += -lqpe -lpthread -lopie -lxine -lstdc++
21MOC_DIR = qpeobj 21MOC_DIR = qpeobj
22OBJECTS_DIR = qpeobj 22OBJECTS_DIR = qpeobj
23 23
24#INCLUDEPATH += $(OPIEDIR)/include 24#INCLUDEPATH += $(OPIEDIR)/include
25#DEPENDPATH += $(OPIEDIR)/include 25#DEPENDPATH += $(OPIEDIR)/include
26 26
27 27
28 28
29TRANSLATIONS = ../../../i18n/de/opieplayer2.ts \ 29TRANSLATIONS = ../../../i18n/de/opieplayer2.ts \
30 ../../../i18n/da/opieplayer2.ts \ 30 ../../../i18n/da/opieplayer2.ts \
31 ../../../i18n/xx/opieplayer2.ts \ 31 ../../../i18n/xx/opieplayer2.ts \
32 ../../../i18n/en/opieplayer2.ts \ 32 ../../../i18n/en/opieplayer2.ts \