From e9d1213578b83f8380c4681186246a2b32ae6375 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 11 Dec 2002 00:03:47 +0000 Subject: - added initialize states to MediaPlayerState - the play button is now of type PlayButton, inheritting from ToolButton and checking the media player initialization state in setEnabled --- (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.h') diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h index 0d8af43..1aa8ac8 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h @@ -70,6 +70,7 @@ public: class ToolButton : public QToolButton { + Q_OBJECT public: ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) : QToolButton( parent, name ) { @@ -83,6 +84,23 @@ public: } }; +class PlayButton : public ToolButton +{ + Q_OBJECT +public: + PlayButton( MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name, + const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ); + +protected: + virtual void setEnabled( bool enable ); + +private slots: + void checkInitializationStatus(); + +private: + MediaPlayerState &mediaPlayerState; + bool m_lastEnableStatus : 1; +}; class MenuItem : public QAction { @@ -122,6 +140,7 @@ protected: QVBox *vbox1; QVBox *vbox5; QPEToolBar *bar; + QWidget *playListTab; void setActiveWindow(); // need to handle this to show the right view void setView( char ); -- cgit v0.9.0.2