#pragma once

#include <ksystemtray.h>

class AlsaModel;
class AlsaDevice;
class AlsaMixerWindow;
class AlsaPopup;

class AlsaTray : public KSystemTray
{
    TQ_OBJECT
public:
    AlsaTray( AlsaModel *model, AlsaMixerWindow *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( AlsaDevice *dev );

private:
    void middleClickMute();

private:
    AlsaModel       *m_model;
    AlsaMixerWindow *m_win;
    AlsaDevice      *m_output;
    AlsaPopup       *m_popup;
};
