summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
commitae364d9bed0589bf1a22cd5f530c563462379e3e (patch)
treee32727e2664e7ce68d0d30270afa040320ae35a1 /kradio3/plugins/gui-standard-display/radioview_frequencyradio.h
downloadtderadio-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/plugins/gui-standard-display/radioview_frequencyradio.h')
-rw-r--r--kradio3/plugins/gui-standard-display/radioview_frequencyradio.h108
1 files changed, 108 insertions, 0 deletions
diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h
new file mode 100644
index 0000000..795eae1
--- /dev/null
+++ b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h
@@ -0,0 +1,108 @@
+/***************************************************************************
+ kradiodisplay.h - description
+ -------------------
+ begin : Mit Jan 29 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_RADIOVIEW_FREQUENCYRADIO_H
+#define KRADIO_RADIOVIEW_FREQUENCYRADIO_H
+
+#include "../../src/include/radiodevice_interfaces.h"
+#include "../../src/include/soundstreamclient_interfaces.h"
+#include "radioview_element.h"
+#include "displaycfg_interfaces.h"
+
+/**
+ *@author Martin Witte
+ */
+
+class RadioViewFrequencyRadio : public RadioViewElement, // is a QObject, must be first
+ public IRadioDeviceClient,
+ public IFrequencyRadioClient,
+ public ISoundStreamClient,
+ public IDisplayCfg
+{
+Q_OBJECT
+public:
+ RadioViewFrequencyRadio(QWidget *parent, const QString &name);
+ ~RadioViewFrequencyRadio();
+
+ float getUsability (Interface *) const;
+
+ virtual void saveState (KConfig *) const;
+ virtual void restoreState (KConfig *);
+
+ ConfigPageInfo createConfigurationPage();
+
+// Interface
+
+ bool connectI (Interface *);
+ bool disconnectI(Interface *);
+
+// IDisplayCfg
+
+RECEIVERS:
+ bool setDisplayColors(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd);
+ bool setDisplayFont (const QFont &f);
+
+ANSWERS:
+ const QColor &getDisplayActiveColor() const { return m_colorActiveText; }
+ const QColor &getDisplayInactiveColor() const { return m_colorInactiveText; }
+ const QColor &getDisplayBkgndColor() const { return m_colorButton; }
+ const QFont &getDisplayFont() const { return m_font; }
+
+// IRadioDeviceClient
+RECEIVERS:
+ bool noticePowerChanged (bool on, const IRadioDevice *sender = NULL);
+ bool noticeStationChanged (const RadioStation &, const IRadioDevice *sender = NULL);
+ bool noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL);
+ bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/, const IRadioDevice */*sender*/) { return false; }
+
+// ISoundStreamClient
+RECEIVERS:
+ void noticeConnectedI (ISoundStreamServer *s, bool pointer_valid);
+
+ bool noticeSignalQualityChanged(SoundStreamID id, float q);
+ bool noticeStereoChanged(SoundStreamID id, bool s);
+
+// IFrequencyRadioClient
+RECEIVERS:
+ bool noticeFrequencyChanged(float f, const RadioStation *s);
+ bool noticeMinMaxFrequencyChanged(float min, float max);
+ bool noticeDeviceMinMaxFrequencyChanged(float min, float max);
+ bool noticeScanStepChanged(float s);
+
+// own stuff ;)
+
+public:
+
+ void reparent (QWidget *parent, WFlags f, const QPoint &p, bool showIt = FALSE);
+
+protected:
+
+ void drawContents(QPainter *p);
+
+protected:
+
+ QColor m_colorActiveText, m_colorInactiveText, m_colorButton;
+ QFont m_font;
+
+ bool m_power;
+ bool m_valid;
+ float m_frequency;
+ float m_quality;
+ bool m_stereo;
+};
+
+#endif