]> git.sesse.net Git - vlc/commitdiff
Qt4 - Right-Click menus for the main interface. Not implemented yet.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 19 Aug 2007 16:20:13 +0000 (16:20 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 19 Aug 2007 16:20:13 +0000 (16:20 +0000)
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index ceeb093071888ab228be557825f92b2a722e7947..3b5e3920bc96e844abb2d31e59bf4d822e6d57cb 100644 (file)
@@ -146,7 +146,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     statusBar()->addWidget( nameLabel, 8 );
     statusBar()->addPermanentWidget( speedLabel, 0 );
     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 = NULL;
     if( config_GetInt( p_intf, "qt-start-minimized") )
@@ -420,6 +425,22 @@ void MainInterface::resizeEvent( QResizeEvent *e )
         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
index 99a3f7ad384de02e45533816afd9aaeb6fdd4196..77ab8e7102c556f1165844f4413c8770d4054d64 100644 (file)
@@ -139,6 +139,8 @@ private slots:
     void updateSystrayMenu( int );
     void updateSystrayTooltipName( QString );
     void updateSystrayTooltipStatus( int );
+    void showSpeedMenu( QPoint );
+    void showTimeMenu( QPoint );
 };