mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00

音量设备解析错误,没有和控制中心保持一致,参照之前的音量的解析逻辑重新来显示音量的功能即可 Log: Influence: 从任务栏打开音量,进入音量的详情页面,观察是否和控制中心一致 Bug: https://pms.uniontech.com/bug-view-165853.html Change-Id: I39a6b0664ac2adc40f2ea523d8e0693426640ae5
81 lines
1.9 KiB
C++
81 lines
1.9 KiB
C++
/*
|
|
* Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd.
|
|
*
|
|
* Author: donghualin <donghualin@uniontech.com>
|
|
*
|
|
* Maintainer: donghualin <donghualin@uniontech.com>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#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);
|
|
}
|
|
}
|