diff options
author | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2016-07-19 22:49:40 +0900 |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2016-07-19 22:49:40 +0900 |
commit | ddfe5552b3297236effc42f0c73e8b69654c976c (patch) | |
tree | 58290a7ed8035a468393c1dd63357d8f1d300133 /rtlfmradiotunercontrol.h | |
parent | 02670272224eb2ce73a5470441131861aa3cfb91 (diff) |
initial commit for ALS2016
Change-Id: If170e059c9be053117e31afd5ae4b7cfa810aa1b
Diffstat (limited to 'rtlfmradiotunercontrol.h')
-rw-r--r-- | rtlfmradiotunercontrol.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/rtlfmradiotunercontrol.h b/rtlfmradiotunercontrol.h new file mode 100644 index 0000000..f00bfa4 --- /dev/null +++ b/rtlfmradiotunercontrol.h @@ -0,0 +1,68 @@ +/* Copyright (C) 2016, The Qt Company Ltd. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef RTLFMRADIOTUNERCONTROL_H +#define RTLFMRADIOTUNERCONTROL_H + +#include <QtMultimedia/QRadioTunerControl> + +class RtlFmRadioTunerControl : public QRadioTunerControl +{ + Q_OBJECT +public: + RtlFmRadioTunerControl(QObject *parent = 0); + ~RtlFmRadioTunerControl(); + + QRadioTuner::State state() const; + + QRadioTuner::Band band() const; + void setBand(QRadioTuner::Band band); + bool isBandSupported(QRadioTuner::Band band) const; + + int frequency() const; + int frequencyStep(QRadioTuner::Band band) const; + QPair<int,int> frequencyRange(QRadioTuner::Band band) const; + void setFrequency(int frequency); + + bool isStereo() const; + QRadioTuner::StereoMode stereoMode() const; + void setStereoMode(QRadioTuner::StereoMode stereoMode); + + int signalStrength() const; + + int volume() const; + void setVolume(int volume); + + bool isMuted() const; + void setMuted(bool muted); + + bool isSearching() const; + + bool isAntennaConnected() const { return true; } + + void searchForward(); + void searchBackward(); + void searchAllStations(QRadioTuner::SearchMode searchMode = QRadioTuner::SearchFast); + void cancelSearch(); +private: + void setSearching(bool searching); + +public: + void start(); + void stop(); + + QRadioTuner::Error error() const; + QString errorString() const; + +private: + void setError(QRadioTuner::Error error, const QString &errorString); + +private: + class Private; + Private *d; +}; + +#endif // RTLFMRADIOTUNERCONTROL_H |