summaryrefslogtreecommitdiff
path: root/src/ui/tmixtray.h
blob: f04450c7dcbb97cdb77162603752021d90538f06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once

#include <ksystemtray.h>

class AudioDevice;
class PulseModel;
class TmixPopup;

class TmixTray : public KSystemTray
{
    TQ_OBJECT

public:
    TmixTray( TQWidget *parent );
    void setDevice( AudioDevice *dev );
    void setModel( PulseModel *model );

public slots:
    void updateIcon();
    void onRecordingActive( bool active );
    void onDeviceAdded( AudioDevice *dev );

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

public:
    void toggleRecordingPopup();

private slots:
    void executeSingleClick();

private:
    void updateRecordingTray();

    PulseModel   *m_model;
    AudioDevice  *m_device;
    KSystemTray  *m_recTray;
    TmixPopup    *m_popup;
    TmixPopup    *m_recPopup;
    int           m_popupMode;
    bool          m_popupShowOutput;
    bool          m_popupShowMic;
    bool          m_popupShowApps;
    int           m_recordingCount;
};