X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Finterface_widgets.hpp;h=61edabbdd17c5f45b09f290ffac1434c6a334fbc;hb=495602e13542b7b3ed6646c9768e25d4bf66a2ee;hp=760084103da402f2a934c48c77cb30f7997cc855;hpb=5ccbc289ef6c96b118e6f0d28fa26554eac43bc7;p=vlc diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp index 760084103d..61edabbdd1 100644 --- a/modules/gui/qt4/components/interface_widgets.hpp +++ b/modules/gui/qt4/components/interface_widgets.hpp @@ -6,6 +6,7 @@ * * Authors: Clément Stenac * Jean-Baptiste Kempf + * Rafaël Carré * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +34,7 @@ #include #include +#define VOLUME_MAX 200 class ResizeEvent; class QPalette; @@ -64,6 +66,7 @@ private: vlc_mutex_t lock; signals: void askResize(); + void askVideoToShow(); private slots: void SetMinSize(); }; @@ -82,11 +85,13 @@ private: QLabel *label; QHBoxLayout *backgroundLayout; virtual void resizeEvent( QResizeEvent *e ); + virtual void contextMenuEvent( QContextMenuEvent *event ); int DrawBackground(); int CleanBackground(); intf_thread_t *p_intf; -private slots: +public slots: void setArt( QString ); + void toggle(){ TOGGLEV( this ); } }; class VisualSelector : public QFrame @@ -103,6 +108,7 @@ private slots: void next(); }; +/* Advanced Button Bar */ class QPushButton; class AdvControlsWidget : public QFrame { @@ -110,20 +116,23 @@ class AdvControlsWidget : public QFrame public: AdvControlsWidget( intf_thread_t *); virtual ~AdvControlsWidget(); + void enableInput( bool ); void enableVideo( bool ); + private: intf_thread_t *p_intf; - QPushButton *normalButton, *recordButton, *ABButton; + QPushButton *recordButton, *ABButton; QPushButton *snapshotButton, *frameButton; + private slots: - void normal(); void snapshot(); void frame(); void fromAtoB(); void record(); }; +/* Button Bar */ class InputSlider; class QSlider; class QGridLayout; @@ -155,6 +164,7 @@ private: QPushButton *playButton, *fullscreenButton; QPushButton *slowerButton, *fasterButton; AdvControlsWidget *advControls; + QLabel *volMuteLabel; bool b_advancedVisible; private slots: @@ -165,7 +175,6 @@ private slots: void updateVolume( int ); void fullscreen(); void extSettings(); - void prefs(); void faster(); void slower(); void toggleAdvanced(); @@ -181,9 +190,12 @@ public: virtual ~VolumeClickHandler() {}; bool eventFilter( QObject *obj, QEvent *e ) { - if (e->type() == QEvent::MouseButtonPress ) + if (e->type() == QEvent::MouseButtonPress ) { aout_VolumeMute( p_intf, NULL ); + audio_volume_t i_volume; + aout_VolumeGet( p_intf, &i_volume ); + m->updateVolume( i_volume * VOLUME_MAX / (AOUT_VOLUME_MAX/2) ); return true; } return false; @@ -193,6 +205,23 @@ private: intf_thread_t *p_intf; }; +#include +#include +class TimeLabel : public QLabel +{ + Q_OBJECT + void mousePressEvent( QMouseEvent *event ) + { + if( event->button() == Qt::LeftButton ) emit timeLabelClicked(); + } + void mouseDoubleClickEvent( QMouseEvent *event ) + { + emit timeLabelDoubleClicked(); + } +signals: + void timeLabelClicked(); + void timeLabelDoubleClicked(); +}; /******************** Playlist Widgets ****************/ #include @@ -208,8 +237,6 @@ class PlaylistWidget : public QSplitter public: PlaylistWidget( intf_thread_t *_p_i ) ; virtual ~PlaylistWidget(); - QSize widgetSize; - virtual QSize sizeHint() const; private: PLSelector *selector; PLPanel *rightPanel; @@ -225,4 +252,23 @@ signals: void artSet( QString ); }; + +/******************** Speed Control Widgets ****************/ +class SpeedControlWidget : public QFrame +{ + Q_OBJECT +public: + SpeedControlWidget( intf_thread_t *); + virtual ~SpeedControlWidget(); + void updateControls( int ); +private: + intf_thread_t *p_intf; + QSlider *speedSlider; + QPushButton *normalSpeedButton; +private slots: + void updateRate( int ); + void resetRate(); +}; + + #endif