summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-09 22:07:05 (UTC)
committer simon <simon>2002-12-09 22:07:05 (UTC)
commit5a08075743a50a63eaad9c80884f4c2f4c69579b (patch) (unidiff)
tree4d0005b4fa5ed1856298a32f0a2f10ca55c3ee05
parent40ff6884f079a55fcf219b2d032c7be4da385bc1 (diff)
downloadopie-5a08075743a50a63eaad9c80884f4c2f4c69579b.zip
opie-5a08075743a50a63eaad9c80884f4c2f4c69579b.tar.gz
opie-5a08075743a50a63eaad9c80884f4c2f4c69579b.tar.bz2
- removed unused isHeld attribute
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 8c781e9..3b3a263 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -1,96 +1,95 @@
1/* 1/*
2 Copyright (C) 2002 Simon Hausmann <hausmann@kde.org> 2 Copyright (C) 2002 Simon Hausmann <hausmann@kde.org>
3 (C) 2002 Max Reiss <harlekin@handhelds.org> 3 (C) 2002 Max Reiss <harlekin@handhelds.org>
4 (C) 2002 L. Potter <ljp@llornkcor.com> 4 (C) 2002 L. Potter <ljp@llornkcor.com>
5 (C) 2002 Holger Freyther <zecke@handhelds.org> 5 (C) 2002 Holger Freyther <zecke@handhelds.org>
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
11 11
12 This library is distributed in the hope that it will be useful, 12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details. 15 Library General Public License for more details.
16 16
17 You should have received a copy of the GNU Library General Public License 17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to 18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. 20 Boston, MA 02111-1307, USA.
21*/ 21*/
22 22
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 33
34class MediaWidget : public QWidget 34class MediaWidget : public QWidget
35{ 35{
36 Q_OBJECT 36 Q_OBJECT
37public: 37public:
38 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined }; 38 enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined };
39 enum ButtonType { NormalButton, ToggleButton }; 39 enum ButtonType { NormalButton, ToggleButton };
40 40
41 struct Button 41 struct Button
42 { 42 {
43 Button() : command( Undefined ), type( NormalButton ), isHeld( false ), isDown( false ) {} 43 Button() : command( Undefined ), type( NormalButton ), isDown( false ) {}
44 44
45 Command command; 45 Command command;
46 46
47 ButtonType type; // this should be part of the bitfield but gcc2 is too buggy to support this :-( 47 ButtonType type; // this should be part of the bitfield but gcc2 is too buggy to support this :-(
48 bool isHeld : 1;
49 bool isDown : 1; 48 bool isDown : 1;
50 49
51 QBitmap mask; 50 QBitmap mask;
52 QPixmap pixUp; 51 QPixmap pixUp;
53 QPixmap pixDown; 52 QPixmap pixDown;
54 }; 53 };
55 typedef std::vector<Button> ButtonVector; 54 typedef std::vector<Button> ButtonVector;
56 55
57 struct SkinButtonInfo 56 struct SkinButtonInfo
58 { 57 {
59 Command command; 58 Command command;
60 const char *fileName; 59 const char *fileName;
61 ButtonType type; 60 ButtonType type;
62 }; 61 };
63 62
64 typedef std::vector<QBitmap> MaskVector; 63 typedef std::vector<QBitmap> MaskVector;
65 typedef std::vector<QPixmap> PixmapVector; 64 typedef std::vector<QPixmap> PixmapVector;
66 65
67 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); 66 MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 );
68 virtual ~MediaWidget(); 67 virtual ~MediaWidget();
69 68
70public slots: 69public slots:
71 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; 70 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0;
72 virtual void setLength( long length ) = 0; 71 virtual void setLength( long length ) = 0;
73 virtual void setPlaying( bool playing ) = 0; 72 virtual void setPlaying( bool playing ) = 0;
74 73
75 virtual void loadSkin() = 0; 74 virtual void loadSkin() = 0;
76 75
77signals: 76signals:
78 void moreReleased(); 77 void moreReleased();
79 void lessReleased(); 78 void lessReleased();
80 void forwardReleased(); 79 void forwardReleased();
81 void backReleased(); 80 void backReleased();
82 void forwardClicked(); 81 void forwardClicked();
83 void backClicked(); 82 void backClicked();
84 void moreClicked(); 83 void moreClicked();
85 void lessClicked(); 84 void lessClicked();
86 85
87protected: 86protected:
88 void setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount, 87 void setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
89 const QString &imagePrefix, const QSize &buttonAreaSize ); 88 const QString &imagePrefix, const QSize &buttonAreaSize );
90 Button setupButton( const SkinButtonInfo &buttonInfo, const QString &imagePrefix ); 89 Button setupButton( const SkinButtonInfo &buttonInfo, const QString &imagePrefix );
91 QBitmap setupButtonMask( const Command &command, const QString &fileName ); 90 QBitmap setupButtonMask( const Command &command, const QString &fileName );
92 91
93 virtual void closeEvent( QCloseEvent * ); 92 virtual void closeEvent( QCloseEvent * );
94 93
95 virtual void paintEvent( QPaintEvent *pe ); 94 virtual void paintEvent( QPaintEvent *pe );
96 95