source: smplayer/trunk/src/defaultgui.h

Last change on this file was 188, checked in by Silvan Scherrer, 8 years ago

SMPlayer: update trunk to version 17.1.0

  • Property svn:eol-style set to LF
File size: 4.3 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2017 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 displayTime(double sec);
95 virtual void displayFrame(int frame);
96 virtual void displayABSection(int secs_a, int secs_b);
97 virtual void displayVideoInfo(int width, int height, double fps);
98 virtual void displayBitrateInfo(int vbitrate, int abitrate);
99 void checkCompactMode();
100#ifdef ADD_QUICK_ACCESS
101 void adaptForTabletMode();
102#endif
103
104 // Reimplemented:
105#if AUTODISABLE_ACTIONS
106 virtual void enableActionsOnPlaying();
107 virtual void disableActionsOnStop();
108#endif
109 virtual void togglePlayAction(Core::State state);
110
111 void adjustFloatingControlSize();
112
113protected:
114 void reconfigureFloatingControl();
115
116protected:
117 QLabel * time_display;
118 QLabel * frame_display;
119 QLabel * ab_section_display;
120 QLabel * video_info_display;
121 QLabel * format_info_display;
122 QLabel * bitrate_info_display;
123#ifdef BUFFERING_ANIMATION
124 StateWidget * state_widget;
125#endif
126
127 EditableToolbar * controlwidget;
128 EditableToolbar * controlwidget_mini;
129
130 EditableToolbar * toolbar1;
131
132#ifdef LANGUAGE_TOOLBAR
133 QToolBar * toolbar2;
134 QPushButton * select_audio;
135 QPushButton * select_subtitle;
136#endif
137
138 TimeSliderAction * timeslider_action;
139 VolumeSliderAction * volumeslider_action;
140
141#if MINI_ARROW_BUTTONS
142 SeekingButton * rewindbutton_action;
143 SeekingButton * forwardbutton_action;
144#endif
145
146 AutohideWidget * floating_control;
147 TimeLabelAction * time_label_action;
148 TimeLabelAction * current_time_label_action;
149 TimeLabelAction * total_time_label_action;
150 TimeLabelAction * remaining_time_label_action;
151
152 MyAction * viewFrameCounterAct;
153 MyAction * viewVideoInfoAct;
154 MyAction * viewFormatInfoAct;
155 MyAction * viewBitrateInfoAct;
156 MyAction * useMillisecondsAct;
157
158#if USE_CONFIGURABLE_TOOLBARS
159 MyAction * editToolbar1Act;
160 MyAction * editControl1Act;
161 MyAction * editControl2Act;
162 MyAction * editFloatingControlAct;
163#endif
164
165 QMenu * toolbar_menu;
166 QMenu * statusbar_menu;
167
168 bool fullscreen_toolbar1_was_visible;
169 bool compact_toolbar1_was_visible;
170#ifdef LANGUAGE_TOOLBAR
171 bool fullscreen_toolbar2_was_visible;
172 bool compact_toolbar2_was_visible;
173#endif
174};
175
176#endif
Note: See TracBrowser for help on using the repository browser.