00001
00002
00003
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
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
00045
00046
00047
00048
00049
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 }