summaryrefslogtreecommitdiffstats
path: root/src/include/standardscandialog.h
blob: 5797faef0ce45e79782ac941ae9352374ea58ebd (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/***************************************************************************
                          standardscandialog.h  -  description
                             -------------------
    begin                : Son Aug 3 2003
    copyright            : (C) 2003 by Martin Witte
    email                : [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_STANDARDSCANDIALOG_H
#define KRADIO_STANDARDSCANDIALOG_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <standardscandialog-ui.h>
#include "radiodevice_interfaces.h"
#include "radio_interfaces.h"
#include "stationlist.h"

#include <tqtimer.h>
#include <tqdatetime.h>
#include <kdemacros.h>

class KDE_EXPORT StandardScanDialog : public StandardScanDialogUI,
                                      public ISeekRadioClient,
//                                    public IRadioSoundClient,
                                      public IRadioClient
{
TQ_OBJECT

public:
    StandardScanDialog(TQWidget *parent);
    ~StandardScanDialog();

    bool connectI (Interface *i);
    bool disconnectI (Interface *i);

    void start();
    void stop();

    const StationList &getStations() const { return m_stations; }

// ISeekRadioClient

RECEIVERS:
    bool noticeSeekStarted (bool up);
    bool noticeSeekStopped ();
    bool noticeSeekFinished (const RadioStation &s, bool goodQuality);
    bool noticeProgress (float f);

// // ISoundRadioClient
//
// RECEIVERS:
//     bool noticeVolumeChanged(float /*v*/)           { return false; }
//     bool noticeTrebleChanged(float /*v*/)           { return false; }
//     bool noticeBassChanged(float /*v*/)             { return false; }
//     bool noticeBalanceChanged(float /*v*/)          { return false; }
//     bool noticeSignalQualityChanged(float /*q*/)    { return false; }
//     bool noticeSignalQualityChanged(bool /*good*/)  { return false; }
//     bool noticeSignalMinQualityChanged(float /*q*/) { return false; }
//     bool noticeStereoChanged(bool  /*s*/)           { return false; }
//     bool noticeMuted(bool /*m*/)                    { return false; }

// IRadioClient

RECEIVERS:
    bool noticePowerChanged(bool on);
    bool noticeStationChanged (const RadioStation &, int /*idx*/){ return false; }
    bool noticeStationsChanged(const StationList &/*sl*/)        { return false; }
    bool noticePresetFileChanged(const TQString &/*f*/)           { return false; }

    bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; }

protected slots:

    void slotCancelDone();

protected:

    int           m_count;
    bool          m_running;
    bool          m_oldPowerOn;
    RadioStation *m_oldStation;
    TQDateTime     m_startTime;

    StationList   m_stations;

    bool          m_ignorePower;
};


#endif