mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
66 lines
1.3 KiB
C++
66 lines
1.3 KiB
C++
// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd.
|
|
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
|
|
//
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
#include "sounddeviceport.h"
|
|
|
|
SoundDevicePort::SoundDevicePort(QObject *parent)
|
|
: QObject(parent)
|
|
, m_isActive(false)
|
|
, m_direction(Out)
|
|
{
|
|
}
|
|
|
|
SoundDevicePort::~SoundDevicePort()
|
|
{
|
|
}
|
|
|
|
void SoundDevicePort::setId(const QString &id)
|
|
{
|
|
if (id != m_id) {
|
|
m_id = id;
|
|
Q_EMIT idChanged(id);
|
|
}
|
|
}
|
|
|
|
void SoundDevicePort::setName(const QString &name)
|
|
{
|
|
if (name != m_name) {
|
|
m_name = name;
|
|
Q_EMIT nameChanged(name);
|
|
}
|
|
}
|
|
|
|
void SoundDevicePort::setCardName(const QString &cardName)
|
|
{
|
|
if (cardName != m_cardName) {
|
|
m_cardName = cardName;
|
|
Q_EMIT cardNameChanged(cardName);
|
|
}
|
|
}
|
|
|
|
void SoundDevicePort::setIsActive(bool isActive)
|
|
{
|
|
if (isActive != m_isActive) {
|
|
m_isActive = isActive;
|
|
Q_EMIT isActiveChanged(isActive);
|
|
}
|
|
}
|
|
|
|
void SoundDevicePort::setDirection(const Direction &direction)
|
|
{
|
|
if (direction != m_direction) {
|
|
m_direction = direction;
|
|
Q_EMIT directionChanged(direction);
|
|
}
|
|
}
|
|
|
|
void SoundDevicePort::setCardId(const uint &cardId)
|
|
{
|
|
if (cardId != m_cardId) {
|
|
m_cardId = cardId;
|
|
Q_EMIT cardIdChanged(cardId);
|
|
}
|
|
}
|