summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistwidgetgui.h
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.h19
1 files changed, 19 insertions, 0 deletions
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
@@ -61,37 +61,55 @@ class QAction;
61class QLabel; 61class QLabel;
62 62
63class PlayListWidgetPrivate { 63class PlayListWidgetPrivate {
64public: 64public:
65 QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; 65 QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove;
66 QFrame *playListFrame; 66 QFrame *playListFrame;
67 PlayListSelection *selectedFiles; 67 PlayListSelection *selectedFiles;
68 bool setDocumentUsed; 68 bool setDocumentUsed;
69}; 69};
70 70
71 71
72class ToolButton : public QToolButton { 72class ToolButton : public QToolButton {
73 Q_OBJECT
73public: 74public:
74 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) 75 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
75 : QToolButton( parent, name ) { 76 : QToolButton( parent, name ) {
76 setTextLabel( name ); 77 setTextLabel( name );
77 setPixmap( Resource::loadPixmap( icon ) ); 78 setPixmap( Resource::loadPixmap( icon ) );
78 setAutoRaise( TRUE ); 79 setAutoRaise( TRUE );
79 setFocusPolicy( QWidget::NoFocus ); 80 setFocusPolicy( QWidget::NoFocus );
80 setToggleButton( t ); 81 setToggleButton( t );
81 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); 82 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
82 QPEMenuToolFocusManager::manager()->addWidget( this ); 83 QPEMenuToolFocusManager::manager()->addWidget( this );
83 } 84 }
84}; 85};
85 86
87class PlayButton : public ToolButton
88{
89 Q_OBJECT
90public:
91 PlayButton( MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name,
92 const QString& icon, QObject *handler, const QString& slot, bool t = FALSE );
93
94protected:
95 virtual void setEnabled( bool enable );
96
97private slots:
98 void checkInitializationStatus();
99
100private:
101 MediaPlayerState &mediaPlayerState;
102 bool m_lastEnableStatus : 1;
103};
86 104
87class MenuItem : public QAction { 105class MenuItem : public QAction {
88 106
89public: 107public:
90 MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) 108 MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot )
91 : QAction( text, QString::null, 0, 0 ) { 109 : QAction( text, QString::null, 0, 0 ) {
92 connect( this, SIGNAL( activated() ), handler, slot ); 110 connect( this, SIGNAL( activated() ), handler, slot );
93 addTo( parent ); 111 addTo( parent );
94 } 112 }
95}; 113};
96 114
97class PlayListWidgetGui : public QMainWindow { 115class PlayListWidgetGui : public QMainWindow {
@@ -113,20 +131,21 @@ protected:
113 bool insanityBool; 131 bool insanityBool;
114 QString setDocFileRef; 132 QString setDocFileRef;
115 // retrieve the current playlist entry (media file link) 133 // retrieve the current playlist entry (media file link)
116 QPushButton *tbDeletePlaylist; 134 QPushButton *tbDeletePlaylist;
117 int selected; 135 int selected;
118 QPopupMenu *pmPlayList; 136 QPopupMenu *pmPlayList;
119 FileSelector* playLists; 137 FileSelector* playLists;
120 QPopupMenu *skinsMenu; 138 QPopupMenu *skinsMenu;
121 PlayListWidgetPrivate *d; // Private implementation data 139 PlayListWidgetPrivate *d; // Private implementation data
122 QVBox *vbox1; 140 QVBox *vbox1;
123 QVBox *vbox5; 141 QVBox *vbox5;
124 QPEToolBar *bar; 142 QPEToolBar *bar;
143 QWidget *playListTab;
125 void setActiveWindow(); // need to handle this to show the right view 144 void setActiveWindow(); // need to handle this to show the right view
126 void setView( char ); 145 void setView( char );
127 146
128 MediaPlayerState &mediaPlayerState; 147 MediaPlayerState &mediaPlayerState;
129}; 148};
130 149
131#endif 150#endif
132 151