Commit d5ef9279 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - no more timeElapsed/timeReamining menu for a boolean option. Right and...

Qt4 - no more timeElapsed/timeReamining menu for a boolean option. Right and left click toggle it, while double click opens the goto one. kudos to the KDE team.

parent afac1c04
......@@ -44,6 +44,8 @@
#include <QLabel>
#include <QSlider>
#include <QWidgetAction>
#include <QDockWidget>
#include <QToolBar>
#include <assert.h>
#include <vlc_keys.h>
......@@ -125,6 +127,17 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
setVLCWindowsTitle();
handleMainUi( settings );
#if 0 /* dock part */
QDockWidget *dock = new QDockWidget( this );
PlaylistWidget *plw = new PlaylistWidget( p_intf );
dock->setWidget( plw );
addDockWidget( Qt::RightDockWidgetArea, dock );
QToolBar *tb = new QToolBar(this);
tb->addAction( "playlist", dock, SLOT( hide() ) );
addToolBar(Qt::RightToolBarArea, tb);
#endif
/* Menu Bar */
QVLCMenu::createMenuBar( this, p_intf, playlistEmbeddedFlag,
visualSelectorEnabled );
......@@ -148,10 +161,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
speedLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
timeLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
CONNECT( timeLabel, timeLabelClicked(), this, toggleTimeDisplay() );
CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
CONNECT( speedLabel, customContextMenuRequested( QPoint ),
this, showSpeedMenu( QPoint ) );
CONNECT( timeLabel, customContextMenuRequested( QPoint ),
this, showTimeMenu( QPoint ) );
this, toggleTimeDisplay() );
/**********************
* Systray Management *
......@@ -409,14 +423,6 @@ void MainInterface::showSpeedMenu( QPoint pos )
speedControlMenu->exec( QCursor::pos() - pos + QPoint( 0, speedLabel->height() ) );
}
void MainInterface::showTimeMenu( QPoint pos )
{
QMenu menu( this );
menu.addAction( qtr("Elapsed Time") , this, SLOT( setElapsedTime() ) );
menu.addAction( qtr("Remaining Time") , this, SLOT( setRemainTime() ) );
menu.exec( QCursor::pos() - pos +QPoint( 0, timeLabel->height() ) );
}
/****************************************************************************
* Video Handling
****************************************************************************/
......@@ -675,12 +681,10 @@ void MainInterface::setDisplayPosition( float pos, int time, int length )
void MainInterface::toggleTimeDisplay()
{
msg_Dbg( p_intf, "Hello" );
b_remainingTime = ( b_remainingTime ? false : true );
}
void MainInterface::setElapsedTime(){ b_remainingTime = false; }
void MainInterface::setRemainTime(){ b_remainingTime = true; }
void MainInterface::setName( QString name )
{
input_name = name;
......
......@@ -117,7 +117,7 @@ private:
QLabel *timeLabel;
QLabel *speedLabel;
QLabel *nameLabel;
bool b_remainingTime;
void customEvent( QEvent *);
......@@ -136,8 +136,6 @@ private slots:
void setVLCWindowsTitle( QString title = "" );
void setDisplayPosition( float, int, int );
void toggleTimeDisplay();
void setElapsedTime();
void setRemainTime();
#if 0
void visual();
#endif
......@@ -146,7 +144,6 @@ private slots:
void updateSystrayTooltipName( QString );
void updateSystrayTooltipStatus( int );
void showSpeedMenu( QPoint );
void showTimeMenu( QPoint );
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment