00001
00002
00003
00004
00005 #ifndef _GAPE_CONTROLLER_H_
00006 #define _GAPE_CONTROLLER_H_
00007
00008 #include <qwidget.h>
00009 #include <qapplication.h>
00010 #include "gapeconsts.h"
00011
00012
00045 class GapeController : public QWidget
00046 {
00047 Q_OBJECT
00048 public:
00054 GapeController(QWidget* parent=0, const char * name=0)
00055 : QWidget(parent,name) {};
00056
00060 ~GapeController() {};
00061
00062 public slots:
00067 void setFreq(double freq) {
00068 emit emitFreq(freq);
00069 }
00070
00075 void setGain(double gain) {
00076 emit emitGain(gain);
00077 }
00078
00083 void setGainDb(double gain) {
00084 emit emitGainDb(gain);
00085 }
00086
00091 void setSolo(bool s) {
00092 emit emitSolo(s);
00093 }
00094
00099 void setMute(bool m) {
00100 emit emitMute(m);
00101 }
00102
00107 void setNumChannels(int c) {
00108 emit emitNumChannels(c);
00109 }
00110
00111
00112 signals:
00113 void emitFreq(double freq);
00114 void emitGain(double gain);
00115 void emitGainDb(double gain);
00116 void emitSolo(bool s);
00117 void emitMute(bool m);
00118 void emitNumChannels(int c);
00119
00120
00121 protected:
00125 virtual void requestUpdate() {
00126
00127
00128
00129
00130
00131 #ifdef DIRECTX_API
00132 GapeRedrawEvent* ge = new GapeRedrawEvent();
00133 QApplication::postEvent( this, ge );
00134 #else
00135 updateDisplay();
00136 #endif
00137 }
00138
00143 virtual void customEvent(QCustomEvent* e) {
00144 if ( e->type() == GAPE_REDRAW_EVENT ) {
00145 updateDisplay();
00146 }
00147 }
00148
00152 virtual void updateDisplay () {}
00153
00154 };
00155 #endif