summaryrefslogtreecommitdiffstats
path: root/src/include/frequencyradiostation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/frequencyradiostation.h')
-rw-r--r--src/include/frequencyradiostation.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/src/include/frequencyradiostation.h b/src/include/frequencyradiostation.h
new file mode 100644
index 0000000..75c6ecd
--- /dev/null
+++ b/src/include/frequencyradiostation.h
@@ -0,0 +1,83 @@
+/***************************************************************************
+ frequencyradiostation.h - description
+ -------------------
+ begin : Sat March 29 2003
+ copyright : (C) 2003 by Klas Kalass, Ernst Martin Witte
+ email : klas@kde.org, 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_FREQUENCYRADIOSTATION_H
+#define KRADIO_FREQUENCYRADIOSTATION_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "radiostation.h"
+
+/**
+ * @author Klas Kalass, Ernst Martin Witte
+ */
+
+
+// Kopenhagener Wellenplan: 300kHz
+#define STATION_FREQ_INTERVAL_FM 0.3
+
+// Kopenhagener Wellenplan: 9kHz
+#define STATION_FREQ_INTERVAL_AM 0.009
+
+class FrequencyRadioStation : public RadioStation {
+public:
+ FrequencyRadioStation ();
+ FrequencyRadioStation (float frequency);
+ FrequencyRadioStation (const TQString &name, const TQString &shortName, float frequency);
+ FrequencyRadioStation (const FrequencyRadioStation &);
+ FrequencyRadioStation (RegisterStationClass, const TQString &classname = TQString());
+ ~FrequencyRadioStation();
+
+ float frequency() const { return m_frequency; }
+ void setFrequency (float frequency) { m_frequency = frequency; }
+
+ virtual TQString longName() const;
+ virtual TQString description() const;
+ virtual bool isValid () const;
+
+ /* = 0 : "this" is same as "s", i.e. approximately same frequency
+ > 0 : this.frequency > s.frequency
+ < 0 : this.frequency < s.frequency
+ other class than FrequencyRadioStation: compare typeid(.).name()
+ */
+ virtual int compare (const RadioStation &s) const;
+
+ /** returns an exact copy of this station */
+ virtual RadioStation *copy() const;
+ virtual RadioStation *copyNewID() const;
+
+ virtual RadioStationConfig *createEditor() const;
+
+ // for XML-Parsing/Export
+ virtual bool setProperty(const TQString &property_name, const TQString &val);
+ virtual TQString getProperty(const TQString &property_name) const;
+ virtual TQStringList getPropertyNames() const;
+ virtual TQString getClassName() const { return "FrequencyRadioStation"; }
+
+
+ virtual bool operator == (const RadioStation &x) const;
+
+protected:
+
+ float m_frequency;
+};
+
+
+
+#endif