summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-03-21 10:31:06 (UTC)
committer llornkcor <llornkcor>2005-03-21 10:31:06 (UTC)
commit18825d8195f05d1a82affc0111f524371dbdeb5f (patch) (side-by-side diff)
treeaa807f10454b77496bb18a24569e12bf38acb7cf
parentda645ace9b556dd132ac998cd124fa1e062e0032 (diff)
downloadopie-18825d8195f05d1a82affc0111f524371dbdeb5f.zip
opie-18825d8195f05d1a82affc0111f524371dbdeb5f.tar.gz
opie-18825d8195f05d1a82affc0111f524371dbdeb5f.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opierec/vumeter.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/noncore/multimedia/opierec/vumeter.cpp b/noncore/multimedia/opierec/vumeter.cpp
index c28dbe4..6a3f7c2 100644
--- a/noncore/multimedia/opierec/vumeter.cpp
+++ b/noncore/multimedia/opierec/vumeter.cpp
@@ -3,4 +3,5 @@
///// copyright : (C) 1999 by Martin Lorenz
////// email : lorenz@ch.tum.de
+// also copyright 2005 lpotter@trolltech.com
#include "vumeter.h"
@@ -11,7 +12,4 @@
#include <qdrawutl.h>
-#include <opie2/odebug.h>
-using namespace Opie::Core;
-
#include <math.h>
@@ -19,5 +17,5 @@ VUMeter::VUMeter(QWidget *parent, const char *name, const int tr)
: QWidget( parent, name )
{
- int tracks = tr;
+ tracks = tr;
int i;
@@ -28,4 +26,6 @@ VUMeter::VUMeter(QWidget *parent, const char *name, const int tr)
}
+ colorScheme = 0;
+
readConf();
@@ -40,5 +40,4 @@ VUMeter::VUMeter(QWidget *parent, const char *name, const int tr)
int i16 = (j);
color[i] = QColor(( 15 - i16) * 16, 255, 255, QColor::Hsv);
-// owarn << color[i].name() << oendl;
j--;
}
@@ -53,9 +52,8 @@ VUMeter::VUMeter(QWidget *parent, const char *name, const int tr)
VUMeter::~VUMeter(){
- writeConf();
+// writeConf();
}
void VUMeter::update(){
-// qWarning("vumeter update");
vuTimer->start(para.update, FALSE);
if (para.onOff) {
@@ -70,14 +68,13 @@ void VUMeter::update(){
void VUMeter::slotOn() {
connect(vuTimer, SIGNAL(timeout()), this , SLOT(timeSlot()));
- para.onOff=true;
+ para.onOff = true;
}
void VUMeter::slotOff() {
disconnect(vuTimer, SIGNAL(timeout()), this , SLOT(timeSlot()));
- para.onOff=false;
+ para.onOff = false;
}
void VUMeter::slotProps() {
- qDebug("VU-Dialog");
}
@@ -99,7 +96,7 @@ void VUMeter::resizeEvent(QResizeEvent* event) {
void VUMeter::resize() {
- qWarning("resize VUMeter painting");
+// qWarning("resize VUMeter painting");
if(buffer == 0)
- qDebug("Dude NULL pixmap buffer!");
+ qWarning("Dude NULL pixmap buffer!");
buffer->fill(black);
@@ -122,4 +119,5 @@ void VUMeter::resize() {
font = painter.font(); font.setPointSize( 2 * dy - 2);
painter.setFont(font);
+
for(i = 0; i < tracks + 2; i++) {
painter.setPen(green); painter.setBrush(green);
@@ -132,4 +130,5 @@ void VUMeter::resize() {
painter.drawText(textOffset + ox + dx * i, oy + dy * (para.leds) - 2, sx, 2 * dy, AlignCenter, str);
}
+
painter.end();
paint();
@@ -139,6 +138,4 @@ void VUMeter::resize() {
void VUMeter::timeSlot() {
int i;
-// getting stuck here
-// qDebug("calling paint() from timeSlot()\n");
paint();
for(i = 0; i < tracks + 2; i++) {
@@ -181,6 +178,4 @@ void VUMeter::paint() {
void VUMeter::setPeak(int a[]) {
int i;
-// qDebug("set peak int");
-// cerr<<"setting peak\n";
for(i = 0; i < tracks + 2; i++) {
if (a[i] > i_peak[i]) i_peak[i] = a[i];