blob: 75c6ecdc9dd5a674b6ccf9ec95d220dc2f6b01c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/***************************************************************************
frequencyradiostation.h - description
-------------------
begin : Sat March 29 2003
copyright : (C) 2003 by Klas Kalass, Ernst Martin Witte
email : [email protected], [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_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
|