diff options
Diffstat (limited to 'plugins/recording/recording-datamonitor.h')
-rw-r--r-- | plugins/recording/recording-datamonitor.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/plugins/recording/recording-datamonitor.h b/plugins/recording/recording-datamonitor.h new file mode 100644 index 0000000..2ac493e --- /dev/null +++ b/plugins/recording/recording-datamonitor.h @@ -0,0 +1,67 @@ +/*************************************************************************** + recording-monitor-widget.h - description + ------------------- + begin : So Sep 7 2003 + copyright : (C) 2003 by Martin Witte + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KRADIO_RECORDING_DATA_MONITOR +#define KRADIO_RECORDING_DATA_MONITOR + +#include <tqframe.h> +#include <tqcolor.h> + +//#include <tderadio/interfaces/recording-interfaces.h> +#include "../../src/include/soundstreamclient_interfaces.h" + +class RecordingDataMonitor : public TQFrame//, + //public ISoundStreamClient + //public IRecordingClient +{ +Q_OBJECT + +public: + RecordingDataMonitor(TQWidget *parent, const char *name); + ~RecordingDataMonitor(); + + bool noticeSoundStreamData(SoundStreamID id, + const SoundFormat &sf, const char *data, size_t size, size_t &consumed_size, + const SoundMetaData &md); + +// QT/KDE ... + +protected: + + void drawContents(TQPainter *p); + void internalDrawContents(TQPainter &painter, bool repaintAll); +// own stuff ... + +protected: + + void setChannels(int n); + bool setColors(const TQColor &activeColor, const TQColor &bkgnd); + +// data +protected: + + int *m_channelsMax; // maximum absolute value recorded on each channel + double *m_channelsAvg; // average value recorded on each channel + int m_maxValue; // maximum absolute value possible for samples + int m_channels; + + TQColor m_colorActiveText, m_colorButton; + + int *m_pActiveBlocks; +}; + +#endif |