mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00

音量的两个图标回执的方式不一样,目前是右侧的图标显示正常,所以都改成了右侧图标显示的方式 Log: 修复音量插件界面部分图标显示模糊的问题 Bug: https://pms.uniontech.com/zentao/bug-view-81685.html Change-Id: I3513cb677f711ca0567134ca96e950672cb4eb9f
70 lines
1.7 KiB
C++
70 lines
1.7 KiB
C++
/*
|
|
* Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
|
|
*
|
|
* Author: sbw <sbw@sbw.so>
|
|
*
|
|
* Maintainer: sbw <sbw@sbw.so>
|
|
*
|
|
* 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 SINKINPUTWIDGET_H
|
|
#define SINKINPUTWIDGET_H
|
|
|
|
#include "componments/volumeslider.h"
|
|
#include <com_deepin_daemon_audio_sinkinput.h>
|
|
|
|
#include <QFrame>
|
|
#include <QPainter>
|
|
|
|
#include <DIconButton>
|
|
|
|
DWIDGET_USE_NAMESPACE
|
|
using DBusSinkInput = com::deepin::daemon::audio::SinkInput;
|
|
namespace Dock {
|
|
class TipsWidget;
|
|
}
|
|
class QLabel;
|
|
class SinkInputWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SinkInputWidget(const QString &inputPath, QWidget *parent = nullptr);
|
|
|
|
private slots:
|
|
void setVolume(const int value);
|
|
void setMute();
|
|
void setMuteIcon();
|
|
void onPlaySoundEffect();
|
|
void onVolumeChanged();
|
|
|
|
private:
|
|
void refreshIcon();
|
|
|
|
protected:
|
|
bool eventFilter(QObject* watcher, QEvent *event) override;
|
|
|
|
private:
|
|
DBusSinkInput *m_inputInter;
|
|
|
|
DIconButton *m_appBtn;
|
|
QLabel *m_volumeIconMin;
|
|
QLabel *m_volumeIconMax;
|
|
VolumeSlider *m_volumeSlider;
|
|
Dock::TipsWidget *m_volumeLabel;
|
|
};
|
|
|
|
#endif // SINKINPUTWIDGET_H
|