]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/util/customwidgets.cpp
Qt4 - Support for VolumeMuteKey, as spotted by DGMurdockIII
[vlc] / modules / gui / qt4 / util / customwidgets.cpp
index 437cde045f8ae61f0b46ca6bba0bfc61277fa9e3..907e71ccc1fcd9dd4b3c8b9c14314d17cdbff01b 100644 (file)
@@ -21,7 +21,8 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
 
 #include "customwidgets.hpp"
 #include <QPainter>
@@ -75,7 +76,6 @@ void ClickLineEdit::dropEvent( QDropEvent *ev )
     QLineEdit::dropEvent( ev );
 }
 
-
 void ClickLineEdit::focusInEvent( QFocusEvent *ev )
 {
     if ( mDrawClickMsg == true ) {
@@ -85,7 +85,6 @@ void ClickLineEdit::focusInEvent( QFocusEvent *ev )
     QLineEdit::focusInEvent( ev );
 }
 
-
 void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
 {
     if ( text().isEmpty() ) {
@@ -144,6 +143,13 @@ int qtEventToVLCKey( QKeyEvent *e )
         HANDLE( Key_End, KEY_END );
         HANDLE( Key_Insert, KEY_INSERT );
         HANDLE( Key_Delete, KEY_DELETE );
+        HANDLE( Key_VolumeDown, KEY_VOLUME_DOWN);
+        HANDLE( Key_VolumeUp, KEY_VOLUME_UP );
+        HANDLE( Key_VolumeMute, KEY_VOLUME_MUTE );
+        HANDLE( Key_MediaPlay, KEY_MEDIA_PLAY_PAUSE );
+        HANDLE( Key_MediaStop, KEY_MEDIA_STOP );
+        HANDLE( Key_MediaPrevious, KEY_MEDIA_PREV_TRACK );
+        HANDLE( Key_MediaNext, KEY_MEDIA_NEXT_TRACK );
 
     }
     if( !found )
@@ -190,3 +196,4 @@ QString VLCKeyToString( int val )
     }
     return r;
 }
+