Commit 00eaa270 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Right-Click menus for the main interface. Not implemented yet.

parent 2067ae4c
...@@ -146,7 +146,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -146,7 +146,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
statusBar()->addWidget( nameLabel, 8 ); statusBar()->addWidget( nameLabel, 8 );
statusBar()->addPermanentWidget( speedLabel, 0 ); statusBar()->addPermanentWidget( speedLabel, 0 );
statusBar()->addPermanentWidget( timeLabel, 2 ); statusBar()->addPermanentWidget( timeLabel, 2 );
speedLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
timeLabel->setContextMenuPolicy ( Qt::CustomContextMenu );
CONNECT( speedLabel, customContextMenuRequested( QPoint ),
this, showSpeedMenu( QPoint ) );
CONNECT( timeLabel, customContextMenuRequested( QPoint ),
this, showTimeMenu( QPoint ) );
/* Systray */ /* Systray */
sysTray = NULL; sysTray = NULL;
if( config_GetInt( p_intf, "qt-start-minimized") ) if( config_GetInt( p_intf, "qt-start-minimized") )
...@@ -420,6 +425,22 @@ void MainInterface::resizeEvent( QResizeEvent *e ) ...@@ -420,6 +425,22 @@ void MainInterface::resizeEvent( QResizeEvent *e )
playlistWidget->updateGeometry(); playlistWidget->updateGeometry();
} }
} }
/****************************************************************************
* Small right-click menus
****************************************************************************/
void MainInterface::showSpeedMenu( QPoint pos )
{
QMenu menu( this );
menu.addAction( "Not Implemented Yet" );
menu.exec( QCursor::pos() );
}
void MainInterface::showTimeMenu( QPoint pos )
{
QMenu menu( this );
menu.addAction( "Not Implemented Yet" );
menu.exec( QCursor::pos() );
}
/***************************************************************************** /*****************************************************************************
* Systray Icon and Systray Menu * Systray Icon and Systray Menu
......
...@@ -139,6 +139,8 @@ private slots: ...@@ -139,6 +139,8 @@ private slots:
void updateSystrayMenu( int ); void updateSystrayMenu( int );
void updateSystrayTooltipName( QString ); void updateSystrayTooltipName( QString );
void updateSystrayTooltipStatus( int ); void updateSystrayTooltipStatus( int );
void showSpeedMenu( QPoint );
void showTimeMenu( QPoint );
}; };
......
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