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

Last change on this file since 167 was 165, checked in by Silvan Scherrer, 11 years ago

SMPlayer: update trunk to latest 0.8.7

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