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

gapedelaycontroller.cpp

00001 //gapesimplecontroller.cpp
00002 //Dave Chisholm dkc@ccrma.stanford.edu
00003 //11/24/00
00004 
00005 #include "gapedelaycontroller.h"
00006 
00007 GapeDelayController::GapeDelayController(QWidget* parent, const char * name, const QPixmap& icon)
00008 : GapeController(parent,name),
00009 titleFont("times", 12, QFont::Bold) {
00010     preferredSize.setHeight(GAPE_DELAY_CONTROLLER_HEIGHT);
00011     preferredSize.setWidth(GAPE_DELAY_CONTROLLER_WIDTH);
00012 
00013     title = new QLabel(this);
00014     title->setFont(titleFont);
00015     title->setText(name);
00016 
00017     delayControls = new QHBox(this);
00018     muteControls = new QHBox(this);
00019 
00020     delayLabel = new QLabel(delayControls);
00021     delayLabel->setText( "Delay (ms): " );
00022     delaySlider = new QwtSlider(delayControls);
00023     delaySlider->setRange(GAPE_DELAY_CONTROLLER_DELAY_MIN, GAPE_DELAY_CONTROLLER_DELAY_MAX, GAPE_DELAY_CONTROLLER_DELAY_STEP);
00024     delayLcd = new QLCDNumber(6,delayControls);
00025     delayLcd->setSmallDecimalPoint(true);
00026 
00027     clearLabel = new QLabel(muteControls);
00028     //clearLabel->setText( "Clear delay buffer?: " );
00029     clearButton = new QPushButton("Clear Delay Buffer?",muteControls);
00030 
00031     muteLabel = new QLabel(muteControls);
00032     muteLabel->setText( "Mute: " );
00033     muteBox = new QCheckBox(muteControls);
00034 
00035     QVBoxLayout* columnLayout;
00036 
00037     connect(delaySlider, SIGNAL(valueChanged(double)), this, SIGNAL(emitDelay(double)));
00038     connect(delaySlider, SIGNAL(valueChanged(double)), delayLcd, SLOT(display(double)));
00039     connect(this, SIGNAL(emitDelay(double)), delaySlider, SLOT(setValue(double)));
00040     connect(muteBox, SIGNAL(toggled(bool)), this, SIGNAL(emitMute(bool)));
00041     connect(this, SIGNAL(emitMute(bool)), muteBox, SLOT(setChecked(bool)));
00042     connect(clearButton, SIGNAL(clicked()), this, SIGNAL(emitClear()));
00043 
00044     /*delaySlider->setValue(GAPE_SIMPLE_CONTROLLER_DEFAULT_FREQ);
00045     gainSlider->setValue(GAPE_SIMPLE_CONTROLLER_DEFAULT_GAIN);
00046     muteBox->setChecked(false);*/
00047 
00048     //connect(delaySlider, SIGNAL(valueChanged(double)), this, SLOT(gotFreq(double)));
00049     //connect(this, SIGNAL(emitFreq(double)), this, SLOT(testFreq(double)));
00050 
00051     columnLayout = new QVBoxLayout(this);
00052     columnLayout->addWidget(title);
00053     columnLayout->addWidget(delayControls);
00054     columnLayout->addWidget(muteControls);
00055 }
00056 
00057 GapeDelayController::~GapeDelayController() {}
00058 
00059 QSize GapeDelayController::sizeHint() const {
00060     return preferredSize;
00061 }

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