mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#ifndef SOUNDTRAYWIDGET_H
|
|
#define SOUNDTRAYWIDGET_H
|
|
|
|
#include "../abstractsystemtraywidget.h"
|
|
#include "soundapplet.h"
|
|
#include "dbus/dbussink.h"
|
|
|
|
#include <QWidget>
|
|
|
|
class TipsWidget;
|
|
class SoundTrayWidget : public AbstractSystemTrayWidget
|
|
{
|
|
public:
|
|
SoundTrayWidget(QWidget *parent = nullptr);
|
|
|
|
void setActive(const bool active) Q_DECL_OVERRIDE;
|
|
void updateIcon() Q_DECL_OVERRIDE;
|
|
const QImage trayImage() Q_DECL_OVERRIDE;
|
|
|
|
QWidget *trayTipsWidget() Q_DECL_OVERRIDE;
|
|
QWidget *trayPopupApplet() Q_DECL_OVERRIDE;
|
|
|
|
const QString contextMenu() const;
|
|
void invokeMenuItem(const QString menuId, const bool checked);
|
|
|
|
protected:
|
|
QSize sizeHint() const Q_DECL_OVERRIDE;
|
|
void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
|
|
void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE;
|
|
void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE;
|
|
|
|
private Q_SLOTS:
|
|
void refreshTips(const bool force = false);
|
|
void sinkChanged(DBusSink *sink);
|
|
|
|
private:
|
|
TipsWidget *m_tipsLabel;
|
|
SoundApplet *m_applet;
|
|
DBusSink *m_sinkInter;
|
|
QPixmap m_iconPixmap;
|
|
};
|
|
|
|
#endif // SOUNDTRAYWIDGET_H
|