standardscandialog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
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
00062
00063 RECEIVERS:
00064 bool noticePowerChanged(bool on);
00065 bool noticeStationChanged (const RadioStation &, int ){ return false; }
00066 bool noticeStationsChanged(const StationList &) { return false; }
00067 bool noticePresetFileChanged(const QString &) { return false; }
00068
00069 bool noticeRDSStateChanged (bool ) { return false; }
00070 bool noticeRDSRadioTextChanged (const QString &) { return false; }
00071 bool noticeRDSStationNameChanged(const QString &);
00072
00073 bool noticeCurrentSoundStreamSourceIDChanged(SoundStreamID ) { return false; }
00074 bool noticeCurrentSoundStreamSinkIDChanged (SoundStreamID ) { 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