| 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 SKINGUI_H
|
|---|
| 20 | #define SKINGUI_H
|
|---|
| 21 |
|
|---|
| 22 | #include "guiconfig.h"
|
|---|
| 23 | #include "baseguiplus.h"
|
|---|
| 24 | #include <QPoint>
|
|---|
| 25 |
|
|---|
| 26 | class QToolBar;
|
|---|
| 27 | class EditableToolbar;
|
|---|
| 28 | class QPushButton;
|
|---|
| 29 | class QResizeEvent;
|
|---|
| 30 | class MyAction;
|
|---|
| 31 | class QMenu;
|
|---|
| 32 | class TimeSliderAction;
|
|---|
| 33 | class VolumeSliderAction;
|
|---|
| 34 | class AutohideWidget;
|
|---|
| 35 | class TimeLabelAction;
|
|---|
| 36 | class MyAction;
|
|---|
| 37 | class MediaBarPanel;
|
|---|
| 38 |
|
|---|
| 39 | #if MINI_ARROW_BUTTONS
|
|---|
| 40 | class SeekingButton;
|
|---|
| 41 | #endif
|
|---|
| 42 |
|
|---|
| 43 | //#define SKIN_EDITABLE_CONTROL 1
|
|---|
| 44 |
|
|---|
| 45 | class SkinGui : public BaseGuiPlus
|
|---|
| 46 | {
|
|---|
| 47 | Q_OBJECT
|
|---|
| 48 |
|
|---|
| 49 | public:
|
|---|
| 50 | SkinGui( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
|
|---|
| 51 | ~SkinGui();
|
|---|
| 52 |
|
|---|
| 53 | public slots:
|
|---|
| 54 | //virtual void showPlaylist(bool b);
|
|---|
| 55 |
|
|---|
| 56 | protected:
|
|---|
| 57 | virtual void retranslateStrings();
|
|---|
| 58 | virtual QMenu * createPopupMenu();
|
|---|
| 59 |
|
|---|
| 60 | void createMainToolBars();
|
|---|
| 61 | void createControlWidget();
|
|---|
| 62 | void createFloatingControl();
|
|---|
| 63 | void createActions();
|
|---|
| 64 | void createMenus();
|
|---|
| 65 | virtual void populateMainMenu();
|
|---|
| 66 |
|
|---|
| 67 | void loadConfig();
|
|---|
| 68 | void saveConfig();
|
|---|
| 69 |
|
|---|
| 70 | virtual void aboutToEnterFullscreen();
|
|---|
| 71 | virtual void aboutToExitFullscreen();
|
|---|
| 72 | virtual void aboutToEnterCompactMode();
|
|---|
| 73 | virtual void aboutToExitCompactMode();
|
|---|
| 74 |
|
|---|
| 75 | protected slots:
|
|---|
| 76 | virtual void updateWidgets();
|
|---|
| 77 | virtual void displayState(Core::State state);
|
|---|
| 78 | virtual void displayMessage(QString message, int time);
|
|---|
| 79 | virtual void displayMessage(QString message);
|
|---|
| 80 |
|
|---|
| 81 | // Reimplemented:
|
|---|
| 82 | #if AUTODISABLE_ACTIONS
|
|---|
| 83 | virtual void enableActionsOnPlaying();
|
|---|
| 84 | virtual void disableActionsOnStop();
|
|---|
| 85 | #endif
|
|---|
| 86 | virtual void togglePlayAction(Core::State);
|
|---|
| 87 |
|
|---|
| 88 | protected:
|
|---|
| 89 | MediaBarPanel* mediaBarPanel;
|
|---|
| 90 | QAction * mediaBarPanelAction;
|
|---|
| 91 |
|
|---|
| 92 | EditableToolbar * toolbar1;
|
|---|
| 93 | QToolBar * controlwidget;
|
|---|
| 94 |
|
|---|
| 95 | TimeSliderAction * timeslider_action;
|
|---|
| 96 | VolumeSliderAction * volumeslider_action;
|
|---|
| 97 |
|
|---|
| 98 | #if MINI_ARROW_BUTTONS
|
|---|
| 99 | SeekingButton * rewindbutton_action;
|
|---|
| 100 | SeekingButton * forwardbutton_action;
|
|---|
| 101 | #endif
|
|---|
| 102 |
|
|---|
| 103 | AutohideWidget * floating_control;
|
|---|
| 104 | TimeLabelAction * time_label_action;
|
|---|
| 105 |
|
|---|
| 106 | #if USE_CONFIGURABLE_TOOLBARS
|
|---|
| 107 | MyAction * editToolbar1Act;
|
|---|
| 108 | #if defined(SKIN_EDITABLE_CONTROL)
|
|---|
| 109 | MyAction * editFloatingControlAct;
|
|---|
| 110 | #endif
|
|---|
| 111 | #endif
|
|---|
| 112 |
|
|---|
| 113 | MyAction * viewVideoInfoAct;
|
|---|
| 114 | MyAction * scrollTitleAct;
|
|---|
| 115 |
|
|---|
| 116 | QMenu * toolbar_menu;
|
|---|
| 117 | QMenu * statusbar_menu;
|
|---|
| 118 |
|
|---|
| 119 | int last_second;
|
|---|
| 120 |
|
|---|
| 121 | bool fullscreen_toolbar1_was_visible;
|
|---|
| 122 | bool compact_toolbar1_was_visible;
|
|---|
| 123 |
|
|---|
| 124 | bool was_muted;
|
|---|
| 125 | };
|
|---|
| 126 |
|
|---|
| 127 | #endif
|
|---|