#pragma once

#include <ksystemtray.h>

class OssModel;
class OssDevice;
class OssMixerWindow;
class OssPopup;

class OssTray : public KSystemTray
{
    TQ_OBJECT
public:
    OssTray( OssModel *model, OssMixerWindow *win, TQWidget *parent = 0 );

public slots:
    void updateIcon();

protected:
    void mousePressEvent( TQMouseEvent *e );
    void wheelEvent( TQWheelEvent *e );
    void contextMenuAboutToShow( TDEPopupMenu *menu );

private slots:
    void onPreferredChanged( OssDevice *dev );

private:
    void middleClickMute();

    OssModel       *m_model;
    OssMixerWindow *m_win;
    OssDevice      *m_output;
    OssPopup       *m_popup;
};
