-rw-r--r-- | noncore/multimedia/opierec/vumeter.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/noncore/multimedia/opierec/vumeter.cpp b/noncore/multimedia/opierec/vumeter.cpp index 0edc806..c28dbe4 100644 --- a/noncore/multimedia/opierec/vumeter.cpp +++ b/noncore/multimedia/opierec/vumeter.cpp @@ -25,29 +25,24 @@ VUMeter::VUMeter(QWidget *parent, const char *name, const int tr) for(i = 0; i < tracks + 2; i++) { peak[i] = hold[i] = 32768; holdTime[i] = 20; } readConf(); - -// QColor c; -// c.setHsv( (x * 255)/w, 255, 255 );// rainbow effect -// c.setRgb( 255, 0, 255); -// p.setPen(c); - + //rainbow effect - if( colorScheme = 0 ) { + if( colorScheme == 0 ) { for( i = 0; i < para.leds; i++) color[i] = green; color[0] = color[1] = red; color[2] = color[3] = color[4] = color[5] = yellow; } else { int j = para.leds - 4; for( i = 0; i < para.leds; i++) { - int i16 = (j);// & 15; + int i16 = (j); color[i] = QColor(( 15 - i16) * 16, 255, 255, QColor::Hsv); - owarn << color[i].name() << oendl; +// owarn << color[i].name() << oendl; j--; } } buffer = new QPixmap(); setBackgroundMode(NoBackground); @@ -58,13 +53,13 @@ VUMeter::VUMeter(QWidget *parent, const char *name, const int tr) VUMeter::~VUMeter(){ writeConf(); } void VUMeter::update(){ - qWarning("vumeter update"); +// qWarning("vumeter update"); vuTimer->start(para.update, FALSE); if (para.onOff) { disconnect(vuTimer, SIGNAL(timeout()), this , SLOT(timeSlot())); connect(vuTimer, SIGNAL(timeout()), this , SLOT(timeSlot())); } else { disconnect(vuTimer, SIGNAL(timeout()), this , SLOT(timeSlot())); @@ -219,15 +214,13 @@ void VUMeter::readConf() { para.update = config.readNumEntry("Update", 25); para.hold = config.readNumEntry("Hold", 20); para.reso = config.readNumEntry("Resolution", 3); para.leds = config.readNumEntry("LEDs", 20); para.resoFactor = pow(2, para.reso / 6.0); - colorScheme = config.readNumEntry("colorScheme", 0); -// update(); -// dia->updatePara(); + colorScheme = config.readNumEntry("colorScheme", 1); } void VUMeter::writeConf() { Config config("OpieRec"); config.setGroup("VU-Meter"); |