diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2017-12-19 22:39:05 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2017-12-21 05:52:44 +0000 |
commit | d9bb450ee8898cb810027897a32afd3adcb05d9f (patch) | |
tree | 39e43ebed5f11c7f0fe9b8182540e24fbbe41d28 /app/pacontrolmodel.h | |
parent | 3336a398bb8ae52b74affc00dcd03342592c5fd6 (diff) |
mixer: add clearer pulseaudio control naming
Use the role name for the control name in the Mixer UI instead
of overall vague control description
Bug-AGL: SPEC-1196
Change-Id: I34b5c3378fa3bca7464067490907f9ae0adb6364
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'app/pacontrolmodel.h')
-rw-r--r-- | app/pacontrolmodel.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/pacontrolmodel.h b/app/pacontrolmodel.h index a3cd5ae..81eb70b 100644 --- a/app/pacontrolmodel.h +++ b/app/pacontrolmodel.h @@ -24,15 +24,17 @@ class PaControlModel; class PaControl { public: - PaControl(const quint32 &index, const QString &desc, const quint32 &type, const quint32 &channel, const QString &cdesc, const quint32 &volume); + PaControl(const quint32 &index, const QString &name, const QString &desc, const quint32 &type, const quint32 &channel, const QString &cdesc, const quint32 &volume); quint32 cindex() const; + QString name() const; QString desc() const; quint32 type() const; quint32 channel() const; QString cdesc() const; quint32 volume() const; void setCIndex(const QVariant&); + void setName(const QVariant&); void setDesc(const QVariant&); void setType(const QVariant&); void setChannel(const QVariant&); @@ -41,6 +43,7 @@ class PaControl private: quint32 m_cindex; + QString m_name; QString m_desc; quint32 m_type; quint32 m_channel; @@ -54,6 +57,7 @@ class PaControlModel : public QAbstractListModel public: enum PaControlRoles { CIndexRole = Qt::UserRole + 1, + NameRole, DescRole, TypeRole, ChannelRole, @@ -74,7 +78,7 @@ class PaControlModel : public QAbstractListModel Qt::ItemFlags flags(const QModelIndex &index) const; public slots: - void addOneControl(int cindex, QString desc, int type, int channel, const char *cdesc, int volume); + void addOneControl(int cindex, QString name, QString desc, int type, int channel, const char *cdesc, int volume); void changeExternalVolume(uint32_t type, uint32_t cindex, uint32_t chan, uint32_t volume); signals: |