controller_widget.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
00043
00044
00045
00046
00047
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