1 /*****************************************************************************
2 * Controller_widget.cpp : Controller Widget for the controllers
3 ****************************************************************************
4 * Copyright (C) 2006-2008 the VideoLAN team
7 * Authors: Jean-Baptiste Kempf <jb@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #ifndef _CONTROLLER_WIDGET_H_
25 #define _CONTROLLER_WIDGET_H_
34 #include <QToolButton>
39 class QAbstractSlider;
42 * SPECIAL Widgets that are a bit more than just a ToolButton
43 * and have an icon/behaviour that changes depending on the context:
46 * - Teletext group buttons
47 * - Sound Widget group
49 class PlayButton : public QToolButton
53 void updateButtonIcons( bool );
56 class LoopButton : public QToolButton
60 void updateButtonIcons( int );
63 class AtoB_Button : public QToolButton
67 void updateButtonIcons( bool, bool );
70 #define VOLUME_MAX (QT_VOLUME_MAX * 100 / QT_VOLUME_DEFAULT)
71 class SoundWidget : public QWidget
76 SoundWidget( QWidget *parent, intf_thread_t *_p_i, bool,
77 bool b_special = false );
78 virtual ~SoundWidget();
79 void setMuted( bool );
82 virtual bool eventFilter( QObject *obj, QEvent *e );
85 intf_thread_t *p_intf;
87 QAbstractSlider *volumeSlider;
88 QFrame *volumeControlWidget;
92 bool b_ignore_valuechanged;
95 void userUpdateVolume( int );
96 void libUpdateVolume( void );
97 void updateMuteStatus( void );
98 void refreshLabels( void );
99 void showVolumeMenu( QPoint pos );
100 void valueChangedFilter( int );
103 void valueReallyChanged( int );