summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediawidget.h
authorsimon <simon>2002-12-09 14:29:48 (UTC)
committer simon <simon>2002-12-09 14:29:48 (UTC)
commit3f88070b9be5209cdd88caa0afd7f7294d3b1764 (patch) (side-by-side diff)
treefe1c3c224e6d6930cef0756f4e23aded980d692f /noncore/multimedia/opieplayer2/mediawidget.h
parent8746877e7ed89fc4c227d5d79d63c35c69ceacd6 (diff)
downloadopie-3f88070b9be5209cdd88caa0afd7f7294d3b1764.zip
opie-3f88070b9be5209cdd88caa0afd7f7294d3b1764.tar.gz
opie-3f88070b9be5209cdd88caa0afd7f7294d3b1764.tar.bz2
- merged the separate mask and pixmap arrays into the Button structure
and the buttons vector
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 2641df6..504b705 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -15,44 +15,49 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. 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>
class MediaWidget : public QWidget
{
Q_OBJECT
public:
enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back };
enum ButtonType { NormalButton, ToggleButton };
struct Button
{
Button() : type( NormalButton ), isHeld( false ), isDown( false ) {}
ButtonType type : 1;
bool isHeld : 1;
bool isDown : 1;
+
+ QBitmap mask;
+ QPixmap pixUp;
+ QPixmap pixDown;
};
typedef std::vector<Button> ButtonVector;
struct SkinButtonInfo
{
Command command;
const char *fileName;
ButtonType type;
};
typedef std::vector<QBitmap> MaskVector;
typedef std::vector<QPixmap> PixmapVector;
@@ -81,22 +86,18 @@ protected:
void paintButton( int buttonId );
virtual void paintButton( QPainter &p, int i ) = 0;
void toggleButton( int buttonId );
MediaPlayerState &mediaPlayerState;
PlayListWidget &playList;
ButtonVector buttons;
QImage buttonMask;
- MaskVector masks;
- PixmapVector buttonPixUp;
- PixmapVector buttonPixDown;
-
QPoint upperLeftOfButtonMask;
};
#endif // MEDIAWIDGET_H
/* vim: et sw=4 ts=4
*/