X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Finterface_widgets.hpp;h=59275c66bf2d481f0301fcc06d56f24a35b1e2db;hb=ddd3518c0bf1fe2102105ed1ff77d4312ed72d17;hp=54447bd4613b87a1101c93d3146f42063e0f80d0;hpb=a5ac2854a978066f9c3defc02f3dfbb1e73e2e8e;p=vlc diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp index 54447bd461..59275c66bf 100644 --- a/modules/gui/qt4/components/interface_widgets.hpp +++ b/modules/gui/qt4/components/interface_widgets.hpp @@ -26,6 +26,10 @@ #ifndef _INTFWIDGETS_H_ #define _INTFWIDGETS_H_ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include #include @@ -52,43 +56,40 @@ public: void *request( vout_thread_t *, int *, int *, unsigned int *, unsigned int * ); - void release( void * ); - int control( void *, int, va_list ); + void release( void * ); + int control( void *, int, va_list ); - int i_video_height, i_video_width; - vout_thread_t *p_vout; - - QSize widgetSize; - virtual QSize sizeHint() const; private: - QWidget *frame; intf_thread_t *p_intf; + vout_thread_t *p_vout; + vlc_mutex_t lock; + signals: - void askResize(); -private slots: - void SetMinSize(); + void askVideoWidgetToShow(); + //void askResize(); + +public slots: + void SetSizing( unsigned int, unsigned int ); }; /******************** Background Widget ****************/ -class BackgroundWidget : public QFrame +class BackgroundWidget : public QWidget { Q_OBJECT public: BackgroundWidget( intf_thread_t * ); virtual ~BackgroundWidget(); - QSize widgetSize; - virtual QSize sizeHint() const; + private: QPalette plt; QLabel *label; - QHBoxLayout *backgroundLayout; - virtual void resizeEvent( QResizeEvent *e ); - int DrawBackground(); - int CleanBackground(); + virtual void contextMenuEvent( QContextMenuEvent *event ); intf_thread_t *p_intf; -private slots: - void setArt( QString ); + +public slots: + void toggle(){ TOGGLEV( this ); } + void update( QString ); }; class VisualSelector : public QFrame @@ -105,6 +106,7 @@ private slots: void next(); }; +/* Advanced Button Bar */ class QPushButton; class AdvControlsWidget : public QFrame { @@ -112,54 +114,65 @@ 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; + + mtime_t timeA, timeB; + private slots: - void normal(); void snapshot(); +#if 0 void frame(); +#endif void fromAtoB(); void record(); + void AtoBLoop( float, int, int ); }; - - +/* Button Bar */ class InputSlider; class QSlider; class QGridLayout; class VolumeClickHandler; +class SoundSlider; +class QAbstractSlider; +class QToolButton; + class ControlsWidget : public QFrame { Q_OBJECT public: - ControlsWidget( intf_thread_t *, bool ); + /* p_intf, advanced control visible or not, blingbling or not */ + ControlsWidget( intf_thread_t *, MainInterface*, bool, bool ); virtual ~ControlsWidget(); QPushButton *playlistButton; - QSlider *volumeSlider; void setStatus( int ); void enableInput( bool ); void enableVideo( bool ); public slots: void setNavigation( int ); - void updateOnTimer(); protected: friend class MainInterface; friend class VolumeClickHandler; private: intf_thread_t *p_intf; - QFrame *discFrame; + QWidget *discFrame; + QWidget *telexFrame; QGridLayout *controlLayout; InputSlider *slider; QPushButton *prevSectionButton, *nextSectionButton, *menuButton; QPushButton *playButton, *fullscreenButton; - QPushButton *slowerButton, *fasterButton; + QToolButton *slowerButton, *fasterButton; AdvControlsWidget *advControls; QLabel *volMuteLabel; + QAbstractSlider *volumeSlider; bool b_advancedVisible; private slots: @@ -168,6 +181,7 @@ private slots: void prev(); void next(); void updateVolume( int ); + void updateVolume( void ); void fullscreen(); void extSettings(); void faster(); @@ -207,7 +221,7 @@ class TimeLabel : public QLabel Q_OBJECT void mousePressEvent( QMouseEvent *event ) { - if( event->button() == Qt::LeftButton ) emit timeLabelClicked(); + emit timeLabelClicked(); } void mouseDoubleClickEvent( QMouseEvent *event ) { @@ -218,37 +232,6 @@ signals: void timeLabelDoubleClicked(); }; -/******************** Playlist Widgets ****************/ -#include -#include -class QSignalMapper; -class PLSelector; -class PLPanel; -class QPushButton; - -class PlaylistWidget : public QSplitter -{ - Q_OBJECT; -public: - PlaylistWidget( intf_thread_t *_p_i ) ; - virtual ~PlaylistWidget(); - QSize widgetSize; - virtual QSize sizeHint() const; -private: - PLSelector *selector; - PLPanel *rightPanel; - QPushButton *addButton; - QLabel *art; - QString prevArt; -protected: - intf_thread_t *p_intf; -private slots: - void setArt( QString ); -signals: - void rootChanged( int ); - void artSet( QString ); -}; - /******************** Speed Control Widgets ****************/ class SpeedControlWidget : public QFrame @@ -261,11 +244,9 @@ public: private: intf_thread_t *p_intf; QSlider *speedSlider; - QPushButton *normalSpeedButton; private slots: void updateRate( int ); void resetRate(); }; - #endif