1// qradiotuner.sip generated by MetaSIP 2// 3// This file is part of the QtMultimedia Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QRadioTuner : QMediaObject 24{ 25%TypeHeaderCode 26#include <qradiotuner.h> 27%End 28 29public: 30 enum State 31 { 32 ActiveState, 33 StoppedState, 34 }; 35 36 enum Band 37 { 38 AM, 39 FM, 40 SW, 41 LW, 42 FM2, 43 }; 44 45 enum Error 46 { 47 NoError, 48 ResourceError, 49 OpenError, 50 OutOfRangeError, 51 }; 52 53 enum StereoMode 54 { 55 ForceStereo, 56 ForceMono, 57 Auto, 58 }; 59 60 enum SearchMode 61 { 62 SearchFast, 63 SearchGetStationId, 64 }; 65 66%If (Qt_5_6_1 -) 67 explicit QRadioTuner(QObject *parent /TransferThis/ = 0); 68%End 69%If (- Qt_5_6_1) 70 QRadioTuner(QObject *parent /TransferThis/ = 0); 71%End 72 virtual ~QRadioTuner(); 73 virtual QMultimedia::AvailabilityStatus availability() const; 74 QRadioTuner::State state() const; 75 QRadioTuner::Band band() const; 76 bool isBandSupported(QRadioTuner::Band b) const; 77 int frequency() const; 78 int frequencyStep(QRadioTuner::Band band) const; 79 QPair<int, int> frequencyRange(QRadioTuner::Band band) const; 80 bool isStereo() const; 81 void setStereoMode(QRadioTuner::StereoMode mode); 82 QRadioTuner::StereoMode stereoMode() const; 83 int signalStrength() const; 84 int volume() const; 85 bool isMuted() const; 86 bool isSearching() const; 87 bool isAntennaConnected() const; 88 QRadioTuner::Error error() const; 89 QString errorString() const; 90 QRadioData *radioData() const; 91 92public slots: 93 void searchForward(); 94 void searchBackward(); 95 void searchAllStations(QRadioTuner::SearchMode searchMode = QRadioTuner::SearchFast); 96 void cancelSearch(); 97 void setBand(QRadioTuner::Band band); 98 void setFrequency(int frequency); 99 void setVolume(int volume); 100 void setMuted(bool muted); 101 void start(); 102 void stop(); 103 104signals: 105 void stateChanged(QRadioTuner::State state); 106 void bandChanged(QRadioTuner::Band band); 107 void frequencyChanged(int frequency); 108 void stereoStatusChanged(bool stereo); 109 void searchingChanged(bool searching); 110 void signalStrengthChanged(int signalStrength); 111 void volumeChanged(int volume); 112 void mutedChanged(bool muted); 113 void stationFound(int frequency, QString stationId); 114 void antennaConnectedChanged(bool connectionStatus); 115 void error(QRadioTuner::Error error); 116}; 117