source: smplayer/trunk/src/defaultgui.h@ 181

Last change on this file since 181 was 181, checked in by Silvan Scherrer, 9 years ago

smplayer: update trunk to version 16.8.0

  • Property svn:eol-style set to LF
File size: 4.1 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2016 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 DEFAULTGUI_H
20#define DEFAULTGUI_H
21
22#define BUFFERING_ANIMATION
23//#define LANGUAGE_TOOLBAR
24
25#ifdef IDOPT_BUILD
26#define ADD_QUICK_ACCESS
27#endif
28
29#include "guiconfig.h"
30#include "baseguiplus.h"
31#include <QPoint>
32
33class QToolBar;
34class EditableToolbar;
35class QPushButton;
36class QResizeEvent;
37class MyAction;
38class QMenu;
39class TimeSliderAction;
40class VolumeSliderAction;
41class AutohideWidget;
42class TimeLabelAction;
43class MyAction;
44
45#if MINI_ARROW_BUTTONS
46class SeekingButton;
47#endif
48
49#ifdef BUFFERING_ANIMATION
50class StateWidget;
51#endif
52
53class DefaultGui : public BaseGuiPlus
54{
55 Q_OBJECT
56
57public:
58 DefaultGui( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
59 ~DefaultGui();
60
61#if USE_MINIMUMSIZE
62 virtual QSize minimumSizeHint () const;
63#endif
64
65public slots:
66 //virtual void showPlaylist(bool b);
67
68protected:
69 virtual void retranslateStrings();
70 virtual QMenu * createPopupMenu();
71
72 void createStatusBar();
73 void createMainToolBars();
74 void createControlWidget();
75 void createControlWidgetMini();
76 void createFloatingControl();
77 void createActions();
78 void createMenus();
79 virtual void populateMainMenu();
80
81 void loadConfig();
82 void saveConfig();
83
84 virtual void aboutToEnterFullscreen();
85 virtual void aboutToExitFullscreen();
86 virtual void aboutToEnterCompactMode();
87 virtual void aboutToExitCompactMode();
88
89 virtual void resizeEvent( QResizeEvent * );
90 /* virtual void closeEvent( QCloseEvent * ); */
91
92protected slots:
93 virtual void updateWidgets();
94 virtual void displayFrame(int frame);
95 virtual void displayABSection(int secs_a, int secs_b);
96 virtual void displayVideoInfo(int width, int height, double fps);
97 void checkCompactMode();
98#ifdef ADD_QUICK_ACCESS
99 void adaptForTabletMode();
100#endif
101
102 // Reimplemented:
103#if AUTODISABLE_ACTIONS
104 virtual void enableActionsOnPlaying();
105 virtual void disableActionsOnStop();
106#endif
107 virtual void togglePlayAction(Core::State state);
108
109 void adjustFloatingControlSize();
110
111protected:
112 void reconfigureFloatingControl();
113
114protected:
115 QLabel * time_display;
116 QLabel * frame_display;
117 QLabel * ab_section_display;
118 QLabel * video_info_display;
119 QLabel * format_info_display;
120#ifdef BUFFERING_ANIMATION
121 StateWidget * state_widget;
122#endif
123
124 EditableToolbar * controlwidget;
125 EditableToolbar * controlwidget_mini;
126
127 EditableToolbar * toolbar1;
128
129#ifdef LANGUAGE_TOOLBAR
130 QToolBar * toolbar2;
131 QPushButton * select_audio;
132 QPushButton * select_subtitle;
133#endif
134
135 TimeSliderAction * timeslider_action;
136 VolumeSliderAction * volumeslider_action;
137
138#if MINI_ARROW_BUTTONS
139 SeekingButton * rewindbutton_action;
140 SeekingButton * forwardbutton_action;
141#endif
142
143 AutohideWidget * floating_control;
144 TimeLabelAction * time_label_action;
145 TimeLabelAction * current_time_label_action;
146 TimeLabelAction * total_time_label_action;
147 TimeLabelAction * remaining_time_label_action;
148
149 MyAction * viewFrameCounterAct;
150 MyAction * viewVideoInfoAct;
151 MyAction * viewFormatInfoAct;
152
153#if USE_CONFIGURABLE_TOOLBARS
154 MyAction * editToolbar1Act;
155 MyAction * editControl1Act;
156 MyAction * editControl2Act;
157 MyAction * editFloatingControlAct;
158#endif
159
160 QMenu * toolbar_menu;
161 QMenu * statusbar_menu;
162
163 int last_second;
164
165 bool fullscreen_toolbar1_was_visible;
166 bool compact_toolbar1_was_visible;
167#ifdef LANGUAGE_TOOLBAR
168 bool fullscreen_toolbar2_was_visible;
169 bool compact_toolbar2_was_visible;
170#endif
171};
172
173#endif
Note: See TracBrowser for help on using the repository browser.