diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-22 18:23:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-22 18:23:26 +0000 |
commit | ae364d9bed0589bf1a22cd5f530c563462379e3e (patch) | |
tree | e32727e2664e7ce68d0d30270afa040320ae35a1 /kradio3/src/include/frequencyseekhelper.h | |
download | tderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.tar.gz tderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.zip |
Added old KDE3 version of kradio
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1094417 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/src/include/frequencyseekhelper.h')
-rw-r--r-- | kradio3/src/include/frequencyseekhelper.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/kradio3/src/include/frequencyseekhelper.h b/kradio3/src/include/frequencyseekhelper.h new file mode 100644 index 0000000..4dc529f --- /dev/null +++ b/kradio3/src/include/frequencyseekhelper.h @@ -0,0 +1,77 @@ +/*************************************************************************** + frequencyseekhelper.h - description + ------------------- + begin : Fre Mai 9 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_FREQUENCY_SEEKHELPER_H +#define KRADIO_FREQUENCY_SEEKHELPER_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <qobject.h> +#include "radiodevice_interfaces.h" +#include "seekhelper.h" + +class FrequencySeekHelper : public QObject, + public SeekHelper, + public IFrequencyRadioClient +{ +Q_OBJECT +public: + + FrequencySeekHelper(ISeekRadio &parent); + virtual ~FrequencySeekHelper(); + +// IFrequencyRadioClient +RECEIVERS: + bool noticeFrequencyChanged(float /*f*/, const RadioStation */*s*/) { return false; } + bool noticeMinMaxFrequencyChanged(float /*min*/, float /*max*/) { return false; } + bool noticeDeviceMinMaxFrequencyChanged(float /*min*/, float /*max*/){ return false; } + bool noticeScanStepChanged(float /*s*/) { return false; } + +public: + + virtual bool connectI (Interface *i); + virtual bool disconnectI(Interface *i); + + virtual void start(const SoundStreamID &, direction_t dir); + +public slots: + + virtual void step() { SeekHelper::step(); } + +protected: + virtual void abort(); + virtual bool isGood() const; + virtual bool isBetter() const; + virtual bool isWorse() const; + virtual bool bestFound() const; + virtual void getData(); + virtual void rememberBest(); + virtual bool nextSeekStep(); + virtual void applyBest(); + +protected: + QTimer *m_timer; + + float m_currentSignal, m_oldSignal; + bool m_goodSignal; + float m_currentFrequency, m_oldFrequency; + float m_bestFrequency; +}; + +#endif |