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

gapewaveformpalette.cpp

00001 //gapewaveformpalette.cpp
00002 //Dave Chisholm dkc@ccrma.stanford.edu
00003 //5/24/00
00004 
00005 #include "gapewaveformpalette.h"
00006 
00007 GapeWaveformPalette::GapeWaveformPalette(QWidget* parent, const char * name, const QPixmap& icon)
00008 : GapeSimpleController(parent,name, icon) {
00009     preferredSize.setHeight(GAPE_SIMPLE_CONTROLLER_HEIGHT + GAPE_DRAWING_WIDGET_MIN_HEIGHT);
00010     if (GAPE_SIMPLE_CONTROLLER_WIDTH > GAPE_DRAWING_WIDGET_MIN_WIDTH) {
00011         preferredSize.setWidth(GAPE_SIMPLE_CONTROLLER_WIDTH);
00012     } else {
00013         preferredSize.setWidth(GAPE_DRAWING_WIDGET_MIN_WIDTH);
00014     }
00015 
00016     palette = new GapeDrawingWidget(this);
00017     palette->setAxisTitle(QwtPlot::xBottom,"User Drawn Waveform");
00018     palette->setAxisTitle(QwtPlot::yLeft,"Amplitude");
00019     palette->setAxisScale(QwtPlot::xBottom, 0.0,1.0);
00020     palette->setAxisScale(QwtPlot::yLeft, -1.0,1.0);
00021 
00022     //palette->setTitle
00023     //we strand some memory here but QT doesn't want to cooperate, keeps seq faulting and whatnot
00024     //removeChild(columnLayout);
00025     //delete columnLayout;
00026     /*columnLayout = new QVBoxLayout(this);
00027     columnLayout->addWidget(palette);
00028     columnLayout->addWidget(title);
00029     columnLayout->addWidget(pic);
00030     columnLayout->addWidget(freqControls);
00031     columnLayout->addWidget(gainControls);
00032     columnLayout->addWidget(muteControls);*/
00033     columnLayout->insertWidget(0, palette);
00034 
00035     //columnLayout->addWidget(palette);
00036     connect(palette, SIGNAL(emitPoint(double, double)), this, SLOT(setPoint(double, double)));
00037 }
00038 
00039 GapeWaveformPalette::~GapeWaveformPalette() {}
00040 
00041 
00042 void GapeWaveformPalette::setPoint(double x, double y) {
00043     //GapeConsts::reportError("GWP sp\n");
00044     emit emitPoint(x, (y * 2.0) - 1.0);
00045     requestUpdate();
00046 }

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