1 | /* smplayer, GUI front-end for mplayer.
|
---|
2 | Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
3 | umplayer, Copyright (C) 2010 Ori Rejwan
|
---|
4 |
|
---|
5 | This program is free software; you can redistribute it and/or modify
|
---|
6 | it under the terms of the GNU General Public License as published by
|
---|
7 | the Free Software Foundation; either version 2 of the License, or
|
---|
8 | (at your option) any later version.
|
---|
9 |
|
---|
10 | This program is distributed in the hope that it will be useful,
|
---|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | GNU General Public License for more details.
|
---|
14 |
|
---|
15 | You should have received a copy of the GNU General Public License
|
---|
16 | along with this program; if not, write to the Free Software
|
---|
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
18 | */
|
---|
19 |
|
---|
20 | #ifndef MEDIABARPANEL_H
|
---|
21 | #define MEDIABARPANEL_H
|
---|
22 |
|
---|
23 | #include <QWidget>
|
---|
24 | #include <QPushButton>
|
---|
25 | #include <QList>
|
---|
26 | #include "core.h"
|
---|
27 |
|
---|
28 |
|
---|
29 | namespace Ui {
|
---|
30 | class MediaBarPanel;
|
---|
31 | }
|
---|
32 |
|
---|
33 | class PlayControl;
|
---|
34 | class MediaPanel;
|
---|
35 | class VolumeControlPanel;
|
---|
36 | class MyAction;
|
---|
37 |
|
---|
38 | class MediaBarPanel : public QWidget {
|
---|
39 | Q_OBJECT
|
---|
40 |
|
---|
41 | public:
|
---|
42 | MediaBarPanel(QWidget *parent = 0);
|
---|
43 | ~MediaBarPanel();
|
---|
44 | void setPlayControlActionCollection(QList<QAction*> actions);
|
---|
45 | void setMediaPanelActionCollection(QList<QAction*> actions);
|
---|
46 | void setVolumeControlActionCollection(QList<QAction*> actions);
|
---|
47 | void setToolbarActionCollection(QList<QAction *>actions);
|
---|
48 | void setCore(Core* c);
|
---|
49 | void setRecordAvailable(bool av);
|
---|
50 |
|
---|
51 | protected:
|
---|
52 | void changeEvent(QEvent *e);
|
---|
53 |
|
---|
54 | private:
|
---|
55 | Ui::MediaBarPanel *ui;
|
---|
56 | PlayControl* playControlPanel;
|
---|
57 | MediaPanel* mediaPanel;
|
---|
58 | VolumeControlPanel* volumeControlPanel;
|
---|
59 | Core* core;
|
---|
60 |
|
---|
61 | // Play Control
|
---|
62 | public slots:
|
---|
63 | void setMplayerState(Core::State state);
|
---|
64 | void setDuration();
|
---|
65 | void gotCurrentTime(double time);
|
---|
66 | void updateMediaInfo();
|
---|
67 | void displayMessage(QString status);
|
---|
68 | void displayPermanentMessage(QString status);
|
---|
69 | void setBuffering();
|
---|
70 | void setVolume(int v);
|
---|
71 | void setSeeker(int v);
|
---|
72 |
|
---|
73 | signals:
|
---|
74 | void volumeChanged(int);
|
---|
75 | void volumeSliderMoved(int);
|
---|
76 | void seekerChanged(int);
|
---|
77 | };
|
---|
78 |
|
---|
79 | #endif // MEDIABARPANEL_H
|
---|