00001 /*************************************************************************** 00002 standardscandialog.h - description 00003 ------------------- 00004 begin : Son Aug 3 2003 00005 copyright : (C) 2003 by Martin Witte 00006 email : witte@kawo1.rwth-aachen.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef KRADIO_STANDARDSCANDIALOG_H 00019 #define KRADIO_STANDARDSCANDIALOG_H 00020 00021 #ifdef HAVE_CONFIG_H 00022 #include <config.h> 00023 #endif 00024 00025 #include <standardscandialog-ui.h> 00026 #include "radiodevice_interfaces.h" 00027 #include "radio_interfaces.h" 00028 #include "stationlist.h" 00029 00030 #include <qtimer.h> 00031 #include <qdatetime.h> 00032 00033 class StandardScanDialog : public StandardScanDialogUI, 00034 public ISeekRadioClient, 00035 // public IRadioSoundClient, 00036 public IRadioClient 00037 { 00038 Q_OBJECT 00039 public: 00040 StandardScanDialog(QWidget *parent); 00041 ~StandardScanDialog(); 00042 00043 bool connectI (Interface *i); 00044 bool disconnectI (Interface *i); 00045 00046 void start(); 00047 void stop(); 00048 00049 const StationList &getStations() const { return m_stations; } 00050 00051 // ISeekRadioClient 00052 00053 RECEIVERS: 00054 bool noticeSeekStarted (bool up); 00055 bool noticeSeekStopped (); 00056 bool noticeSeekFinished (const RadioStation &s, bool goodQuality); 00057 bool noticeProgress (float f); 00058 00059 // // ISoundRadioClient 00060 // 00061 // RECEIVERS: 00062 // bool noticeVolumeChanged(float /*v*/) { return false; } 00063 // bool noticeTrebleChanged(float /*v*/) { return false; } 00064 // bool noticeBassChanged(float /*v*/) { return false; } 00065 // bool noticeBalanceChanged(float /*v*/) { return false; } 00066 // bool noticeSignalQualityChanged(float /*q*/) { return false; } 00067 // bool noticeSignalQualityChanged(bool /*good*/) { return false; } 00068 // bool noticeSignalMinQualityChanged(float /*q*/) { return false; } 00069 // bool noticeStereoChanged(bool /*s*/) { return false; } 00070 // bool noticeMuted(bool /*m*/) { return false; } 00071 00072 // IRadioClient 00073 00074 RECEIVERS: 00075 bool noticePowerChanged(bool on); 00076 bool noticeStationChanged (const RadioStation &, int /*idx*/){ return false; } 00077 bool noticeStationsChanged(const StationList &/*sl*/) { return false; } 00078 bool noticePresetFileChanged(const QString &/*f*/) { return false; } 00079 00080 bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; } 00081 00082 protected slots: 00083 00084 void slotCancelDone(); 00085 00086 protected: 00087 00088 int m_count; 00089 bool m_running; 00090 bool m_oldPowerOn; 00091 RadioStation *m_oldStation; 00092 QDateTime m_startTime; 00093 00094 StationList m_stations; 00095 00096 bool m_ignorePower; 00097 }; 00098 00099 00100 #endif