summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2
Side-by-side diff
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
@@ -11,88 +11,71 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef MEDIAWIDGET_H
#define MEDIAWIDGET_H
#include <qwidget.h>
#include <qmap.h>
#include "mediaplayerstate.h"
#include "playlistwidget.h"
#include <vector>
#include <memory>
-namespace
-{
- struct simpleAndStupidAllocator
- {
- static void *allocate( size_t amount )
- { return ::operator new( amount ); }
- static void deallocate( void *p, size_t )
- { ::operator delete( p ); }
- };
-}
-
class Skin;
class MediaWidget : public QWidget
{
Q_OBJECT
public:
enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined };
enum ButtonType { NormalButton, ToggleButton };
struct Button
{
Button() : command( Undefined ), type( NormalButton ), isDown( false ) {}
Command command;
ButtonType type; // this should be part of the bitfield but gcc2 is too buggy to support this :-(
bool isDown : 1;
QBitmap mask;
QPixmap pixUp;
QPixmap pixDown;
};
-#if defined( _CC_GNU_ )
- // use that allocator to avoid the default allocator that on gcc2 requires libstdc++ because
- // in the BAD_ALLOC macro it uses std::cerr and friends :-(
- typedef std::vector<Button, std::__allocator<Button, simpleAndStupidAllocator> > ButtonVector;
-#else
typedef std::vector<Button> ButtonVector;
-#endif
struct SkinButtonInfo
{
Command command;
const char *fileName;
ButtonType type;
};
struct GUIInfo
{
GUIInfo() : buttonInfo( 0 ), buttonCount( 0 ) {}
GUIInfo( const QString &_fileNameInfix, const SkinButtonInfo *_buttonInfo, const uint _buttonCount )
: fileNameInfix( _fileNameInfix ), buttonInfo( _buttonInfo ), buttonCount( _buttonCount )
{}
QString fileNameInfix;
const SkinButtonInfo *buttonInfo;
const uint buttonCount;
};
typedef QValueList<GUIInfo> GUIInfoList;
MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 );
virtual ~MediaWidget();
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
@@ -1,44 +1,44 @@
TEMPLATE = app
CONFIG = qt warn_on release
DESTDIR = $(OPIEDIR)/bin
HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \
videowidget.h audiowidget.h playlistwidget.h om3u.h mediaplayer.h inputDialog.h \
frame.h lib.h xinevideowidget.h volumecontrol.h playlistwidgetgui.h\
alphablend.h yuv2rgb.h threadutil.h mediawidget.h playlistview.h playlistfileview.h \
skin.h
SOURCES = main.cpp \
playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp \
videowidget.cpp audiowidget.cpp playlistwidget.cpp om3u.cpp mediaplayer.cpp inputDialog.cpp \
frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp volumecontrol.cpp \
playlistwidgetgui.cpp\
alphablend.c yuv2rgb.c yuv2rgb_arm.c yuv2rgb_arm4l.S \
threadutil.cpp mediawidget.cpp playlistview.cpp playlistfileview.cpp \
skin.cpp
TARGET = opieplayer2
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lpthread -lopie -lxine
+LIBS += -lqpe -lpthread -lopie -lxine -lstdc++
MOC_DIR = qpeobj
OBJECTS_DIR = qpeobj
#INCLUDEPATH += $(OPIEDIR)/include
#DEPENDPATH += $(OPIEDIR)/include
TRANSLATIONS = ../../../i18n/de/opieplayer2.ts \
../../../i18n/da/opieplayer2.ts \
../../../i18n/xx/opieplayer2.ts \
../../../i18n/en/opieplayer2.ts \
../../../i18n/es/opieplayer2.ts \
../../../i18n/fr/opieplayer2.ts \
../../../i18n/hu/opieplayer2.ts \
../../../i18n/ja/opieplayer2.ts \
../../../i18n/ko/opieplayer2.ts \
../../../i18n/no/opieplayer2.ts \
../../../i18n/pl/opieplayer2.ts \
../../../i18n/pt/opieplayer2.ts \
../../../i18n/pt_BR/opieplayer2.ts \
../../../i18n/sl/opieplayer2.ts \
../../../i18n/zh_CN/opieplayer2.ts \
../../../i18n/zh_TW/opieplayer2.ts