Diffstat (limited to 'noncore/multimedia/opieplayer3/mwindow.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer3/mwindow.h | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer3/mwindow.h b/noncore/multimedia/opieplayer3/mwindow.h new file mode 100644 index 0000000..28f820f --- a/dev/null +++ b/noncore/multimedia/opieplayer3/mwindow.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | ||
5 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | ||
6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | ||
7 | =. | ||
8 | .=l. | ||
9 | .>+-= | ||
10 | _;:, .> :=|. This program is free software; you can | ||
11 | .> <`_, > . <= redistribute it and/or modify it under | ||
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
13 | .="- .-=="i, .._ License as published by the Free Software | ||
14 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
15 | ._= =} : or (at your option) any later version. | ||
16 | .%`+i> _;_. | ||
17 | .i_,=:_. -<s. This program is distributed in the hope that | ||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
19 | : .. .:, . . . without even the implied warranty of | ||
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
22 | ..}^=.= = ; Library General Public License for more | ||
23 | ++= -. .` .: details. | ||
24 | : = ...= . :.=- | ||
25 | -. .:....=;==+<; You should have received a copy of the GNU | ||
26 | -_. . . )=. = Library General Public License along with | ||
27 | -- :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
30 | Boston, MA 02111-1307, USA. | ||
31 | |||
32 | */ | ||
33 | |||
34 | #ifndef _mwindow_h | ||
35 | #define _mwindow_h | ||
36 | |||
37 | #include <qmainwindow.h> | ||
38 | |||
39 | #include <qpe/applnk.h> | ||
40 | |||
41 | #include <qaction.h> | ||
42 | |||
43 | namespace Opie { | ||
44 | namespace Ui { | ||
45 | class OWidgetStack; | ||
46 | class OFileSelector; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | namespace XINE { | ||
51 | class Lib; | ||
52 | } | ||
53 | |||
54 | class PlaylistView; | ||
55 | class QToolBar; | ||
56 | class QPopupMenu; | ||
57 | class QMenuBar; | ||
58 | class AudioWidget; | ||
59 | class VideoWidget; | ||
60 | class PlaylistItem; | ||
61 | |||
62 | class PMainWindow : public QMainWindow { | ||
63 | Q_OBJECT | ||
64 | public: | ||
65 | static QString appName() { return QString::fromLatin1("opie-mediaplayer3" ); } | ||
66 | PMainWindow(QWidget*, const char*, WFlags ); | ||
67 | virtual ~PMainWindow(); | ||
68 | |||
69 | public slots: | ||
70 | virtual void slotVideoclicked(); | ||
71 | protected: | ||
72 | static const int stack_list = 0; | ||
73 | static const int stack_file = 1; | ||
74 | static const int stack_audio = 2; | ||
75 | static const int stack_video = 3; | ||
76 | Opie::Ui::OWidgetStack *m_stack; | ||
77 | Opie::Ui::OFileSelector*m_sfl; | ||
78 | PlaylistView*m_playList; | ||
79 | AudioWidget*m_AudioPlayer; | ||
80 | VideoWidget*m_VideoPlayer; | ||
81 | |||
82 | QAction*a_appendFiles,*a_removeFiles,*a_showPlaylist,*a_playAction,*a_deleteItem,*a_stopAction; | ||
83 | QAction*a_playNext,*a_playPrevious,*a_ShowFull,*a_stopPlay; | ||
84 | QActionGroup*playersGroup; | ||
85 | QToolBar*m_toolBar; | ||
86 | QPopupMenu *fileMenu,*dispMenu,*playMenu; | ||
87 | QMenuBar*m_menuBar; | ||
88 | XINE::Lib*m_PlayLib; | ||
89 | |||
90 | void setupActions(); | ||
91 | void setupToolBar(); | ||
92 | void setupMenu(); | ||
93 | void checkLib(); | ||
94 | void setupVideo(bool full); | ||
95 | void hideVideo(); | ||
96 | |||
97 | bool m_playing:1; | ||
98 | int m_CurrentPos; | ||
99 | PlaylistItem*m_LastItem; | ||
100 | |||
101 | protected slots: | ||
102 | virtual void fileSelected(const DocLnk&); | ||
103 | virtual void slotAppendFiles(); | ||
104 | virtual void slotRemoveFiles(); | ||
105 | virtual void slotShowList(); | ||
106 | virtual void slotPlayList(); | ||
107 | virtual void slotPlayNext(); | ||
108 | virtual void slotPlayPrevious(); | ||
109 | virtual void slotPlayCurrent(); | ||
110 | virtual void slotStopped(); | ||
111 | virtual void slotCheckPos(); | ||
112 | virtual void slotToggleFull(bool); | ||
113 | virtual void slotUserStop(); | ||
114 | virtual void slotGoNext(); | ||
115 | |||
116 | signals: | ||
117 | void sigPos(int); | ||
118 | }; | ||
119 | |||
120 | #endif | ||