[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdemultimedia/noatun/modules/kjofol-skin
From:       Stefan Gehn <sgehn () gmx ! net>
Date:       2003-01-19 12:07:31
[Download RAW message or body]

CVS commit by metz: 

* support equalizerbutton now I know how to open noatuns equalizerview
* fix equalizer init, that QTimer::singleShot was unneeded
* cleaned kdDebug messages


  M +7 -4      kjbutton.cpp   1.12
  M +9 -9      kjequalizer.cpp   1.4


--- kdemultimedia/noatun/modules/kjofol-skin/kjbutton.cpp  #1.11:1.12
@@ -13,4 +13,5 @@
 #include <noatun/player.h>
 #include <noatun/vequalizer.h>
+#include <equalizerview.h> // FIXME: not part of noatun-API
 
 #include <kdebug.h>
@@ -102,4 +103,6 @@ QString KJButton::tip()
         else if (mTitle=="repeatbutton")
                 str=i18n("Loop");
+        else if (mTitle=="equalizerbutton")
+                str=i18n("Show Equalizer Window");
         else if (mTitle=="equalizeronbutton")
                 str=i18n("Turn on Equalizer");
@@ -166,11 +169,7 @@ void KJButton::eqEnabled(bool on)
 
         if (mTitle=="equalizeronbutton")
-        {
                 showPressed(on);
-        }
         else if (mTitle=="equalizeroffbutton")
-        {
                 showPressed(!on);
-        }
 }
 
@@ -222,4 +221,8 @@ void KJButton::mouseRelease(const QPoint
                         showPressed ( true );
                 }
+        }
+        else if (mTitle=="equalizerbutton")
+        {
+                napp->equalizerView();
         }
         else if (mTitle=="equalizeronbutton")

--- kdemultimedia/noatun/modules/kjofol-skin/kjequalizer.cpp  #1.3:1.4
@@ -26,8 +26,8 @@ KJEqualizer::KJEqualizer(const QStringLi
         setRect(x,y,xs,ys);
 
-        mBars=p->pixmap(parser()["equalizerbmp"][3]);
+        mBars = p->pixmap(parser()["equalizerbmp"][3]);
 
-        mBands=l[6].toInt();
-        mXSpace=l[7].toInt();
+        mBands = l[6].toInt();
+        mXSpace = l[7].toInt();
 
         // background under equalizer
@@ -43,12 +43,12 @@ KJEqualizer::KJEqualizer(const QStringLi
         mBandHalfHeight=parser()["EqualizerBmp"][2].toInt();
         
-        kdDebug(66666) << "mBands=" << mBands << ", mXSpace=" << mXSpace << ", \
mBandWidth=" << mBandWidth << ", mBandHalfHeight=" <<  mBandHalfHeight << "." << \
endl; +        kdDebug(66666) << "[KJEqualizer] mBands=" << mBands << ", mXSpace=" << \
mXSpace << ", mBandWidth=" << mBandWidth << ", mBandHalfHeight=" <<  mBandHalfHeight \
<< "." << endl;  
-        kdDebug(66666) << "creating VInterpolation for " << mBands << " bands..." << \
endl; +        kdDebug(66666) << "[KJEqualizer] creating VInterpolation for " << \
mBands << " bands..." << endl;  mInterpEq = new VInterpolation(mBands);
         napp->vequalizer()->setBands(mBands); // FIXME: hack because spline sucks :P
         connect(napp->vequalizer(), SIGNAL(changed()), this, \
SLOT(slotUpdateBuffer()));  
-        QTimer::singleShot(0,this,SLOT(slotUpdateBuffer())); // fill mView pixmap \
with valid data +        slotUpdateBuffer(); // fill mView pixmap with valid data
 }
 
@@ -124,5 +124,5 @@ void KJEqualizer::mouseMove(const QPoint
 bool KJEqualizer::mousePress(const QPoint &p)
 {
-        kdDebug(66666) << "[KJEqualizer] setting band " << barNum(p) << " to level " \
<< level(p) << endl; +        kdDebug(66666) << "[KJEqualizer] setting band " << \
mBands << "/" << barNum(p) << " to level " << level(p) << endl;  VBand b = \
mInterpEq->band( barNum(p) );  b.setLevel( level(p) );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic