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