27class AudioInputSelection :
public QObject
31 QString deviceName READ deviceName WRITE setDeviceName NOTIFY
34 int firstChannel READ firstChannel WRITE setFirstChannel NOTIFY
36 Q_PROPERTY (
bool stereo READ stereo WRITE setStereo NOTIFY stereoChanged)
38 QML_UNCREATABLE (
"Created by ProjectUiState")
41 explicit AudioInputSelection (QObject * parent =
nullptr) : QObject (parent)
44 ~AudioInputSelection ()
override =
default;
45 Q_DISABLE_COPY_MOVE (AudioInputSelection)
47 QString deviceName ()
const;
48 void setDeviceName (
const QString &name);
49 Q_SIGNAL
void deviceNameChanged ();
51 int firstChannel ()
const {
return first_channel_; }
52 void setFirstChannel (
int channel);
53 Q_SIGNAL
void firstChannelChanged ();
55 bool stereo ()
const {
return stereo_; }
56 void setStereo (
bool s);
57 Q_SIGNAL
void stereoChanged ();
60 operator== (
const AudioInputSelection &a,
const AudioInputSelection &b);
62 static constexpr auto kDeviceNameKey =
"deviceName"sv;
63 static constexpr auto kFirstChannelKey =
"firstChannel"sv;
64 static constexpr auto kStereoKey =
"stereo"sv;
67 friend void to_json (nlohmann::json &j,
const AudioInputSelection &sel);
68 friend void from_json (
const nlohmann::json &j, AudioInputSelection &sel);
71 uint8_t first_channel_ = 0;