summaryrefslogtreecommitdiffstats
path: root/src/include/frequencyseekhelper.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-05-30 19:40:31 +0900
committerSlávek Banko <slavek.banko@axis.cz>2022-05-30 21:55:12 +0200
commit9d7329284fd42187092c829ae6ed030561002776 (patch)
tree1d53503d17938eca725caee7ff783fccf52ca509 /src/include/frequencyseekhelper.h
parentfac82f62f156c76cb4b23c313111283b30a778b5 (diff)
downloadtderadio-9d7329284fd42187092c829ae6ed030561002776.tar.gz
tderadio-9d7329284fd42187092c829ae6ed030561002776.zip
Standardize folder structure.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit d95a4fea540b371fa86493d069fdbd54f33c5b40)
Diffstat (limited to 'src/include/frequencyseekhelper.h')
-rw-r--r--src/include/frequencyseekhelper.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/include/frequencyseekhelper.h b/src/include/frequencyseekhelper.h
new file mode 100644
index 0000000..68ffe78
--- /dev/null
+++ b/src/include/frequencyseekhelper.h
@@ -0,0 +1,78 @@
+/***************************************************************************
+ frequencyseekhelper.h - description
+ -------------------
+ begin : Fre Mai 9 2003
+ copyright : (C) 2003 by Martin Witte
+ email : witte@kawo1.rwth-aachen.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 <tqobject.h>
+#include "radiodevice_interfaces.h"
+#include "seekhelper.h"
+
+class FrequencySeekHelper : public TQObject,
+ 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:
+ TQTimer *m_timer;
+
+ float m_currentSignal, m_oldSignal;
+ bool m_goodSignal;
+ float m_currentFrequency, m_oldFrequency;
+ float m_bestFrequency;
+};
+
+#endif