| 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| 2 | Copyright (C) 2006-2010 Ricardo Villalba <[email protected]>
|
|---|
| 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 | #include "defaultgui.h"
|
|---|
| 20 | #include "helper.h"
|
|---|
| 21 | #include "colorutils.h"
|
|---|
| 22 | #include "core.h"
|
|---|
| 23 | #include "global.h"
|
|---|
| 24 | #include "widgetactions.h"
|
|---|
| 25 | #include "playlist.h"
|
|---|
| 26 | #include "mplayerwindow.h"
|
|---|
| 27 | #include "myaction.h"
|
|---|
| 28 | #include "images.h"
|
|---|
| 29 | #include "floatingwidget.h"
|
|---|
| 30 | #include "toolbareditor.h"
|
|---|
| 31 | #include "desktopinfo.h"
|
|---|
| 32 |
|
|---|
| 33 | #if DOCK_PLAYLIST
|
|---|
| 34 | #include "playlistdock.h"
|
|---|
| 35 | #endif
|
|---|
| 36 |
|
|---|
| 37 | #include <QMenu>
|
|---|
| 38 | #include <QToolBar>
|
|---|
| 39 | #include <QSettings>
|
|---|
| 40 | #include <QLabel>
|
|---|
| 41 | #include <QStatusBar>
|
|---|
| 42 | #include <QPushButton>
|
|---|
| 43 | #include <QToolButton>
|
|---|
| 44 | #include <QMenuBar>
|
|---|
| 45 |
|
|---|
| 46 | using namespace Global;
|
|---|
| 47 |
|
|---|
| 48 | DefaultGui::DefaultGui( QWidget * parent, Qt::WindowFlags flags )
|
|---|
| 49 | : BaseGuiPlus( parent, flags )
|
|---|
| 50 | {
|
|---|
| 51 | createStatusBar();
|
|---|
| 52 |
|
|---|
| 53 | connect( this, SIGNAL(timeChanged(QString)),
|
|---|
| 54 | this, SLOT(displayTime(QString)) );
|
|---|
| 55 | connect( this, SIGNAL(frameChanged(int)),
|
|---|
| 56 | this, SLOT(displayFrame(int)) );
|
|---|
| 57 | connect( this, SIGNAL(ABMarkersChanged(int,int)),
|
|---|
| 58 | this, SLOT(displayABSection(int,int)) );
|
|---|
| 59 | connect( this, SIGNAL(videoInfoChanged(int,int,double)),
|
|---|
| 60 | this, SLOT(displayVideoInfo(int,int,double)) );
|
|---|
| 61 |
|
|---|
| 62 | connect( this, SIGNAL(cursorNearBottom(QPoint)),
|
|---|
| 63 | this, SLOT(showFloatingControl(QPoint)) );
|
|---|
| 64 | connect( this, SIGNAL(cursorNearTop(QPoint)),
|
|---|
| 65 | this, SLOT(showFloatingMenu(QPoint)) );
|
|---|
| 66 | connect( this, SIGNAL(cursorFarEdges()),
|
|---|
|
|---|