standardscandialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           standardscandialog.h  -  description
00003                              -------------------
00004     begin                : Son Aug 3 2003
00005     copyright            : (C) 2003 by Martin Witte
00006     email                : emw-kradio@nocabal.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 "seekradio_interfaces.h"
00026 #include "radio_interfaces.h"
00027 #include "stationlist.h"
00028 
00029 #include <QtCore/QTimer>
00030 #include <QtCore/QDateTime>
00031 #include <QtGui/QDialog>
00032 
00033 class Ui_StandardScanDialogUI;
00034 
00035 class KDE_EXPORT StandardScanDialog : public QDialog,
00036                                       public ISeekRadioClient,
00037                                       public IRadioClient,
00038                                       public IErrorLogClient
00039 {
00040 Q_OBJECT
00041 public:
00042     StandardScanDialog(QWidget *parent);
00043     ~StandardScanDialog();
00044 
00045     bool connectI (Interface *i);
00046     bool disconnectI (Interface *i);
00047 
00048     void start();
00049     void stop();
00050 
00051     const StationList &getStations() const { return m_stations; }
00052 
00053 // ISeekRadioClient
00054 
00055 RECEIVERS:
00056     bool noticeSeekStarted (bool up);
00057     bool noticeSeekStopped ();
00058     bool noticeSeekFinished (const RadioStation &s, bool goodQuality);
00059     bool noticeProgress (float f);
00060 
00061 // IRadioClient
00062 
00063 RECEIVERS:
00064     bool noticePowerChanged(bool on);
00065     bool noticeStationChanged (const RadioStation &, int /*idx*/){ return false; }
00066     bool noticeStationsChanged(const StationList &/*sl*/)        { return false; }
00067     bool noticePresetFileChanged(const QString &/*f*/)           { return false; }
00068 
00069     bool noticeRDSStateChanged      (bool  /*enabled*/)          { return false; }  // don't care
00070     bool noticeRDSRadioTextChanged  (const QString &/*s*/)       { return false; }  // don't care
00071     bool noticeRDSStationNameChanged(const QString &/*s*/);
00072 
00073     bool noticeCurrentSoundStreamSourceIDChanged(SoundStreamID /*id*/) { return false; }
00074     bool noticeCurrentSoundStreamSinkIDChanged  (SoundStreamID /*id*/) { return false; }
00075 
00076 protected slots:
00077 
00078     void slotStartStop();
00079     void slotOk();
00080     void slotDiscard();
00081     void slotWait4RDSTimeout();
00082 
00083 protected:
00084 
00085     void addCurrentStation();
00086     void continueScan();
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     Ui_StandardScanDialogUI *m_ui;
00099 
00100     QTimer        m_Wait4RDSTimeout;
00101     bool          m_waiting4RDS;
00102 };
00103 
00104 
00105 #endif

Generated on Tue Jun 2 19:19:57 2009 for kradio4 by  doxygen 1.5.8