1 | /* smplayer, GUI front-end for mplayer.
|
---|
2 | Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
3 |
|
---|
4 | This program is free software; you can redistribute it and/or modify
|
---|
5 | it under the terms of the GNU General Public License as published by
|
---|
6 | the Free Software Foundation; either version 2 of the License, or
|
---|
7 | (at your option) any later version.
|
---|
8 |
|
---|
9 | This program is distributed in the hope that it will be useful,
|
---|
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
12 | GNU General Public License for more details.
|
---|
13 |
|
---|
14 | You should have received a copy of the GNU General Public License
|
---|
15 | along with this program; if not, write to the Free Software
|
---|
16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef _SKINGUI_H_
|
---|
20 | #define _SKINGUI_H_
|
---|
21 |
|
---|
22 | #include "guiconfig.h"
|
---|
23 | #include "baseguiplus.h"
|
---|
24 | #include <QPoint>
|
---|
25 |
|
---|
26 | class QToolBar;
|
---|
27 | class EditableToolbar;
|
---|
28 | class QPushButton;
|
---|
29 | class QResizeEvent;
|
---|
30 | class MyAction;
|
---|
31 | class QMenu;
|
---|
32 | class TimeSliderAction;
|
---|
33 | class VolumeSliderAction;
|
---|
34 | class FloatingWidget;
|
---|
35 | class TimeLabelAction;
|
---|
36 | class MyAction;
|
---|
37 | class MediaBarPanel;
|
---|
38 |
|
---|
39 | #if MINI_ARROW_BUTTONS
|
---|
40 | class SeekingButton;
|
---|
41 | #endif
|
---|
42 |
|
---|
43 | //#define SKIN_CONTROLWIDGET_OVER_VIDEO 1
|
---|
44 |
|
---|
45 | class SkinGui : public BaseGuiPlus
|
---|
46 | {
|
---|
47 | Q_OBJECT
|
---|
48 |
|
---|
49 | public:
|
---|
50 | SkinGui( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
|
---|
51 | ~SkinGui();
|
---|
52 |
|
---|
53 | public slots:
|
---|
54 | //virtual void showPlaylist(bool b);
|
---|
55 |
|
---|
56 | protected:
|
---|
57 | virtual void retranslateStrings();
|
---|
58 | virtual QMenu * createPopupMenu();
|
---|
59 |
|
---|
60 | void createMainToolBars();
|
---|
61 | void createControlWidget();
|
---|
62 | #if SKIN_CONTROLWIDGET_OVER_VIDEO
|
---|
63 | void createFloatingControl();
|
---|
64 | #endif
|
---|
65 | void createActions();
|
---|
66 | void createMenus();
|
---|
67 |
|
---|
68 | void loadConfig();
|
---|
69 | void saveConfig();
|
---|
70 |
|
---|
71 | virtual void aboutToEnterFullscreen();
|
---|
72 | virtual void aboutToExitFullscreen();
|
---|
73 | virtual void aboutToEnterCompactMode();
|
---|
74 | virtual void aboutToExitCompactMode();
|
---|
75 |
|
---|
76 | protected slots:
|
---|
77 | virtual void updateWidgets();
|
---|
78 | virtual void displayTime(QString text);
|
---|
79 | virtual void displayState(Core::State state);
|
---|
80 | virtual void displayMessage(QString message, int time);
|
---|
81 | virtual void displayMessage(QString message);
|
---|
82 |
|
---|
83 | virtual void showFloatingControl(QPoint p);
|
---|
84 | virtual void showFloatingMenu(QPoint p);
|
---|
85 | virtual void hideFloatingControls();
|
---|
86 |
|
---|
87 | // Reimplemented:
|
---|
88 | #if AUTODISABLE_ACTIONS
|
---|
89 | virtual void enableActionsOnPlaying();
|
---|
90 | virtual void disableActionsOnStop();
|
---|
91 | virtual void togglePlayAction(Core::State);
|
---|
92 | #endif
|
---|
93 | virtual void changeStyleSheet(QString style);
|
---|
94 |
|
---|
95 | protected:
|
---|
96 | MediaBarPanel* mediaBarPanel;
|
---|
97 |
|
---|
98 | EditableToolbar * toolbar1;
|
---|
99 | QToolBar * controlwidget;
|
---|
100 |
|
---|
101 | TimeSliderAction * timeslider_action;
|
---|
102 | VolumeSliderAction * volumeslider_action;
|
---|
103 |
|
---|
104 | #if MINI_ARROW_BUTTONS
|
---|
105 | SeekingButton * rewindbutton_action;
|
---|
106 | SeekingButton * forwardbutton_action;
|
---|
107 | #endif
|
---|
108 |
|
---|
109 | #if SKIN_CONTROLWIDGET_OVER_VIDEO
|
---|
110 | FloatingWidget * floating_control;
|
---|
111 | #endif
|
---|
112 | TimeLabelAction * time_label_action;
|
---|
113 |
|
---|
114 | #if USE_CONFIGURABLE_TOOLBARS
|
---|
115 | MyAction * editToolbar1Act;
|
---|
116 | #if SKIN_CONTROLWIDGET_OVER_VIDEO
|
---|
117 | MyAction * editFloatingControlAct;
|
---|
118 | #endif
|
---|
119 | #endif
|
---|
120 |
|
---|
121 | MyAction * viewVideoInfoAct;
|
---|
122 |
|
---|
123 | QMenu * toolbar_menu;
|
---|
124 | QMenu * statusbar_menu;
|
---|
125 |
|
---|
126 | int last_second;
|
---|
127 |
|
---|
128 | bool fullscreen_toolbar1_was_visible;
|
---|
129 | bool compact_toolbar1_was_visible;
|
---|
130 | };
|
---|
131 |
|
---|
132 | #endif
|
---|