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();
|
|
|
|
|
|
|
|
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
|