diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch) | |
tree | 9047cf9e6b5c43878d5bf82660adae77ceee097a /noatun/modules/kjofol-skin/kjvis.h | |
download | tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/kjofol-skin/kjvis.h')
-rw-r--r-- | noatun/modules/kjofol-skin/kjvis.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/noatun/modules/kjofol-skin/kjvis.h b/noatun/modules/kjofol-skin/kjvis.h new file mode 100644 index 00000000..d2a43700 --- /dev/null +++ b/noatun/modules/kjofol-skin/kjvis.h @@ -0,0 +1,102 @@ +#ifndef KJVIS_H +#define KJVIS_H + +#include "kjwidget.h" +class KJLoader; +class KPixmap; + +class KJVisScope : public KJWidget +{ +public: + KJVisScope(KJLoader *parent) : KJWidget(parent) {}; + enum Visuals { Null=0, FFT, Mono, StereoFFT }; + void swapScope(Visuals newOne); +// virtual void readConfig(); +}; + + +// dummy-scope displaying nothing +class KJNullScope : public KJVisScope +{ +public: + KJNullScope(const QStringList &, KJLoader *parent); + virtual void paint(QPainter *p, const QRect &); + virtual bool mousePress(const QPoint&); + virtual void mouseRelease(const QPoint &, bool in); + virtual void readConfig(void); + +private: + KPixmap *mBack; + +}; + + +// analyzer-like scope +class KJFFT : public KJVisScope, public MonoFFTScope +{ +public: + KJFFT(const QStringList &, KJLoader *parent); + virtual void paint(QPainter *p, const QRect &); + virtual void scopeEvent(float *d, int size); + + virtual bool mousePress(const QPoint&); + virtual void mouseRelease(const QPoint &, bool in); + virtual void readConfig(void); + +private: + QColor mColor; + KPixmap *mGradient; + KPixmap *mBack; + KPixmap *mAnalyzer; + int mMultiples; + int mTimerValue; +}; + + +// analyzer-like scope, stereo version +class KJStereoFFT : public KJVisScope, public StereoFFTScope +{ +public: + KJStereoFFT(const QStringList &, KJLoader *parent); + virtual void paint(QPainter *p, const QRect &); + virtual void scopeEvent(float *left, float *right, int len); + + virtual bool mousePress(const QPoint&); + virtual void mouseRelease(const QPoint &, bool in); + virtual void readConfig(void); + +private: + QColor mColor; + KPixmap *mGradient; + KPixmap *mBack; + KPixmap *mAnalyzer; + int mMultiples; + int mTimerValue; +}; + + +// oscilloscope showing waveform +class KJScope : public KJVisScope, public MonoScope +{ +public: + KJScope ( const QStringList &, KJLoader *parent); + virtual void paint(QPainter *p, const QRect &); + virtual void scopeEvent(float *d, int size); + + virtual bool mousePress(const QPoint&); + virtual void mouseRelease(const QPoint &, bool in); + virtual void readConfig(void); + +private: + QColor mColor; + KPixmap *mGradient; + KPixmap *mBack; + KPixmap *mOsci; + int mMultiples; + int mWidth; + int mHeight; + unsigned int blurnum; + int mTimerValue; +}; + +#endif |