Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

gapemutecontroller.h

00001 //gapemutecontroller.h
00002 //Dave Chisholm dkc@ccrma.stanford.edu
00003 //5/24/01
00004 
00005 #ifndef _GAPE_MUTE_CONTROLLER_H_
00006 #define _GAPE_MUTE_CONTROLLER_H_
00007 
00008 #include "gapecontroller.h"
00009 #include <qwidget.h>
00010 #include <qlabel.h>
00011 #include <qlayout.h>
00012 #include <qcheckbox.h>
00013 
00014 #define GAPE_MUTE_CONTROLLER_HEIGHT 50
00015 #define GAPE_MUTE_CONTROLLER_WIDTH 40
00016 
00024 class GapeMuteController : public GapeController
00025 {
00026   Q_OBJECT
00027     public:
00028     QWidget* pic;
00029     QLabel* title;
00030     QLabel* muteLabel;
00031     QCheckBox* muteBox;
00032     QHBoxLayout* columnLayout;
00033 
00041         GapeMuteController(QWidget* parent=NULL, const char * name=0, const QPixmap& icon=0)
00042         : GapeController(parent,name),
00043         titleFont("times", 12, QFont::Bold) {
00044             preferredSize.setHeight(GAPE_MUTE_CONTROLLER_HEIGHT);
00045             preferredSize.setWidth(GAPE_MUTE_CONTROLLER_WIDTH);
00046             title = new QLabel(this);
00047             title->setFont(titleFont);
00048             title->setText(name);
00049 
00050             //muteLabel = new QLabel(muteControls);
00051             //muteLabel->setText( "Mute?" );
00052             muteBox = new QCheckBox(this);
00053             columnLayout = new QHBoxLayout(this);
00054             columnLayout->addWidget(title);
00055             //columnLayout->addWidget(muteLabel);
00056             columnLayout->addWidget(muteBox);
00057             connect(muteBox, SIGNAL(toggled(bool)), this, SIGNAL(emitMute(bool)));
00058             connect(this, SIGNAL(emitMute(bool)), this, SLOT(setChecked(bool)));
00059         }
00060 
00064         ~GapeMuteController() {};
00065 
00066     virtual QSize sizeHint() const {
00067         return preferredSize;
00068     }
00069 
00070     public slots:
00071         virtual void setChecked(bool b) {
00072             muteBox->setChecked(b);
00073         }
00074 
00075     protected:
00076         QFont titleFont;
00077         QSize preferredSize;
00078 
00079 };
00080 #endif

Generated at Thu Jun 21 13:28:49 2001 for GAPE by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001