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

Last change on this file since 113 was 112, checked in by Silvan Scherrer, 15 years ago

Smplayer: eol-style

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