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
77 lines
2.1 KiB
C++
77 lines
2.1 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/>.
|
|
*/
|
|
#ifndef SOUNDDEVICEPORT_H
|
|
#define SOUNDDEVICEPORT_H
|
|
|
|
#include <QObject>
|
|
|
|
class SoundDevicePort : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum Direction {
|
|
Out = 1,
|
|
In = 2
|
|
};
|
|
|
|
explicit SoundDevicePort(QObject *parent = nullptr);
|
|
virtual ~SoundDevicePort();
|
|
|
|
inline QString id() const { return m_id; }
|
|
void setId(const QString &id);
|
|
|
|
inline QString name() const { return m_name; }
|
|
void setName(const QString &name);
|
|
|
|
inline QString cardName() const { return m_cardName; }
|
|
void setCardName(const QString &cardName);
|
|
|
|
inline bool isActive() const { return m_isActive; }
|
|
void setIsActive(bool isActive);
|
|
|
|
inline Direction direction() const { return m_direction; }
|
|
void setDirection(const Direction &direction);
|
|
|
|
inline uint cardId() const { return m_cardId; }
|
|
void setCardId(const uint &cardId);
|
|
|
|
Q_SIGNALS:
|
|
void idChanged(const QString &id) const;
|
|
void nameChanged(const QString &name) const;
|
|
void cardNameChanged(const QString &name) const;
|
|
void isActiveChanged(bool ative) const;
|
|
void directionChanged(Direction direction) const;
|
|
void cardIdChanged(uint cardId) const;
|
|
|
|
private:
|
|
QString m_id;
|
|
QString m_name;
|
|
uint m_cardId;
|
|
QString m_cardName;
|
|
bool m_isActive;
|
|
Direction m_direction;
|
|
};
|
|
|
|
Q_DECLARE_METATYPE(const SoundDevicePort *)
|
|
|
|
#endif // SOUNDDEVICEPORT_H
|