source: smplayer/vendor/current/src/defaultgui.h@ 186

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

SMPlayer: update vendor to 17.1.0

File size: 4.3 KB
RevLine 
[90]1/* smplayer, GUI front-end for mplayer.
[186]2 Copyright (C) 2006-2017 Ricardo Villalba <[email protected]>
[90]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
[175]19#ifndef DEFAULTGUI_H
20#define DEFAULTGUI_H
[90]21
[175]22#define BUFFERING_ANIMATION
[179]23//#define LANGUAGE_TOOLBAR
[175]24
[179]25#ifdef IDOPT_BUILD
26#define ADD_QUICK_ACCESS
27#endif
28
[90]29#include "guiconfig.h"
30#include "baseguiplus.h"
31#include <QPoint>
32
33class QToolBar;
[127]34class EditableToolbar;
[90]35class QPushButton;
36class QResizeEvent;
37class MyAction;
38class QMenu;
39class TimeSliderAction;
40class VolumeSliderAction;
[163]41class AutohideWidget;
[90]42class TimeLabelAction;
43class MyAction;
44
45#if MINI_ARROW_BUTTONS
46class SeekingButton;
47#endif
48
[175]49#ifdef BUFFERING_ANIMATION
50class StateWidget;
51#endif
52
[90]53class DefaultGui : public BaseGuiPlus
54{
55 Q_OBJECT
56
57public:
[127]58 DefaultGui( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
[90]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();
[179]79 virtual void populateMainMenu();
[90]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();
[186]94 virtual void displayTime(double sec);
[90]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);
[186]98 virtual void displayBitrateInfo(int vbitrate, int abitrate);
[179]99 void checkCompactMode();
100#ifdef ADD_QUICK_ACCESS
101 void adaptForTabletMode();
102#endif
[90]103
104 // Reimplemented:
105#if AUTODISABLE_ACTIONS
106 virtual void enableActionsOnPlaying();
107 virtual void disableActionsOnStop();
108#endif
[175]109 virtual void togglePlayAction(Core::State state);
[90]110
[175]111 void adjustFloatingControlSize();
112
[90]113protected:
[163]114 void reconfigureFloatingControl();
115
116protected:
[90]117 QLabel * time_display;
118 QLabel * frame_display;
119 QLabel * ab_section_display;
120 QLabel * video_info_display;
[179]121 QLabel * format_info_display;
[186]122 QLabel * bitrate_info_display;
[175]123#ifdef BUFFERING_ANIMATION
124 StateWidget * state_widget;
125#endif
[90]126
[127]127 EditableToolbar * controlwidget;
128 EditableToolbar * controlwidget_mini;
[90]129
[127]130 EditableToolbar * toolbar1;
[179]131
132#ifdef LANGUAGE_TOOLBAR
[90]133 QToolBar * toolbar2;
134 QPushButton * select_audio;
135 QPushButton * select_subtitle;
[179]136#endif
[90]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
[163]146 AutohideWidget * floating_control;
[90]147 TimeLabelAction * time_label_action;
[179]148 TimeLabelAction * current_time_label_action;
149 TimeLabelAction * total_time_label_action;
150 TimeLabelAction * remaining_time_label_action;
[90]151
152 MyAction * viewFrameCounterAct;
153 MyAction * viewVideoInfoAct;
[179]154 MyAction * viewFormatInfoAct;
[186]155 MyAction * viewBitrateInfoAct;
156 MyAction * useMillisecondsAct;
[90]157
[127]158#if USE_CONFIGURABLE_TOOLBARS
159 MyAction * editToolbar1Act;
160 MyAction * editControl1Act;
161 MyAction * editControl2Act;
162 MyAction * editFloatingControlAct;
163#endif
164
[90]165 QMenu * toolbar_menu;
166 QMenu * statusbar_menu;
167
168 bool fullscreen_toolbar1_was_visible;
[179]169 bool compact_toolbar1_was_visible;
170#ifdef LANGUAGE_TOOLBAR
[90]171 bool fullscreen_toolbar2_was_visible;
172 bool compact_toolbar2_was_visible;
[179]173#endif
[90]174};
175
176#endif
Note: See TracBrowser for help on using the repository browser.