mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-22 06:08:07 +00:00
feat(src/components/codecs/CodecsModel): in progress.
This commit is contained in:
parent
b43517001e
commit
f91aaf01cf
3 changed files with 11 additions and 1 deletions
|
|
@ -89,6 +89,6 @@ QVariant CodecsModel::data (const QModelIndex &index, int role) const {
|
|||
|
||||
void CodecsModel::enableCodec (int id, bool status) {
|
||||
Q_ASSERT(id >= 0 && id < m_codecs.count());
|
||||
shared_ptr<linphone::PayloadType> codec = m_codecs[id].toMap().value("__codec").value<>();
|
||||
shared_ptr<linphone::PayloadType> codec = m_codecs[id].toMap().value("__codec").value<shared_ptr<linphone::PayloadType> >();
|
||||
codec->enable(status);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,16 @@
|
|||
#ifndef CODECS_MODEL_H_
|
||||
#define CODECS_MODEL_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
namespace linphone {
|
||||
class PayloadType;
|
||||
}
|
||||
|
||||
class CodecsModel : public QAbstractListModel {
|
||||
Q_OBJECT;
|
||||
|
||||
|
|
@ -53,4 +59,6 @@ private:
|
|||
QVariantList m_codecs;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(std::shared_ptr<linphone::PayloadType> );
|
||||
|
||||
#endif // CODECS_MODEL_H_
|
||||
|
|
|
|||
|
|
@ -12,4 +12,6 @@ Text {
|
|||
bold: true
|
||||
pointSize: CodecsViewerStyle.legend.fontSize
|
||||
}
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue