Clementine-audio-player-Mac.../src/osd.h

43 lines
757 B
C
Raw Normal View History

2010-01-08 15:52:05 +01:00
#ifndef OSD_H
#define OSD_H
#include <QObject>
#include <QSystemTrayIcon>
#include "engine_fwd.h"
#include "song.h"
2010-01-08 16:16:59 +01:00
#ifdef Q_WS_X11
# ifndef _NOTIFY_NOTIFICATION_H_
struct NotifyNotification;
# endif
#endif
2010-01-08 15:52:05 +01:00
class OSD : public QObject {
Q_OBJECT
public:
OSD(QSystemTrayIcon* tray_icon, QObject* parent = 0);
void Init();
void ShowMessage(const QString& summary,
const QString& message = QString::null,
const QString& icon = QString::null);
public slots:
void SongChanged(const Song& song);
void Paused();
void Stopped();
2010-01-08 17:40:34 +01:00
void VolumeChanged(int value);
2010-01-08 15:52:05 +01:00
private:
QSystemTrayIcon* tray_icon_;
2010-01-08 16:37:35 +01:00
int timeout_;
2010-01-08 16:16:59 +01:00
#ifdef Q_WS_X11
NotifyNotification* notification_;
#endif
2010-01-08 15:52:05 +01:00
};
#endif // OSD_H