controller_widget.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Controller_widget.cpp : Controller Widget for the controllers
00003  ****************************************************************************
00004  * Copyright (C) 2006-2008 the VideoLAN team
00005  * $Id: 5727da3cb1d03161e58855b17332ca57be33149a $
00006  *
00007  * Authors: Jean-Baptiste Kempf <jb@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef _CONTROLLER_WIDGET_H_
00025 #define _CONTROLLER_WIDGET_H_
00026 
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030 
00031 #include "qt4.hpp"
00032 
00033 #include <QWidget>
00034 #include <QFrame>
00035 #include <QToolButton>
00036 
00037 class QLabel;
00038 class QSpinBox;
00039 class QAbstractSlider;
00040 
00041 /**
00042  * SPECIAL Widgets that are a bit more than just a ToolButton
00043  * and have an icon/behaviour that changes depending on the context:
00044  * - playButton
00045  * - A->B Button
00046  * - Teletext group buttons
00047  * - Sound Widget group
00048  **/
00049 class PlayButton : public QToolButton
00050 {
00051     Q_OBJECT
00052 private slots:
00053     void updateButton( bool );
00054 };
00055 
00056 class LoopButton : public QToolButton
00057 {
00058     Q_OBJECT
00059 public slots:
00060     void updateIcons( int );
00061 };
00062 
00063 class AtoB_Button : public QToolButton
00064 {
00065     Q_OBJECT
00066 private slots:
00067     void setIcons( bool, bool );
00068 };
00069 
00070 #define VOLUME_MAX 200
00071 class SoundWidget : public QWidget
00072 {
00073     Q_OBJECT
00074 
00075 public:
00076     SoundWidget( QWidget *parent, intf_thread_t  *_p_i, bool,
00077                  bool b_special = false );
00078     virtual ~SoundWidget();
00079     void setMuted( bool );
00080 
00081 private:
00082     intf_thread_t       *p_intf;
00083     QLabel              *volMuteLabel;
00084     QAbstractSlider     *volumeSlider;
00085     QFrame              *volumeControlWidget;
00086     QMenu               *volumeMenu;
00087     virtual bool eventFilter( QObject *obj, QEvent *e );
00088     bool                b_is_muted;
00089 
00090 protected slots:
00091     void userUpdateVolume( int );
00092     void libUpdateVolume( void );
00093     void updateMuteStatus( void );
00094     void refreshLabels( void );
00095     void showVolumeMenu( QPoint pos );
00096 };
00097 
00098 #endif

Generated on Tue May 25 08:04:57 2010 for VLC by  doxygen 1.5.6