Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h index 4eefb93..9b5252a 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h | |||
@@ -28,101 +28,103 @@ | |||
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef PLAY_LIST_WIDGET_GUI_H | 34 | #ifndef PLAY_LIST_WIDGET_GUI_H |
35 | #define PLAY_LIST_WIDGET_GUI_H | 35 | #define PLAY_LIST_WIDGET_GUI_H |
36 | 36 | ||
37 | #include <qmainwindow.h> | 37 | #include <qmainwindow.h> |
38 | #include <qpe/applnk.h> | 38 | #include <qpe/applnk.h> |
39 | #include <qpe/resource.h> | 39 | #include <qpe/resource.h> |
40 | #include <qpe/qpemenubar.h> | 40 | #include <qpe/qpemenubar.h> |
41 | 41 | ||
42 | #include <qtabwidget.h> | 42 | #include <qtabwidget.h> |
43 | #include <qpe/fileselector.h> | 43 | #include <qpe/fileselector.h> |
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qpopupmenu.h> | 45 | #include <qpopupmenu.h> |
46 | #include <qaction.h> | 46 | #include <qaction.h> |
47 | #include <qslider.h> | 47 | #include <qslider.h> |
48 | #include <qlcdnumber.h> | 48 | #include <qlcdnumber.h> |
49 | 49 | ||
50 | class PlayListWidgetPrivate; | 50 | class PlayListWidgetPrivate; |
51 | class PlayListSelection; | 51 | class PlayListSelection; |
52 | class MediaPlayerState; | ||
52 | 53 | ||
53 | class Config; | 54 | class Config; |
54 | class QPEToolBar; | 55 | class QPEToolBar; |
55 | class QListViewItem; | 56 | class QListViewItem; |
56 | class QListView; | 57 | class QListView; |
57 | class QPoint; | 58 | class QPoint; |
58 | class QAction; | 59 | class QAction; |
59 | class QLabel; | 60 | class QLabel; |
60 | 61 | ||
61 | class PlayListWidgetPrivate { | 62 | class PlayListWidgetPrivate { |
62 | public: | 63 | public: |
63 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; | 64 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; |
64 | QFrame *playListFrame; | 65 | QFrame *playListFrame; |
65 | PlayListSelection *selectedFiles; | 66 | PlayListSelection *selectedFiles; |
66 | bool setDocumentUsed; | 67 | bool setDocumentUsed; |
67 | }; | 68 | }; |
68 | 69 | ||
69 | 70 | ||
70 | class ToolButton : public QToolButton { | 71 | class ToolButton : public QToolButton { |
71 | public: | 72 | public: |
72 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 73 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |
73 | : QToolButton( parent, name ) { | 74 | : QToolButton( parent, name ) { |
74 | setTextLabel( name ); | 75 | setTextLabel( name ); |
75 | setPixmap( Resource::loadPixmap( icon ) ); | 76 | setPixmap( Resource::loadPixmap( icon ) ); |
76 | setAutoRaise( TRUE ); | 77 | setAutoRaise( TRUE ); |
77 | setFocusPolicy( QWidget::NoFocus ); | 78 | setFocusPolicy( QWidget::NoFocus ); |
78 | setToggleButton( t ); | 79 | setToggleButton( t ); |
79 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); | 80 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); |
80 | QPEMenuToolFocusManager::manager()->addWidget( this ); | 81 | QPEMenuToolFocusManager::manager()->addWidget( this ); |
81 | } | 82 | } |
82 | }; | 83 | }; |
83 | 84 | ||
84 | 85 | ||
85 | class MenuItem : public QAction { | 86 | class MenuItem : public QAction { |
86 | 87 | ||
87 | public: | 88 | public: |
88 | MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) | 89 | MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) |
89 | : QAction( text, QString::null, 0, 0 ) { | 90 | : QAction( text, QString::null, 0, 0 ) { |
90 | connect( this, SIGNAL( activated() ), handler, slot ); | 91 | connect( this, SIGNAL( activated() ), handler, slot ); |
91 | addTo( parent ); | 92 | addTo( parent ); |
92 | } | 93 | } |
93 | }; | 94 | }; |
94 | 95 | ||
95 | class PlayListWidgetGui : public QMainWindow { | 96 | class PlayListWidgetGui : public QMainWindow { |
96 | Q_OBJECT | 97 | Q_OBJECT |
97 | public: | 98 | public: |
98 | PlayListWidgetGui( QWidget* parent=0, const char* name=0, WFlags fl=0 ); | 99 | PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent=0, const char* name=0 ); |
99 | ~PlayListWidgetGui(); | 100 | ~PlayListWidgetGui(); |
100 | 101 | ||
101 | protected: | 102 | protected: |
102 | QTabWidget * tabWidget; | 103 | QTabWidget * tabWidget; |
103 | QListView *audioView, *videoView, *playlistView; | 104 | QListView *audioView, *videoView, *playlistView; |
104 | QLabel *libString; | 105 | QLabel *libString; |
105 | QPopupMenu *pmView ; | 106 | QPopupMenu *pmView ; |
106 | QPopupMenu *gammaMenu; | 107 | QPopupMenu *gammaMenu; |
107 | QSlider *gammaSlider; | 108 | QSlider *gammaSlider; |
108 | QLCDNumber *gammaLCD; | 109 | QLCDNumber *gammaLCD; |
109 | bool fromSetDocument; | 110 | bool fromSetDocument; |
110 | bool insanityBool; | 111 | bool insanityBool; |
111 | QString setDocFileRef; | 112 | QString setDocFileRef; |
112 | // retrieve the current playlist entry (media file link) | 113 | // retrieve the current playlist entry (media file link) |
113 | QPushButton *tbDeletePlaylist; | 114 | QPushButton *tbDeletePlaylist; |
114 | int selected; | 115 | int selected; |
115 | QPopupMenu *pmPlayList; | 116 | QPopupMenu *pmPlayList; |
116 | FileSelector* playLists; | 117 | FileSelector* playLists; |
117 | QPopupMenu *skinsMenu; | 118 | QPopupMenu *skinsMenu; |
118 | PlayListWidgetPrivate *d; // Private implementation data | 119 | PlayListWidgetPrivate *d; // Private implementation data |
119 | QVBox *vbox1; | 120 | QVBox *vbox1; |
120 | QVBox *vbox5; | 121 | QVBox *vbox5; |
121 | QPEToolBar *bar; | 122 | QPEToolBar *bar; |
122 | void setActiveWindow(); // need to handle this to show the right view | 123 | void setActiveWindow(); // need to handle this to show the right view |
123 | void setView( char ); | 124 | void setView( char ); |
124 | 125 | ||
126 | MediaPlayerState &mediaPlayerState; | ||
125 | }; | 127 | }; |
126 | 128 | ||
127 | #endif | 129 | #endif |
128 | 130 | ||